diff --git a/interface/src/App.tsx b/interface/src/App.tsx index c085204b8..2556fd06c 100644 --- a/interface/src/App.tsx +++ b/interface/src/App.tsx @@ -42,9 +42,7 @@ const App: FC = () => { )} > - {/* */} - {/* */} diff --git a/interface/src/AuthenticatedRouting.tsx b/interface/src/AuthenticatedRouting.tsx index 073b7363c..5df1ddcd1 100644 --- a/interface/src/AuthenticatedRouting.tsx +++ b/interface/src/AuthenticatedRouting.tsx @@ -3,11 +3,12 @@ import { Navigate, Routes, Route, useNavigate, useLocation } from 'react-router- import { AxiosError } from 'axios'; import * as AuthenticationApi from 'api/authentication'; -import { PROJECT_PATH } from 'api/env'; import { AXIOS } from 'api/endpoints'; import { Layout, RequireAdmin } from 'components'; -import ProjectRouting from 'project/ProjectRouting'; +import Dashboard from './project/Dashboard'; +import Settings from './project/Settings'; +import Help from './project/Help'; import NetworkConnection from 'framework/network/NetworkConnection'; import AccessPoint from 'framework/ap/AccessPoint'; @@ -39,7 +40,17 @@ const AuthenticatedRouting: FC = () => { return ( - } /> + } /> + + + + } + /> + } /> + } /> } /> } /> diff --git a/interface/src/api/authentication.ts b/interface/src/api/authentication.ts index 5ec1ebb26..32d0c4f90 100644 --- a/interface/src/api/authentication.ts +++ b/interface/src/api/authentication.ts @@ -6,13 +6,10 @@ import { Path } from 'react-router-dom'; import { Me, SignInRequest, SignInResponse } from 'types'; import { ACCESS_TOKEN, AXIOS } from './endpoints'; -import { PROJECT_PATH } from './env'; export const SIGN_IN_PATHNAME = 'loginPathname'; export const SIGN_IN_SEARCH = 'loginSearch'; -export const getDefaultRoute = `/${PROJECT_PATH}`; - export function verifyAuthorization(): AxiosPromise { return AXIOS.get('/verifyAuthorization'); } @@ -21,9 +18,6 @@ export function signIn(request: SignInRequest): AxiosPromise { return AXIOS.post('/signIn', request); } -/** - * Fallback to sessionStorage if localStorage is absent. WebView may not have local storage enabled. - */ export function getStorage() { return localStorage || sessionStorage; } @@ -45,7 +39,7 @@ export function fetchLoginRedirect(): Partial { const signInSearch = getStorage().getItem(SIGN_IN_SEARCH); clearLoginRedirect(); return { - pathname: signInPathname || `/${PROJECT_PATH}`, + pathname: signInPathname || `/dashboard`, search: (signInPathname && signInSearch) || undefined }; } diff --git a/interface/src/api/env.ts b/interface/src/api/env.ts index 34eda75c1..556b0a0c5 100644 --- a/interface/src/api/env.ts +++ b/interface/src/api/env.ts @@ -1,2 +1 @@ export const PROJECT_NAME = 'EMS-ESP'; -export const PROJECT_PATH = 'project'; diff --git a/interface/src/components/layout/LayoutMenu.tsx b/interface/src/components/layout/LayoutMenu.tsx index 1c7a26af6..0f0004591 100644 --- a/interface/src/components/layout/LayoutMenu.tsx +++ b/interface/src/components/layout/LayoutMenu.tsx @@ -9,9 +9,12 @@ import SettingsIcon from '@mui/icons-material/Settings'; import LockIcon from '@mui/icons-material/Lock'; import SettingsEthernetIcon from '@mui/icons-material/SettingsEthernet'; -import ProjectMenu from 'project/ProjectMenu'; +import TuneIcon from '@mui/icons-material/Tune'; +import DashboardIcon from '@mui/icons-material/Dashboard'; +import InfoIcon from '@mui/icons-material/Info'; + +import LayoutMenuItem from 'components/layout/LayoutMenuItem'; -import LayoutMenuItem from './LayoutMenuItem'; import { AuthenticatedContext } from 'contexts/authentication'; import { useI18nContext } from 'i18n/i18n-react'; @@ -23,7 +26,14 @@ const LayoutMenu: FC = () => { return ( <> - + + + diff --git a/interface/src/project/ProjectMenu.tsx b/interface/src/project/ProjectMenu.tsx deleted file mode 100644 index 375874d56..000000000 --- a/interface/src/project/ProjectMenu.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { FC, useContext } from 'react'; - -import { List } from '@mui/material'; - -import { AuthenticatedContext } from 'contexts/authentication'; - -import { PROJECT_PATH } from 'api/env'; - -import { useI18nContext } from 'i18n/i18n-react'; - -import TuneIcon from '@mui/icons-material/Tune'; -import DashboardIcon from '@mui/icons-material/Dashboard'; -import LayoutMenuItem from 'components/layout/LayoutMenuItem'; -import InfoIcon from '@mui/icons-material/Info'; - -const ProjectMenu: FC = () => { - const authenticatedContext = useContext(AuthenticatedContext); - const { LL } = useI18nContext(); - - return ( - - - - - - ); -}; - -export default ProjectMenu; diff --git a/interface/src/project/ProjectRouting.tsx b/interface/src/project/ProjectRouting.tsx deleted file mode 100644 index 9e43e644f..000000000 --- a/interface/src/project/ProjectRouting.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { FC } from 'react'; -import { Navigate, Routes, Route } from 'react-router-dom'; - -import { RequireAdmin } from 'components'; - -import Dashboard from './Dashboard'; -import Settings from './Settings'; -import Help from './Help'; - -const ProjectRouting: FC = () => { - return ( - - } /> - - - - } - /> - } /> - } /> - - ); -}; - -export default ProjectRouting; diff --git a/src/version.h b/src/version.h index 0c98cd5fc..bbb843955 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define EMSESP_APP_VERSION "3.6.0-dev.0" +#define EMSESP_APP_VERSION "3.6.0-dev.1"