This UI is really damn easy to replicate

This commit is contained in:
MotorTruck1221
2025-03-18 01:17:56 -06:00
parent a57072d6f8
commit a972e43c2c
7 changed files with 752 additions and 4 deletions
+4 -4
View File
@@ -26,15 +26,15 @@ class Settings {
return get().next().value! as Settings;
}
theme(theme: string) {
this.#storageManager.setVal('theme', theme);
theme(theme?: string) {
this.#storageManager.setVal('theme', theme || this.#storageManager.getVal('theme'));
theme === 'default'
? document.documentElement.className = ''
: document.documentElement.className = theme;
: document.documentElement.className = theme || this.#storageManager.getVal('theme');
}
async *#init() {
yield this.theme(this.#storageManager.getVal('theme'));
yield this.theme(this.#storageManager.getVal('theme') || 'default');
}
constructor() {