Fix type errors
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { sluggy } from '#imports';
|
||||
import { useI18nKey } from '~/composables/useI18nKey';
|
||||
import { useTitleStore } from '~/stores/title';
|
||||
|
||||
@@ -42,7 +43,7 @@ titleStore.title = data.value ? tKey(data.value, 'title').value : undefined;
|
||||
<VaButton
|
||||
icon="arrow_back"
|
||||
:to="
|
||||
$localePath(
|
||||
localePath(
|
||||
`/hunt/${data ? tSluggy(data.hunt).value : sluggy(huntSlug!)}`
|
||||
)
|
||||
"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { parseError, sluggy } from '#imports';
|
||||
import { compressImage, createImageURL } from '#shared/utils/image';
|
||||
import ClickableImage from '~/components/ClickableImage.vue';
|
||||
import MultilineString from '~/components/MultilineString.vue';
|
||||
@@ -17,6 +18,7 @@ const { user } = useUserSession();
|
||||
const { huntSlug, questSlug } = app.$slugData;
|
||||
|
||||
const { t, d, locale } = useI18n();
|
||||
const localePath = useLocalePath();
|
||||
const { tKey, hasKey, tSluggy } = useI18nKey();
|
||||
|
||||
const titleStore = useTitleStore();
|
||||
@@ -176,7 +178,7 @@ async function submit() {
|
||||
<VaButton
|
||||
icon="arrow_back"
|
||||
:to="
|
||||
$localePath(
|
||||
localePath(
|
||||
`/hunt/${data ? tSluggy(data.hunt).value : sluggy(huntSlug!)}`
|
||||
)
|
||||
"
|
||||
@@ -196,7 +198,7 @@ async function submit() {
|
||||
v-if="user && user.role === 'ADMIN'"
|
||||
color="danger"
|
||||
:to="
|
||||
$localePath(
|
||||
localePath(
|
||||
`/hunt/${data?.hunt ? tSluggy(data.hunt).value : sluggy(huntSlug!)}/${data ? tSluggy(data).value : sluggy(questSlug!)}}/admin`
|
||||
)
|
||||
"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { sluggy } from '#imports';
|
||||
import { useTitleStore } from '~/stores/title';
|
||||
|
||||
definePageMeta({
|
||||
@@ -7,6 +8,7 @@ definePageMeta({
|
||||
const app = useNuxtApp();
|
||||
const { loggedIn } = useUserSession();
|
||||
const { t } = useI18n();
|
||||
const localePath = useLocalePath();
|
||||
const { tKey } = useI18nKey();
|
||||
|
||||
const { name, id } = app.$slugData.huntSlug!;
|
||||
@@ -100,7 +102,7 @@ titleStore.title = data.value?.name;
|
||||
}}</VaAlert
|
||||
><VaButton
|
||||
icon="arrow_back"
|
||||
:to="$localePath(`/hunt/${sluggy($nuxt.$slugData.huntSlug!)}`)"
|
||||
:to="localePath(`/hunt/${sluggy($nuxt.$slugData.huntSlug!)}`)"
|
||||
>{{ t('page.common.back_to_hunt') }}</VaButton
|
||||
>
|
||||
</div>
|
||||
@@ -113,7 +115,7 @@ titleStore.title = data.value?.name;
|
||||
}}</VaAlert
|
||||
><VaButton
|
||||
icon="arrow_back"
|
||||
:to="$localePath(`/hunt/${sluggy($nuxt.$slugData.huntSlug!)}`)"
|
||||
:to="localePath(`/hunt/${sluggy($nuxt.$slugData.huntSlug!)}`)"
|
||||
>{{ t('page.common.back_to_hunt') }}</VaButton
|
||||
>
|
||||
</div>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { sluggy } from '#imports';
|
||||
import { unique } from '#shared/utils/array';
|
||||
import { useTitleStore } from '~/stores/title';
|
||||
|
||||
@@ -8,6 +9,7 @@ definePageMeta({
|
||||
const app = useNuxtApp();
|
||||
const { loggedIn } = useUserSession();
|
||||
const { t, locale } = useI18n();
|
||||
const localePath = useLocalePath();
|
||||
const { tKey, hasKey } = useI18nKey();
|
||||
|
||||
const { name, id } = app.$slugData.huntSlug!;
|
||||
@@ -161,7 +163,7 @@ titleStore.title = data.value ? tKey(data.value, 'name').value : undefined;
|
||||
}}</VaAlert
|
||||
><VaButton
|
||||
icon="arrow_back"
|
||||
:to="$localePath(`/hunt/${sluggy($nuxt.$slugData.huntSlug!)}`)"
|
||||
:to="localePath(`/hunt/${sluggy($nuxt.$slugData.huntSlug!)}`)"
|
||||
>{{ t('page.common.back_to_hunt') }}</VaButton
|
||||
>
|
||||
</div>
|
||||
@@ -174,7 +176,7 @@ titleStore.title = data.value ? tKey(data.value, 'name').value : undefined;
|
||||
}}</VaAlert
|
||||
><VaButton
|
||||
icon="arrow_back"
|
||||
:to="$localePath(`/hunt/${sluggy($nuxt.$slugData.huntSlug!)}`)"
|
||||
:to="localePath(`/hunt/${sluggy($nuxt.$slugData.huntSlug!)}`)"
|
||||
>{{ t('page.common.back_to_hunt') }}</VaButton
|
||||
>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { sluggy } from '#imports';
|
||||
import type { DataTableColumnSource } from 'vuestic-ui';
|
||||
import NumberCard from '~/components/showcase/NumberCard.vue';
|
||||
import { fullDate } from '~~/server/utils/date';
|
||||
@@ -7,6 +8,7 @@ definePageMeta({
|
||||
layout: 'full'
|
||||
});
|
||||
const { t, d } = useI18n();
|
||||
const localePath = useLocalePath();
|
||||
const { tKey, hasKey, tSluggy } = useI18nKey();
|
||||
|
||||
const app = useNuxtApp();
|
||||
@@ -266,7 +268,7 @@ const columns = leaderboardColumns.map((c) =>
|
||||
}}</VaAlert
|
||||
><VaButton
|
||||
icon="arrow_back"
|
||||
:to="$localePath(`/hunt/${sluggy($nuxt.$slugData.huntSlug!)}`)"
|
||||
:to="localePath(`/hunt/${sluggy($nuxt.$slugData.huntSlug!)}`)"
|
||||
>{{ t('page.common.back_to_hunt') }}</VaButton
|
||||
>
|
||||
</article>
|
||||
|
||||
Reference in New Issue
Block a user