From 951dbec46284590231f8d82658309cc069308584 Mon Sep 17 00:00:00 2001 From: rramiachraf <51409801+rramiachraf@users.noreply.github.com> Date: Sat, 4 Mar 2023 23:19:02 +0100 Subject: [PATCH] fix: make title bar reactive on auto mode --- src/App.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/App.vue b/src/App.vue index 3da866f0..5f1282f5 100644 --- a/src/App.vue +++ b/src/App.vue @@ -34,10 +34,12 @@ export default { if (themePref == "auto") this.theme = darkModePreference.matches ? "dark" : "light"; else this.theme = themePref; - // Change title bar color to white + // Change title bar color based on user's theme + const themeColor = document.querySelector("meta[name='theme-color']"); if (this.theme === "light") { - const themeColor = document.querySelector("meta[name='theme-color']"); themeColor.setAttribute("content", "#FFF"); + } else { + themeColor.setAttribute("content", "#0F0F0F"); } // Used for the scrollbar