Add chapter duration next to start time.

This adds the duration to the chapter table on the book page.
This commit is contained in:
sir-wilhelm
2025-11-03 17:39:44 -06:00
parent 072f19e157
commit 9158f4f8f1
+4
View File
@@ -15,6 +15,7 @@
<tr>
<th class="text-left">{{ $strings.LabelTitle }}</th>
<th class="text-center w-16">{{ $strings.LabelStart }}</th>
<th class="text-center w-16">{{ $strings.LabelDuration }}</th>
</tr>
<tr v-for="chapter in chapters" :key="chapter.id">
<td>
@@ -23,6 +24,9 @@
<td class="font-mono text-center underline w-16" @click.stop="goToTimestamp(chapter.start)">
{{ $secondsToTimestamp(chapter.start) }}
</td>
<td class="font-mono text-center">
{{ $secondsToTimestamp(Math.max(0, chapter.end - chapter.start)) }}
</td>
</tr>
</table>
</transition>