mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-02 00:54:30 +02:00
Add:Nav button in side drawer and item more menu to go to web client #1079
This commit is contained in:
parent
f04eebe0d8
commit
3c6d4b5f19
24 changed files with 69 additions and 7 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue