Fix dark mode: sync dark class to html element for Tailwind
This commit is contained in:
@@ -613,6 +613,7 @@ function dashboard() {
|
|||||||
toggleDark() {
|
toggleDark() {
|
||||||
this.dark = !this.dark;
|
this.dark = !this.dark;
|
||||||
localStorage.setItem('dark', String(this.dark));
|
localStorage.setItem('dark', String(this.dark));
|
||||||
|
document.documentElement.classList.toggle('dark', this.dark);
|
||||||
},
|
},
|
||||||
|
|
||||||
portAccessLabel(port, inv) {
|
portAccessLabel(port, inv) {
|
||||||
@@ -650,6 +651,7 @@ function dashboard() {
|
|||||||
},
|
},
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
|
document.documentElement.classList.toggle('dark', this.dark);
|
||||||
// Each service has: external (public domain/ip), lan (192.168.x), ts (tailscale 100.x)
|
// Each service has: external (public domain/ip), lan (192.168.x), ts (tailscale 100.x)
|
||||||
// Fields left undefined = not applicable
|
// Fields left undefined = not applicable
|
||||||
this.publicServices = [
|
this.publicServices = [
|
||||||
|
|||||||
Reference in New Issue
Block a user