fix: fixes for Nuxt v4 update

This commit is contained in:
DecDuck
2025-09-25 09:15:29 +10:00
parent 2db8e753b7
commit 55878bdf5f
12 changed files with 1086 additions and 1407 deletions

View File

@ -92,7 +92,7 @@ import type { Locale } from "vue-i18n";
const { showText = true } = defineProps<{ showText?: boolean }>();
const { availableLocales, locale: currLocale, setLocale } = useI18n();
const { locale: currLocale, setLocale, locales } = useI18n();
function changeLocale(locale: Locale) {
setLocale(locale);
@ -102,7 +102,7 @@ function changeLocale(locale: Locale) {
useHead({
htmlAttrs: {
lang: locale,
// dir: availableLocales.find((l) => l === locale)?.dir || "ltr",
dir: locales.value.find((l) => l.code === locale)?.dir || "ltr",
},
});
}
@ -150,6 +150,6 @@ const wiredLocale = computed({
},
});
const currentLocaleInformation = computed(() =>
availableLocales.find((e) => e == wiredLocale.value),
locales.value.find((e) => e.code == wiredLocale.value),
);
</script>

View File

@ -106,7 +106,7 @@ const emit = defineEmits<{
}>();
const props = defineProps<{
value?: string;
value?: string | undefined;
guesses?: Array<{ platform: PlatformRenderable; filename: string }>;
}>();

View File

@ -5,7 +5,7 @@
</template>
<script setup lang="ts">
import AdminSourcesPage from "~~/pages/admin/library/sources/index.vue";
import AdminSourcesPage from "~/pages/admin/library/sources/index.vue";
const complete = defineModel<boolean>({ required: true });
// Only runs on component load, so it's fine

View File

@ -1,10 +1,10 @@
<template>
<div v-if="!noWrapper" class="flex flex-col w-full min-h-screen bg-zinc-900">
<UserHeader class="z-50" hydrate-on-idle />
<LazyUserHeader class="z-50" hydrate-on-idle />
<div class="grow flex">
<NuxtPage />
</div>
<UserFooter class="z-50" hydrate-on-interaction />
<LazyUserFooter class="z-50" hydrate-on-interaction />
</div>
<div v-else class="flex w-full min-h-screen bg-zinc-900">
<NuxtPage />

View File

@ -252,7 +252,8 @@
>Uninstall command</label
>
<p class="text-zinc-400 text-xs">
Executable to be run on uninstalling a game. Useful for installer-only games.
Executable to be run on uninstalling a game. Useful for installer-only
games.
</p>
<div class="mt-2">
<div
@ -301,7 +302,8 @@
</SwitchDescription>
</span>
<Switch
v-model="versionSettings.delta"
:model-value="versionSettings.delta || false"
@update:model-value="(v) => (versionSettings.delta = v)"
:class="[
versionSettings.delta ? 'bg-blue-600' : 'bg-zinc-800',
'relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-blue-600 focus:ring-offset-2',
@ -489,7 +491,6 @@ const versionGuesses =
Array<SerializeObject<{ platform: PlatformRenderable; filename: string }>>
>();
function updateLaunchCommand(idx: number, value: string) {
versionSettings.value.launches![idx].launchCommand = value;
autosetPlatform(value);

View File

@ -44,7 +44,6 @@
<script setup lang="ts">
import type { AuthMec } from "~~/prisma/client/enums";
import DropLogo from "~~/components/DropLogo.vue";
const { t } = useI18n();
const enabledAuths = await $dropFetch("/api/v1/auth");