mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-03 17:54:54 +02:00
Merge remote-tracking branch 'origin/master' into auth_passportjs
This commit is contained in:
commit
dd9a3858d7
249 changed files with 15582 additions and 7835 deletions
|
@ -74,9 +74,17 @@ export default {
|
|||
} else {
|
||||
this.$router.replace('/oops?message=No libraries available')
|
||||
}
|
||||
} else if (this.$route.query.redirect) {
|
||||
this.$router.replace(this.$route.query.redirect)
|
||||
} else {
|
||||
if (this.$route.query.redirect) {
|
||||
const isAdminUser = this.$store.getters['user/getIsAdminOrUp']
|
||||
const redirect = this.$route.query.redirect
|
||||
// If not admin user then do not redirect to config pages other than your stats
|
||||
if (isAdminUser || !redirect.startsWith('/config/') || redirect === '/config/stats') {
|
||||
this.$router.replace(redirect)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
this.$router.replace(`/library/${this.$store.state.libraries.currentLibraryId}`)
|
||||
}
|
||||
}
|
||||
|
@ -107,7 +115,7 @@ export default {
|
|||
const payload = {
|
||||
newRoot: { ...this.newRoot }
|
||||
}
|
||||
var success = await this.$axios
|
||||
const success = await this.$axios
|
||||
.$post('/init', payload)
|
||||
.then(() => true)
|
||||
.catch((error) => {
|
||||
|
@ -124,9 +132,14 @@ export default {
|
|||
|
||||
location.reload()
|
||||
},
|
||||
<<<<<<< HEAD
|
||||
setUser({ user, userDefaultLibraryId, serverSettings, Source }) {
|
||||
=======
|
||||
setUser({ user, userDefaultLibraryId, serverSettings, Source, ereaderDevices }) {
|
||||
>>>>>>> origin/master
|
||||
this.$store.commit('setServerSettings', serverSettings)
|
||||
this.$store.commit('setSource', Source)
|
||||
this.$store.commit('libraries/setEReaderDevices', ereaderDevices)
|
||||
this.$setServerLanguageCode(serverSettings.language)
|
||||
|
||||
if (serverSettings.chromecastEnabled) {
|
||||
|
@ -153,7 +166,10 @@ export default {
|
|||
else this.error = 'Unknown Error'
|
||||
return false
|
||||
})
|
||||
<<<<<<< HEAD
|
||||
console.log('Auth res', authRes)
|
||||
=======
|
||||
>>>>>>> origin/master
|
||||
if (authRes?.error) {
|
||||
this.error = authRes.error
|
||||
} else if (authRes) {
|
||||
|
@ -162,7 +178,7 @@ export default {
|
|||
this.processing = false
|
||||
},
|
||||
checkAuth() {
|
||||
var token = localStorage.getItem('token')
|
||||
const token = localStorage.getItem('token')
|
||||
if (!token) return false
|
||||
|
||||
this.processing = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue