feat: add vue router navigation to /admin (#3622)

This commit is contained in:
dni ⚡
2025-12-05 09:25:47 +01:00
committed by GitHub
parent 850087a8ec
commit dbf71fed53
3 changed files with 15 additions and 15 deletions
File diff suppressed because one or more lines are too long
+14 -5
View File
@@ -15,13 +15,22 @@ window.PageAdmin = {
needsRestart: false
}
},
async created() {
await this.getSettings()
const hash = window.location.hash.replace('#', '')
if (hash) {
this.tab = hash
watch: {
tab(tab) {
this.$router.push(`/admin#${tab}`)
},
$route(to) {
if (to.hash.length > 1) {
this.tab = to.hash.replace('#', '')
} else {
this.$router.push(`/admin#funding`)
}
}
},
async created() {
this.tab = this.$route.hash.replace('#', '')
await this.getSettings()
},
computed: {
checkChanges() {
return !_.isEqual(this.settings, this.formData)