feat: migrate to tailwind v4 and fix user token API

This commit is contained in:
DecDuck
2025-02-14 20:01:18 +11:00
parent d8d5b938f0
commit a64a2479ba
19 changed files with 348 additions and 57 deletions

View File

@@ -39,15 +39,16 @@
</NuxtLink>
<div class="h-0.5 rounded-full w-full bg-zinc-800" />
<div class="flex flex-col">
<MenuItem v-for="(nav, navIdx) in navigation" v-slot="{ active }">
<NuxtLink
<MenuItem v-for="(nav, navIdx) in navigation" v-slot="{ active, close }">
<button
:href="nav.route"
@click="() => navigateTo(nav.route, close)"
:class="[
active ? 'bg-zinc-800 text-zinc-100' : 'text-zinc-400',
'transition block px-4 py-2 text-sm',
'text-left transition block px-4 py-2 text-sm',
]"
>
{{ nav.label }}</NuxtLink
{{ nav.label }}</button
>
</MenuItem>
</div>
@@ -84,4 +85,11 @@ const navigation: NavigationItem[] = [
prefix: "",
},
].filter((e) => e !== undefined);
const router = useRouter();
function navigateLink(href: string, closeFn: () => any) {
closeFn();
router.push(href);
}
</script>