From fa060e784a82b381621effefb6c85e2baed62aff Mon Sep 17 00:00:00 2001 From: Pascal Jufer Date: Sun, 30 Jul 2023 18:48:52 +0200 Subject: [PATCH] Remove directus info --- web/components/admin/Settings.js | 37 ++------------------------------ web/pages/admin.js | 5 ----- 2 files changed, 2 insertions(+), 40 deletions(-) diff --git a/web/components/admin/Settings.js b/web/components/admin/Settings.js index 0e6d900..9eb9d7e 100644 --- a/web/components/admin/Settings.js +++ b/web/components/admin/Settings.js @@ -22,14 +22,9 @@ const domain = env('DOMAIN') || (typeof window !== 'undefined' && window.location.host); const chatwootUrl = env('CHATWOOT_URL'); -export default function Settings({ - jobs, - settings, - refreshSettings, - directusInfo, -}) { +export default function Settings({ jobs, settings, refreshSettings }) { const theme = useTheme(); - const { formatMessage, formatRelativeTime } = useIntl(); + const { formatMessage } = useIntl(); const chatwootIsSetup = settings.chatwoot_website_token && settings.chatwoot_hmac_token; @@ -179,34 +174,6 @@ export default function Settings({ {directusUrl} - - - {formatMessage({ id: 'version' })} - - {directusInfo.directus.version} - - - - {formatMessage({ id: 'launched' })} - - - {formatRelativeTime( - Math.floor(directusInfo.node.uptime / 3600) > 24 - ? -Math.floor(directusInfo.node.uptime / (3600 * 24)) - : -Math.floor(directusInfo.node.uptime / 3600), - Math.floor(directusInfo.node.uptime / 3600) > 24 - ? 'days' - : 'hours', - { numeric: 'auto' }, - )} - - diff --git a/web/pages/admin.js b/web/pages/admin.js index 09d8168..5422e61 100644 --- a/web/pages/admin.js +++ b/web/pages/admin.js @@ -57,7 +57,6 @@ export default function Admin() { const [docs, setDocs] = useState({}); const [dates, setDates] = useState([]); const [settings, setSettings] = useState({}); - const [directusInfo, setDirectusInfo] = useState({}); const user = AuthStore.useState((s) => s.user); async function getJobs() { @@ -95,9 +94,6 @@ export default function Admin() { setDates(dates.data); await getSettings(); - - setDirectusInfo(await directus.server.info()); - setLoading({ state: false }); } catch (error) { setLoading({ state: true, error: error }); @@ -231,7 +227,6 @@ export default function Admin() {