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