refactor: home route is now /dashboard

This commit is contained in:
2026-03-25 16:07:48 +01:00
parent 5ca59b205e
commit 1d893719ef
3 changed files with 8 additions and 4 deletions

View File

@@ -5,7 +5,7 @@ import type { AuthFormField, FormSubmitEvent } from "@nuxt/ui";
definePageMeta({ definePageMeta({
middleware: () => { middleware: () => {
const { loggedIn } = useUserSession(); const { loggedIn } = useUserSession();
if (loggedIn.value) return navigateTo("/"); if (loggedIn.value) return navigateTo("/dashboard");
}, },
}); });
@@ -31,7 +31,7 @@ const onSubmit = async (event: FormSubmitEvent<Schema>) => {
try { try {
await $fetch("/api/auth/sign-in", { method: "POST", body: event.data }); await $fetch("/api/auth/sign-in", { method: "POST", body: event.data });
await fetchSession(); await fetchSession();
await navigateTo("/"); await navigateTo("/dashboard");
} catch (e) { } catch (e) {
error.value = getApiError(e); error.value = getApiError(e);
} finally { } finally {

View File

@@ -58,14 +58,14 @@ const deleteLink = async (link: Link) => {
label: 'All', label: 'All',
icon: 'i-lucide-link', icon: 'i-lucide-link',
badge: links?.length ?? 0, badge: links?.length ?? 0,
to: '/', to: '/dashboard',
active: category === 'all', active: category === 'all',
}, },
{ {
label: 'Disabled', label: 'Disabled',
icon: 'i-lucide-link-2-off', icon: 'i-lucide-link-2-off',
badge: links?.filter((l) => l.disabled).length ?? 0, badge: links?.filter((l) => l.disabled).length ?? 0,
to: '/?filter=disabled', to: '/dashboard?filter=disabled',
active: category === 'disabled', active: category === 'disabled',
}, },
]" ]"

View File

@@ -10,6 +10,10 @@ export default defineNuxtConfig({
} }
}, },
routeRules: {
'/': { redirect: '/dashboard' },
},
devtools: { devtools: {
enabled: true enabled: true
}, },