Refactoring of fe4ebd58: Set Close/Back buttons to always browse back

This commit is contained in:
Bubka 2023-08-30 15:34:28 +02:00
parent 5f6bbbd156
commit 5d4f88baa6
2 changed files with 6 additions and 4 deletions

View File

@ -101,6 +101,12 @@ router.beforeEach((to, from, next) => {
next()
}
}
else if (to.name == 'about' && to.params.goBackTo == undefined) {
if (from.name) {
next({ name: to.name, params: {goBackTo: from.path} })
}
else next({ name: to.name, params: {goBackTo: '/accounts'} })
}
else if (to.matched.some(record => record.meta.disabledWithAuthProxy)) {
if (window.appConfig.proxyAuth) {
next({ name: 'accounts' })

View File

@ -143,10 +143,6 @@
if (from.params.returnTo) {
to.params.returnTo = from.params.returnTo
}
to.params.goBackTo = from.name
? from.path
: '/accounts'
})
},