Better attachment view page

This commit is contained in:
2024-10-04 20:21:01 +08:00
parent a0cf66d2e1
commit 6693acb24a
3 changed files with 86 additions and 63 deletions

View File

@ -18,7 +18,7 @@
</v-row>
</v-sheet>
<v-img v-else-if="item.mimetype.split('/')[0] == 'image'" :src="getAttachmentUrl(item.rid)" :alt="item.alt"
class="w-full h-full" cover />
class="w-full h-full" :cover="!props.noCover" />
<video v-else-if="item.mimetype.split('/')[0] == 'video'" :src="getAttachmentUrl(item.rid)" class="w-full h-full"
controls @click.stop />
<v-sheet v-else color="rgba(0, 0, 0, .4)" height="calc(100% + 24px)" class="p-5">
@ -49,7 +49,7 @@
<script setup lang="ts">
const config = useRuntimeConfig()
const props = defineProps<{ item: any }>()
const props = defineProps<{ item: any, noCover?: boolean }>()
const item = computed(() => props.item)