Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

fix: rebase corrections

DarkPhoenix2704d6d2114b3c3c
diff --git a/packages/nc-gui/components/cell/attachment/Preview/Thumbnail.vue b/packages/nc-gui/components/cell/attachment/Preview/Thumbnail.vue
index fd0b8f02f2..29e3848f10 100644
--- a/packages/nc-gui/components/cell/attachment/Preview/Thumbnail.vue
+++ b/packages/nc-gui/components/cell/attachment/Preview/Thumbnail.vue
@@ -79,75 +79,21 @@ const onError = async () => {
@error="onError"
/>
- <GeneralIcon
- v-else-if="isImage(attachment.title, attachment.mimetype)"
- class="text-white"
- icon="ncFileTypeImage"
- :height="iconHeight"
- :width="iconWidth"
- />
-
- <GeneralIcon
- v-else-if="isPdf(attachment.title, attachment.mimetype)"
- class="text-white"
- icon="ncFileTypePdf"
- :height="iconHeight"
- :width="iconWidth"
- />
-
- <GeneralIcon
- v-else-if="isAudio(attachment.title, attachment.mimetype)"
- class="text-white"
- icon="ncFileTypeAudio"
- :height="iconHeight"
- :width="iconWidth"
- />
- <GeneralIcon
- v-else-if="isVideo(attachment.title, attachment.mimetype)"
- class="text-white"
- icon="ncFileTypeVideo"
- :height="iconHeight"
- :width="iconWidth"
- />
-
- <GeneralIcon
- v-else-if="isWord(attachment.title, attachment.mimetype)"
- class="text-white"
- icon="ncFileTypeWord"
+ <component
+ :is="FileIcon(attachment.icon)"
+ v-else-if="attachment.icon"
:height="iconHeight"
:width="iconWidth"
- />
- <GeneralIcon
- v-else-if="isExcel(attachment.title, attachment.mimetype)"
class="text-white"
- icon="ncFileTypeCsv"
- :height="iconHeight"
- :width="iconWidth"
/>
<GeneralIcon
- v-else-if="isPresentation(attachment.title, attachment.mimetype)"
- class="text-white"
- icon="ncFileTypePresentation"
- :height="iconHeight"
- :width="iconWidth"
- />
- <GeneralIcon
- v-else-if="isZip(attachment.title, attachment.mimetype)"
+ v-else
class="text-white"
- icon="ncFileTypeZip"
+ :icon="getAttachmentIcon(attachment.title, attachment.mimetype)"
:height="iconHeight"
:width="iconWidth"
/>
- <component
- :is="FileIcon(attachment.icon)"
- v-else-if="attachment.icon"
- :height="iconHeight"
- :width="iconWidth"
- class="text-white"
- />
-
- <GeneralIcon v-else icon="ncFileTypeUnknown" :height="iconHeight" :width="iconWidth" class="text-white" />
</div>
</div>
</template>