Skip to content

Commit

Permalink
Show song count on video card
Browse files Browse the repository at this point in the history
  • Loading branch information
NeloBlivion authored Sep 29, 2023
1 parent a1c3deb commit 6846b3c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/components/video/VideoCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@
<!-- Video duration/music indicator (👻❌) -->
<div v-if="!isPlaceholder" class="d-flex flex-column align-end">
<!-- Show music icon if songs exist -->
<div v-if="data.songcount" class="video-duration">
<div
v-if="data.songcount"
class="video-duration"
:title="songIconTitle"
>
{{ songCount }}
<v-icon small color="white">{{ icons.mdiMusic }}</v-icon>
</div>
<!-- Show TL chat icon if recently active or has archive tl exist -->
Expand Down Expand Up @@ -536,6 +541,12 @@ export default {
? this.$t("component.videoCard.totalTLs")
: this.$t("component.videoCard.tlPresence");
},
songIconTitle() {
return this.$t("component.videoCard.totalSongs");
},
songCount() {
return this.data.songcount > 1 ? this.data.songcount : "";
},
href() {
if (this.isPlaceholder) return undefined;
return this.redirectMode
Expand Down
1 change: 1 addition & 0 deletions src/locales/en/ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ component:
premiere: PREMIERE
googleCalendar: Add to Google Calendar
totalTLs: Total live chat TLs
totalSongs: Total timestamped songs
tlPresence: Active translator in last 30 mins
uncertainPlaceholder: Start time is not officially confirmed, actual start time may vary.
typeScheduledYT: Scheduled Stream
Expand Down

0 comments on commit 6846b3c

Please sign in to comment.