From 1aaf290814e4737142c382c148ede816ca1a5df2 Mon Sep 17 00:00:00 2001 From: shironeko Date: Thu, 29 Dec 2022 14:41:17 -0500 Subject: [PATCH] handle auto theme correctly with the manual toggle If the user used the manual toggle, they will not be able to get back to auto since it will force set to light theme. This should fix that. --- assets/js/themes.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/js/themes.js b/assets/js/themes.js index 76767d5f..84a9f6d9 100644 --- a/assets/js/themes.js +++ b/assets/js/themes.js @@ -22,9 +22,11 @@ function setTheme(theme) { if (theme === THEME_DARK) { toggle_theme.children[0].className = 'icon ion-ios-sunny'; document.body.className = 'dark-theme'; - } else { + } else if (theme === THEME_LIGHT) { toggle_theme.children[0].className = 'icon ion-ios-moon'; document.body.className = 'light-theme'; + } else { + document.body.className = 'no-theme'; } }