mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-24 09:45:35 +08:00
feat: redirect illegal path to overview (#41)
This commit is contained in:
parent
91e8984989
commit
a114b35c1a
@ -1,4 +1,4 @@
|
|||||||
import { Route, Routes, useNavigate } from '@solidjs/router'
|
import { Navigate, Route, Routes, useNavigate } from '@solidjs/router'
|
||||||
import { Show, lazy, onMount } from 'solid-js'
|
import { Show, lazy, onMount } from 'solid-js'
|
||||||
import { Header } from '~/components/Header'
|
import { Header } from '~/components/Header'
|
||||||
import { curTheme, selectedEndpoint } from '~/signals'
|
import { curTheme, selectedEndpoint } from '~/signals'
|
||||||
@ -30,12 +30,13 @@ export const App = () => {
|
|||||||
<div class="flex-1 overflow-y-auto p-4">
|
<div class="flex-1 overflow-y-auto p-4">
|
||||||
<Routes>
|
<Routes>
|
||||||
<Show when={selectedEndpoint()}>
|
<Show when={selectedEndpoint()}>
|
||||||
|
<Route path="/overview" component={Overview} />
|
||||||
<Route path="/proxies" component={Proxies} />
|
<Route path="/proxies" component={Proxies} />
|
||||||
<Route path="/rules" component={Rules} />
|
<Route path="/rules" component={Rules} />
|
||||||
<Route path="/conns" component={Connections} />
|
<Route path="/conns" component={Connections} />
|
||||||
<Route path="/logs" component={Logs} />
|
<Route path="/logs" component={Logs} />
|
||||||
<Route path="/config" component={Config} />
|
<Route path="/config" component={Config} />
|
||||||
<Route path="*" component={Overview} />
|
<Route path="*" element={<Navigate href="/overview" />} />
|
||||||
</Show>
|
</Show>
|
||||||
|
|
||||||
<Route path="/setup" component={Setup} />
|
<Route path="/setup" component={Setup} />
|
||||||
|
Loading…
Reference in New Issue
Block a user