mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-03 17:44:51 +02:00
Check app version, fix close stream bug, show audiobook progress, add toasts
This commit is contained in:
parent
98076927ff
commit
619b6f3686
51 changed files with 551 additions and 141 deletions
|
@ -33,6 +33,7 @@ class Server extends EventEmitter {
|
|||
setUser(user) {
|
||||
this.user = user
|
||||
this.store.commit('user/setUser', user)
|
||||
this.store.commit('user/setSettings', user.settings)
|
||||
if (user) {
|
||||
localStorage.setItem('userToken', user.token)
|
||||
} else {
|
||||
|
@ -149,6 +150,11 @@ class Server extends EventEmitter {
|
|||
this.emit('initialStream', data.stream)
|
||||
}
|
||||
})
|
||||
this.socket.on('user_updated', (user) => {
|
||||
if (this.user && user.id === this.user.id) {
|
||||
this.setUser(user)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue