Sfoglia il codice sorgente

feat: added christmas-mode class to body in christmas mode, set primary color to red in christmas mode

Kristian Vos 3 anni fa
parent
commit
00bb4a0411
1 ha cambiato i file con 13 aggiunte e 0 eliminazioni
  1. 13 0
      frontend/src/App.vue

+ 13 - 0
frontend/src/App.vue

@@ -227,6 +227,10 @@ export default {
 			this.changeNightmode(true);
 			this.enableNightmode();
 		}
+
+		lofig.get("siteSettings.christmas").then(christmas => {
+			if (christmas) this.enableChristmasMode();
+		});
 	},
 	methods: {
 		toggleNightMode() {
@@ -254,6 +258,11 @@ export default {
 				.getElementsByTagName("body")[0]
 				.classList.remove("night-mode");
 		},
+		enableChristmasMode: () => {
+			document
+				.getElementsByTagName("body")[0]
+				.classList.add("christmas-mode");
+		},
 		...mapActions("modalVisibility", ["closeCurrentModal"]),
 		...mapActions("user/preferences", [
 			"changeNightmode",
@@ -357,6 +366,10 @@ export default {
 	}
 }
 
+.christmas-mode {
+	--primary-color: var(--red);
+}
+
 /* inter-regular - latin */
 @font-face {
 	font-family: "Inter";