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