mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-12 04:11:43 +00:00
add a layout option to the authors page Cards|Table
This commit is contained in:
parent
c72eac9987
commit
9246e46423
4 changed files with 113 additions and 6 deletions
|
|
@ -98,6 +98,7 @@
|
|||
|
||||
<!-- author sort select -->
|
||||
<controls-sort-select v-if="authors?.length" v-model="settings.authorSortBy" :descending.sync="settings.authorSortDesc" :items="authorSortItems" class="w-36 sm:w-44 md:w-48 h-7.5 ml-1 sm:ml-4" @change="updateAuthorSort" />
|
||||
<controls-layout-select v-if="authors?.length" v-model="settings.authorPageLayout" :items="layoutSelectItems" class="w-24 sm:w-44 md:w-48 h-7.5 ml-1 sm:ml-4" @change="updateAuthorLayout" />
|
||||
</template>
|
||||
<!-- home page -->
|
||||
<template v-else-if="isHome">
|
||||
|
|
@ -195,6 +196,18 @@ export default {
|
|||
}
|
||||
]
|
||||
},
|
||||
layoutSelectItems() {
|
||||
return [
|
||||
{
|
||||
text: 'Cards',
|
||||
value: 'cards'
|
||||
},
|
||||
{
|
||||
text: 'Table',
|
||||
value: 'table'
|
||||
}
|
||||
]
|
||||
},
|
||||
authorSortItems() {
|
||||
return [
|
||||
{
|
||||
|
|
@ -593,6 +606,9 @@ export default {
|
|||
updateAuthorSort() {
|
||||
this.saveSettings()
|
||||
},
|
||||
updateAuthorLayout() {
|
||||
this.saveSettings()
|
||||
},
|
||||
saveSettings() {
|
||||
this.$store.dispatch('user/updateUserSettings', this.settings)
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue