update(Plugin Theme):changes the way the primevue theme is replaced if the theme is not dark or light

This commit is contained in:
SimonGschnell
2025-03-24 15:03:59 +01:00
parent 5d39d5ec46
commit 75ad88eb24
+4
View File
@@ -17,6 +17,10 @@ const toggleTheme = (theme)=>{
} else if (theme == "light") {
stylesheet.attributes.href.value = stylesheet.attributes.href.value.replace("bootstrap4-dark-blue", "bootstrap4-light-blue");
}
else{
if (stylesheet.attributes.href.value.includes("bootstrap4-dark-blue"))
stylesheet.attributes.href.value = stylesheet.attributes.href.value.replace("bootstrap4-dark-blue", "bootstrap4-light-blue");
}
localStorage.setItem("theme", theme);
}