- this.isDark =
- "overrideDark" in localStorage
- ? JSON.parse(localStorage.overrideDark)
- : matchMedia("(prefers-color-scheme: dark)").matches;
+ this.faClasses = ["fas fa-adjust", "fas fa-circle", "far fa-circle"];
+ this.titles = ["Auto-switch", "Light theme", "Dark theme"];
+ this.mode = 0;
+ if ("overrideDark" in localStorage) {
+ // Light theme is 1 and Dark theme is 2
+ this.mode = JSON.parse(localStorage.overrideDark) ? 2 : 1;
+ }
+ this.isDark = this.getIsDark();