refactor: file info preview mime type, icon, type

This commit is contained in:
puri-ph4tt 2023-11-28 09:22:44 +07:00 committed by Methapon2001
parent 0666a60741
commit b10679b53c
No known key found for this signature in database
GPG key ID: 849924FEF46BD132
4 changed files with 85 additions and 69 deletions

View file

@ -2,6 +2,7 @@
import { storeToRefs } from 'pinia'
import { useSearchDataStore } from '@/stores/searched-data'
import { useFileInfoStore } from '@/stores/file-info-data'
import FileIcon from '@/components/FileIcon.vue'
const { foundFile } = storeToRefs(useSearchDataStore())
const { isPreview } = storeToRefs(useFileInfoStore())
@ -27,7 +28,11 @@ const { getFileInfo } = useFileInfoStore()
"
>
<q-card-section class="column justify-center relative q-px-xl">
<q-icon name="description" size="6em" color="primary" />
<file-icon
size="preview"
:fileMimeType="value.fileType"
ref="fileIconComp"
/>
<span class="text-center q-pt-md">{{ value.title }}</span>
</q-card-section>
</q-card>