refactor: merge duration/live/shorts indicator to VideoThumbnail component

This commit is contained in:
Bnyro
2025-01-22 15:14:00 +01:00
parent 5266b2d1d9
commit 691cb6d86b
3 changed files with 25 additions and 41 deletions

View File

@@ -14,20 +14,6 @@
>
<VideoThumbnail :item="item" />
<div class="relative text-sm">
<!-- shorts thumbnail -->
<span v-if="item.isShort" v-t="'video.shorts'" class="thumbnail-overlay thumbnail-left" />
<span
v-if="item.duration > 0 || (item.duration == 0 && item.isShort)"
class="thumbnail-overlay thumbnail-right px-0.5"
v-text="timeFormat(item.duration)"
/>
<i18n-t v-else keypath="video.live" class="thumbnail-overlay thumbnail-right !bg-red-600" tag="div">
<i class="i-fa6-solid:tower-broadcast w-3" />
</i18n-t>
<span v-if="item.watched" v-t="'video.watched'" class="thumbnail-overlay bottom-5px left-5px" />
</div>
<div>
<p
style="display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical"