import { useI18n } from '@solid-primitives/i18n' import { A, useLocation, useNavigate } from '@solidjs/router' import { IconArrowsExchange, IconFileStack, IconGlobe, IconHome, IconMenu, IconNetwork, IconPalette, IconRuler, IconSettings, } from '@tabler/icons-solidjs' import { For, ParentComponent, Show, createSignal } from 'solid-js' import { twMerge } from 'tailwind-merge' import { themes } from '~/constants' import { setCurTheme, setSelectedEndpoint } from '~/signals' const Nav: ParentComponent<{ href: string; tooltip: string }> = ({ href, tooltip, children, }) => (
  • {children}
  • ) const ThemeSwitcher = () => (
    ) export const Header = () => { const [t] = useI18n() const navs = () => [ { href: '/overview', name: t('navs.overview'), icon: , }, { href: '/proxies', name: t('navs.proxies'), icon: , }, { href: '/rules', name: t('navs.rules'), icon: , }, { href: '/conns', name: t('navs.connections'), icon: , }, { href: '/logs', name: t('navs.logs'), icon: , }, { href: '/config', name: t('navs.config'), icon: , }, ] const location = useLocation() const navigate = useNavigate() const [openedDrawer, setOpenedDrawer] = createSignal(false) const onSwitchEndpointClick = () => { setSelectedEndpoint('') navigate('/setup') } return ( ) }