feat: add vue router navigation to /admin (#3622)
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user