import { useI18n } from '@solid-primitives/i18n' import { A, useLocation, useNavigate } from '@solidjs/router' import { IconArrowsExchange, IconFileStack, IconGlobe, IconHome, IconLanguage, 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, { locale }] = useI18n() const navs = () => [ { href: '/overview', name: t('overview'), icon: , }, { href: '/proxies', name: t('proxies'), icon: , }, { href: '/rules', name: t('rules'), icon: , }, { href: '/conns', name: t('connections'), icon: , }, { href: '/logs', name: t('logs'), icon: , }, { href: '/config', name: t('config'), icon: , }, ] const location = useLocation() const navigate = useNavigate() const [openedDrawer, setOpenedDrawer] = createSignal(false) const onSwitchEndpointClick = () => { setSelectedEndpoint('') navigate('/setup') } return ( ) }