MCPcopy Create free account
hub / github.com/NanmiCoder/MediaCrawler / getSystemTheme

Function getSystemTheme

webui/src/store/themeStore.ts:13–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11const THEME_KEY = 'mediacrawler_theme'
12
13function getSystemTheme(): 'light' | 'dark' {
14 if (typeof window === 'undefined') return 'light'
15 return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
16}
17
18function getStoredTheme(): Theme {
19 if (typeof window === 'undefined') return 'light'

Callers 1

resolveThemeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected