Minor fix to chapter support

This commit is contained in:
WardPearce
2024-03-22 17:36:52 +13:00
parent 27d5f46843
commit d690cf1ff5
@@ -124,15 +124,17 @@
</p>
<p style="white-space: pre-line;word-wrap: break-word;">{data.content.description}</p>
{#if data.content}
<h6 style="margin-bottom: .3em;">Chapters</h6>
{#each data.content.timestamps as timestamp}
<button
on:click={() => seekTo(timestamp.time)}
class="timestamps"
class:primary={timestamp.time <= currentTime}
>{timestamp.title} - {timestamp.timePretty}</button
>
{/each}
{#if data.content.timestamps.length > 0}
<h6 style="margin-bottom: .3em;">Chapters</h6>
{#each data.content.timestamps as timestamp}
<button
on:click={() => seekTo(timestamp.time)}
class="timestamps"
class:primary={timestamp.time <= currentTime}
>{timestamp.title} - {timestamp.timePretty}</button
>
{/each}
{/if}
{/if}
</article>