Fix type errors

This commit is contained in:
2025-10-16 20:44:52 +02:00
parent c80fc61539
commit baca5415c3
12 changed files with 56 additions and 43 deletions
+19 -19
View File
@@ -1,8 +1,10 @@
<script setup lang="ts">
import { sluggy } from '#imports';
import { useTitleStore } from '~/stores/title';
const { loggedIn, clear, user } = useUserSession();
const { t } = useI18n();
const localePath = useLocalePath();
const route = useRoute();
const breakpoints = useBreakpoint();
const titleStore = useTitleStore();
@@ -41,8 +43,8 @@ const slugs = computed(() => checkSlug(route.params));
<template #left>
<VaSidebar v-model="isSidebarVisible">
<VaSidebarItem
:to="$localePath('/')"
:active="$localePath('/') === route.path"
:to="localePath('/')"
:active="localePath('/') === route.path"
>
<VaSidebarItemContent>
<VaIcon name="home" />
@@ -50,8 +52,8 @@ const slugs = computed(() => checkSlug(route.params));
</VaSidebarItemContent>
</VaSidebarItem>
<VaSidebarItem
:to="$localePath('/impressum')"
:active="$localePath('/impressum') === route.path"
:to="localePath('/impressum')"
:active="localePath('/impressum') === route.path"
>
<VaSidebarItemContent>
<VaIcon name="balance" />
@@ -62,10 +64,8 @@ const slugs = computed(() => checkSlug(route.params));
</VaSidebarItem>
<VaSidebarItem
v-if="slugs?.huntSlug"
:to="$localePath(`/hunt/${sluggy(slugs.huntSlug)}`)"
:active="
$localePath(`/hunt/${sluggy(slugs.huntSlug)}`) === route.path
"
:to="localePath(`/hunt/${sluggy(slugs.huntSlug)}`)"
:active="localePath(`/hunt/${sluggy(slugs.huntSlug)}`) === route.path"
>
<VaSidebarItemContent>
<VaIcon name="camera_indoor" />
@@ -79,9 +79,9 @@ const slugs = computed(() => checkSlug(route.params));
text-color="danger"
hover-color="danger"
active-color="onDanger"
:to="$localePath(`/hunt/${sluggy(slugs.huntSlug)}/admin`)"
:to="localePath(`/hunt/${sluggy(slugs.huntSlug)}/admin`)"
:active="
$localePath(`/hunt/${sluggy(slugs.huntSlug)}/admin`) === route.path
localePath(`/hunt/${sluggy(slugs.huntSlug)}/admin`) === route.path
"
>
<VaSidebarItemContent>
@@ -94,9 +94,9 @@ const slugs = computed(() => checkSlug(route.params));
text-color="danger"
hover-color="danger"
active-color="onDanger"
:to="$localePath(`/hunt/${sluggy(slugs.huntSlug)}/teams`)"
:to="localePath(`/hunt/${sluggy(slugs.huntSlug)}/teams`)"
:active="
$localePath(`/hunt/${sluggy(slugs.huntSlug)}/teams`) === route.path
localePath(`/hunt/${sluggy(slugs.huntSlug)}/teams`) === route.path
"
>
<VaSidebarItemContent>
@@ -107,12 +107,12 @@ const slugs = computed(() => checkSlug(route.params));
<VaSidebarItem
v-if="slugs?.huntSlug && slugs?.questSlug"
:to="
$localePath(
localePath(
`/hunt/${sluggy(slugs.huntSlug)}/${sluggy(slugs.questSlug)}`
)
"
:active="
$localePath(
localePath(
`/hunt/${sluggy(slugs.huntSlug)}/${sluggy(slugs.questSlug)}`
) === route.path
"
@@ -130,12 +130,12 @@ const slugs = computed(() => checkSlug(route.params));
hover-color="danger"
active-color="onDanger"
:to="
$localePath(
localePath(
`/hunt/${sluggy(slugs.huntSlug)}/${sluggy(slugs.questSlug)}/admin`
)
"
:active="
$localePath(
localePath(
`/hunt/${sluggy(slugs.huntSlug)}/${sluggy(slugs.questSlug)}/admin`
) === route.path
"
@@ -148,8 +148,8 @@ const slugs = computed(() => checkSlug(route.params));
<VaSpacer />
<VaSidebarItem
v-if="user"
:to="$localePath('/profile')"
:active="$localePath('/profile') === route.path"
:to="localePath('/profile')"
:active="localePath('/profile') === route.path"
:hover-color="user.role === 'ADMIN' ? 'danger' : undefined"
:text-color="user.role === 'ADMIN' ? 'danger' : undefined"
>
@@ -174,7 +174,7 @@ const slugs = computed(() => checkSlug(route.params));
</VaSidebarItemTitle>
</VaSidebarItemContent>
</VaSidebarItem>
<VaSidebarItem v-else :to="$localePath(`/login?to=${route.path}`)">
<VaSidebarItem v-else :to="localePath(`/login?to=${route.path}`)">
<VaSidebarItemContent>
<VaIcon name="login" />
<VaSidebarItemTitle>