Refactoring: use theme instead of layout in a lot of places

This commit is contained in:
Pieter Vander Vennet 2024-10-17 04:06:03 +02:00
parent 9427083939
commit bdc9ba52a6
104 changed files with 445 additions and 449 deletions

View file

@ -30,13 +30,16 @@ export class LocalStorageSource {
return cached
}
let saved = defaultValue
try {
saved = localStorage.getItem(key)
if (saved === "undefined") {
saved = undefined
if (!Utils.runningFromConsole) {
try {
saved = localStorage.getItem(key)
if (saved === "undefined") {
saved = undefined
}
} catch (e) {
console.error("Could not get value", key, "from local storage")
}
} catch (e) {
console.error("Could not get value", key, "from local storage")
}
const source = new UIEventSource<string>(saved ?? defaultValue, "localstorage:" + key)