mirror of
https://github.com/gotson/komga.git
synced 2025-12-22 00:13:30 +01:00
parent
5c903502e8
commit
5f61597125
3 changed files with 9 additions and 4 deletions
|
|
@ -127,8 +127,9 @@ router.beforeEach((to, from, next) => {
|
|||
if (!['read-book', 'browse-book', 'browse-series'].includes(<string>to.name)) {
|
||||
document.title = 'Komga'
|
||||
}
|
||||
if (to.name !== 'startup' && to.name !== 'login' && !lStore.getters.authenticated) next({ name: 'startup' })
|
||||
else next()
|
||||
if (to.name !== 'startup' && to.name !== 'login' && !lStore.getters.authenticated) {
|
||||
next({ name: 'startup', query: { redirect: to.fullPath } })
|
||||
} else next()
|
||||
})
|
||||
|
||||
export default router
|
||||
|
|
|
|||
|
|
@ -93,7 +93,11 @@ export default Vue.extend({
|
|||
|
||||
await this.$store.dispatch('getLibraries')
|
||||
|
||||
this.$router.push({ name: 'home' })
|
||||
if (this.$route.query.redirect) {
|
||||
this.$router.push({ path: this.$route.query.redirect.toString() })
|
||||
} else {
|
||||
this.$router.push({ name: 'home' })
|
||||
}
|
||||
} catch (e) {
|
||||
this.showSnack(e.message)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ export default Vue.extend({
|
|||
await this.$store.dispatch('getLibraries')
|
||||
this.$router.back()
|
||||
} catch (e) {
|
||||
this.$router.push({ name: 'login' })
|
||||
this.$router.push({ name: 'login', query: { redirect: this.$route.query.redirect } })
|
||||
}
|
||||
},
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue