diff --git a/src/mixins/theme.js b/src/mixins/theme.js index 98b605a7..8f4d9680 100644 --- a/src/mixins/theme.js +++ b/src/mixins/theme.js @@ -4,6 +4,7 @@ export default { return { system: (window.matchMedia("(prefers-color-scheme: dark)").matches) ? "dark" : "light", userTheme: localStorage.theme, + userHeartbeatBar: localStorage.heartbeatBarTheme }; }, @@ -13,6 +14,11 @@ export default { this.userTheme = "light"; } + //Default Heartbeat Bar + if (! this.userHeartbeatBar) { + this.userHeartbeatBar = "normal"; + } + document.body.classList.add(this.theme); this.updateThemeColorMeta(); }, @@ -35,6 +41,15 @@ export default { document.body.classList.remove(from); document.body.classList.add(this.theme); this.updateThemeColorMeta(); + }, + + userHeartbeatBar(to, from) { + localStorage.heartbeatBarTheme = to; + }, + + heartbeatBarTheme(to, from) { + document.body.classList.remove(from); + document.body.classList.add(this.heartbeatBarTheme); } }, diff --git a/src/pages/Dashboard.vue b/src/pages/Dashboard.vue index bb673db8..89ceae30 100644 --- a/src/pages/Dashboard.vue +++ b/src/pages/Dashboard.vue @@ -13,17 +13,24 @@
-
+
{{ item.name }}
-
+
+ +
+
+ +
+
+
@@ -146,4 +153,12 @@ export default { } } +.hideHeartbeatBar { + display: none; +} + +.monitorItem { + width: 100%; +} + diff --git a/src/pages/Settings.vue b/src/pages/Settings.vue index 73e71172..0ffd72d3 100644 --- a/src/pages/Settings.vue +++ b/src/pages/Settings.vue @@ -26,6 +26,22 @@
+
+ +
+
+ + + + + + + + +
+
+
+