ui/client/features/shell/domain/ThemePreference
Pure (DOMAIN-001): the Dark / Light / System preference chosen in the profile menu.
Cockpit client (features), v0.9. Source: ui/client/features/shell/domain/ThemePreference.ts.
Functions#
parseThemePreference()#
parseThemePreference(
value):ThemePreference
Defined in: ui/client/features/shell/domain/ThemePreference.ts:6
What the person chose: a fixed theme, or "follow the operating system". Unknown means dark (the default).
Parameters#
value
unknown
Returns#
resolveTheme()#
resolveTheme(
preference,systemPrefersLight):Theme
Defined in: ui/client/features/shell/domain/ThemePreference.ts:11
The theme actually painted for a preference; systemPrefersLight is the OS setting, read by the caller.
Parameters#
preference
systemPrefersLight
boolean