mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-02 09:14:40 +02:00
Add:All listening sessions config page
This commit is contained in:
parent
2d5e4ebcf0
commit
5cd343cb01
7 changed files with 261 additions and 13 deletions
|
@ -38,12 +38,6 @@ export default {
|
|||
userIsAdminOrUp() {
|
||||
return this.$store.getters['user/getIsAdminOrUp']
|
||||
},
|
||||
user() {
|
||||
return this.$store.state.user.user || {}
|
||||
},
|
||||
userId() {
|
||||
return this.user.id
|
||||
},
|
||||
configRoutes() {
|
||||
if (!this.userIsAdminOrUp) {
|
||||
return [
|
||||
|
@ -70,6 +64,11 @@ export default {
|
|||
title: 'Users',
|
||||
path: '/config/users'
|
||||
},
|
||||
{
|
||||
id: 'config-sessions',
|
||||
title: 'Sessions',
|
||||
path: '/config/sessions'
|
||||
},
|
||||
{
|
||||
id: 'config-backups',
|
||||
title: 'Backups',
|
||||
|
@ -93,11 +92,6 @@ export default {
|
|||
title: 'Your Stats',
|
||||
path: '/config/stats'
|
||||
})
|
||||
configRoutes.push({
|
||||
id: 'config-users-id-sessions',
|
||||
title: 'Your Sessions',
|
||||
path: `/config/users/${this.userId}/sessions`
|
||||
})
|
||||
}
|
||||
|
||||
return configRoutes
|
||||
|
|
|
@ -42,7 +42,8 @@ export default {
|
|||
editable: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
showAllWhenEmpty: Boolean
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -72,6 +73,7 @@ export default {
|
|||
itemsToShow() {
|
||||
if (!this.editable) return this.items
|
||||
if (!this.textInput || this.textInput === this.input) {
|
||||
if (this.showAllWhenEmpty) return this.items
|
||||
return []
|
||||
}
|
||||
return this.items.filter((i) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue