1
0
mirror of https://github.com/louislam/uptime-kuma.git synced 2024-12-12 10:13:46 +02:00

make settings' menu reactive

This commit is contained in:
Louis Lam 2021-11-29 16:50:00 +08:00
parent c50b2b636a
commit aea128a85b

View File

@ -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,17 +79,7 @@ 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;
};
},
},