1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-05-17 22:32:02 +00:00
bramw_baserow/web-frontend/modules/database/components/card/RowCardFieldFile.vue

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
787 B
Vue
Raw Normal View History

2021-11-23 16:48:51 +00:00
<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
2023-09-28 13:39:41 +00:00
class="card-file__icon"
:class="$options.methods.getIconClass(file.mime_type)"
2021-11-23 16:48:51 +00:00
></i>
</li>
</ul>
</div>
</template>
<script>
2023-09-28 13:39:41 +00:00
import { mimetype2icon } from '@baserow/modules/core/utils/fileTypeToIcon'
2021-11-23 16:48:51 +00:00
export default {
height: 22,
name: 'RowCardFieldFile',
methods: {
getIconClass(mimeType) {
2023-09-28 13:39:41 +00:00
return mimetype2icon(mimeType)
2021-11-23 16:48:51 +00:00
},
},
}
</script>