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
+11 -9
View File
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { parseError } from '#imports';
import TeamAddModal from '~/components/TeamAddModal.vue';
import { useSettingsStore } from '~/stores/settings';
import { useTitleStore } from '~/stores/title';
@@ -7,6 +8,7 @@ import { fullDate } from '~~/server/utils/date';
const app = useNuxtApp();
const { loggedIn } = useUserSession();
const { t, d } = useI18n();
const localePath = useLocalePath();
const { tKey, hasKey, tSluggy } = useI18nKey();
const { init } = useToast();
@@ -95,34 +97,34 @@ ${document.location.href}`
v-if="(data?.revealAnswers && data?.revealQuests) || data?.isMember"
color="success"
icon="leaderboard"
:to="$localePath(`/hunt/${tSluggy(data).value}/showcase`)"
:to="localePath(`/hunt/${tSluggy(data).value}/showcase`)"
>{{ t('page.hunt.showcase') }}</VaButton
>
<VaButton
v-if="(data?.revealAnswers && data?.revealQuests) || data?.isMember"
color="success"
icon="collections"
:to="$localePath(`/hunt/${tSluggy(data).value}/diashow`)"
:to="localePath(`/hunt/${tSluggy(data).value}/diashow`)"
>{{ t('page.hunt.diashow') }}</VaButton
>
<VaButton
v-if="(data?.revealAnswers && data?.revealQuests) || data?.isMember"
color="success"
icon="auto_awesome_mosaic"
:to="$localePath(`/hunt/${tSluggy(data).value}/pictures`)"
:to="localePath(`/hunt/${tSluggy(data).value}/pictures`)"
>{{ t('page.hunt.all_pictures') }}</VaButton
>
<VaButton
v-if="data?.isMember"
color="danger"
icon="edit"
:to="$localePath(`/hunt/${tSluggy(data).value}/admin`)"
:to="localePath(`/hunt/${tSluggy(data).value}/admin`)"
>{{ t('page.common.admin') }}</VaButton
><VaButton
v-if="data?.isMember"
color="danger"
icon="groups"
:to="$localePath(`/hunt/${tSluggy(data).value}/teams`)"
:to="localePath(`/hunt/${tSluggy(data).value}/teams`)"
>{{ t('page.hunt.teams') }}</VaButton
>
</div>
@@ -199,7 +201,7 @@ ${document.location.href}`
<VaButton
color="info"
icon="login"
:to="$localePath(`/login?to=/hunt/${tSluggy(data).value}`)"
:to="localePath(`/login?to=/hunt/${tSluggy(data).value}`)"
>{{ t('page.common.login_first') }}</VaButton
>
</VaCardActions>
@@ -267,7 +269,7 @@ ${document.location.href}`
<VaCardActions>
<VaButton
:to="
$localePath(
localePath(
`/hunt/${tSluggy(data).value}/${tSluggy(quest).value}`
)
"
@@ -291,7 +293,7 @@ ${document.location.href}`
"
:icon="(quest.unreviewed || 0) > 0 ? 'priority_high' : undefined"
:to="
$localePath(
localePath(
`/hunt/${tSluggy(data).value}/${tSluggy(quest).value}/admin`
)
"
@@ -312,7 +314,7 @@ ${document.location.href}`
<div v-if="error">
<h1 class="mt-8 text-3xl">{{ t(parseError(error)) }}</h1>
<VaButton icon="arrow_back" :to="$localePath(`/`)">{{
<VaButton icon="arrow_back" :to="localePath(`/`)">{{
t('page.common.back_home')
}}</VaButton>
</div>