make settings' menu reactive

pull/966/head
Louis Lam 3 years ago
parent c50b2b636a
commit aea128a85b

@ -44,8 +44,20 @@ export default {
settings: {}, settings: {},
settingsLoaded: false, settingsLoaded: false,
};
},
computed: {
currentPage() {
let pathEnd = useRoute().path.split("/").at(-1);
if (pathEnd == "settings" || pathEnd == null) {
return "general";
}
return pathEnd;
},
subMenus: { subMenus() {
return {
general: { general: {
title: this.$t("General"), title: this.$t("General"),
}, },
@ -67,17 +79,7 @@ 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;
}, },
}, },

Loading…
Cancel
Save