From 369cad90c1c2e938a7651947dbffaed6bd2ebd4f Mon Sep 17 00:00:00 2001 From: Nelson Chan Date: Wed, 3 Nov 2021 17:03:40 +0800 Subject: [PATCH] WIP: Convert to use vue-router & improve layout WIP: Fix security page & improve layout WIP: Fix displaying current page UI: Improve spacing Chore: Improve styling --- src/components/settings/General.vue | 6 +-- src/components/settings/MonitorHistory.vue | 8 ++-- src/components/settings/Security.vue | 10 ++--- src/pages/Settings.vue | 51 ++++++++++------------ src/router.js | 46 +++++++++++++++++++ 5 files changed, 82 insertions(+), 39 deletions(-) diff --git a/src/components/settings/General.vue b/src/components/settings/General.vue index 308f21aee..a1b42d85f 100644 --- a/src/components/settings/General.vue +++ b/src/components/settings/General.vue @@ -163,13 +163,13 @@ export default { computed: { settings() { - return this.$parent.$parent.settings; + return this.$parent.$parent.$parent.settings; }, saveSettings() { - return this.$parent.$parent.saveSettings; + return this.$parent.$parent.$parent.saveSettings; }, settingsLoaded() { - return this.$parent.$parent.settingsLoaded; + return this.$parent.$parent.$parent.settingsLoaded; }, guessTimezone() { return dayjs.tz.guess(); diff --git a/src/components/settings/MonitorHistory.vue b/src/components/settings/MonitorHistory.vue index 85853ea1a..95efff0e2 100644 --- a/src/components/settings/MonitorHistory.vue +++ b/src/components/settings/MonitorHistory.vue @@ -23,7 +23,7 @@ -
{{ $t("shrinkDatabaseDescription") }}
+
{{ $t("shrinkDatabaseDescription") }}

{{ $t("Change Password") }}
@@ -60,7 +61,7 @@ -
+
{{ $t("Two Factor Authentication") }}
@@ -82,7 +83,6 @@
-
@@ -244,13 +244,13 @@ export default { computed: { settings() { - return this.$parent.$parent.settings; + return this.$parent.$parent.$parent.settings; }, saveSettings() { - return this.$parent.$parent.saveSettings; + return this.$parent.$parent.$parent.saveSettings; }, settingsLoaded() { - return this.$parent.$parent.settingsLoaded; + return this.$parent.$parent.$parent.settingsLoaded; } }, diff --git a/src/pages/Settings.vue b/src/pages/Settings.vue index 9ff234150..0cff13678 100644 --- a/src/pages/Settings.vue +++ b/src/pages/Settings.vue @@ -8,21 +8,25 @@
- + +
- {{ subMenus[currentSubMenu].title }} + {{ subMenus[$route.name.split("-")[1]].title }}
- +
@@ -32,16 +36,6 @@