fix: move the ALT text button for video attahcments to the top (#2479)

This commit is contained in:
Alex 2023-11-24 02:19:53 -06:00 committed by GitHub
parent 7595162a0e
commit 1f752e65ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -67,6 +67,7 @@ const type = $computed(() => {
const video = ref<HTMLVideoElement | undefined>()
const prefersReducedMotion = usePreferredReducedMotion()
const isAudio = $computed(() => attachment.type === 'audio')
const isVideo = $computed(() => attachment.type === 'video')
const enableAutoplay = usePreferences('enableAutoplay')
@ -246,7 +247,12 @@ watch(shouldLoadAttachment, () => {
/>
</button>
</template>
<div v-if="attachment.description && !getPreferences(userSettings, 'hideAltIndicatorOnPosts')" :class="isAudio ? '' : 'absolute left-2 bottom-2'">
<div
v-if="attachment.description && !getPreferences(userSettings, 'hideAltIndicatorOnPosts')" :class="isAudio ? [] : [
'absolute left-2',
isVideo ? 'top-2' : 'bottom-2',
]"
>
<VDropdown :distance="6" placement="bottom-start">
<button
font-bold text-sm