mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-27 11:18:14 +01:00 
			
		
		
		
	Update start playback from bookmark time confirm to new confirm prompt
This commit is contained in:
		
							parent
							
								
									bcc2f847f9
								
							
						
					
					
						commit
						3cf8b9dca9
					
				| @ -1,5 +1,5 @@ | |||||||
| <template> | <template> | ||||||
|   <div class="flex items-center px-4 py-4 justify-start relative bg-primary hover:bg-opacity-25" :class="wrapperClass" @click="click" @mouseover="mouseover" @mouseleave="mouseleave"> |   <div class="flex items-center px-4 py-4 justify-start relative bg-primary hover:bg-opacity-25" :class="wrapperClass" @click.stop="click" @mouseover="mouseover" @mouseleave="mouseleave"> | ||||||
|     <div class="w-16 max-w-16 text-center"> |     <div class="w-16 max-w-16 text-center"> | ||||||
|       <p class="text-sm font-mono text-gray-400"> |       <p class="text-sm font-mono text-gray-400"> | ||||||
|         {{ this.$secondsToTimestamp(bookmark.time) }} |         {{ this.$secondsToTimestamp(bookmark.time) }} | ||||||
|  | |||||||
| @ -424,13 +424,21 @@ export default { | |||||||
|     }, |     }, | ||||||
|     selectBookmark(bookmark) { |     selectBookmark(bookmark) { | ||||||
|       if (!bookmark) return |       if (!bookmark) return | ||||||
|       console.log('Select bookmark', bookmark) |  | ||||||
|       if (this.isStreaming) { |       if (this.isStreaming) { | ||||||
|         this.$eventBus.$emit('playback-seek', bookmark.time) |         this.$eventBus.$emit('playback-seek', bookmark.time) | ||||||
|       } else if (this.streamLibraryItem) { |       } else if (this.streamLibraryItem) { | ||||||
|         if (confirm(`Are you sure you want to play ${this.title} @ ${this.$secondsToTimestamp(bookmark.time)}?`)) { |         this.showBookmarksModal = false | ||||||
|  |         console.log('Already streaming library item so ask about it') | ||||||
|  |         const payload = { | ||||||
|  |           message: `Start playback for "${this.title}" at ${this.$secondsToTimestamp(bookmark.time)}?`, | ||||||
|  |           callback: (confirmed) => { | ||||||
|  |             if (confirmed) { | ||||||
|               this.startStream(bookmark.time) |               this.startStream(bookmark.time) | ||||||
|             } |             } | ||||||
|  |           }, | ||||||
|  |           type: 'yesNo' | ||||||
|  |         } | ||||||
|  |         this.$store.commit('globals/setConfirmPrompt', payload) | ||||||
|       } else { |       } else { | ||||||
|         this.startStream(bookmark.time) |         this.startStream(bookmark.time) | ||||||
|       } |       } | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user