Display attachments of unknown type as list items

This commit is contained in:
silverpill 2022-12-22 21:36:01 +00:00
parent c7eeb92ba1
commit d942127d06

View file

@ -1,7 +1,9 @@
<template>
<img v-if="attachment.type === 'image'" :src="attachment.url">
<video v-else-if="attachment.type === 'video'" :src="attachment.url" controls></video>
<a v-else :href="attachment.url">{{ attachment.url }}</a>
<div v-else>
&bull; <a :href="attachment.url">{{ attachment.url }}</a>
</div>
</template>
<script setup lang="ts">
@ -14,8 +16,8 @@ defineProps<{
</script>
<style scoped lang="scss">
@import "../styles/theme";
@import "../styles/mixins";
@import "../styles/theme";
a {
@include block-link;