mirror of
https://github.com/directus/directus.git
synced 2026-01-27 10:18:06 -05:00
Center horizontally for small width videos
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
<template>
|
||||
<div v-if="type && !imgError" class="file-preview" :class="{ modal: inModal, small: isSmall, svg: isSVG }">
|
||||
<div
|
||||
v-if="type && !imgError"
|
||||
class="file-preview"
|
||||
:class="{ modal: inModal, small: isSmall, svg: isSVG, centered: type === 'video' }"
|
||||
>
|
||||
<div v-if="type === 'image'" class="image" @click="$emit('click')">
|
||||
<v-image :src="src" :width="width" :height="height" :alt="title" @error="imgError = true" />
|
||||
</div>
|
||||
@@ -65,6 +69,11 @@ const authenticatedSrc = computed(() => addTokenToURL(props.src));
|
||||
position: relative;
|
||||
max-width: calc((var(--form-column-max-width) * 2) + var(--form-horizontal-gap));
|
||||
|
||||
&.centered {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
img,
|
||||
video {
|
||||
width: auto;
|
||||
|
||||
Reference in New Issue
Block a user