mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-08 21:08:43 +02:00
Add:Nav button in side drawer and item more menu to go to web client #1079
This commit is contained in:
@@ -79,7 +79,10 @@ export default {
|
||||
return this.$store.state.serverSettings || {}
|
||||
},
|
||||
username() {
|
||||
return this.user ? this.user.username : ''
|
||||
return this.user?.username || ''
|
||||
},
|
||||
userIsAdminOrUp() {
|
||||
return this.$store.getters['user/getIsAdminOrUp']
|
||||
},
|
||||
navItems() {
|
||||
var items = [
|
||||
@@ -132,6 +135,13 @@ export default {
|
||||
})
|
||||
|
||||
if (this.serverConnectionConfig) {
|
||||
if (this.userIsAdminOrUp) {
|
||||
items.push({
|
||||
icon: 'language',
|
||||
text: this.$strings.ButtonGoToWebClient,
|
||||
action: 'openWebClient'
|
||||
})
|
||||
}
|
||||
items.push({
|
||||
icon: 'login',
|
||||
text: this.$strings.ButtonSwitchServerUser,
|
||||
@@ -151,6 +161,10 @@ export default {
|
||||
if (action === 'logout') {
|
||||
await this.logout()
|
||||
this.$router.push('/connect')
|
||||
} else if (action === 'openWebClient') {
|
||||
this.show = false
|
||||
let path = `/library/${this.$store.state.libraries.currentLibraryId}`
|
||||
await this.$store.dispatch('user/openWebClient', path)
|
||||
}
|
||||
},
|
||||
clickBackground() {
|
||||
|
||||
Reference in New Issue
Block a user