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

Function applyTheme

webui/src/store/themeStore.ts:27–34  ·  view source on GitHub ↗
(resolved: 'light' | 'dark')

Source from the content-addressed store, hash-verified

25}
26
27function applyTheme(resolved: 'light' | 'dark') {
28 const root = document.documentElement
29 if (resolved === 'dark') {
30 root.classList.add('dark')
31 } else {
32 root.classList.remove('dark')
33 }
34}
35
36function resolveTheme(theme: Theme): 'light' | 'dark' {
37 return theme === 'system' ? getSystemTheme() : theme

Callers 1

themeStore.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected