+
- {{ notificationHistoryConfig.buffer_timestamp_min }}min
–
–
diff --git a/src/components/TheThemeButton.vue b/src/components/TheThemeButton.vue
index 17e8b5d..683a1ef 100644
--- a/src/components/TheThemeButton.vue
+++ b/src/components/TheThemeButton.vue
@@ -2,14 +2,16 @@
import { ref, watch } from 'vue'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
import { faMoon, faSun } from '@fortawesome/free-solid-svg-icons'
+ import { darkModeOn } from "@/settings.js"
- const darkMode = ref(true)
+ const darkMode = ref(darkModeOn.value)
watch(darkMode, (newValue) => {
+ darkModeOn.value = newValue
if (newValue) {
- document.getElementsByTagName('body')[0].classList.add('dark')
- } else {
- document.getElementsByTagName('body')[0].classList.remove('dark')
+ document.getElementsByTagName('body')[0].classList.add('dark')
+ } else {
+ document.getElementsByTagName('body')[0].classList.remove('dark')
}
})
diff --git a/src/settings.js b/src/settings.js
new file mode 100644
index 0000000..567cfa7
--- /dev/null
+++ b/src/settings.js
@@ -0,0 +1,4 @@
+import { ref, computed } from 'vue'
+
+export const darkModeOn = ref(true)
+export const darkModeEnabled = computed(() => darkModeOn.value)
\ No newline at end of file