diff --git a/index.html b/index.html index 197c8faa..0ea53cf9 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,10 @@ - + Solid App @@ -10,7 +13,7 @@ -
+
diff --git a/src/App.tsx b/src/App.tsx index 841896cc..5e801cfe 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,7 +1,6 @@ -import { Route, Routes, useLocation, useNavigate } from '@solidjs/router' -import { For, Show, onMount } from 'solid-js' +import { Route, Routes, useNavigate } from '@solidjs/router' +import { Show, onMount } from 'solid-js' import { Header } from '~/components/Header' -import { themes } from '~/constants' import { Config } from '~/pages/Config' import { Connections } from '~/pages/Connections' import { Logs } from '~/pages/Logs' @@ -9,10 +8,9 @@ import { Overview } from '~/pages/Overview' import { Proxies } from '~/pages/Proxies' import { Rules } from '~/pages/Rules' import { Setup } from '~/pages/Setup' -import { curTheme, selectedEndpoint, setCurTheme } from '~/signals' +import { curTheme, selectedEndpoint } from '~/signals' export const App = () => { - const location = useLocation() const navigate = useNavigate() onMount(() => { @@ -23,39 +21,12 @@ export const App = () => { return (
-
- -
- +
- -
- -
+
diff --git a/src/components/Header.tsx b/src/components/Header.tsx index d4d58dbe..8c04f52d 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -1,4 +1,4 @@ -import { A, useNavigate } from '@solidjs/router' +import { A, useLocation, useNavigate } from '@solidjs/router' import { IconFileStack, IconGlobe, @@ -8,62 +8,105 @@ import { IconRuler, IconSettings, } from '@tabler/icons-solidjs' -import { setSelectedEndpoint } from '~/signals' +import { For, Show } from 'solid-js' +import { themes } from '~/constants' +import { setCurTheme, setSelectedEndpoint } from '~/signals' export const Header = () => { + const location = useLocation() const navigate = useNavigate() return ( - + + +
+ + +
+ +
+ +
+
+
+
) } diff --git a/src/pages/Setup.tsx b/src/pages/Setup.tsx index a52167a1..715ff0b3 100644 --- a/src/pages/Setup.tsx +++ b/src/pages/Setup.tsx @@ -40,13 +40,13 @@ export const Setup = () => { setEndpointList(endpointList().filter((e) => e.id !== id)) return ( -
+
-
+
@@ -59,7 +59,7 @@ export const Setup = () => { name="secret" type="password" autocomplete="new-password" - class="input join-item input-bordered" + class="input input-bordered" placeholder="secret" />