|
|
@ -1,46 +1,45 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<transition name="slide-fade" appear>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<h1 v-show="show" class="mb-3">
|
|
|
|
<h1 v-show="show" class="mb-3">
|
|
|
|
{{ $t("Settings") }}
|
|
|
|
{{ $t("Settings") }}
|
|
|
|
</h1>
|
|
|
|
</h1>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="shadow-box">
|
|
|
|
<div class="shadow-box">
|
|
|
|
<div class="row">
|
|
|
|
<div class="row">
|
|
|
|
<div class="settings-menu">
|
|
|
|
<div class="settings-menu">
|
|
|
|
<router-link
|
|
|
|
<router-link
|
|
|
|
v-for="(item, key) in subMenus"
|
|
|
|
v-for="(item, key) in subMenus"
|
|
|
|
:key="key"
|
|
|
|
:key="key"
|
|
|
|
:to="`/settings/${key}`"
|
|
|
|
:to="`/settings/${item.path}`"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<div class="menu-item">
|
|
|
|
<div
|
|
|
|
{{ item.title }}
|
|
|
|
class="menu-item"
|
|
|
|
|
|
|
|
:class="{ active: $route.name == `settings-${key}` }"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
{{ item.title }}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</router-link>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="settings-content">
|
|
|
|
|
|
|
|
<div class="settings-content-header">
|
|
|
|
|
|
|
|
{{ subMenus[$route.name.split("-")[1]].title }}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="mx-3">
|
|
|
|
|
|
|
|
<router-view />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</router-link>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="settings-content">
|
|
|
|
|
|
|
|
<div class="settings-content-header">
|
|
|
|
|
|
|
|
{{ subMenus[currentPage].title }}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="mx-3">
|
|
|
|
|
|
|
|
<router-view v-slot="{ Component }">
|
|
|
|
|
|
|
|
<transition name="slide-fade" appear>
|
|
|
|
|
|
|
|
<component :is="Component" />
|
|
|
|
|
|
|
|
</transition>
|
|
|
|
|
|
|
|
</router-view>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</transition>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
import { useRoute } from "vue-router";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
|
|
|
|
|
|
|
|
show: true,
|
|
|
|
show: true,
|
|
|
|
|
|
|
|
|
|
|
|
settings: {},
|
|
|
|
settings: {},
|
|
|
@ -49,36 +48,39 @@ export default {
|
|
|
|
subMenus: {
|
|
|
|
subMenus: {
|
|
|
|
general: {
|
|
|
|
general: {
|
|
|
|
title: this.$t("General"),
|
|
|
|
title: this.$t("General"),
|
|
|
|
path: "general",
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
appearance: {
|
|
|
|
appearance: {
|
|
|
|
title: this.$t("Appearance"),
|
|
|
|
title: this.$t("Appearance"),
|
|
|
|
path: "appearance",
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
notifications: {
|
|
|
|
notifications: {
|
|
|
|
title: this.$t("Notifications"),
|
|
|
|
title: this.$t("Notifications"),
|
|
|
|
path: "notifications",
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
monitorHistory: {
|
|
|
|
"monitor-history": {
|
|
|
|
title: this.$t("Monitor History"),
|
|
|
|
title: this.$t("Monitor History"),
|
|
|
|
path: "monitor-history",
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
security: {
|
|
|
|
security: {
|
|
|
|
title: this.$t("Security"),
|
|
|
|
title: this.$t("Security"),
|
|
|
|
path: "security",
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
backup: {
|
|
|
|
backup: {
|
|
|
|
title: this.$t("Backup"),
|
|
|
|
title: this.$t("Backup"),
|
|
|
|
path: "backup",
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
about: {
|
|
|
|
about: {
|
|
|
|
title: this.$t("About"),
|
|
|
|
title: this.$t("About"),
|
|
|
|
path: "about",
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
computed: {
|
|
|
|
|
|
|
|
currentPage() {
|
|
|
|
|
|
|
|
let pathEnd = useRoute().path.split("/").at(-1);
|
|
|
|
|
|
|
|
if (pathEnd == "settings" || pathEnd == null) {
|
|
|
|
|
|
|
|
return "general";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return pathEnd;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
mounted() {
|
|
|
|
mounted() {
|
|
|
|
this.loadSettings();
|
|
|
|
this.loadSettings();
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -120,7 +122,6 @@ export default {
|
|
|
|
.shadow-box {
|
|
|
|
.shadow-box {
|
|
|
|
padding: 20px;
|
|
|
|
padding: 20px;
|
|
|
|
min-height: calc(100vh - 155px);
|
|
|
|
min-height: calc(100vh - 155px);
|
|
|
|
max-height: calc(100vh - 30px);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
footer {
|
|
|
|
footer {
|
|
|
@ -154,7 +155,7 @@ footer {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.menu-item.active {
|
|
|
|
.active .menu-item {
|
|
|
|
background: $highlight-white;
|
|
|
|
background: $highlight-white;
|
|
|
|
border-left: 4px solid $primary;
|
|
|
|
border-left: 4px solid $primary;
|
|
|
|
border-top-left-radius: 0;
|
|
|
|
border-top-left-radius: 0;
|
|
|
|