MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / refreshCustomThemes

Function refreshCustomThemes

packages/app-core/src/store.ts:7469–7473  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7467/** Re-scan the themes dir and apply the result. Used after an in-app change
7468 * (e.g. deleting a theme) so the UI updates without waiting on the watcher. */
7469export function refreshCustomThemes(): void {
7470 const bridge = typeof window !== 'undefined' ? window.zen : undefined
7471 if (!bridge || typeof bridge.listCustomThemes !== 'function') return
7472 void bridge.listCustomThemes().then(applyCustomThemes).catch(() => {})
7473}
7474
7475/**
7476 * Load user themes from the config dir, inject their CSS, and keep both in sync

Callers 3

removeCustomThemeFunction · 0.90
createThemeFunction · 0.90
initCustomThemesFunction · 0.85

Calls 1

listCustomThemesMethod · 0.80

Tested by

no test coverage detected