diff options
Diffstat (limited to 'ui/src/utils.ts')
-rw-r--r-- | ui/src/utils.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ui/src/utils.ts b/ui/src/utils.ts index 32193db4..cf290882 100644 --- a/ui/src/utils.ts +++ b/ui/src/utils.ts @@ -238,3 +238,17 @@ export function getMomentLanguage(): string { } return lang; } + +export const themes = ['litera', 'minty', 'solar', 'united', 'cyborg','darkly', 'journal', 'sketchy']; + +export function setTheme(theme: string = 'darkly') { + for (var i=0; i < themes.length; i++) { + + let styleSheet = document.getElementById(themes[i]); + if (themes[i] == theme) { + styleSheet.removeAttribute("disabled"); + } else { + styleSheet.setAttribute("disabled", "disabled"); + } + } +} |