mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-27 11:18:14 +01:00 
			
		
		
		
	Remove experimental set bookshelf texture
This commit is contained in:
		
							parent
							
								
									7456052620
								
							
						
					
					
						commit
						705aac40d7
					
				| @ -147,9 +147,6 @@ export default { | |||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   methods: { |   methods: { | ||||||
|     toggleBookshelfTexture() { |  | ||||||
|       this.$store.dispatch('setBookshelfTexture', 'wood2.png') |  | ||||||
|     }, |  | ||||||
|     cancelSelectionMode() { |     cancelSelectionMode() { | ||||||
|       if (this.processingBatchDelete) return |       if (this.processingBatchDelete) return | ||||||
|       this.$store.commit('setSelectedLibraryItems', []) |       this.$store.commit('setSelectedLibraryItems', []) | ||||||
|  | |||||||
| @ -2,10 +2,6 @@ | |||||||
|   <div id="bookshelf" ref="wrapper" class="w-full max-w-full h-full overflow-y-scroll relative"> |   <div id="bookshelf" ref="wrapper" class="w-full max-w-full h-full overflow-y-scroll relative"> | ||||||
|     <!-- Cover size widget --> |     <!-- Cover size widget --> | ||||||
|     <widgets-cover-size-widget class="fixed bottom-4 right-4 z-30" /> |     <widgets-cover-size-widget class="fixed bottom-4 right-4 z-30" /> | ||||||
|     <!-- Experimental Bookshelf Texture --> |  | ||||||
|     <div v-show="showExperimentalFeatures && !isAlternativeBookshelfView" class="fixed bottom-4 right-28 z-40"> |  | ||||||
|       <div class="rounded-full py-1 bg-primary hover:bg-bg cursor-pointer px-2 border border-black-100 text-center flex items-center box-shadow-md" @mousedown.prevent @mouseup.prevent @click="showBookshelfTextureModal"><p class="text-sm py-0.5">Texture</p></div> |  | ||||||
|     </div> |  | ||||||
| 
 | 
 | ||||||
|     <div v-if="loaded && !shelves.length && !search" class="w-full flex flex-col items-center justify-center py-12"> |     <div v-if="loaded && !shelves.length && !search" class="w-full flex flex-col items-center justify-center py-12"> | ||||||
|       <p class="text-center text-2xl font-book mb-4 py-4">{{ libraryName }} Library is empty!</p> |       <p class="text-center text-2xl font-book mb-4 py-4">{{ libraryName }} Library is empty!</p> | ||||||
| @ -100,9 +96,6 @@ export default { | |||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   methods: { |   methods: { | ||||||
|     showBookshelfTextureModal() { |  | ||||||
|       this.$store.commit('globals/setShowBookshelfTextureModal', true) |  | ||||||
|     }, |  | ||||||
|     async init() { |     async init() { | ||||||
|       this.wrapperClientWidth = this.$refs.wrapper ? this.$refs.wrapper.clientWidth : 0 |       this.wrapperClientWidth = this.$refs.wrapper ? this.$refs.wrapper.clientWidth : 0 | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -22,13 +22,6 @@ | |||||||
|     </div> |     </div> | ||||||
| 
 | 
 | ||||||
|     <widgets-cover-size-widget class="fixed bottom-4 right-4 z-30" /> |     <widgets-cover-size-widget class="fixed bottom-4 right-4 z-30" /> | ||||||
| 
 |  | ||||||
|     <!-- Experimental Bookshelf Texture --> |  | ||||||
|     <div v-show="showExperimentalFeatures && !isAlternativeBookshelfView" class="fixed bottom-4 right-28 z-40"> |  | ||||||
|       <div class="rounded-full py-1 bg-primary hover:bg-bg cursor-pointer px-2 border border-black-100 text-center flex items-center box-shadow-md" @mousedown.prevent @mouseup.prevent @click="showBookshelfTextureModal"> |  | ||||||
|         <p class="text-sm py-0.5">Texture</p> |  | ||||||
|       </div> |  | ||||||
|     </div> |  | ||||||
|   </div> |   </div> | ||||||
| </template> | </template> | ||||||
| 
 | 
 | ||||||
| @ -206,9 +199,6 @@ export default { | |||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   methods: { |   methods: { | ||||||
|     showBookshelfTextureModal() { |  | ||||||
|       this.$store.commit('globals/setShowBookshelfTextureModal', true) |  | ||||||
|     }, |  | ||||||
|     clearFilter() { |     clearFilter() { | ||||||
|       this.$store.dispatch('user/updateUserSettings', { filterBy: 'all' }) |       this.$store.dispatch('user/updateUserSettings', { filterBy: 'all' }) | ||||||
|     }, |     }, | ||||||
|  | |||||||
| @ -1,68 +0,0 @@ | |||||||
| <template> |  | ||||||
|   <modals-modal v-model="show" name="textures" :width="'40vw'" :height="'unset'" :bg-opacity="10" :processing="processing"> |  | ||||||
|     <template #outer> |  | ||||||
|       <div class="absolute top-0 left-0 p-5 w-2/3 overflow-hidden"> |  | ||||||
|         <p class="font-book text-3xl text-white truncate">Bookshelf Texture</p> |  | ||||||
|       </div> |  | ||||||
|     </template> |  | ||||||
|     <div class="px-4 w-full max-w-full text-sm py-6 rounded-lg bg-bg shadow-lg border border-black-300" @mousedown.prevent @mouseup.prevent @mousemove.prevent> |  | ||||||
|       <h1 class="text-2xl mb-2">Select a bookshelf texture (For testing only)</h1> |  | ||||||
|       <div class="overflow-y-hidden overflow-x-auto"> |  | ||||||
|         <div class="flex -mx-1"> |  | ||||||
|           <template v-for="texture in textures"> |  | ||||||
|             <div :key="texture" class="relative mx-1" style="height: 180px; width: 180px; min-width: 180px" @mousedown.prevent @mouseup.prevent> |  | ||||||
|               <img :src="texture" class="h-full object-cover cursor-pointer" @click="setTexture(texture)" /> |  | ||||||
|               <div v-if="texture === selectedBookshelfTexture" class="absolute top-0 left-0 flex items-center justify-center w-full h-full bg-black bg-opacity-10"> |  | ||||||
|                 <span class="material-icons text-4xl text-success">check</span> |  | ||||||
|               </div> |  | ||||||
|             </div> |  | ||||||
|           </template> |  | ||||||
|         </div> |  | ||||||
|       </div> |  | ||||||
|       <!-- <div class="flex pt-4"> |  | ||||||
|         <div class="flex-grow" /> |  | ||||||
|         <ui-btn color="success" type="submit">Submit</ui-btn> |  | ||||||
|       </div> --> |  | ||||||
|     </div> |  | ||||||
|   </modals-modal> |  | ||||||
| </template> |  | ||||||
| 
 |  | ||||||
| <script> |  | ||||||
| export default { |  | ||||||
|   data() { |  | ||||||
|     return { |  | ||||||
|       textures: ['/textures/wood_default.jpg', '/textures/wood1.png', '/textures/wood2.png', '/textures/wood3.png', '/textures/wood4.png', '/textures/leather1.jpg'], |  | ||||||
|       processing: false |  | ||||||
|     } |  | ||||||
|   }, |  | ||||||
|   watch: { |  | ||||||
|     show: { |  | ||||||
|       handler(newVal) { |  | ||||||
|         if (newVal) { |  | ||||||
|           this.init() |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|     } |  | ||||||
|   }, |  | ||||||
|   computed: { |  | ||||||
|     show: { |  | ||||||
|       get() { |  | ||||||
|         return this.$store.state.globals.showBookshelfTextureModal |  | ||||||
|       }, |  | ||||||
|       set(val) { |  | ||||||
|         this.$store.commit('globals/setShowBookshelfTextureModal', val) |  | ||||||
|       } |  | ||||||
|     }, |  | ||||||
|     selectedBookshelfTexture() { |  | ||||||
|       return this.$store.state.selectedBookshelfTexture |  | ||||||
|     } |  | ||||||
|   }, |  | ||||||
|   methods: { |  | ||||||
|     init() {}, |  | ||||||
|     setTexture(img) { |  | ||||||
|       this.$store.dispatch('setBookshelfTexture', img) |  | ||||||
|     } |  | ||||||
|   }, |  | ||||||
|   mounted() {} |  | ||||||
| } |  | ||||||
| </script> |  | ||||||
| @ -12,7 +12,6 @@ | |||||||
|     <modals-item-edit-modal /> |     <modals-item-edit-modal /> | ||||||
|     <modals-user-collections-modal /> |     <modals-user-collections-modal /> | ||||||
|     <modals-edit-collection-modal /> |     <modals-edit-collection-modal /> | ||||||
|     <modals-bookshelf-texture-modal /> |  | ||||||
|     <modals-podcast-edit-episode /> |     <modals-podcast-edit-episode /> | ||||||
|     <modals-podcast-view-episode /> |     <modals-podcast-view-episode /> | ||||||
|     <modals-authors-edit-modal /> |     <modals-authors-edit-modal /> | ||||||
|  | |||||||
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 57 KiB | 
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 141 KiB | 
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 209 KiB | 
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 512 KiB | 
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 132 KiB | 
| @ -11,7 +11,6 @@ export const state = () => ({ | |||||||
|   selectedEpisode: null, |   selectedEpisode: null, | ||||||
|   selectedCollection: null, |   selectedCollection: null, | ||||||
|   selectedAuthor: null, |   selectedAuthor: null, | ||||||
|   showBookshelfTextureModal: false, |  | ||||||
|   isCasting: false, // Actively casting
 |   isCasting: false, // Actively casting
 | ||||||
|   isChromecastInitialized: false // Script loaded
 |   isChromecastInitialized: false // Script loaded
 | ||||||
| }) | }) | ||||||
| @ -64,9 +63,6 @@ export const mutations = { | |||||||
|   setSelectedEpisode(state, episode) { |   setSelectedEpisode(state, episode) { | ||||||
|     state.selectedEpisode = episode |     state.selectedEpisode = episode | ||||||
|   }, |   }, | ||||||
|   setShowBookshelfTextureModal(state, val) { |  | ||||||
|     state.showBookshelfTextureModal = val |  | ||||||
|   }, |  | ||||||
|   showEditAuthorModal(state, author) { |   showEditAuthorModal(state, author) { | ||||||
|     state.selectedAuthor = author |     state.selectedAuthor = author | ||||||
|     state.showEditAuthorModal = true |     state.showEditAuthorModal = true | ||||||
|  | |||||||
| @ -21,7 +21,6 @@ export const state = () => ({ | |||||||
|   bookshelfBookIds: [], |   bookshelfBookIds: [], | ||||||
|   openModal: null, |   openModal: null, | ||||||
|   innerModalOpen: false, |   innerModalOpen: false, | ||||||
|   selectedBookshelfTexture: '/textures/wood_default.jpg', |  | ||||||
|   lastBookshelfScrollData: {} |   lastBookshelfScrollData: {} | ||||||
| }) | }) | ||||||
| 
 | 
 | ||||||
| @ -74,11 +73,6 @@ export const actions = { | |||||||
|         console.error('Update check failed', error) |         console.error('Update check failed', error) | ||||||
|         return false |         return false | ||||||
|       }) |       }) | ||||||
|   }, |  | ||||||
|   setBookshelfTexture({ commit, state }, img) { |  | ||||||
|     let root = document.documentElement; |  | ||||||
|     commit('setBookshelfTexture', img) |  | ||||||
|     root.style.setProperty('--bookshelf-texture-img', `url(${img})`); |  | ||||||
|   } |   } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @ -180,8 +174,5 @@ export const mutations = { | |||||||
|   }, |   }, | ||||||
|   setInnerModalOpen(state, val) { |   setInnerModalOpen(state, val) { | ||||||
|     state.innerModalOpen = val |     state.innerModalOpen = val | ||||||
|   }, |  | ||||||
|   setBookshelfTexture(state, val) { |  | ||||||
|     state.selectedBookshelfTexture = val |  | ||||||
|   } |   } | ||||||
| } | } | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user