mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-09-17 08:56:57 +08:00
make settings' menu reactive
This commit is contained in:
@@ -44,8 +44,20 @@ export default {
|
|||||||
|
|
||||||
settings: {},
|
settings: {},
|
||||||
settingsLoaded: false,
|
settingsLoaded: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
subMenus: {
|
computed: {
|
||||||
|
currentPage() {
|
||||||
|
let pathEnd = useRoute().path.split("/").at(-1);
|
||||||
|
if (pathEnd == "settings" || pathEnd == null) {
|
||||||
|
return "general";
|
||||||
|
}
|
||||||
|
return pathEnd;
|
||||||
|
},
|
||||||
|
|
||||||
|
subMenus() {
|
||||||
|
return {
|
||||||
general: {
|
general: {
|
||||||
title: this.$t("General"),
|
title: this.$t("General"),
|
||||||
},
|
},
|
||||||
@@ -67,18 +79,8 @@ export default {
|
|||||||
about: {
|
about: {
|
||||||
title: this.$t("About"),
|
title: this.$t("About"),
|
||||||
},
|
},
|
||||||
},
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
|
||||||
currentPage() {
|
|
||||||
let pathEnd = useRoute().path.split("/").at(-1);
|
|
||||||
if (pathEnd == "settings" || pathEnd == null) {
|
|
||||||
return "general";
|
|
||||||
}
|
|
||||||
return pathEnd;
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
|
Reference in New Issue
Block a user