Modern Docker Management, Designed for Everyone
Go composecontainer-managementcontainersdockerdocker-composedocker-managementgoself-hostedsveltekittypescriptweb-ui
feat: oled dark theme (#1937)
Kyle Mendell84123c61fe47
diff --git a/backend/internal/models/settings.go b/backend/internal/models/settings.goindex 94b9764b7..214145bcf 100644--- a/backend/internal/models/settings.go+++ b/backend/internal/models/settings.go@@ -51,6 +51,7 @@ type Settings struct {DefaultShell SettingVariable `key:"defaultShell" meta:"label=Default Shell;type=text;keywords=shell,default,shellpath,path,login;category=general;description=Default shell to use for commands"`EnvironmentHealthInterval SettingVariable `key:"environmentHealthInterval" meta:"label=Environment Health Check Interval;type=cron;keywords=environment,health,check,interval,frequency,heartbeat,status,monitoring,uptime,jobs,schedule;description=How often to check environment connectivity (cron expression)" catmeta:"id=jobschedule;title=Job Schedule;icon=jobs;url=/settings/jobs;description=Configure how often Arcane background jobs run"`AccentColor SettingVariable `key:"accentColor,public,local" meta:"label=Accent Color;type=text;keywords=color,accent,theme,css,appearance,ui;category=general;description=Primary accent color for UI"`+ OledMode SettingVariable `key:"oledMode,public,local" meta:"label=OLED Mode;type=boolean;keywords=oled,dark,theme,black,amoled,appearance,display;category=general;description=Use true-black backgrounds for OLED displays (only active in dark mode)"`// Docker categoryAutoUpdate SettingVariable `key:"autoUpdate" meta:"label=Auto Update;type=boolean;keywords=auto,update,automatic,upgrade,refresh,restart,deploy;category=internal;description=Automatically update containers when new images are available"`diff --git a/backend/internal/services/settings_service.go b/backend/internal/services/settings_service.goindex 7446d6942..f09a710d9 100644--- a/backend/internal/services/settings_service.go+++ b/backend/internal/services/settings_service.go@@ -149,6 +149,7 @@ func (s *SettingsService) getDefaultSettings() *models.Settings {SidebarHoverExpansion: models.SettingVariable{Value: "true"},KeyboardShortcutsEnabled: models.SettingVariable{Value: "true"},AccentColor: models.SettingVariable{Value: "oklch(0.606 0.25 292.717)"},+ OledMode: models.SettingVariable{Value: "false"},MaxImageUploadSize: models.SettingVariable{Value: "500"},EnvironmentHealthInterval: models.SettingVariable{Value: "0 */2 * * * *"},diff --git a/frontend/messages/en.json b/frontend/messages/en.jsonindex 7b621252f..c964c6c96 100644--- a/frontend/messages/en.json+++ b/frontend/messages/en.json@@ -1133,6 +1133,11 @@"appearance_description": "Customize the look and feel of Arcane","appearance_language_current_user_description": "Language preference is saved for the current user only.","appearance_theme_current_user_description": "Theme preference is saved for the current user only.",+ "oled_mode": "OLED Mode",+ "oled_mode_description": "Use true-black backgrounds for OLED displays. Only active in dark mode.",+ "oled_mode_enabled": "Enabled",+ "oled_mode_disabled": "Disabled",+ "oled_mode_requires_dark": "Enable dark mode to use OLED mode.","navigation_mode_label": "Navigation Mode","navigation_mode_description": "Choose between floating navigation that overlays content or docked navigation that takes up screen space","navigation_mode_floating": "Floating",diff --git a/frontend/src/app.css b/frontend/src/app.cssindex 8c6b9fa4a..ab1ceefe5 100644--- a/frontend/src/app.css+++ b/frontend/src/app.css@@ -117,6 +117,26 @@--glass-shadow-color: oklch(0 0 0 / 0.32);}+/* OLED dark mode — only activates when .dark is also present */+.dark.oled {+ --background: oklch(0 0 0);+ --card: oklch(0 0 0 / 0.5); /* Deepen to near true black */+ --popover: oklch(0.04 0.002 285);+ --secondary: oklch(0.1 0.004 286 / 0.55);+ --muted: oklch(0.1 0.004 286 / 0.55);+ --accent: oklch(0.1 0.004 286 / 0.55);+ --border: oklch(1 0 0 / 18%);+ --input: oklch(1 0 0 / 18%);+ --sidebar: oklch(0.02 0.001 285 / 0.8);+ --sidebar-border: oklch(1 0 0 / 18%);+ --sidebar-accent: oklch(0.1 0.004 286 / 0.55);+ --surface: oklch(0.045 0.002 285.9);+ --bg-surface: oklch(0.02 0.001 285);+ --glass-base: oklch(0.02 0.001 285);+ --glass-shadow-color: oklch(0 0 0 / 0.6);+ --glass-noise-opacity: 0.015;+}+@theme inline {--radius-sm: calc(var(--radius) - 4px);--radius-md: calc(var(--radius) - 2px);diff --git a/frontend/src/lib/components/ui/card/card.svelte b/frontend/src/lib/components/ui/card/card.svelteindex b82cc7dd7..d82d23516 100644--- a/frontend/src/lib/components/ui/card/card.svelte+++ b/frontend/src/lib/components/ui/card/card.svelte@@ -43,7 +43,7 @@bind:this={ref}data-slot="card"class={cn(- 'text-card-foreground group dark:border-surface/80 relative isolate gap-0 overflow-hidden rounded-xl border border-white/80 p-0 transition-all duration-300',+ 'text-card-foreground group dark:border-border/80 relative isolate gap-0 overflow-hidden rounded-xl border border-white/80 p-0 transition-all duration-300',getVariantClasses(variant),onclick? '[&:not(:has(button:hover,a:hover,[role=button]:hover))]:hover:bg-muted/60 cursor-pointer [&:not(:has(button:hover,a:hover,[role=button]:hover))]:hover:shadow-md'diff --git a/frontend/src/lib/components/ui/dialog/dialog-content.svelte b/frontend/src/lib/components/ui/dialog/dialog-content.svelteindex 3d5b2a7cf..595972704 100644--- a/frontend/src/lib/components/ui/dialog/dialog-content.svelte+++ b/frontend/src/lib/components/ui/dialog/dialog-content.svelte@@ -25,7 +25,7 @@bind:refdata-slot="dialog-content"class={cn(- 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 text-foreground dark:bg-surface/10 dark:border-surface/80 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 rounded-2xl border border-white/80 bg-white/10 p-6 shadow-lg backdrop-blur-md duration-200 sm:rounded-2xl',+ 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 text-foreground dark:bg-surface/10 dark:border-border/80 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 rounded-2xl border border-white/80 bg-white/10 p-6 shadow-lg backdrop-blur-md duration-200 sm:rounded-2xl',className)}{...restProps}diff --git a/frontend/src/lib/components/ui/drawer/drawer-content.svelte b/frontend/src/lib/components/ui/drawer/drawer-content.svelteindex fa0baea43..e2d594bb1 100644--- a/frontend/src/lib/components/ui/drawer/drawer-content.svelte+++ b/frontend/src/lib/components/ui/drawer/drawer-content.svelte@@ -20,7 +20,7 @@bind:refdata-slot="drawer-content"class={cn(- 'group/drawer-content text-foreground dark:bg-surface/10 dark:border-surface/80 fixed z-50 flex h-auto flex-col border-white/80 bg-white/10 backdrop-blur-md',+ 'group/drawer-content text-foreground dark:bg-surface/10 dark:border-border/80 fixed z-50 flex h-auto flex-col border-white/80 bg-white/10 backdrop-blur-md','data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b','data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t','data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm',diff --git a/frontend/src/lib/components/ui/sheet/sheet-content.svelte b/frontend/src/lib/components/ui/sheet/sheet-content.svelteindex 344865bd8..c25540c3a 100644--- a/frontend/src/lib/components/ui/sheet/sheet-content.svelte+++ b/frontend/src/lib/components/ui/sheet/sheet-content.svelte@@ -1,7 +1,7 @@<script lang="ts" module>import { tv, type VariantProps } from 'tailwind-variants';export const sheetVariants = tv({- base: 'text-foreground bg-white/10 dark:bg-surface/10 backdrop-blur-md border border-white/80 dark:border-surface/80 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500',+ base: 'text-foreground bg-white/10 dark:bg-surface/10 backdrop-blur-md border border-white/80 dark:border-border/80 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500',variants: {side: {top: 'data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto rounded-b-2xl',diff --git a/frontend/src/lib/stores/config-store.ts b/frontend/src/lib/stores/config-store.tsindex 8e8b787ab..311a27534 100644--- a/frontend/src/lib/stores/config-store.ts+++ b/frontend/src/lib/stores/config-store.ts@@ -1,6 +1,7 @@import { settingsService } from '$lib/services/settings-service';import type { Settings } from '$lib/types/settings.type';import { applyAccentColor } from '$lib/utils/accent-color-util';+import { applyOledMode } from '$lib/utils/oled-mode-util';import { get, writable } from 'svelte/store';const settingsStore = writable<Settings>();@@ -13,6 +14,7 @@ const reload = async () => {const set = (settings: Settings) => {applyAccentColor(settings.accentColor);+ applyOledMode(settings.oledMode ?? false);settingsStore.set(settings);};diff --git a/frontend/src/lib/types/settings.type.ts b/frontend/src/lib/types/settings.type.tsindex d378056b9..ebb8519b6 100644--- a/frontend/src/lib/types/settings.type.ts+++ b/frontend/src/lib/types/settings.type.ts@@ -30,6 +30,7 @@ export type Settings = {defaultShell: string;dockerHost: string;accentColor: string;+ oledMode: boolean;autoInjectEnv: boolean;backupVolumeName?: string;diff --git a/frontend/src/lib/utils/oled-mode-util.ts b/frontend/src/lib/utils/oled-mode-util.tsnew file mode 100644index 000000000..8de29457b--- /dev/null+++ b/frontend/src/lib/utils/oled-mode-util.ts@@ -0,0 +1,66 @@+import { writable } from 'svelte/store';++export const oledModeStore = writable<boolean>(false);++const OLED_CLASS = 'oled';+const OLED_THEME_COLOR = '#000000';+const DARK_THEME_COLOR = 'oklch(0.141 0.005 285.823)';+let currentOledEnabled = false;+let htmlClassObserver: MutationObserver | null = null;++function ensureThemeColorSyncObserver(): void {+ if (typeof document === 'undefined' || htmlClassObserver) {+ return;+ }++ htmlClassObserver = new MutationObserver(() => {+ updateThemeColorMeta(currentOledEnabled);+ });++ htmlClassObserver.observe(document.documentElement, {+ attributes: true,+ attributeFilter: ['class']+ });+}++/**+ * Applies or removes OLED mode by toggling the `.oled` class on <html>.+ * The CSS rule `.dark.oled` only takes effect when dark mode is also active,+ * so calling this while in light mode is safe — it adds the class but the+ * CSS selector will not match until dark mode is enabled.+ *+ * Also updates the `theme-color` meta tag when in dark mode to #000000.+ */+export function applyOledMode(enabled: boolean): void {+ currentOledEnabled = enabled;+ oledModeStore.set(enabled);++ if (typeof document === 'undefined') {+ return;+ }++ ensureThemeColorSyncObserver();++ if (enabled) {+ document.documentElement.classList.add(OLED_CLASS);+ } else {+ document.documentElement.classList.remove(OLED_CLASS);+ }++ updateThemeColorMeta(enabled);+}++/**+ * Updates the theme-color meta tag for the dark scheme.+ * When OLED is active we want #000000 so the browser chrome (e.g. Safari iOS)+ * also goes fully black.+ */+function updateThemeColorMeta(oledEnabled: boolean): void {+ if (typeof document === 'undefined') return;++ const isDark = document.documentElement.classList.contains('dark');+ const darkMeta = document.querySelector<HTMLMetaElement>('meta[name="theme-color"][media="(prefers-color-scheme: dark)"]');+ if (darkMeta) {+ darkMeta.content = oledEnabled && isDark ? OLED_THEME_COLOR : DARK_THEME_COLOR;+ }+}diff --git a/frontend/src/lib/utils/settings.util.ts b/frontend/src/lib/utils/settings.util.tsindex 3e75f20c3..768eb8668 100644--- a/frontend/src/lib/utils/settings.util.ts+++ b/frontend/src/lib/utils/settings.util.ts@@ -1,5 +1,6 @@export type LocalSettings = {accentColor: string;+ oledMode: boolean;mobileNavigationMode: string;mobileNavigationShowLabels: boolean;sidebarHoverExpansion: boolean;@@ -8,6 +9,7 @@ export type LocalSettings = {const LOCAL_SETTING_KEYS = new Set(['accentColor',+ 'oledMode','mobileNavigationMode','mobileNavigationShowLabels','sidebarHoverExpansion',diff --git a/frontend/src/routes/(app)/dashboard/+page.svelte b/frontend/src/routes/(app)/dashboard/+page.svelteindex fc1aee79f..0ee458046 100644--- a/frontend/src/routes/(app)/dashboard/+page.svelte+++ b/frontend/src/routes/(app)/dashboard/+page.svelte@@ -396,7 +396,7 @@<div class="flex min-h-full flex-col gap-4 pt-3 md:gap-5 md:pt-4"><header- class="border-border/70 bg-card/75 dark:border-surface/70 dark:bg-surface/25 rounded-xl border p-4 shadow-sm supports-[backdrop-filter]:backdrop-blur-sm sm:p-5"+ class="dark:border-surface/80 dark:bg-surface/10 rounded-xl border border-white/80 bg-white/10 p-4 shadow-sm backdrop-blur-sm sm:p-5"><div class="relative flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between"><div class="space-y-1.5">diff --git a/frontend/src/routes/(app)/dashboard/dash-action-card.svelte b/frontend/src/routes/(app)/dashboard/dash-action-card.svelteindex cd6628e2b..8be482fa2 100644--- a/frontend/src/routes/(app)/dashboard/dash-action-card.svelte+++ b/frontend/src/routes/(app)/dashboard/dash-action-card.svelte@@ -37,10 +37,7 @@let { title, value, description, icon: Icon, badgeText, badgeVariant = 'red', ctaLabel, href }: Props = $props();</script>-<Card.Root- variant="outlined"- class="border-border/70 bg-card/75 dark:border-surface/70 dark:bg-surface/25 shadow-sm supports-[backdrop-filter]:backdrop-blur-sm"->+<Card.Root variant="outlined" class="shadow-sm"><Card.Content class="space-y-2.5 p-4"><div class="flex items-center justify-between gap-2"><div class="text-foreground/80 flex items-center gap-2 text-sm font-medium">diff --git a/frontend/src/routes/(app)/settings/appearance/+page.svelte b/frontend/src/routes/(app)/settings/appearance/+page.svelteindex a1248ab79..984a1e627 100644--- a/frontend/src/routes/(app)/settings/appearance/+page.svelte+++ b/frontend/src/routes/(app)/settings/appearance/+page.svelte@@ -14,6 +14,7 @@import LocalePicker from '$lib/components/locale-picker.svelte';import AccentColorPicker from '$lib/components/accent-color/accent-color-picker.svelte';import { applyAccentColor } from '$lib/utils/accent-color-util';+ import { applyOledMode } from '$lib/utils/oled-mode-util';import { ApperanceIcon, MonitorSpeakerIcon, DockIcon, MoonIcon, SunIcon } from '$lib/icons';import SwitchWithLabel from '$lib/components/form/labeled-switch.svelte';import { ArcaneButton } from '$lib/components/arcane-button/index.js';@@ -28,7 +29,8 @@sidebarHoverExpansion: z.boolean(),keyboardShortcutsEnabled: z.boolean(),accentColor: z.string(),- enableGravatar: z.boolean()+ enableGravatar: z.boolean(),+ oledMode: z.boolean()});// Track local override state using the shared store@@ -48,7 +50,10 @@currentSettings,getCurrentSettings: () => $settingsStore || data.settings!,successMessage: m.navigation_settings_saved(),- onReset: () => applyAccentColor(currentSettings.accentColor)+ onReset: () => {+ applyAccentColor(currentSettings.accentColor);+ applyOledMode(currentSettings.oledMode ?? false);+ }}));@@ -93,6 +98,12 @@const labelsDisplayValue = $derived(labelsIsLocal ? persistedState.showLabels : $formInputs.mobileNavigationShowLabels.value);const isDarkMode = $derived(mode.current === 'dark');+ function handleOledModeChange(checked: boolean) {+ $formInputs.oledMode.value = checked;+ // Live preview: apply immediately so the user sees the effect+ applyOledMode(checked);+ }+function handleLabelsChange(checked: boolean) {if (labelsIsLocal) {setLocalOverride('showLabels', checked);@@ -200,6 +211,30 @@</ArcaneButton></div></div>++ <Separator />++ <!-- OLED Mode -->+ <div class="grid gap-4 md:grid-cols-[1fr_1.5fr] md:gap-8">+ <div>+ <Label class="text-base">{m.oled_mode()}</Label>+ <p class="text-muted-foreground mt-1 text-sm">{m.oled_mode_description()}</p>+ {#if !isDarkMode}+ <p class="text-muted-foreground/70 mt-1 text-xs italic">{m.oled_mode_requires_dark()}</p>+ {/if}+ </div>+ <div class="flex items-center gap-2">+ <Switch+ id="oledMode"+ checked={$formInputs.oledMode.value}+ disabled={isReadOnly}+ onCheckedChange={handleOledModeChange}+ />+ <Label for="oledMode" class="font-normal">+ {$formInputs.oledMode.value ? m.oled_mode_enabled() : m.oled_mode_disabled()}+ </Label>+ </div>+ </div></div></div></div>diff --git a/types/settings/settings.go b/types/settings/settings.goindex 6d00d2658..b6cb842b9 100644--- a/types/settings/settings.go+++ b/types/settings/settings.go@@ -375,4 +375,9 @@ type Update struct {//// Required: falseDepotToken *string `json:"depotToken,omitempty"`++ // OledMode sets whether OLED dark mode is enabled or not.+ //+ // Required: false+ OledMode *string `json:"oledMode,omitempty"`}