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

zio/stable
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
1 changed files with 7 additions and 1 deletions

View File

@ -67,6 +67,7 @@ const type = $computed(() => {
const video = ref<HTMLVideoElement | undefined>() const video = ref<HTMLVideoElement | undefined>()
const prefersReducedMotion = usePreferredReducedMotion() const prefersReducedMotion = usePreferredReducedMotion()
const isAudio = $computed(() => attachment.type === 'audio') const isAudio = $computed(() => attachment.type === 'audio')
const isVideo = $computed(() => attachment.type === 'video')
const enableAutoplay = usePreferences('enableAutoplay') const enableAutoplay = usePreferences('enableAutoplay')
@ -246,7 +247,12 @@ watch(shouldLoadAttachment, () => {
/> />
</button> </button>
</template> </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"> <VDropdown :distance="6" placement="bottom-start">
<button <button
font-bold text-sm font-bold text-sm