From 2ae1255629ed5ced43dd29ae26b5164ec42baec1 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Fri, 12 Dec 2025 11:34:25 +0100 Subject: [PATCH] Add theme validation and update settings.html accordingly --- settings.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/settings.html b/settings.html index 05ed027..6dafe6d 100644 --- a/settings.html +++ b/settings.html @@ -168,6 +168,7 @@ if (theme === 'sky') document.body.classList.add('theme-sky'); if (theme === 'grey') document.body.classList.add('theme-grey'); }; + const VALID_THEMES = ['sky', 'default', 'grey']; // Elemente holen const themeSelect = document.getElementById('themeSelect'); @@ -195,7 +196,7 @@ window.electronAPI.getMinutesCommitThreshold() ]); - const fallbackTheme = initialTheme || 'sky'; + const fallbackTheme = VALID_THEMES.includes(initialTheme) ? initialTheme : 'sky'; themeSelect.value = fallbackTheme; applyThemeClass(fallbackTheme); // Inputs setzen