mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-11-22 16:23:18 +01:00
Refactoring of fe4ebd58
: Set Close/Back buttons to always browse back
This commit is contained in:
parent
5f6bbbd156
commit
5d4f88baa6
6
resources/js/routes.js
vendored
6
resources/js/routes.js
vendored
@ -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' })
|
||||
|
@ -143,10 +143,6 @@
|
||||
if (from.params.returnTo) {
|
||||
to.params.returnTo = from.params.returnTo
|
||||
}
|
||||
|
||||
to.params.goBackTo = from.name
|
||||
? from.path
|
||||
: '/accounts'
|
||||
})
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user