From 1aabbae3a5176cb9ca979311f1e3bec99cb5afba Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Wed, 21 Feb 2024 00:47:03 -0500 Subject: [PATCH] Add build and web versions to dashboard --- .eslintrc.js | 6 ++- .../components/drawers/DrawerHeaderLink.tsx | 4 +- src/controllers/dashboard/dashboard.html | 14 ++++-- src/controllers/dashboard/dashboard.js | 45 +++++++++++-------- src/controllers/dashboard/dashboard.scss | 17 +++++++ src/global.d.ts | 4 ++ src/hooks/useSystemInfo.ts | 31 +++++++++---- src/index.jsx | 2 +- src/scripts/settings/webSettings.js | 2 +- src/strings/en-us.json | 5 ++- webpack.common.js | 4 ++ 11 files changed, 95 insertions(+), 39 deletions(-) create mode 100644 src/controllers/dashboard/dashboard.scss diff --git a/.eslintrc.js b/.eslintrc.js index a43399e96c..2b65ee767b 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -261,7 +261,11 @@ module.exports = { 'ServerNotifications': 'writable', 'TaskButton': 'writable', 'UserParentalControlPage': 'writable', - 'Windows': 'readonly' + 'Windows': 'readonly', + // Build time definitions + __JF_BUILD_VERSION__: 'readonly', + __USE_SYSTEM_FONTS__: 'readonly', + __WEBPACK_SERVE__: 'readonly' }, rules: { '@typescript-eslint/prefer-string-starts-ends-with': ['error'] diff --git a/src/apps/experimental/components/drawers/DrawerHeaderLink.tsx b/src/apps/experimental/components/drawers/DrawerHeaderLink.tsx index 4515779763..a60dd2a6c7 100644 --- a/src/apps/experimental/components/drawers/DrawerHeaderLink.tsx +++ b/src/apps/experimental/components/drawers/DrawerHeaderLink.tsx @@ -3,15 +3,13 @@ import ListItemIcon from '@mui/material/ListItemIcon'; import ListItemText from '@mui/material/ListItemText'; import React from 'react'; -import { useApi } from 'hooks/useApi'; import { useSystemInfo } from 'hooks/useSystemInfo'; import ListItemLink from 'components/ListItemLink'; import appIcon from 'assets/img/icon-transparent.png'; const DrawerHeaderLink = () => { - const { api } = useApi(); - const { data: systemInfo } = useSystemInfo(api); + const { data: systemInfo } = useSystemInfo(); return ( diff --git a/src/controllers/dashboard/dashboard.html b/src/controllers/dashboard/dashboard.html index aed6bb206f..4dd260877c 100644 --- a/src/controllers/dashboard/dashboard.html +++ b/src/controllers/dashboard/dashboard.html @@ -8,16 +8,22 @@ -
-

-

+
+
${LabelServerName}
+
+
${LabelServerVersion}
+
+
${LabelWebVersion}
+
+
${LabelBuildVersion}
+
-