mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-25 22:41:57 +02: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()
|
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)) {
|
else if (to.matched.some(record => record.meta.disabledWithAuthProxy)) {
|
||||||
if (window.appConfig.proxyAuth) {
|
if (window.appConfig.proxyAuth) {
|
||||||
next({ name: 'accounts' })
|
next({ name: 'accounts' })
|
||||||
|
@ -143,10 +143,6 @@
|
|||||||
if (from.params.returnTo) {
|
if (from.params.returnTo) {
|
||||||
to.params.returnTo = from.params.returnTo
|
to.params.returnTo = from.params.returnTo
|
||||||
}
|
}
|
||||||
|
|
||||||
to.params.goBackTo = from.name
|
|
||||||
? from.path
|
|
||||||
: '/accounts'
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user