feat(audio-player): end-time label toggles total / book-left / chapter-left (plan §10 web)
Clicking the end time cycles the three display modes, persisted per device in localStorage (audio_time_display). Pure helpers (mode list, normalize, cycle, endTimeLabel with 0-clamp and no-chapters fallback to book remaining) + vitest; aria-label announces the current mode and the next. Remaining values track the scrub cursor mid-drag. 140 unit tests; 15 Playwright checks on KJV + Gardens.
This commit is contained in:
1 parent
96fd2aad42
commit
a9430f3c06
4 files changed
+121
-4
No files matched your search
@@ -256,7 +256,14 @@ templ AudioReader(user User, metadata ReaderMetadata) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span class="inline-block min-w-[4.75rem] text-right" x-text="fmtTime(chaptersDuration() || 1)">0:00</span>
|
||||
<button
|
||||
type="button"
|
||||
class="inline-block min-w-[4.75rem] text-right cursor-pointer"
|
||||
x-text="endTimeText()"
|
||||
:aria-label="endTimeAria()"
|
||||
:title="endTimeAria()"
|
||||
@click="cycleEndTime()"
|
||||
>0:00</button>
|
||||
</div>
|
||||
<div class="flex items-center justify-center gap-3 md:gap-5">
|
||||
<button
|
||||
|
||||
Reference in new issue
Block a user