mirror of
https://github.com/tcsenpai/swingmusic.git
synced 2025-07-29 06:02:06 +00:00
show 'Track' or 'Tracks' depending on track count on playlist card
+ handle clicks on context menu separator
This commit is contained in:
parent
01b485748b
commit
2dd4d58574
@ -9,7 +9,7 @@
|
|||||||
v-for="child in option.children"
|
v-for="child in option.children"
|
||||||
:key="child.label"
|
:key="child.label"
|
||||||
:class="[{ critical: child.critical }, child.type]"
|
:class="[{ critical: child.critical }, child.type]"
|
||||||
@click="child.action()"
|
@click="child.action && child.action()"
|
||||||
>
|
>
|
||||||
<div class="label ellip">
|
<div class="label ellip">
|
||||||
{{ child.label }}
|
{{ child.label }}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
ref="playlistheader"
|
ref="playlistheader"
|
||||||
:style="[
|
:style="[
|
||||||
{
|
{
|
||||||
backgroundImage: info.image ? `url(${imguri + info.image})` : '',
|
backgroundImage: info.image ? `url(${imguri + info.image})` : undefined,
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
:class="{ border: !info.image }"
|
:class="{ border: !info.image }"
|
||||||
@ -16,16 +16,15 @@
|
|||||||
<PlayBtnRect :source="playSources.playlist" :store="usePStore" />
|
<PlayBtnRect :source="playSources.playlist" :store="usePStore" />
|
||||||
</div>
|
</div>
|
||||||
<div class="duration">
|
<div class="duration">
|
||||||
<span v-if="info.count == 0">No Tracks</span>
|
{{ info.count + ` ${info.count == 1 ? "Track" : "Tracks"}` }}
|
||||||
<span v-else-if="info.count == 1">{{ info.count }} Track</span>
|
•
|
||||||
<span v-else>{{ info.count }} Tracks</span> •
|
|
||||||
{{ formatSeconds(info.duration, true) }}
|
{{ formatSeconds(info.duration, true) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="title ellip">{{ info.name }}</div>
|
<div class="title ellip">{{ info.name }}</div>
|
||||||
<div class="type">Playlist</div>
|
<div class="type">Playlist</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="last-updated">
|
<div class="last-updated" :class="{ lightbg: !info.image }">
|
||||||
<span class="status"
|
<span class="status"
|
||||||
>Last updated {{ info.lastUpdated }}  |  </span
|
>Last updated {{ info.lastUpdated }}  |  </span
|
||||||
>
|
>
|
||||||
@ -77,7 +76,7 @@ function showDropdown(e: any) {
|
|||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
background-color: $gray5;
|
||||||
|
|
||||||
.gradient {
|
.gradient {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -120,6 +119,10 @@ function showDropdown(e: any) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.last-updated.lightbg {
|
||||||
|
background-color: $gray2;
|
||||||
|
}
|
||||||
|
|
||||||
.carddd {
|
.carddd {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
|
@ -6,19 +6,11 @@
|
|||||||
>
|
>
|
||||||
<img :src="imguri + props.playlist.thumb" />
|
<img :src="imguri + props.playlist.thumb" />
|
||||||
<div class="overlay pad-lg">
|
<div class="overlay pad-lg">
|
||||||
<div class="p-name">{{ playlist.name }}</div>
|
<div class="p-name ellip">{{ playlist.name }}</div>
|
||||||
<div class="p-count">{{ playlist.count }} Tracks</div>
|
<div class="p-count">
|
||||||
</div>
|
{{ playlist.count + ` ${playlist.count == 1 ? "Track" : "Tracks"}` }}
|
||||||
<!-- <div class="bottom">
|
|
||||||
<div class="name ellip">{{ props.playlist.name }}</div>
|
|
||||||
<div class="count">
|
|
||||||
<span v-if="props.playlist.count == 0">No Tracks</span>
|
|
||||||
<span v-else-if="props.playlist.count == 1"
|
|
||||||
>{{ props.playlist.count }} Track</span
|
|
||||||
>
|
|
||||||
<span v-else>{{ props.playlist.count }} Tracks</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div>
|
||||||
</router-link>
|
</router-link>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
:key="option.label"
|
:key="option.label"
|
||||||
:class="[{ critical: option.critical }, option.type]"
|
:class="[{ critical: option.critical }, option.type]"
|
||||||
:option="option"
|
:option="option"
|
||||||
@click="option.action()"
|
@click="option.action && option.action()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user