mirror of
https://github.com/xlmnxp/extractify.zip.git
synced 2024-11-23 17:13:12 +03:00
27 lines
789 B
Vue
27 lines
789 B
Vue
{2ab36fb4df39d63ba13e837466af1879b5c1a811 true 789 file-logo.vue 0xc001f123f0}
<script lang="ts" setup>
|
|
import { iFile } from '~/composables/worker/7zip-manager';
|
|
|
|
interface Props {
|
|
file: iFile,
|
|
}
|
|
|
|
let { file } = defineProps<Props>()
|
|
|
|
let icon = computed(() => {
|
|
if (file.isFolder) return 'mdi-folder';
|
|
|
|
if (file.extension) {
|
|
if (videoExtensions.includes(file.extension!)) return 'mdi-video';
|
|
if (audioExtensions.includes(file.extension!)) return 'mdi-music';
|
|
if (imageExtensions.includes(file.extension!)) return 'mdi-image';
|
|
if (textExtensions.includes(file.extension!)) return 'mdi-file-document';
|
|
}
|
|
|
|
return 'mdi-file';
|
|
})
|
|
</script>
|
|
<template>
|
|
<v-avatar :color="file.isFolder ? 'light-blue-accent-4' : 'blue-grey-darken-1'">
|
|
<v-icon color="white">{{ icon }}</v-icon>
|
|
</v-avatar>
|
|
</template> |