mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-04-25 23:06:43 +02:00
Fix:Series covers on home page not spread out correctly #505, Update:Server settings are now returned with auth requests
This commit is contained in:
@@ -44,6 +44,14 @@ export default {
|
||||
this.$nextTick(this.init)
|
||||
}
|
||||
}
|
||||
},
|
||||
width: {
|
||||
handler(newVal) {
|
||||
if (newVal) {
|
||||
this.isInit = false
|
||||
this.$nextTick(this.init)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
@@ -106,12 +106,6 @@ export default {
|
||||
}
|
||||
}
|
||||
if (payload.serverSettings) {
|
||||
this.$store.commit('setServerSettings', payload.serverSettings)
|
||||
|
||||
if (payload.serverSettings.chromecastEnabled) {
|
||||
console.log('Chromecast enabled import script')
|
||||
require('@/plugins/chromecast.js').default(this)
|
||||
}
|
||||
}
|
||||
|
||||
// Start scans currently running
|
||||
|
||||
@@ -48,8 +48,15 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setUser(user, defaultLibraryId) {
|
||||
this.$store.commit('libraries/setCurrentLibrary', defaultLibraryId)
|
||||
setUser({ user, userDefaultLibraryId, serverSettings }) {
|
||||
this.$store.commit('setServerSettings', serverSettings)
|
||||
|
||||
if (serverSettings.chromecastEnabled) {
|
||||
console.log('Chromecast enabled import script')
|
||||
require('@/plugins/chromecast.js').default(this)
|
||||
}
|
||||
|
||||
this.$store.commit('libraries/setCurrentLibrary', userDefaultLibraryId)
|
||||
this.$store.commit('user/setUser', user)
|
||||
},
|
||||
async submitForm() {
|
||||
@@ -69,7 +76,7 @@ export default {
|
||||
if (authRes && authRes.error) {
|
||||
this.error = authRes.error
|
||||
} else if (authRes) {
|
||||
this.setUser(authRes.user, authRes.userDefaultLibraryId)
|
||||
this.setUser(authRes)
|
||||
}
|
||||
this.processing = false
|
||||
},
|
||||
@@ -87,7 +94,7 @@ export default {
|
||||
}
|
||||
})
|
||||
.then((res) => {
|
||||
this.setUser(res.user, res.userDefaultLibraryId)
|
||||
this.setUser(res)
|
||||
this.processing = false
|
||||
})
|
||||
.catch((error) => {
|
||||
|
||||
Reference in New Issue
Block a user