From 789361ea73e47123ca5da8379c507a3b646f7916 Mon Sep 17 00:00:00 2001 From: DecDuck Date: Tue, 11 Mar 2025 19:02:53 +1100 Subject: [PATCH] feat: add mac as platform --- components/Icons/MacLogo.vue | 13 +++++++++ components/PlatformSelector.vue | 27 +++++++------------ composables/icons.ts | 4 ++- composables/types.ts | 1 + pages/admin/library/[id]/index.vue | 3 ++- .../migration.sql | 2 ++ prisma/schema/app.prisma | 1 + server/internal/library/index.ts | 10 ++++--- server/internal/utils/parseplatform.ts | 4 +++ 9 files changed, 41 insertions(+), 24 deletions(-) create mode 100644 components/Icons/MacLogo.vue create mode 100644 prisma/migrations/20250311073601_add_macos_as_a_platform/migration.sql diff --git a/components/Icons/MacLogo.vue b/components/Icons/MacLogo.vue new file mode 100644 index 0000000..f8db2ed --- /dev/null +++ b/components/Icons/MacLogo.vue @@ -0,0 +1,13 @@ + diff --git a/components/PlatformSelector.vue b/components/PlatformSelector.vue index d84f242..859effa 100644 --- a/components/PlatformSelector.vue +++ b/components/PlatformSelector.vue @@ -7,13 +7,13 @@ - + - {{ values[model].name }} + {{ model }} Please select a platform...
- {{ options.name }} + {{ name }}
diff --git a/composables/icons.ts b/composables/icons.ts index ca465ab..247cf83 100644 --- a/composables/icons.ts +++ b/composables/icons.ts @@ -1,6 +1,8 @@ -import { IconsLinuxLogo, IconsWindowsLogo } from "#components"; +import { IconsLinuxLogo, IconsWindowsLogo, IconsMacLogo } from "#components"; +import { PlatformClient } from "./types"; export const PLATFORM_ICONS = { [PlatformClient.Linux]: IconsLinuxLogo, [PlatformClient.Windows]: IconsWindowsLogo, + [PlatformClient.macOS]: IconsMacLogo, }; diff --git a/composables/types.ts b/composables/types.ts index 676e727..87b2a25 100644 --- a/composables/types.ts +++ b/composables/types.ts @@ -15,4 +15,5 @@ export type QuickActionNav = { export enum PlatformClient { Windows = "Windows", Linux = "Linux", + macOS = "macOS", } diff --git a/pages/admin/library/[id]/index.vue b/pages/admin/library/[id]/index.vue index d62553b..ca5f0f6 100644 --- a/pages/admin/library/[id]/index.vue +++ b/pages/admin/library/[id]/index.vue @@ -320,7 +320,8 @@
{{ item.delta ? "Upgrade mode" : "" }}
-
+
+