@@ -11,6 +11,7 @@ import {
1111 type DateTimeFormat ,
1212 type FileSizeFormat ,
1313 type DirectorySortMode ,
14+ type AppColor ,
1415 densityMappings ,
1516} from '$lib/settings'
1617import { formatDateTimeWithFormat , formatFileSizeWithFormat } from './format-utils'
@@ -26,6 +27,7 @@ let customDateTimeFormat = $state<string>('YYYY-MM-DD HH:mm')
2627let fileSizeFormat = $state < FileSizeFormat > ( 'binary' )
2728let useAppIconsForDocuments = $state < boolean > ( true )
2829let directorySortMode = $state < DirectorySortMode > ( 'likeFiles' )
30+ let appColor = $state < AppColor > ( 'cmdr-gold' )
2931
3032let initialized = false
3133let unsubscribe : ( ( ) => void ) | undefined
@@ -48,6 +50,7 @@ export async function initReactiveSettings(): Promise<void> {
4850 fileSizeFormat = getSetting ( 'appearance.fileSizeFormat' )
4951 useAppIconsForDocuments = getSetting ( 'appearance.useAppIconsForDocuments' )
5052 directorySortMode = getSetting ( 'listing.directorySortMode' )
53+ appColor = getSetting ( 'appearance.appColor' )
5154
5255 // Subscribe to changes (including cross-window changes)
5356 unsubscribe = onSettingChange ( ( id , value ) => {
@@ -80,6 +83,9 @@ export async function initReactiveSettings(): Promise<void> {
8083 log . info ( 'Applying directory sort mode change: {value}' , { value } )
8184 directorySortMode = value as DirectorySortMode
8285 break
86+ case 'appearance.appColor' :
87+ appColor = value as AppColor
88+ break
8389 }
8490 } )
8591
@@ -123,6 +129,11 @@ export function getDirectorySortMode(): DirectorySortMode {
123129 return directorySortMode
124130}
125131
132+ /** Whether the user has selected Cmdr gold as their app color */
133+ export function getIsCmdrGold ( ) : boolean {
134+ return appColor === 'cmdr-gold'
135+ }
136+
126137// ============================================================================
127138// Formatting utilities that use reactive settings
128139// ============================================================================
0 commit comments