From 15d7f5d34832b3f64e3fd58442ac63760bd8e4e9 Mon Sep 17 00:00:00 2001 From: Substancia Date: Mon, 9 Oct 2023 15:01:00 +0530 Subject: [PATCH] load once and cache --- src/components/settings/General.vue | 1 + src/pages/DashboardHome.vue | 5 ++++- src/pages/Details.vue | 5 ++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/settings/General.vue b/src/components/settings/General.vue index bfc651e2..91904488 100644 --- a/src/components/settings/General.vue +++ b/src/components/settings/General.vue @@ -335,6 +335,7 @@ export default { */ saveGeneral() { localStorage.timezone = this.$root.userTimezone; + this.$root.use12HourTimeFormat = this.settings.use12HourTimeFormat; this.saveSettings(); }, /** diff --git a/src/pages/DashboardHome.vue b/src/pages/DashboardHome.vue index 5f6d2fb1..6e0bfbe8 100644 --- a/src/pages/DashboardHome.vue +++ b/src/pages/DashboardHome.vue @@ -113,8 +113,11 @@ export default { }, }, - mounted() { + created() { this.loadSettings(); + }, + + mounted() { this.getImportantHeartbeatListLength(); this.$root.emitter.on("newImportantHeartbeat", this.onNewImportantHeartbeat); diff --git a/src/pages/Details.vue b/src/pages/Details.vue index 8b635263..b49f352d 100644 --- a/src/pages/Details.vue +++ b/src/pages/Details.vue @@ -413,8 +413,11 @@ export default { }, }, - mounted() { + created() { this.loadSettings(); + }, + + mounted() { this.getImportantHeartbeatListLength(); this.$root.emitter.on("newImportantHeartbeat", this.onNewImportantHeartbeat);