diff --git a/src/mixins/theme.js b/src/mixins/theme.js index 98b605a7a..44e375327 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 bb673db85..5db704085 100644 --- a/src/pages/Dashboard.vue +++ b/src/pages/Dashboard.vue @@ -13,17 +13,24 @@
-
+
{{ item.name }}
-
+
+ +
+
+ +
+
+
@@ -146,4 +153,8 @@ export default { } } +.monitorItem { + width: 100%; +} + diff --git a/src/pages/Details.vue b/src/pages/Details.vue index 7d6b4c573..9f9101831 100644 --- a/src/pages/Details.vue +++ b/src/pages/Details.vue @@ -322,6 +322,12 @@ export default {