feat: improve account navigation (#3623)

This commit is contained in:
dni ⚡
2025-12-05 09:45:02 +01:00
committed by GitHub
parent dbf71fed53
commit 46406792fe
4 changed files with 14 additions and 13 deletions
File diff suppressed because one or more lines are too long
+10 -3
View File
@@ -191,6 +191,14 @@ window.PageAccount = {
}
},
watch: {
tab(tab) {
this.$router.push(`/account#${tab}`)
},
$route(to) {
if (to.hash.length > 1) {
this.tab = to.hash.replace('#', '')
}
},
'assetsTable.search': {
handler() {
const props = {}
@@ -688,9 +696,8 @@ window.PageAccount = {
} catch (e) {
LNbits.utils.notifyApiError(e)
}
const hash = window.location.hash.replace('#', '')
if (hash) {
this.tab = hash
if (this.$route.hash.length > 1) {
this.tab = this.$route.hash.replace('#', '')
}
await this.getApiACLs()
await this.getUserAssets()
+3 -3
View File
@@ -22,13 +22,13 @@ window.PageAdmin = {
$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('#', '')
if (this.$route.hash.length > 1) {
this.tab = this.$route.hash.replace('#', '')
}
await this.getSettings()
},
computed: {