mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-13 08:12:40 +10:00
fix: fixes for Nuxt v4 update
This commit is contained in:
@ -92,7 +92,7 @@ import type { Locale } from "vue-i18n";
|
|||||||
|
|
||||||
const { showText = true } = defineProps<{ showText?: boolean }>();
|
const { showText = true } = defineProps<{ showText?: boolean }>();
|
||||||
|
|
||||||
const { availableLocales, locale: currLocale, setLocale } = useI18n();
|
const { locale: currLocale, setLocale, locales } = useI18n();
|
||||||
|
|
||||||
function changeLocale(locale: Locale) {
|
function changeLocale(locale: Locale) {
|
||||||
setLocale(locale);
|
setLocale(locale);
|
||||||
@ -102,7 +102,7 @@ function changeLocale(locale: Locale) {
|
|||||||
useHead({
|
useHead({
|
||||||
htmlAttrs: {
|
htmlAttrs: {
|
||||||
lang: locale,
|
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(() =>
|
const currentLocaleInformation = computed(() =>
|
||||||
availableLocales.find((e) => e == wiredLocale.value),
|
locales.value.find((e) => e.code == wiredLocale.value),
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -106,7 +106,7 @@ const emit = defineEmits<{
|
|||||||
}>();
|
}>();
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
value?: string;
|
value?: string | undefined;
|
||||||
guesses?: Array<{ platform: PlatformRenderable; filename: string }>;
|
guesses?: Array<{ platform: PlatformRenderable; filename: string }>;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<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 });
|
const complete = defineModel<boolean>({ required: true });
|
||||||
// Only runs on component load, so it's fine
|
// Only runs on component load, so it's fine
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="!noWrapper" class="flex flex-col w-full min-h-screen bg-zinc-900">
|
<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">
|
<div class="grow flex">
|
||||||
<NuxtPage />
|
<NuxtPage />
|
||||||
</div>
|
</div>
|
||||||
<UserFooter class="z-50" hydrate-on-interaction />
|
<LazyUserFooter class="z-50" hydrate-on-interaction />
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="flex w-full min-h-screen bg-zinc-900">
|
<div v-else class="flex w-full min-h-screen bg-zinc-900">
|
||||||
<NuxtPage />
|
<NuxtPage />
|
||||||
|
|||||||
@ -252,7 +252,8 @@
|
|||||||
>Uninstall command</label
|
>Uninstall command</label
|
||||||
>
|
>
|
||||||
<p class="text-zinc-400 text-xs">
|
<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>
|
</p>
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<div
|
<div
|
||||||
@ -301,7 +302,8 @@
|
|||||||
</SwitchDescription>
|
</SwitchDescription>
|
||||||
</span>
|
</span>
|
||||||
<Switch
|
<Switch
|
||||||
v-model="versionSettings.delta"
|
:model-value="versionSettings.delta || false"
|
||||||
|
@update:model-value="(v) => (versionSettings.delta = v)"
|
||||||
:class="[
|
:class="[
|
||||||
versionSettings.delta ? 'bg-blue-600' : 'bg-zinc-800',
|
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',
|
'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 }>>
|
Array<SerializeObject<{ platform: PlatformRenderable; filename: string }>>
|
||||||
>();
|
>();
|
||||||
|
|
||||||
|
|
||||||
function updateLaunchCommand(idx: number, value: string) {
|
function updateLaunchCommand(idx: number, value: string) {
|
||||||
versionSettings.value.launches![idx].launchCommand = value;
|
versionSettings.value.launches![idx].launchCommand = value;
|
||||||
autosetPlatform(value);
|
autosetPlatform(value);
|
||||||
|
|||||||
@ -44,7 +44,6 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { AuthMec } from "~~/prisma/client/enums";
|
import type { AuthMec } from "~~/prisma/client/enums";
|
||||||
import DropLogo from "~~/components/DropLogo.vue";
|
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const enabledAuths = await $dropFetch("/api/v1/auth");
|
const enabledAuths = await $dropFetch("/api/v1/auth");
|
||||||
|
|||||||
@ -19,6 +19,7 @@ export default withNuxt([
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
"@intlify/vue-i18n/no-missing-keys": "error",
|
"@intlify/vue-i18n/no-missing-keys": "error",
|
||||||
|
"vue/multi-word-component-names": "ignore",
|
||||||
},
|
},
|
||||||
settings: {
|
settings: {
|
||||||
"vue-i18n": {
|
"vue-i18n": {
|
||||||
|
|||||||
@ -18,6 +18,7 @@ const twemojiJson = module.findPackageJSON(
|
|||||||
if (!twemojiJson) {
|
if (!twemojiJson) {
|
||||||
throw new Error("Could not find @discordapp/twemoji package.");
|
throw new Error("Could not find @discordapp/twemoji package.");
|
||||||
}
|
}
|
||||||
|
const svgSrcDir = path.join(path.dirname(twemojiJson), "dist", "svg");
|
||||||
|
|
||||||
// get drop version
|
// get drop version
|
||||||
const dropVersion = getDropVersion();
|
const dropVersion = getDropVersion();
|
||||||
@ -74,14 +75,13 @@ export default defineNuxtConfig({
|
|||||||
|
|
||||||
vite: {
|
vite: {
|
||||||
plugins: [
|
plugins: [
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
tailwindcss(),
|
||||||
tailwindcss() as any,
|
|
||||||
// only used in dev server, not build because nitro sucks
|
// only used in dev server, not build because nitro sucks
|
||||||
// see build hook below
|
// see build hook below
|
||||||
viteStaticCopy({
|
viteStaticCopy({
|
||||||
targets: [
|
targets: [
|
||||||
{
|
{
|
||||||
src: "node_modules/@discordapp/twemoji/dist/svg/*",
|
src: `${svgSrcDir}/*`,
|
||||||
dest: "twemoji",
|
dest: "twemoji",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -96,7 +96,7 @@ export default defineNuxtConfig({
|
|||||||
// https://github.com/nuxt/nuxt/issues/18918#issuecomment-1925774964
|
// https://github.com/nuxt/nuxt/issues/18918#issuecomment-1925774964
|
||||||
// copy emojis to .output/public/twemoji
|
// copy emojis to .output/public/twemoji
|
||||||
const targetDir = path.join(nitro.options.output.publicDir, "twemoji");
|
const targetDir = path.join(nitro.options.output.publicDir, "twemoji");
|
||||||
cpSync(path.join(path.dirname(twemojiJson), "dist", "svg"), targetDir, {
|
cpSync(svgSrcDir, targetDir, {
|
||||||
recursive: true,
|
recursive: true,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@ -24,7 +24,6 @@
|
|||||||
"@drop-oss/droplet": "3.0.1",
|
"@drop-oss/droplet": "3.0.1",
|
||||||
"@headlessui/vue": "^1.7.23",
|
"@headlessui/vue": "^1.7.23",
|
||||||
"@heroicons/vue": "^2.1.5",
|
"@heroicons/vue": "^2.1.5",
|
||||||
"@lobomfz/prismark": "0.0.3",
|
|
||||||
"@nuxt/fonts": "^0.11.0",
|
"@nuxt/fonts": "^0.11.0",
|
||||||
"@nuxt/image": "^1.10.0",
|
"@nuxt/image": "^1.10.0",
|
||||||
"@nuxtjs/i18n": "^9.5.5",
|
"@nuxtjs/i18n": "^9.5.5",
|
||||||
@ -40,7 +39,7 @@
|
|||||||
"fast-fuzzy": "^1.12.0",
|
"fast-fuzzy": "^1.12.0",
|
||||||
"file-type-mime": "^0.4.3",
|
"file-type-mime": "^0.4.3",
|
||||||
"jdenticon": "^3.3.0",
|
"jdenticon": "^3.3.0",
|
||||||
"jsdom": "^26.1.0",
|
"jsdom": "^27.0.0",
|
||||||
"luxon": "^3.6.1",
|
"luxon": "^3.6.1",
|
||||||
"micromark": "^4.0.1",
|
"micromark": "^4.0.1",
|
||||||
"normalize-url": "^8.0.2",
|
"normalize-url": "^8.0.2",
|
||||||
@ -48,7 +47,7 @@
|
|||||||
"nuxt-security": "2.2.0",
|
"nuxt-security": "2.2.0",
|
||||||
"pino": "^9.7.0",
|
"pino": "^9.7.0",
|
||||||
"pino-pretty": "^13.0.0",
|
"pino-pretty": "^13.0.0",
|
||||||
"prisma": "^6.14.0",
|
"prisma": "^6.11.1",
|
||||||
"sanitize-filename": "^1.6.3",
|
"sanitize-filename": "^1.6.3",
|
||||||
"semver": "^7.7.1",
|
"semver": "^7.7.1",
|
||||||
"stream-mime-type": "^2.0.0",
|
"stream-mime-type": "^2.0.0",
|
||||||
@ -88,5 +87,8 @@
|
|||||||
"vue3-carousel": "^0.16.0"
|
"vue3-carousel": "^0.16.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"prisma": {
|
||||||
|
"schema": "./prisma"
|
||||||
|
},
|
||||||
"packageManager": "pnpm@10.15.0+sha512.486ebc259d3e999a4e8691ce03b5cac4a71cbeca39372a9b762cb500cfdf0873e2cb16abe3d951b1ee2cf012503f027b98b6584e4df22524e0c7450d9ec7aa7b"
|
"packageManager": "pnpm@10.15.0+sha512.486ebc259d3e999a4e8691ce03b5cac4a71cbeca39372a9b762cb500cfdf0873e2cb16abe3d951b1ee2cf012503f027b98b6584e4df22524e0c7450d9ec7aa7b"
|
||||||
}
|
}
|
||||||
|
|||||||
2439
pnpm-lock.yaml
generated
2439
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +0,0 @@
|
|||||||
import { defineConfig } from "prisma/config";
|
|
||||||
import path from "node:path";
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
schema: path.join("prisma", "schema.prisma"),
|
|
||||||
});
|
|
||||||
@ -10,15 +10,6 @@ generator client {
|
|||||||
binaryTargets = ["native", "debian-openssl-3.0.x"]
|
binaryTargets = ["native", "debian-openssl-3.0.x"]
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* generator arktype {
|
|
||||||
* provider = "yarn prismark"
|
|
||||||
* output = "./validate"
|
|
||||||
* fileName = "schema.ts"
|
|
||||||
* nullish = true
|
|
||||||
* }
|
|
||||||
*/
|
|
||||||
|
|
||||||
datasource db {
|
datasource db {
|
||||||
provider = "postgresql"
|
provider = "postgresql"
|
||||||
url = env("DATABASE_URL")
|
url = env("DATABASE_URL")
|
||||||
|
|||||||
Reference in New Issue
Block a user