Skip to content

A self-hosted media server and file management system

fix: preview aspect ratio in ui is not perfect

aminnausinb1679c51f6f2
diff --git a/resources/js/components/cards/data/ImageCard.vue b/resources/js/components/cards/data/ImageCard.vue
index c6fb43ab..e8b592c6 100644
--- a/resources/js/components/cards/data/ImageCard.vue
+++ b/resources/js/components/cards/data/ImageCard.vue
@@ -71,7 +71,7 @@ const emit = defineEmits({
"
>
<div :class="cn('relative flex max-h-48 w-full items-center overflow-clip rounded-t-lg text-xs select-none sm:max-h-80')">
- <div :class="cn({ 'aspect-[1.91/1]!': data.type === 'preview', 'aspect-square': isAudio, 'aspect-video': !isAudio }, 'size-full', $attrs.class)">
+ <div :class="cn({ 'aspect-40/21!': data.type === 'preview', 'aspect-square': isAudio, 'aspect-video': !isAudio }, 'size-full', $attrs.class)">
<div class="absolute inset-0 scale-120 blur-sm" :style="generatePosterStyle(data.path)"></div>
<LazyImage
@@ -80,7 +80,7 @@ const emit = defineEmits({
:animate="false"
loading="lazy"
:wrapper-class="cn('transition-opacity duration-input')"
- :class="cn('absolute inset-0 size-full object-contain', { 'aspect-[1.91/1]': data.type === 'preview' })"
+ :class="cn('absolute inset-0 size-full object-contain', { 'aspect-40/21': data.type === 'preview' })"
/>
</div>