diff --git a/interface/src/AuthenticatedRouting.tsx b/interface/src/AuthenticatedRouting.tsx
index 7fd3701b1..9777ed50a 100644
--- a/interface/src/AuthenticatedRouting.tsx
+++ b/interface/src/AuthenticatedRouting.tsx
@@ -15,7 +15,6 @@ import DownloadUpload from 'app/settings/DownloadUpload';
import MqttSettings from 'app/settings/MqttSettings';
import NTPSettings from 'app/settings/NTPSettings';
import Settings from 'app/settings/Settings';
-import Version from 'app/settings/Version';
import Network from 'app/settings/network/Network';
import Security from 'app/settings/security/Security';
import APStatus from 'app/status/APStatus';
@@ -26,6 +25,7 @@ import NTPStatus from 'app/status/NTPStatus';
import NetworkStatus from 'app/status/NetworkStatus';
import Status from 'app/status/Status';
import SystemLog from 'app/status/SystemLog';
+import Version from 'app/status/Version';
import { Layout } from 'components';
import { AuthenticatedContext } from 'contexts/authentication';
@@ -48,11 +48,11 @@ const AuthenticatedRouting = () => {
} />
} />
} />
+ } />
{me.admin && (
<>
} />
- } />
} />
} />
} />
diff --git a/interface/src/app/settings/Settings.tsx b/interface/src/app/settings/Settings.tsx
index 96d25853b..34abc2554 100644
--- a/interface/src/app/settings/Settings.tsx
+++ b/interface/src/app/settings/Settings.tsx
@@ -1,7 +1,6 @@
import { useState } from 'react';
import AccessTimeIcon from '@mui/icons-material/AccessTime';
-import BuildIcon from '@mui/icons-material/Build';
import CancelIcon from '@mui/icons-material/Cancel';
import DeviceHubIcon from '@mui/icons-material/DeviceHub';
import ImportExportIcon from '@mui/icons-material/ImportExport';
@@ -21,7 +20,7 @@ import {
List
} from '@mui/material';
-import { API, callAction } from 'api/app';
+import { API } from 'api/app';
import { dialogStyle } from 'CustomTheme';
import { useRequest } from 'alova/client';
@@ -40,11 +39,6 @@ const Settings = () => {
immediate: false
});
- // call checkUpgrade with no param to fetch EMS-ESP version
- const { data } = useRequest(() => callAction({ action: 'checkUpgrade' }), {
- initialData: { emsesp_version: '...' }
- });
-
const doFormat = async () => {
await sendAPI({ device: 'system', cmd: 'format', id: 0 }).then(() => {
setConfirmFactoryReset(false);
@@ -83,14 +77,6 @@ const Settings = () => {
const content = () => (
<>
-
-
{
return (
<>
+
+
diff --git a/interface/src/app/settings/Version.tsx b/interface/src/app/status/Version.tsx
similarity index 96%
rename from interface/src/app/settings/Version.tsx
rename to interface/src/app/status/Version.tsx
index 7fbfbf2d0..0f75bdd58 100644
--- a/interface/src/app/settings/Version.tsx
+++ b/interface/src/app/status/Version.tsx
@@ -1,4 +1,4 @@
-import { useEffect, useState } from 'react';
+import { useContext, useEffect, useState } from 'react';
import { toast } from 'react-toastify';
import CancelIcon from '@mui/icons-material/Cancel';
@@ -34,10 +34,13 @@ import {
SingleUpload,
useLayoutTitle
} from 'components';
+import { AuthenticatedContext } from 'contexts/authentication';
import { useI18nContext } from 'i18n/i18n-react';
const Version = () => {
const { LL, locale } = useI18nContext();
+ const { me } = useContext(AuthenticatedContext);
+
const [restarting, setRestarting] = useState(false);
const [openInstallDialog, setOpenInstallDialog] = useState(false);
const [usingDevVersion, setUsingDevVersion] = useState(false);
@@ -230,6 +233,10 @@ const Version = () => {
};
const showButtons = (showDev?: boolean) => {
+ if (!me.admin) {
+ return;
+ }
+
if (downloadOnly) {
return (