improvement: users get notified whenever a task is done completely, not per step.
This commit is contained in:
@@ -3,14 +3,14 @@ export const THEME_STORAGE_KEY = 'dyolink-theme';
|
||||
export type ThemeMode = 'light' | 'dark';
|
||||
|
||||
export function getStoredTheme(): ThemeMode {
|
||||
if (typeof window === 'undefined') return 'dark';
|
||||
if (typeof window === 'undefined') return 'light';
|
||||
try {
|
||||
const v = localStorage.getItem(THEME_STORAGE_KEY);
|
||||
if (v === 'light' || v === 'dark') return v;
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
return 'dark';
|
||||
return 'light';
|
||||
}
|
||||
|
||||
export function applyTheme(mode: ThemeMode) {
|
||||
|
||||
Reference in New Issue
Block a user