diff --git a/components/GameEditor/Version.vue b/components/GameEditor/Version.vue index d2d38ad..ecf3b26 100644 --- a/components/GameEditor/Version.vue +++ b/components/GameEditor/Version.vue @@ -51,7 +51,11 @@ @update="() => updateVersionOrder()" > diff --git a/components/PlatformSelector.vue b/components/PlatformSelector.vue index 1168b04..4b73c18 100644 --- a/components/PlatformSelector.vue +++ b/components/PlatformSelector.vue @@ -32,7 +32,7 @@ class="absolute z-10 mt-1 max-h-56 w-full overflow-auto rounded-md bg-zinc-900 py-1 text-base shadow-lg ring-1 ring-zinc-950 ring-opacity-5 focus:outline-none sm:text-sm" > (); +const model = defineModel(); -const typedModel = computed({ +const typedModel = computed({ get() { return model.value || null; }, @@ -95,5 +96,5 @@ const typedModel = computed({ }, }); -const values = Object.fromEntries(Object.entries(PlatformClient)); +const values = Object.entries(Platform); diff --git a/components/StoreView.vue b/components/StoreView.vue index ea9bdaa..957c6f5 100644 --- a/components/StoreView.vue +++ b/components/StoreView.vue @@ -361,6 +361,7 @@ import { import type { SerializeObject } from "nitropack"; import type { GameModel, GameTagModel } from "~/prisma/client/models"; import MultiItemSelector from "./MultiItemSelector.vue"; +import { Platform } from "~/prisma/client/enums"; const { showGamePanelTextDecoration } = await $dropFetch(`/api/v1/settings`); const mobileFiltersOpen = ref(false); @@ -407,7 +408,7 @@ const options: Array = [ name: "Platform", param: "platform", multiple: true, - options: Object.values(PlatformClient).map((e) => ({ name: e, param: e })), + options: Object.values(Platform).map((e) => ({ name: e, param: e })), }, ...(props.extraOptions ?? []), ]; diff --git a/composables/icons.ts b/composables/icons.ts index 247cf83..d56cfcf 100644 --- a/composables/icons.ts +++ b/composables/icons.ts @@ -1,8 +1,8 @@ import { IconsLinuxLogo, IconsWindowsLogo, IconsMacLogo } from "#components"; -import { PlatformClient } from "./types"; +import { Platform } from "~/prisma/client/enums"; export const PLATFORM_ICONS = { - [PlatformClient.Linux]: IconsLinuxLogo, - [PlatformClient.Windows]: IconsWindowsLogo, - [PlatformClient.macOS]: IconsMacLogo, + [Platform.Linux]: IconsLinuxLogo, + [Platform.Windows]: IconsWindowsLogo, + [Platform.macOS]: IconsMacLogo, }; diff --git a/composables/types.ts b/composables/types.ts index 87b2a25..7725de0 100644 --- a/composables/types.ts +++ b/composables/types.ts @@ -10,10 +10,4 @@ export type QuickActionNav = { icon: Component; notifications?: Ref; action: () => Promise; -}; - -export enum PlatformClient { - Windows = "Windows", - Linux = "Linux", - macOS = "macOS", -} +}; \ No newline at end of file diff --git a/i18n/locales/en_us.json b/i18n/locales/en_us.json index 2356acb..f3f1523 100644 --- a/i18n/locales/en_us.json +++ b/i18n/locales/en_us.json @@ -293,8 +293,8 @@ "advancedOptions": "Advanced options", "import": "Import version", "installDir": "(install_dir)/", - "launchCmd": "Launch executable/command", - "launchDesc": "Executable to launch the game", + "launchCmd": "Launch executables/commands", + "launchDesc": "Executables to launch the game", "launchPlaceholder": "game.exe", "loadingVersion": "Loading version metadata…", "noAdv": "No advanced options for this configuration.", diff --git a/package.json b/package.json index 9eb9722..e25510e 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "nuxt-security": "2.2.0", "pino": "^9.7.0", "pino-pretty": "^13.0.0", - "prisma": "^6.11.1", + "prisma": "^6.14.0", "sanitize-filename": "^1.6.3", "semver": "^7.7.1", "stream-mime-type": "^2.0.0", diff --git a/pages/admin/library/[id]/import.vue b/pages/admin/library/[id]/import.vue index 485a57c..f92d7f6 100644 --- a/pages/admin/library/[id]/import.vue +++ b/pages/admin/library/[id]/import.vue @@ -1,8 +1,9 @@