Browse Source

fix(MainHeader): localNightmode not set on mounted

Owen Diffey 3 năm trước cách đây
mục cha
commit
8ddac07739
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  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() {
+		this.localNightmode = JSON.parse(localStorage.getItem("nightmode"));
+		if (this.localNightmode === null) this.localNightmode = false;
+
 		this.frontendDomain = await lofig.get("frontendDomain");
 		this.siteSettings = await lofig.get("siteSettings");