From f96a7fa86a18ad2fe2823286008e2ca8f0361eb2 Mon Sep 17 00:00:00 2001 From: Sai Karthik Date: Tue, 19 Jul 2022 18:11:42 +0530 Subject: [PATCH] chapters: highlight current playing chapter --- src/components/ChaptersBar.vue | 47 ++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/src/components/ChaptersBar.vue b/src/components/ChaptersBar.vue index 1b0f74c2..6630196c 100644 --- a/src/components/ChaptersBar.vue +++ b/src/components/ChaptersBar.vue @@ -9,6 +9,11 @@ v-for="(chapter, index) in chapters" @click="$emit('seek', chapter.start)" class="chapter-vertical" + :class=" + playerPosition >= chapter.start && playerPosition < chapters[index + 1].start + ? 'chapter-vertical bg-red-500/50' + : 'chapter-vertical' + " >
@@ -22,7 +27,16 @@
-
+
@@ -55,17 +69,24 @@ @apply truncate overflow-hidden inline-block w-10em; } - -