show 'Track' or 'Tracks' depending on track count on playlist card

+ handle clicks on context menu separator
This commit is contained in:
geoffrey45
2022-09-02 22:16:00 +03:00
parent 01b485748b
commit 2dd4d58574
4 changed files with 15 additions and 20 deletions
+9 -6
View File
@@ -4,7 +4,7 @@
ref="playlistheader"
:style="[
{
backgroundImage: info.image ? `url(${imguri + info.image})` : '',
backgroundImage: info.image ? `url(${imguri + info.image})` : undefined,
},
]"
:class="{ border: !info.image }"
@@ -16,16 +16,15 @@
<PlayBtnRect :source="playSources.playlist" :store="usePStore" />
</div>
<div class="duration">
<span v-if="info.count == 0">No Tracks</span>
<span v-else-if="info.count == 1">{{ info.count }} Track</span>
<span v-else>{{ info.count }} Tracks</span>
{{ info.count + ` ${info.count == 1 ? "Track" : "Tracks"}` }}
{{ formatSeconds(info.duration, true) }}
</div>
<div class="title ellip">{{ info.name }}</div>
<div class="type">Playlist</div>
</div>
</div>
<div class="last-updated">
<div class="last-updated" :class="{ lightbg: !info.image }">
<span class="status"
>Last updated {{ info.lastUpdated }} &#160;|&#160;&#160;</span
>
@@ -77,7 +76,7 @@ function showDropdown(e: any) {
grid-template-columns: 1fr;
height: 100%;
position: relative;
background-color: $gray5;
.gradient {
position: absolute;
@@ -120,6 +119,10 @@ function showDropdown(e: any) {
}
}
.last-updated.lightbg {
background-color: $gray2;
}
.carddd {
width: 100%;
padding: 1rem;