diff --git a/apps/desktop/src/assets/icons/nightly.png b/apps/desktop/src/assets/icons/nightly.png new file mode 100644 index 0000000000..e5b2a22dbe Binary files /dev/null and b/apps/desktop/src/assets/icons/nightly.png differ diff --git a/apps/desktop/src/assets/icons/pro.png b/apps/desktop/src/assets/icons/pro.png new file mode 100644 index 0000000000..3b89925857 Binary files /dev/null and b/apps/desktop/src/assets/icons/pro.png differ diff --git a/apps/desktop/src/assets/icons/stable.png b/apps/desktop/src/assets/icons/stable.png new file mode 100644 index 0000000000..4aea81a993 Binary files /dev/null and b/apps/desktop/src/assets/icons/stable.png differ diff --git a/apps/desktop/src/assets/icons/staging.png b/apps/desktop/src/assets/icons/staging.png new file mode 100644 index 0000000000..39ef571ee3 Binary files /dev/null and b/apps/desktop/src/assets/icons/staging.png differ diff --git a/apps/desktop/src/components/settings/general/app-icon.tsx b/apps/desktop/src/components/settings/general/app-icon.tsx new file mode 100644 index 0000000000..ba12b9663d --- /dev/null +++ b/apps/desktop/src/components/settings/general/app-icon.tsx @@ -0,0 +1,48 @@ +import { cn } from "@hypr/utils"; + +import nightlyIcon from "../../../assets/icons/nightly.png"; +import proIcon from "../../../assets/icons/pro.png"; +import stableIcon from "../../../assets/icons/stable.png"; +import stagingIcon from "../../../assets/icons/staging.png"; + +const ICON_OPTIONS: { value: string; label: string; icon: string }[] = [ + { value: "stable", label: "Stable", icon: stableIcon }, + { value: "nightly", label: "Nightly", icon: nightlyIcon }, + { value: "staging", label: "Staging", icon: stagingIcon }, + { value: "pro", label: "Pro", icon: proIcon }, +]; + +interface AppIconSettingsProps { + value: string | undefined; + onChange: (value: string) => void; +} + +export function AppIconSettings({ value, onChange }: AppIconSettingsProps) { + return ( +
+

App Icon

+
+ {ICON_OPTIONS.map((option) => ( + + ))} +
+
+ ); +} diff --git a/apps/desktop/src/components/settings/general/index.tsx b/apps/desktop/src/components/settings/general/index.tsx index 5b6e9718f1..0d087de139 100644 --- a/apps/desktop/src/components/settings/general/index.tsx +++ b/apps/desktop/src/components/settings/general/index.tsx @@ -10,6 +10,7 @@ import { useConfigValues } from "../../../config/use-config"; import * as settings from "../../../store/tinybase/store/settings"; import { Data } from "../data"; import { AccountSettings } from "./account"; +import { AppIconSettings } from "./app-icon"; import { AppSettingsView } from "./app-settings"; import { Audio } from "./audio"; import { MainLanguageView } from "./main-language"; @@ -29,6 +30,7 @@ function useSettingsForm() { "ai_language", "spoken_languages", "current_stt_provider", + "app_icon", ] as const); const setPartialValues = settings.UI.useSetPartialValuesCallback( @@ -60,6 +62,7 @@ function useSettingsForm() { telemetry_consent: value.telemetry_consent, ai_language: value.ai_language, spoken_languages: value.spoken_languages, + app_icon: value.app_icon, }, listeners: { onChange: ({ formApi }) => { @@ -211,6 +214,15 @@ export function SettingsApp() { + + {(field) => ( + field.handleChange(val)} + /> + )} + +
diff --git a/apps/desktop/src/config/registry.ts b/apps/desktop/src/config/registry.ts index 76f2f9bbef..dea750163e 100644 --- a/apps/desktop/src/config/registry.ts +++ b/apps/desktop/src/config/registry.ts @@ -1,6 +1,7 @@ import { disable, enable } from "@tauri-apps/plugin-autostart"; import { commands as detectCommands } from "@hypr/plugin-detect"; +import { commands as iconCommands } from "@hypr/plugin-icon"; import { commands as localSttCommands, type SupportedSttModel, @@ -22,7 +23,9 @@ export type ConfigKey = | "current_llm_provider" | "current_llm_model" | "timezone" - | "week_start"; + | "week_start" + | "notification_in_meeting_reminder" + | "app_icon"; type ConfigValueType = (typeof CONFIG_REGISTRY)[K]["default"]; @@ -160,4 +163,21 @@ export const CONFIG_REGISTRY = { key: "week_start", default: undefined as "sunday" | "monday" | undefined, }, + + notification_in_meeting_reminder: { + key: "notification_in_meeting_reminder", + default: true, + }, + + app_icon: { + key: "app_icon", + default: undefined as string | undefined, + sideEffect: async (value: string | undefined, _) => { + if (value) { + await iconCommands.setDockIcon(value); + } else { + await iconCommands.resetDockIcon(); + } + }, + }, } satisfies Record; diff --git a/apps/desktop/src/store/tinybase/store/settings.ts b/apps/desktop/src/store/tinybase/store/settings.ts index 5af9a5aebd..aea6b17a5f 100644 --- a/apps/desktop/src/store/tinybase/store/settings.ts +++ b/apps/desktop/src/store/tinybase/store/settings.ts @@ -73,6 +73,10 @@ export const SETTINGS_MAPPING = { type: "string", path: ["general", "week_start"], }, + app_icon: { + type: "string", + path: ["general", "app_icon"], + }, }, tables: { ai_providers: { diff --git a/packages/store/src/zod.ts b/packages/store/src/zod.ts index 0cdc806a4f..4dcc5dc785 100644 --- a/packages/store/src/zod.ts +++ b/packages/store/src/zod.ts @@ -253,6 +253,7 @@ export const generalSchema = z.object({ current_stt_model: z.string().optional(), timezone: z.string().optional(), week_start: z.string().optional(), + app_icon: z.string().optional(), }); export const aiProviderSchema = z.object({