mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-27 11:18:14 +01:00 
			
		
		
		
	Starting point for home page
This commit is contained in:
		
							parent
							
								
									a343a1038c
								
							
						
					
					
						commit
						868e1af28a
					
				@ -9,20 +9,38 @@
 | 
				
			|||||||
  height: calc(100% - 64px - 165px);
 | 
					  height: calc(100% - 64px - 165px);
 | 
				
			||||||
  max-height: calc(100% - 64px - 165px);
 | 
					  max-height: calc(100% - 64px - 165px);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					#bookshelf {
 | 
				
			||||||
 | 
					  height: calc(100% - 40px);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* width */
 | 
					/* width */
 | 
				
			||||||
::-webkit-scrollbar {
 | 
					::-webkit-scrollbar {
 | 
				
			||||||
  width: 8px;
 | 
					  width: 8px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					/* ::-webkit-scrollbar:horizontal { */
 | 
				
			||||||
 | 
					  /* height: 16px; */
 | 
				
			||||||
 | 
					  /* height: 24px;
 | 
				
			||||||
 | 
					} */
 | 
				
			||||||
/* Track */
 | 
					/* Track */
 | 
				
			||||||
::-webkit-scrollbar-track {
 | 
					::-webkit-scrollbar-track {
 | 
				
			||||||
  background-color: rgba(0,0,0,0);
 | 
					  background-color: rgba(0,0,0,0);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					/* ::-webkit-scrollbar-track:horizontal { */
 | 
				
			||||||
 | 
					  /* background: rgb(149, 119, 90); */
 | 
				
			||||||
 | 
					  /* background: linear-gradient(180deg, rgba(149, 119, 90, 1) 0%, rgba(103, 70, 37, 1) 17%, rgba(103, 70, 37, 1) 88%, rgba(71, 48, 25, 1) 100%); */
 | 
				
			||||||
 | 
					  /* background: linear-gradient(180deg, rgb(117, 88, 60) 0%, rgb(65, 41, 17) 17%, rgb(71, 43, 15) 88%, rgb(3, 2, 1) 100%);
 | 
				
			||||||
 | 
					  box-shadow: 2px 14px 8px #111111aa;
 | 
				
			||||||
 | 
					} */
 | 
				
			||||||
/* Handle */
 | 
					/* Handle */
 | 
				
			||||||
::-webkit-scrollbar-thumb {
 | 
					::-webkit-scrollbar-thumb {
 | 
				
			||||||
  background: #855620; 
 | 
					  background: #855620; 
 | 
				
			||||||
  border-radius: 4px;
 | 
					  border-radius: 4px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					/* ::-webkit-scrollbar-thumb:horizontal { */
 | 
				
			||||||
 | 
					  /* background: linear-gradient(180deg, rgba(149, 119, 90, 1) 0%, rgba(103, 70, 37, 1) 17%, rgba(103, 70, 37, 1) 88%, rgba(71, 48, 25, 1) 100%); */
 | 
				
			||||||
 | 
					  /* box-shadow: 2px 14px 8px #111111aa; 
 | 
				
			||||||
 | 
					  border-radius: 4px;
 | 
				
			||||||
 | 
					} */
 | 
				
			||||||
/* Handle on hover */
 | 
					/* Handle on hover */
 | 
				
			||||||
::-webkit-scrollbar-thumb:hover {
 | 
					::-webkit-scrollbar-thumb:hover {
 | 
				
			||||||
  background: #704922; 
 | 
					  background: #704922; 
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="w-full h-16 bg-primary relative">
 | 
					  <div class="w-full h-16 bg-primary relative">
 | 
				
			||||||
    <div id="appbar" class="absolute top-0 bottom-0 left-0 w-full h-full px-6 py-1 z-30">
 | 
					    <div id="appbar" class="absolute top-0 bottom-0 left-0 w-full h-full px-6 py-1 z-40">
 | 
				
			||||||
      <div class="flex h-full items-center">
 | 
					      <div class="flex h-full items-center">
 | 
				
			||||||
        <img v-if="!showBack" src="/Logo48.png" class="w-12 h-12 mr-4" />
 | 
					        <img v-if="!showBack" src="/Logo48.png" class="w-12 h-12 mr-4" />
 | 
				
			||||||
        <a v-if="showBack" @click="back" class="rounded-full h-12 w-12 flex items-center justify-center hover:bg-white hover:bg-opacity-10 mr-4 cursor-pointer">
 | 
					        <a v-if="showBack" @click="back" class="rounded-full h-12 w-12 flex items-center justify-center hover:bg-white hover:bg-opacity-10 mr-4 cursor-pointer">
 | 
				
			||||||
@ -37,7 +37,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      <div v-show="numAudiobooksSelected" class="absolute top-0 left-0 w-full h-full px-4 bg-primary flex items-center">
 | 
					      <div v-show="numAudiobooksSelected" class="absolute top-0 left-0 w-full h-full px-4 bg-primary flex items-center">
 | 
				
			||||||
        <h1 class="text-2xl px-4">{{ numAudiobooksSelected }} Selected</h1>
 | 
					        <h1 class="text-2xl px-4">{{ numAudiobooksSelected }} Selected</h1>
 | 
				
			||||||
        <ui-btn small class="text-sm mx-2" @click="toggleSelectAll"
 | 
					        <ui-btn v-show="!isHome" small class="text-sm mx-2" @click="toggleSelectAll"
 | 
				
			||||||
          >{{ isAllSelected ? 'Select None' : 'Select All' }}<span class="pl-2">({{ audiobooksShowing.length }})</span></ui-btn
 | 
					          >{{ isAllSelected ? 'Select None' : 'Select All' }}<span class="pl-2">({{ audiobooksShowing.length }})</span></ui-btn
 | 
				
			||||||
        >
 | 
					        >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -64,8 +64,11 @@ export default {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  computed: {
 | 
					  computed: {
 | 
				
			||||||
 | 
					    isHome() {
 | 
				
			||||||
 | 
					      return this.$route.name === 'index'
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    showBack() {
 | 
					    showBack() {
 | 
				
			||||||
      return this.$route.name !== 'library-id'
 | 
					      return this.$route.name !== 'library-id' && !this.isHome
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    user() {
 | 
					    user() {
 | 
				
			||||||
      return this.$store.state.user.user
 | 
					      return this.$store.state.user.user
 | 
				
			||||||
@ -73,6 +76,7 @@ export default {
 | 
				
			|||||||
    isRootUser() {
 | 
					    isRootUser() {
 | 
				
			||||||
      return this.$store.getters['user/getIsRoot']
 | 
					      return this.$store.getters['user/getIsRoot']
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    username() {
 | 
					    username() {
 | 
				
			||||||
      return this.user ? this.user.username : 'err'
 | 
					      return this.user ? this.user.username : 'err'
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@ -92,6 +96,9 @@ export default {
 | 
				
			|||||||
      // return this.$store.getters['audiobooks/getFiltered']()
 | 
					      // return this.$store.getters['audiobooks/getFiltered']()
 | 
				
			||||||
      return this.$store.getters['audiobooks/getEntitiesShowing']()
 | 
					      return this.$store.getters['audiobooks/getEntitiesShowing']()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    selectedSeries() {
 | 
				
			||||||
 | 
					      return this.$store.state.audiobooks.selectedSeries
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    userCanUpdate() {
 | 
					    userCanUpdate() {
 | 
				
			||||||
      return this.$store.getters['user/getUserCanUpdate']
 | 
					      return this.$store.getters['user/getUserCanUpdate']
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
				
			|||||||
@ -68,11 +68,13 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    selectedSeries() {
 | 
					    selectedSeries() {
 | 
				
			||||||
      this.$nextTick(() => {
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
 | 
					        this.$store.commit('audiobooks/setSelectedSeries', this.selectedSeries)
 | 
				
			||||||
        this.setBookshelfEntities()
 | 
					        this.setBookshelfEntities()
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    searchResults() {
 | 
					    searchResults() {
 | 
				
			||||||
      this.$nextTick(() => {
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
 | 
					        this.$store.commit('audiobooks/setSearchResults', this.searchResults)
 | 
				
			||||||
        this.setBookshelfEntities()
 | 
					        this.setBookshelfEntities()
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -130,9 +132,6 @@ export default {
 | 
				
			|||||||
    clickGroup(group) {
 | 
					    clickGroup(group) {
 | 
				
			||||||
      this.$emit('update:selectedSeries', group.name)
 | 
					      this.$emit('update:selectedSeries', group.name)
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changeRotation() {
 | 
					 | 
				
			||||||
      this.rotation = 'show-right'
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    clearFilter() {
 | 
					    clearFilter() {
 | 
				
			||||||
      this.$store.commit('audiobooks/setKeywordFilter', null)
 | 
					      this.$store.commit('audiobooks/setKeywordFilter', null)
 | 
				
			||||||
      if (this.filterBy !== 'all') {
 | 
					      if (this.filterBy !== 'all') {
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										234
									
								
								client/components/app/BookShelfCategorized.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										234
									
								
								client/components/app/BookShelfCategorized.vue
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,234 @@
 | 
				
			|||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div id="bookshelf" ref="wrapper" class="w-full h-full overflow-y-scroll relative">
 | 
				
			||||||
 | 
					    <!-- Cover size widget -->
 | 
				
			||||||
 | 
					    <div class="fixed bottom-2 right-4 z-40">
 | 
				
			||||||
 | 
					      <div class="rounded-full py-1 bg-primary px-2 border border-black-100 text-center flex items-center box-shadow-md" @mousedown.prevent @mouseup.prevent>
 | 
				
			||||||
 | 
					        <span class="material-icons" :class="selectedSizeIndex === 0 ? 'text-gray-400' : 'hover:text-yellow-300 cursor-pointer'" style="font-size: 0.9rem" @mousedown.prevent @click="decreaseSize">remove</span>
 | 
				
			||||||
 | 
					        <p class="px-2 font-mono">{{ bookCoverWidth }}</p>
 | 
				
			||||||
 | 
					        <span class="material-icons" :class="selectedSizeIndex === availableSizes.length - 1 ? 'text-gray-400' : 'hover:text-yellow-300 cursor-pointer'" style="font-size: 0.9rem" @mousedown.prevent @click="increaseSize">add</span>
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <div v-if="!audiobooks.length" class="w-full flex flex-col items-center justify-center py-12">
 | 
				
			||||||
 | 
					      <p class="text-center text-2xl font-book mb-4 py-4">Your Audiobookshelf is empty!</p>
 | 
				
			||||||
 | 
					      <div class="flex">
 | 
				
			||||||
 | 
					        <ui-btn to="/config" color="primary" class="w-52 mr-2" @click="scan">Configure Scanner</ui-btn>
 | 
				
			||||||
 | 
					        <ui-btn color="success" class="w-52" @click="scan">Scan Audiobooks</ui-btn>
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div v-else id="bookshelf" class="w-full flex flex-col items-center">
 | 
				
			||||||
 | 
					      <template v-for="(shelf, index) in shelves">
 | 
				
			||||||
 | 
					        <div :key="index" class="relative">
 | 
				
			||||||
 | 
					          <div class="w-full bookshelfRowCategorized relative overflow-x-scroll overflow-y-hidden z-10" :style="{ paddingLeft: 4 * sizeMultiplier + 'rem' }">
 | 
				
			||||||
 | 
					            <div class="w-full h-full" :style="{ marginTop: sizeMultiplier + 'rem' }">
 | 
				
			||||||
 | 
					              <div class="flex items-center -mb-2">
 | 
				
			||||||
 | 
					                <template v-for="entity in shelf.books">
 | 
				
			||||||
 | 
					                  <cards-book-card :key="entity.id" :width="bookCoverWidth" :user-progress="userAudiobooks[entity.id]" :audiobook="entity" />
 | 
				
			||||||
 | 
					                </template>
 | 
				
			||||||
 | 
					              </div>
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					          <!-- <div class="absolute text-center box-shadow-book categoryPlacard font-book transform z-30" :style="{ top: sizeMultiplier + 'rem', left: 1.5 * signSizeMultiplier + 'rem', height: 2 * signSizeMultiplier + 'rem', width: 9 * signSizeMultiplier + 'rem', padding: 0.25 * signSizeMultiplier + 'rem', borderRadius: 0.375 * signSizeMultiplier + 'rem' }">
 | 
				
			||||||
 | 
					            <div class="w-px bg-white shadow-sm bg-opacity-60 absolute transform skew-x-6" :style="{ height: sizeMultiplier + 'rem', top: -sizeMultiplier + 'rem', left: 1.25 * signSizeMultiplier + 'rem' }" />
 | 
				
			||||||
 | 
					            <div class="w-px bg-white shadow-sm bg-opacity-60 absolute transform -skew-x-6" :style="{ height: sizeMultiplier + 'rem', top: -sizeMultiplier + 'rem', right: 1.25 * signSizeMultiplier + 'rem' }" />
 | 
				
			||||||
 | 
					            <div class="w-full h-full shinyBlack flex items-center justify-center rounded-sm" :style="{ borderWidth: 0.125 * signSizeMultiplier + 'rem' }">
 | 
				
			||||||
 | 
					              <p class="transform" :style="{ fontSize: 0.875 * signSizeMultiplier + 'rem' }">{{ shelf.label }}</p>
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					          </div> -->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          <!-- <div class="absolute text-center box-shadow-side categoryPlacard font-book transform z-30 bottom-4" :style="{ left: 0.5 * signSizeMultiplier + 'rem', height: 2 * signSizeMultiplier + 'rem', width: 9 * signSizeMultiplier + 'rem', padding: 0.25 * signSizeMultiplier + 'rem', borderRadius: 0.375 * signSizeMultiplier + 'rem' }">
 | 
				
			||||||
 | 
					            <div class="w-full h-full shinyBlack flex items-center justify-center rounded-sm" :style="{ borderWidth: 0.125 * signSizeMultiplier + 'rem' }">
 | 
				
			||||||
 | 
					              <p class="transform" :style="{ fontSize: 0.875 * signSizeMultiplier + 'rem' }">{{ shelf.label }}</p>
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					          </div> -->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          <div class="absolute text-center categoryPlacard font-book transform z-30 bottom-0.5 left-8 w-36 rounded-md" style="height: 22px">
 | 
				
			||||||
 | 
					            <div class="w-full h-full shinyBlack flex items-center justify-center rounded-sm border">
 | 
				
			||||||
 | 
					              <p class="transform text-sm">{{ shelf.label }}</p>
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          <!-- <div class="absolute text-center box-shadow-book categoryPlacard font-book transform z-30 -rotate-45 origin-bottom-right" :style="{ top: -1 * sizeMultiplier + 'rem', left: -1 * signSizeMultiplier + 'rem', height: 2 * signSizeMultiplier + 'rem', width: 9 * signSizeMultiplier + 'rem', padding: 0.25 * signSizeMultiplier + 'rem', borderRadius: 0.375 * signSizeMultiplier + 'rem' }">
 | 
				
			||||||
 | 
					            <div class="w-full h-full shinyBlack flex items-center justify-center rounded-sm" :style="{ borderWidth: 0.125 * signSizeMultiplier + 'rem' }">
 | 
				
			||||||
 | 
					              <p class="transform" :style="{ fontSize: 0.875 * signSizeMultiplier + 'rem' }">{{ shelf.label }}</p>
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					          </div> -->
 | 
				
			||||||
 | 
					          <div class="bookshelfDividerCategorized h-6 w-full absolute bottom-0 left-0 right-0 z-20"></div>
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					      </template>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      availableSizes: [60, 80, 100, 120, 140, 160, 180, 200, 220],
 | 
				
			||||||
 | 
					      selectedSizeIndex: 3,
 | 
				
			||||||
 | 
					      rowPaddingX: 40,
 | 
				
			||||||
 | 
					      keywordFilterTimeout: null,
 | 
				
			||||||
 | 
					      scannerParseSubtitle: false,
 | 
				
			||||||
 | 
					      wrapperClientWidth: 0
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  computed: {
 | 
				
			||||||
 | 
					    userAudiobooks() {
 | 
				
			||||||
 | 
					      return this.$store.state.user.user ? this.$store.state.user.user.audiobooks || {} : {}
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    audiobooks() {
 | 
				
			||||||
 | 
					      return this.$store.state.audiobooks.audiobooks
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    bookCoverWidth() {
 | 
				
			||||||
 | 
					      return this.availableSizes[this.selectedSizeIndex]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    sizeMultiplier() {
 | 
				
			||||||
 | 
					      return this.bookCoverWidth / 120
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    signSizeMultiplier() {
 | 
				
			||||||
 | 
					      return (1 - this.sizeMultiplier) / 2 + this.sizeMultiplier
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    paddingX() {
 | 
				
			||||||
 | 
					      return 16 * this.sizeMultiplier
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    bookWidth() {
 | 
				
			||||||
 | 
					      return this.bookCoverWidth + this.paddingX * 2
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    mostRecentPlayed() {
 | 
				
			||||||
 | 
					      var audiobooks = this.audiobooks.filter((ab) => this.userAudiobooks[ab.id] && this.userAudiobooks[ab.id].lastUpdate > 0).map((ab) => ({ ...ab }))
 | 
				
			||||||
 | 
					      audiobooks.sort((a, b) => {
 | 
				
			||||||
 | 
					        return this.userAudiobooks[b.id].lastUpdate - this.userAudiobooks[a.id].lastUpdate
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					      return audiobooks.slice(0, 10)
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    mostRecentAdded() {
 | 
				
			||||||
 | 
					      var audiobooks = this.audiobooks.map((ab) => ({ ...ab })).sort((a, b) => b.addedAt - a.addedAt)
 | 
				
			||||||
 | 
					      return audiobooks.slice(0, 10)
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    seriesGroups() {
 | 
				
			||||||
 | 
					      return this.$store.getters['audiobooks/getSeriesGroups']()
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    recentlyUpdatedSeries() {
 | 
				
			||||||
 | 
					      var mostRecentTime = 0
 | 
				
			||||||
 | 
					      var mostRecentSeries = null
 | 
				
			||||||
 | 
					      this.seriesGroups.forEach((series) => {
 | 
				
			||||||
 | 
					        if ((series.books.length && mostRecentSeries === null) || series.lastUpdate > mostRecentTime) {
 | 
				
			||||||
 | 
					          mostRecentTime = series.lastUpdate
 | 
				
			||||||
 | 
					          mostRecentSeries = series
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					      if (!mostRecentSeries) return null
 | 
				
			||||||
 | 
					      return mostRecentSeries.books
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    booksRecentlyRead() {
 | 
				
			||||||
 | 
					      var audiobooks = this.audiobooks.filter((ab) => this.userAudiobooks[ab.id] && this.userAudiobooks[ab.id].isRead).map((ab) => ({ ...ab }))
 | 
				
			||||||
 | 
					      audiobooks.sort((a, b) => {
 | 
				
			||||||
 | 
					        return this.userAudiobooks[b.id].finishedAt - this.userAudiobooks[a.id].finishedAt
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					      return audiobooks.slice(0, 10)
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    shelves() {
 | 
				
			||||||
 | 
					      var shelves = [
 | 
				
			||||||
 | 
					        { books: this.mostRecentPlayed, label: 'Continue Reading' },
 | 
				
			||||||
 | 
					        { books: this.mostRecentAdded, label: 'Recently Added' }
 | 
				
			||||||
 | 
					      ]
 | 
				
			||||||
 | 
					      if (this.recentlyUpdatedSeries) {
 | 
				
			||||||
 | 
					        shelves.push({ books: this.recentlyUpdatedSeries, label: 'Newest Series' })
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      if (this.booksRecentlyRead.length) {
 | 
				
			||||||
 | 
					        shelves.push({ books: this.booksRecentlyRead, label: 'Read Again' })
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      return shelves
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    increaseSize() {
 | 
				
			||||||
 | 
					      this.selectedSizeIndex = Math.min(this.availableSizes.length - 1, this.selectedSizeIndex + 1)
 | 
				
			||||||
 | 
					      this.resize()
 | 
				
			||||||
 | 
					      this.$store.dispatch('user/updateUserSettings', { bookshelfCoverSize: this.bookCoverWidth })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    decreaseSize() {
 | 
				
			||||||
 | 
					      this.selectedSizeIndex = Math.max(0, this.selectedSizeIndex - 1)
 | 
				
			||||||
 | 
					      this.resize()
 | 
				
			||||||
 | 
					      this.$store.dispatch('user/updateUserSettings', { bookshelfCoverSize: this.bookCoverWidth })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    async init() {
 | 
				
			||||||
 | 
					      this.wrapperClientWidth = this.$refs.wrapper ? this.$refs.wrapper.clientWidth : 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      var bookshelfCoverSize = this.$store.getters['user/getUserSetting']('bookshelfCoverSize')
 | 
				
			||||||
 | 
					      var sizeIndex = this.availableSizes.findIndex((s) => s === bookshelfCoverSize)
 | 
				
			||||||
 | 
					      if (!isNaN(sizeIndex)) this.selectedSizeIndex = sizeIndex
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      await this.$store.dispatch('audiobooks/load')
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    resize() {},
 | 
				
			||||||
 | 
					    audiobooksUpdated() {},
 | 
				
			||||||
 | 
					    settingsUpdated(settings) {
 | 
				
			||||||
 | 
					      if (settings.bookshelfCoverSize !== this.bookCoverWidth && settings.bookshelfCoverSize !== undefined) {
 | 
				
			||||||
 | 
					        var index = this.availableSizes.indexOf(settings.bookshelfCoverSize)
 | 
				
			||||||
 | 
					        if (index >= 0) {
 | 
				
			||||||
 | 
					          this.selectedSizeIndex = index
 | 
				
			||||||
 | 
					          this.resize()
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    scan() {
 | 
				
			||||||
 | 
					      this.$root.socket.emit('scan')
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    window.addEventListener('resize', this.resize)
 | 
				
			||||||
 | 
					    this.$store.commit('audiobooks/addListener', { id: 'bookshelf', meth: this.audiobooksUpdated })
 | 
				
			||||||
 | 
					    this.$store.commit('user/addSettingsListener', { id: 'bookshelf', meth: this.settingsUpdated })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    this.init()
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  beforeDestroy() {
 | 
				
			||||||
 | 
					    window.removeEventListener('resize', this.resize)
 | 
				
			||||||
 | 
					    this.$store.commit('audiobooks/removeListener', 'bookshelf')
 | 
				
			||||||
 | 
					    this.$store.commit('user/removeSettingsListener', 'bookshelf')
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<style>
 | 
				
			||||||
 | 
					.bookshelfRowCategorized {
 | 
				
			||||||
 | 
					  width: calc(100vw - 80px);
 | 
				
			||||||
 | 
					  background-image: url(/wood_panels.jpg);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					.bookshelfDividerCategorized {
 | 
				
			||||||
 | 
					  background: rgb(149, 119, 90);
 | 
				
			||||||
 | 
					  /* background: linear-gradient(180deg, rgba(149, 119, 90, 1) 0%, rgba(103, 70, 37, 1) 17%, rgba(103, 70, 37, 1) 88%, rgba(71, 48, 25, 1) 100%); */
 | 
				
			||||||
 | 
					  background: linear-gradient(180deg, rgb(122, 94, 68) 0%, rgb(92, 62, 31) 17%, rgb(82, 54, 26) 88%, rgba(71, 48, 25, 1) 100%);
 | 
				
			||||||
 | 
					  /* background: linear-gradient(180deg, rgb(114, 85, 59) 0%, rgb(73, 48, 22) 17%, rgb(71, 43, 15) 88%, rgb(61, 41, 20) 100%); */
 | 
				
			||||||
 | 
					  box-shadow: 2px 14px 8px #111111aa;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.categoryPlacard {
 | 
				
			||||||
 | 
					  background-image: url(https://image.freepik.com/free-photo/brown-wooden-textured-flooring-background_53876-128537.jpg);
 | 
				
			||||||
 | 
					  letter-spacing: 1px;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.shinyBlack {
 | 
				
			||||||
 | 
					  background-color: #2d3436;
 | 
				
			||||||
 | 
					  background-image: linear-gradient(315deg, #19191a 0%, rgb(15, 15, 15) 74%);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /* border-color: #daa520; */
 | 
				
			||||||
 | 
					  /* border-color: #ebc463af; */
 | 
				
			||||||
 | 
					  border-color: rgba(255, 244, 182, 0.6);
 | 
				
			||||||
 | 
					  border-style: solid;
 | 
				
			||||||
 | 
					  /* color: rgba(255, 244, 182, 1); */
 | 
				
			||||||
 | 
					  color: #fce3a6;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.shinyWhite {
 | 
				
			||||||
 | 
					  background-color: #ffffff;
 | 
				
			||||||
 | 
					  background-image: linear-gradient(315deg, #ffffff 0%, #ebebeb 74%);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /* border-color: #cc9917aa; */
 | 
				
			||||||
 | 
					  border-style: solid;
 | 
				
			||||||
 | 
					  color: rgba(19, 19, 19, 1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  font-weight: 600;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="w-full h-10 relative">
 | 
					  <div class="w-full h-10 relative">
 | 
				
			||||||
    <div id="toolbar" class="absolute top-0 left-0 w-full h-full z-20 flex items-center px-8">
 | 
					    <div id="toolbar" class="absolute top-0 left-0 w-full h-full z-40 flex items-center px-8">
 | 
				
			||||||
      <template v-if="page !== 'search'">
 | 
					      <template v-if="page !== 'search' && !isHome">
 | 
				
			||||||
        <p v-if="!selectedSeries" class="font-book">{{ numShowing }} {{ entityName }}</p>
 | 
					        <p v-if="!selectedSeries" class="font-book">{{ numShowing }} {{ entityName }}</p>
 | 
				
			||||||
        <div v-else class="flex items-center">
 | 
					        <div v-else class="flex items-center">
 | 
				
			||||||
          <div @click="seriesBackArrow" class="rounded-full h-10 w-10 flex items-center justify-center hover:bg-white hover:bg-opacity-10 cursor-pointer">
 | 
					          <div @click="seriesBackArrow" class="rounded-full h-10 w-10 flex items-center justify-center hover:bg-white hover:bg-opacity-10 cursor-pointer">
 | 
				
			||||||
@ -18,7 +18,7 @@
 | 
				
			|||||||
        <controls-filter-select v-show="showSortFilters" v-model="settings.filterBy" class="w-48 h-7.5 ml-4" @change="updateFilter" />
 | 
					        <controls-filter-select v-show="showSortFilters" v-model="settings.filterBy" class="w-48 h-7.5 ml-4" @change="updateFilter" />
 | 
				
			||||||
        <controls-order-select v-show="showSortFilters" v-model="settings.orderBy" :descending.sync="settings.orderDesc" class="w-48 h-7.5 ml-4" @change="updateOrder" />
 | 
					        <controls-order-select v-show="showSortFilters" v-model="settings.orderBy" :descending.sync="settings.orderDesc" class="w-48 h-7.5 ml-4" @change="updateOrder" />
 | 
				
			||||||
      </template>
 | 
					      </template>
 | 
				
			||||||
      <template v-else>
 | 
					      <template v-else-if="!isHome">
 | 
				
			||||||
        <div @click="searchBackArrow" class="rounded-full h-10 w-10 flex items-center justify-center hover:bg-white hover:bg-opacity-10 cursor-pointer">
 | 
					        <div @click="searchBackArrow" class="rounded-full h-10 w-10 flex items-center justify-center hover:bg-white hover:bg-opacity-10 cursor-pointer">
 | 
				
			||||||
          <span class="material-icons text-3xl text-white">west</span>
 | 
					          <span class="material-icons text-3xl text-white">west</span>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
@ -35,6 +35,7 @@
 | 
				
			|||||||
export default {
 | 
					export default {
 | 
				
			||||||
  props: {
 | 
					  props: {
 | 
				
			||||||
    page: String,
 | 
					    page: String,
 | 
				
			||||||
 | 
					    isHome: Boolean,
 | 
				
			||||||
    selectedSeries: String,
 | 
					    selectedSeries: String,
 | 
				
			||||||
    searchResults: {
 | 
					    searchResults: {
 | 
				
			||||||
      type: Array,
 | 
					      type: Array,
 | 
				
			||||||
 | 
				
			|||||||
@ -1,14 +1,24 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="w-20 bg-bg h-full relative box-shadow-side z-20" style="min-width: 80px">
 | 
					  <div class="w-20 bg-bg h-full relative box-shadow-side z-30" style="min-width: 80px">
 | 
				
			||||||
    <div class="absolute top-0 -right-4 w-4 bg-bg h-10 pointer-events-none" />
 | 
					    <div class="absolute top-0 -right-4 w-4 bg-bg h-10 pointer-events-none" />
 | 
				
			||||||
    <nuxt-link to="/library" class="w-full h-20 flex flex-col items-center justify-center text-white border-b border-primary border-opacity-70 hover:bg-primary cursor-pointer relative" :class="paramId === '' ? 'bg-primary bg-opacity-80' : 'bg-bg bg-opacity-60'">
 | 
					    <nuxt-link to="/" class="w-full h-20 flex flex-col items-center justify-center text-white border-b border-primary border-opacity-70 hover:bg-primary cursor-pointer relative" :class="homePage ? 'bg-primary bg-opacity-80' : 'bg-bg bg-opacity-60'">
 | 
				
			||||||
 | 
					      <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
 | 
				
			||||||
 | 
					        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" />
 | 
				
			||||||
 | 
					      </svg>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      <p class="font-book pt-1.5" style="font-size: 1rem">Home</p>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      <div v-show="homePage" class="h-full w-0.5 bg-yellow-400 absolute top-0 left-0" />
 | 
				
			||||||
 | 
					    </nuxt-link>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <nuxt-link to="/library" class="w-full h-20 flex flex-col items-center justify-center text-white border-b border-primary border-opacity-70 hover:bg-primary cursor-pointer relative" :class="paramId === '' && !homePage ? 'bg-primary bg-opacity-80' : 'bg-bg bg-opacity-60'">
 | 
				
			||||||
      <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
 | 
					      <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
 | 
				
			||||||
        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253" />
 | 
					        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253" />
 | 
				
			||||||
      </svg>
 | 
					      </svg>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      <p class="font-book pt-1.5" style="font-size: 1rem">Library</p>
 | 
					      <p class="font-book pt-1.5" style="font-size: 1rem">Library</p>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      <div v-show="paramId === ''" class="h-full w-0.5 bg-yellow-400 absolute top-0 left-0" />
 | 
					      <div v-show="paramId === '' && !homePage" class="h-full w-0.5 bg-yellow-400 absolute top-0 left-0" />
 | 
				
			||||||
    </nuxt-link>
 | 
					    </nuxt-link>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <nuxt-link to="/library/series" class="w-full h-20 flex flex-col items-center justify-center text-white text-opacity-80 border-b border-primary border-opacity-70 hover:bg-primary cursor-pointer relative" :class="paramId === 'series' ? 'bg-primary bg-opacity-80' : 'bg-bg bg-opacity-60'">
 | 
					    <nuxt-link to="/library/series" class="w-full h-20 flex flex-col items-center justify-center text-white text-opacity-80 border-b border-primary border-opacity-70 hover:bg-primary cursor-pointer relative" :class="paramId === 'series' ? 'bg-primary bg-opacity-80' : 'bg-bg bg-opacity-60'">
 | 
				
			||||||
@ -64,6 +74,9 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    selectedClassName() {
 | 
					    selectedClassName() {
 | 
				
			||||||
      return ''
 | 
					      return ''
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    homePage() {
 | 
				
			||||||
 | 
					      return this.$route.name === 'index'
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {},
 | 
					  methods: {},
 | 
				
			||||||
 | 
				
			|||||||
@ -8,9 +8,9 @@
 | 
				
			|||||||
      <div class="absolute -bottom-4 left-0 triangle-right" />
 | 
					      <div class="absolute -bottom-4 left-0 triangle-right" />
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <div class="rounded-sm h-full overflow-hidden relative" :style="{ padding: `16px ${paddingX}px` }" @mouseover="isHovering = true" @mouseleave="isHovering = false" @click="clickCard">
 | 
					    <div class="rounded-sm h-full overflow-hidden relative" :style="{ padding: `16px ${paddingX}px` }" @mouseover="isHovering = true" @mouseleave="isHovering = false" @click.stop>
 | 
				
			||||||
      <nuxt-link :to="isSelectionMode ? '' : `/audiobook/${audiobookId}`" class="cursor-pointer">
 | 
					      <nuxt-link :to="isSelectionMode ? '' : `/audiobook/${audiobookId}`" class="cursor-pointer">
 | 
				
			||||||
        <div class="w-full relative box-shadow-book" :style="{ height: height + 'px' }">
 | 
					        <div class="w-full relative box-shadow-book" :style="{ height: height + 'px' }" @click="clickCard">
 | 
				
			||||||
          <cards-book-cover :audiobook="audiobook" :author-override="authorFormat" :width="width" />
 | 
					          <cards-book-cover :audiobook="audiobook" :author-override="authorFormat" :width="width" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          <div v-show="isHovering || isSelectionMode" class="absolute top-0 left-0 w-full h-full bg-black rounded" :class="overlayWrapperClasslist">
 | 
					          <div v-show="isHovering || isSelectionMode" class="absolute top-0 left-0 w-full h-full bg-black rounded" :class="overlayWrapperClasslist">
 | 
				
			||||||
@ -86,7 +86,8 @@ export default {
 | 
				
			|||||||
      return this.audiobook.numEbooks
 | 
					      return this.audiobook.numEbooks
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    isSelectionMode() {
 | 
					    isSelectionMode() {
 | 
				
			||||||
      return this.$store.getters['getNumAudiobooksSelected']
 | 
					      // return this.$store.getters['getNumAudiobooksSelected']
 | 
				
			||||||
 | 
					      return !!this.selectedAudiobooks.length
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    selectedAudiobooks() {
 | 
					    selectedAudiobooks() {
 | 
				
			||||||
      return this.$store.state.selectedAudiobooks
 | 
					      return this.$store.state.selectedAudiobooks
 | 
				
			||||||
@ -206,7 +207,6 @@ export default {
 | 
				
			|||||||
        this.selectBtnClick()
 | 
					        this.selectBtnClick()
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  }
 | 
				
			||||||
  mounted() {}
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  "name": "audiobookshelf-client",
 | 
					  "name": "audiobookshelf-client",
 | 
				
			||||||
  "version": "1.2.5",
 | 
					  "version": "1.2.6",
 | 
				
			||||||
  "description": "Audiobook manager and player",
 | 
					  "description": "Audiobook manager and player",
 | 
				
			||||||
  "main": "index.js",
 | 
					  "main": "index.js",
 | 
				
			||||||
  "scripts": {
 | 
					  "scripts": {
 | 
				
			||||||
 | 
				
			|||||||
@ -7,14 +7,22 @@
 | 
				
			|||||||
    <!-- <app-book-shelf /> -->
 | 
					    <!-- <app-book-shelf /> -->
 | 
				
			||||||
    <!-- </div> -->
 | 
					    <!-- </div> -->
 | 
				
			||||||
    <!-- </div> -->
 | 
					    <!-- </div> -->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <div class="flex h-full">
 | 
				
			||||||
 | 
					      <app-side-rail />
 | 
				
			||||||
 | 
					      <div class="flex-grow">
 | 
				
			||||||
 | 
					        <app-book-shelf-toolbar is-home />
 | 
				
			||||||
 | 
					        <app-book-shelf-categorized />
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  asyncData({ redirect }) {
 | 
					  // asyncData({ redirect }) {
 | 
				
			||||||
    redirect('/library')
 | 
					  //   redirect('/library')
 | 
				
			||||||
  },
 | 
					  // },
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {}
 | 
					    return {}
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
				
			|||||||
@ -37,7 +37,7 @@ export default {
 | 
				
			|||||||
        if (this.$route.query.redirect) {
 | 
					        if (this.$route.query.redirect) {
 | 
				
			||||||
          this.$router.replace(this.$route.query.redirect)
 | 
					          this.$router.replace(this.$route.query.redirect)
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
          this.$router.replace('/library')
 | 
					          this.$router.replace('/')
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
@ -88,12 +88,15 @@ export const getters = {
 | 
				
			|||||||
    state.audiobooks.forEach((audiobook) => {
 | 
					    state.audiobooks.forEach((audiobook) => {
 | 
				
			||||||
      if (audiobook.book && audiobook.book.series) {
 | 
					      if (audiobook.book && audiobook.book.series) {
 | 
				
			||||||
        if (series[audiobook.book.series]) {
 | 
					        if (series[audiobook.book.series]) {
 | 
				
			||||||
 | 
					          var bookLastUpdate = audiobook.book.lastUpdate
 | 
				
			||||||
 | 
					          if (bookLastUpdate > series[audiobook.book.series].lastUpdate) series[audiobook.book.series].lastUpdate = bookLastUpdate
 | 
				
			||||||
          series[audiobook.book.series].books.push(audiobook)
 | 
					          series[audiobook.book.series].books.push(audiobook)
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
          series[audiobook.book.series] = {
 | 
					          series[audiobook.book.series] = {
 | 
				
			||||||
            type: 'series',
 | 
					            type: 'series',
 | 
				
			||||||
            name: audiobook.book.series || '',
 | 
					            name: audiobook.book.series || '',
 | 
				
			||||||
            books: [audiobook]
 | 
					            books: [audiobook],
 | 
				
			||||||
 | 
					            lastUpdate: audiobook.book.lastUpdate
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,5 @@
 | 
				
			|||||||
import { checkForUpdate } from '@/plugins/version'
 | 
					import { checkForUpdate } from '@/plugins/version'
 | 
				
			||||||
 | 
					import Vue from 'vue'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const state = () => ({
 | 
					export const state = () => ({
 | 
				
			||||||
  versionData: null,
 | 
					  versionData: null,
 | 
				
			||||||
@ -112,13 +113,18 @@ export const mutations = {
 | 
				
			|||||||
    state.developerMode = val
 | 
					    state.developerMode = val
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  setSelectedAudiobooks(state, audiobooks) {
 | 
					  setSelectedAudiobooks(state, audiobooks) {
 | 
				
			||||||
    state.selectedAudiobooks = audiobooks
 | 
					    Vue.set(state, 'selectedAudiobooks', audiobooks)
 | 
				
			||||||
 | 
					    // state.selectedAudiobooks = audiobooks
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  toggleAudiobookSelected(state, audiobookId) {
 | 
					  toggleAudiobookSelected(state, audiobookId) {
 | 
				
			||||||
    if (state.selectedAudiobooks.includes(audiobookId)) {
 | 
					    if (state.selectedAudiobooks.includes(audiobookId)) {
 | 
				
			||||||
      state.selectedAudiobooks = state.selectedAudiobooks.filter(a => a !== audiobookId)
 | 
					      state.selectedAudiobooks = state.selectedAudiobooks.filter(a => a !== audiobookId)
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      state.selectedAudiobooks.push(audiobookId)
 | 
					      var newSel = state.selectedAudiobooks.concat([audiobookId])
 | 
				
			||||||
 | 
					      // state.selectedAudiobooks = newSel
 | 
				
			||||||
 | 
					      console.log('Setting toggle on sel', newSel)
 | 
				
			||||||
 | 
					      Vue.set(state, 'selectedAudiobooks', newSel)
 | 
				
			||||||
 | 
					      // state.selectedAudiobooks.push(audiobookId)
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  setProcessingBatch(state, val) {
 | 
					  setProcessingBatch(state, val) {
 | 
				
			||||||
 | 
				
			|||||||
@ -16,6 +16,12 @@ module.exports = {
 | 
				
			|||||||
      height: {
 | 
					      height: {
 | 
				
			||||||
        '7.5': '1.75rem'
 | 
					        '7.5': '1.75rem'
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      spacing: {
 | 
				
			||||||
 | 
					        '-54': '-13.5rem'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      rotate: {
 | 
				
			||||||
 | 
					        '-60': '-60deg'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
      colors: {
 | 
					      colors: {
 | 
				
			||||||
        bg: '#373838',
 | 
					        bg: '#373838',
 | 
				
			||||||
        primary: '#232323',
 | 
					        primary: '#232323',
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  "name": "audiobookshelf",
 | 
					  "name": "audiobookshelf",
 | 
				
			||||||
  "version": "1.2.5",
 | 
					  "version": "1.2.6",
 | 
				
			||||||
  "description": "Self-hosted audiobook server for managing and playing audiobooks",
 | 
					  "description": "Self-hosted audiobook server for managing and playing audiobooks",
 | 
				
			||||||
  "main": "index.js",
 | 
					  "main": "index.js",
 | 
				
			||||||
  "scripts": {
 | 
					  "scripts": {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user