A self-hosted media server and file management system
Vue ffmpegfile-serverjellyfinlaravelmediamedia-playermedia-servermediabrowsermediaservermusicmusic-librarymusic-playermusicplayerself-hostedvuejs
feat: show media duration over thumbnail instead of text
aminnausinf47f0623c10f
diff --git a/resources/js/components/cards/data/VideoCard.vue b/resources/js/components/cards/data/VideoCard.vueindex cfd8be38..98975e89 100644--- a/resources/js/components/cards/data/VideoCard.vue+++ b/resources/js/components/cards/data/VideoCard.vue@@ -210,7 +210,7 @@ const dateInformation = computed(() => getMediaDateDescription(videoData));<ProiconsInfoSquare v-else class="size-5" /></template><template #content>- <div class="text-foreground-1 flex gap-1 overflow-clip uppercase *:text-nowrap sm:min-w-fit">+ <div class="text-foreground-1 flex gap-1 overflow-clip text-sm uppercase *:text-nowrap sm:min-w-fit"><span v-if="videoData.file_size" :title="`File Size: ${formatFileSize(videoData.file_size)}`">{{ formatFileSize(videoData.file_size) }}</span>@@ -233,15 +233,10 @@ const dateInformation = computed(() => getMediaDateDescription(videoData));<span class="min-w-fit" :title="`View Count: ${views}`">{{ views }}</span>-- <span>|</span>- <span class="text-nowrap" :title="`Duration: ${duration}`">- {{ toFormattedDuration(data.metadata?.duration ?? 0, false, 'analog', true) }}- </span></div><spanv-if="videoData.video_tags.length"- class="3xl:h-5.5 3xl:gap-1 3xl:*:text-sm -order-1 flex w-full flex-wrap gap-0.5 overflow-clip [overflow-clip-margin:4px] *:w-fit *:text-xs sm:order-0 sm:h-5 sm:flex-1 sm:gap-y-2"+ class="3xl:h-5.5 3xl:gap-1 3xl:*:text-sm order-2 flex w-full flex-wrap gap-0.5 overflow-clip [overflow-clip-margin:4px] *:w-fit *:text-xs sm:order-0 sm:h-5 sm:flex-1 sm:gap-y-2"title="Tags"><MediaTag v-for="(tag, index) in videoData.video_tags" :key="index" :label="tag.name" />diff --git a/resources/js/components/video/VideoPreview.vue b/resources/js/components/video/VideoPreview.vueindex 35e4a7b2..5ff8d780 100644--- a/resources/js/components/video/VideoPreview.vue+++ b/resources/js/components/video/VideoPreview.vue@@ -224,18 +224,14 @@ defineExpose({ hovered });})">- <VideoControlWrapper- :class="cn('ml-1 w-fit opacity-0 transition-opacity duration-150', { 'opacity-100': hovered, 'mb-2': !activeCue, 'backdrop-blur-none': !hovered })"- >+ <VideoControlWrapper :class="cn('ml-1 w-fit')"><p :class="cn('font-figtree px-1 text-white tabular-nums text-shadow-lg')">- {{ activeCue ? timestamp : toFormattedDuration(data.duration, false, 'digital') }}+ {{ activeCue && hovered ? timestamp : toFormattedDuration(data.duration, false, 'digital') }}</p></VideoControlWrapper>- <Transition name="fade">- <div v-if="activeCue && hovered" :class="cn('h-1 w-full bg-white/20 transition-opacity duration-150')">- <div class="h-full bg-white" :style="{ width: `${(hoverProgress / data.duration) * 100}%` }" />- </div>- </Transition>+ <div :class="cn('h-1 w-full bg-white/20 opacity-0 transition-opacity duration-150', { 'opacity-100': activeCue && hovered })">+ <div class="h-full bg-white" :style="{ width: `${(hoverProgress / data.duration) * 100}%` }" />+ </div></div></template>