refactor: support icon for another file and unknow

This commit is contained in:
puri-ph4tt 2023-12-07 16:22:49 +07:00
parent 17522c62be
commit 87fb1e753a
7 changed files with 104 additions and 88 deletions

View file

@ -91,8 +91,9 @@ async function downloadSubmit(path: string | undefined) {
<div class="q-px-md flex items-center justify-center">
<file-icon
size="preview"
:fileName="fileInfo?.fileName ? fileInfo.fileName : undefined"
:fileMimeType="
fileInfo?.fileType ? fileInfo?.fileType : 'unknow'
fileInfo?.fileType ? fileInfo.fileType : undefined
"
/>
</div>
@ -176,7 +177,9 @@ async function downloadSubmit(path: string | undefined) {
<span>ประเภทไฟล</span>
</div>
<div class="col-grow">
<span class="text-grey">{{ getType(fileInfo?.fileType) }}</span>
<span class="text-grey">{{
getType(fileInfo?.fileType, fileInfo?.fileName)
}}</span>
</div>
</div>
<q-separator />