diff --git a/src/lib/components/ui/navbar/commands/actions.ts b/src/lib/components/ui/navbar/commands/actions.ts index cf558ac1..78be2dae 100644 --- a/src/lib/components/ui/navbar/commands/actions.ts +++ b/src/lib/components/ui/navbar/commands/actions.ts @@ -6,6 +6,7 @@ import { import { resumables, type ResumableItem } from '$lib/lemmy/item' import { userSettings } from '$lib/settings' import { t } from '$lib/translations' +import { legacyTheme } from '$lib/ui/colors' import { fullCommunityName } from '$lib/util' import { ArrowRightOnRectangle, @@ -23,6 +24,10 @@ import { UserGroup, ViewColumns, type IconSource, + PaintBrush, + ComputerDesktop, + Sun, + Moon, } from 'svelte-hero-icons' export interface Group { @@ -181,6 +186,33 @@ export function getGroups(resumables: ResumableItem[], profile: Profile) { }, ], }, + { + name: t.get('nav.commands.setColor'), + icon: PaintBrush, + subActions: [ + { + name: t.get('nav.commands.setColorTo', { + default: t.get('nav.menu.colorscheme.system'), + }), + handle: () => legacyTheme.set('system'), + icon: ComputerDesktop, + }, + { + name: t.get('nav.commands.setColorTo', { + default: t.get('nav.menu.colorscheme.light'), + }), + handle: () => legacyTheme.set('light'), + icon: Sun, + }, + { + name: t.get('nav.commands.setColorTo', { + default: t.get('nav.menu.colorscheme.dark'), + }), + handle: () => legacyTheme.set('dark'), + icon: Moon, + }, + ], + }, ], }, { diff --git a/src/lib/i18n/en.json b/src/lib/i18n/en.json index aa8dacca..9cbc5175 100644 --- a/src/lib/i18n/en.json +++ b/src/lib/i18n/en.json @@ -40,7 +40,9 @@ "search": "Search for {{default}}", "main": "Main", "setView": "Set view", - "setViewTo": "Set view to {{default}}" + "setViewTo": "Set view to {{default}}", + "setColor": "Set color scheme", + "setColorTo": "Set color scheme to {{default}}" } }, "account": {