Explorar o código

fix(MainHeader): localNightmode not set on mounted

Owen Diffey %!s(int64=3) %!d(string=hai) anos
pai
achega
8ddac07739
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      frontend/src/components/layout/MainHeader.vue

+ 3 - 0
frontend/src/components/layout/MainHeader.vue

@@ -138,6 +138,9 @@ export default {
 		}
 		}
 	},
 	},
 	async mounted() {
 	async mounted() {
+		this.localNightmode = JSON.parse(localStorage.getItem("nightmode"));
+		if (this.localNightmode === null) this.localNightmode = false;
+
 		this.frontendDomain = await lofig.get("frontendDomain");
 		this.frontendDomain = await lofig.get("frontendDomain");
 		this.siteSettings = await lofig.get("siteSettings");
 		this.siteSettings = await lofig.get("siteSettings");