mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-18 02:47:24 +00:00
make settings' menu reactive
This commit is contained in:
parent
c50b2b636a
commit
aea128a85b
1 changed files with 14 additions and 12 deletions
|
@ -44,8 +44,20 @@ export default {
|
|||
|
||||
settings: {},
|
||||
settingsLoaded: false,
|
||||
};
|
||||
},
|
||||
|
||||
subMenus: {
|
||||
computed: {
|
||||
currentPage() {
|
||||
let pathEnd = useRoute().path.split("/").at(-1);
|
||||
if (pathEnd == "settings" || pathEnd == null) {
|
||||
return "general";
|
||||
}
|
||||
return pathEnd;
|
||||
},
|
||||
|
||||
subMenus() {
|
||||
return {
|
||||
general: {
|
||||
title: this.$t("General"),
|
||||
},
|
||||
|
@ -67,18 +79,8 @@ export default {
|
|||
about: {
|
||||
title: this.$t("About"),
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
computed: {
|
||||
currentPage() {
|
||||
let pathEnd = useRoute().path.split("/").at(-1);
|
||||
if (pathEnd == "settings" || pathEnd == null) {
|
||||
return "general";
|
||||
}
|
||||
return pathEnd;
|
||||
},
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
|
Loading…
Reference in a new issue