mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 19:54:39 +00:00
fix darkmode with color picker
This commit is contained in:
@@ -13,7 +13,12 @@ let DarkMode = null;
|
||||
export function updateAllColors(storedSetting, newColor = null) {
|
||||
// Determine the color to use
|
||||
const selectedColor = newColor || storedSetting.selectedColor;
|
||||
DarkMode = storedSetting ? storedSetting.DarkMode : DarkMode;
|
||||
|
||||
DarkMode = (typeof storedSetting?.DarkMode === "boolean") ? storedSetting.DarkMode : DarkMode;
|
||||
|
||||
if (typeof storedSetting === "boolean") {
|
||||
DarkMode = storedSetting;
|
||||
}
|
||||
|
||||
// Common properties, always applied
|
||||
const commonProps = {
|
||||
@@ -24,7 +29,6 @@ export function updateAllColors(storedSetting, newColor = null) {
|
||||
|
||||
// Mode-based properties, applied if storedSetting is provided
|
||||
let modeProps = {};
|
||||
console.log("Darkmode: ", DarkMode);
|
||||
if (DarkMode !== null) {
|
||||
modeProps = DarkMode ? {
|
||||
"--background-primary": "#232323",
|
||||
|
||||
Reference in New Issue
Block a user