mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-27 11:18:14 +01:00 
			
		
		
		
	Update chapter modal for mobile
This commit is contained in:
		
							parent
							
								
									f4ee215ad8
								
							
						
					
					
						commit
						a9a3423b58
					
				| @ -1,14 +1,14 @@ | |||||||
| <template> | <template> | ||||||
|   <modals-modal v-model="show" name="chapters" :width="600" :height="'unset'"> |   <modals-modal v-model="show" name="chapters" :width="600" :height="'unset'"> | ||||||
|     <div ref="container" class="w-full rounded-lg bg-primary box-shadow-md overflow-y-auto overflow-x-hidden" style="max-height: 80vh"> |     <div id="chapter-modal-wrapper" ref="container" class="w-full rounded-lg bg-primary box-shadow-md overflow-y-auto overflow-x-hidden" style="max-height: 80vh"> | ||||||
|       <template v-for="chap in chapters"> |       <template v-for="chap in chapters"> | ||||||
|         <div :key="chap.id" :id="`chapter-row-${chap.id}`" class="flex items-center px-6 py-3 justify-start cursor-pointer hover:bg-bg relative" :class="chap.id === currentChapterId ? 'bg-yellow-400 bg-opacity-10' : chap.end <= currentChapterStart ? 'bg-success bg-opacity-5' : 'bg-opacity-20'" @click="clickChapter(chap)"> |         <div :key="chap.id" :id="`chapter-row-${chap.id}`" class="flex items-center px-6 py-3 justify-start cursor-pointer hover:bg-bg relative" :class="chap.id === currentChapterId ? 'bg-yellow-400 bg-opacity-10' : chap.end <= currentChapterStart ? 'bg-success bg-opacity-5' : 'bg-opacity-20'" @click="clickChapter(chap)"> | ||||||
|           <p class="truncate" style="max-width: 400px"> |           <p class="chapter-title truncate text-sm md:text-base"> | ||||||
|             {{ chap.title }} |             {{ chap.title }} | ||||||
|           </p> |           </p> | ||||||
|           <span class="font-mono text-xs text-gray-400 pl-2">{{ $elapsedPrettyExtended(chap.end - chap.start) }}</span> |           <span class="font-mono text-xxs sm:text-xs text-gray-400 pl-2 whitespace-nowrap">{{ $elapsedPrettyExtended(chap.end - chap.start) }}</span> | ||||||
|           <span class="flex-grow" /> |           <span class="flex-grow" /> | ||||||
|           <span class="font-mono text-sm text-gray-300">{{ $secondsToTimestamp(chap.start) }}</span> |           <span class="font-mono text-xs sm:text-sm text-gray-300">{{ $secondsToTimestamp(chap.start) }}</span> | ||||||
| 
 | 
 | ||||||
|           <div v-show="chap.id === currentChapterId" class="w-0.5 h-full absolute top-0 left-0 bg-yellow-400" /> |           <div v-show="chap.id === currentChapterId" class="w-0.5 h-full absolute top-0 left-0 bg-yellow-400" /> | ||||||
|         </div> |         </div> | ||||||
| @ -73,4 +73,15 @@ export default { | |||||||
|     } |     } | ||||||
|   } |   } | ||||||
| } | } | ||||||
| </script> | </script> | ||||||
|  | 
 | ||||||
|  | <style> | ||||||
|  | #chapter-modal-wrapper .chapter-title { | ||||||
|  |   max-width: calc(100% - 120px); | ||||||
|  | } | ||||||
|  | @media (min-width: 640px) { | ||||||
|  |   #chapter-modal-wrapper .chapter-title { | ||||||
|  |     max-width: calc(100% - 150px); | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | </style> | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user