Skip to content

Commit

Permalink
feat(ui): move alt text under the media preview (#863)
Browse files Browse the repository at this point in the history
  • Loading branch information
baptiste0928 committed Jan 17, 2023
1 parent 0b77ad3 commit 6c1d0e7
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions components/modal/ModalMediaPreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,21 @@ onUnmounted(() => locked.value = false)
</button>

<div flex flex-row items-center mxa>
<ModalMediaPreviewCarousel v-model="index" :media="mediaPreviewList" @close="emit('close')" />
<div flex="~ col center" max-h-full max-w-full>
<ModalMediaPreviewCarousel v-model="index" :media="mediaPreviewList" @close="emit('close')" />

<div bg="black/30" dark:bg="white/10" ms-4 mb-6 mt-4 text-white rounded-full flex="~ center shrink-0" overflow-hidden>
<div v-if="mediaPreviewList.length > 1" p="y-1 x-3" rounded-r-0 shrink-0>
{{ index + 1 }} / {{ mediaPreviewList.length }}
</div>
<p
v-if="current.description" bg="dark/30" dark:bg="white/10" p="y-1 x-3" rounded-ie-full line-clamp-1
ws-pre-wrap break-all :title="current.description" w-full
>
{{ current.description }}
</p>
</div>
</div>
</div>

<div absolute top-0 w-full flex justify-between>
Expand All @@ -64,17 +78,6 @@ onUnmounted(() => locked.value = false)
>
<div i-ri:close-line text-white />
</button>
<div bg="black/30" dark:bg="white/10" ms-4 my-auto text-white rounded-full flex="~ center" overflow-hidden>
<div v-if="mediaPreviewList.length > 1" p="y-1 x-2" rounded-r-0 shrink-0>
{{ index + 1 }} / {{ mediaPreviewList.length }}
</div>
<p
v-if="current.description" bg="dark/30" dark:bg="white/10" p="y-1 x-2" rounded-ie-full line-clamp-1
ws-pre-wrap break-all :title="current.description" w-full
>
{{ current.description }}
</p>
</div>
</div>
</div>
</template>

0 comments on commit 6c1d0e7

Please sign in to comment.