1
0
mirror of https://gitlab.com/bramw/baserow.git synced 2024-11-24 16:36:46 +00:00
bramw_baserow/web-frontend/modules/database/components/card/RowCardFieldFile.vue
Jonathan Adeline 4321aaea9a Replace icons
2023-09-28 13:39:41 +00:00

37 lines
787 B
Vue

<template functional>
<div class="card-file__list-wrapper">
<ul class="card-file__list">
<li
v-for="(file, index) in props.value"
:key="file.name + index"
class="card-file__item"
>
<img
v-if="file.is_image"
class="card-file__image"
:src="file.thumbnails.tiny.url"
/>
<i
v-else
class="card-file__icon"
:class="$options.methods.getIconClass(file.mime_type)"
></i>
</li>
</ul>
</div>
</template>
<script>
import { mimetype2icon } from '@baserow/modules/core/utils/fileTypeToIcon'
export default {
height: 22,
name: 'RowCardFieldFile',
methods: {
getIconClass(mimeType) {
return mimetype2icon(mimeType)
},
},
}
</script>