mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-10 05:15:35 +08:00
chore: setup route
This commit is contained in:
parent
e357958d70
commit
880a40f18e
@ -32,7 +32,7 @@ export const App = () => {
|
||||
|
||||
onMount(() => {
|
||||
if (!selectedEndpoint()) {
|
||||
navigate('/setup')
|
||||
navigate(ROUTES.Setup)
|
||||
}
|
||||
})
|
||||
|
||||
@ -56,7 +56,10 @@ export const App = () => {
|
||||
<Route path="*" element={<Navigate href={ROUTES.Overview} />} />
|
||||
</Show>
|
||||
|
||||
<Route path="/setup" component={Setup} />
|
||||
<Route
|
||||
path={selectedEndpoint() ? ROUTES.Setup : '*'}
|
||||
component={Setup}
|
||||
/>
|
||||
</Routes>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -119,7 +119,7 @@ export const Header = () => {
|
||||
|
||||
const onSwitchEndpointClick = () => {
|
||||
setSelectedEndpoint('')
|
||||
navigate('/setup')
|
||||
navigate(ROUTES.Setup)
|
||||
}
|
||||
|
||||
return (
|
||||
@ -167,7 +167,7 @@ export const Header = () => {
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<Show when={location.pathname !== '/setup'}>
|
||||
<Show when={location.pathname !== ROUTES.Setup}>
|
||||
<div class="navbar-center hidden lg:flex">
|
||||
<ul class="menu menu-horizontal gap-2">
|
||||
<For each={navs()}>
|
||||
|
@ -41,6 +41,7 @@ export enum ROUTES {
|
||||
Conns = '/conns',
|
||||
Log = '/logs',
|
||||
Config = '/config',
|
||||
Setup = '/setup',
|
||||
}
|
||||
|
||||
export const CHART_MAX_XAXIS = 10
|
||||
|
Loading…
Reference in New Issue
Block a user