fix icon for DirectoryEntrys without mime type

This commit is contained in:
2025-07-30 23:38:30 +02:00
parent ea09b9c470
commit d4aea1b579
2 changed files with 9 additions and 2 deletions

View File

@@ -127,7 +127,14 @@ function onCopy() {
@click="onClick" @click="onClick"
> >
<div class="flex flex-row items-center"> <div class="flex flex-row items-center">
<Icon class="size-6" :name="getFileIcon(entry.mimeType)" /> <Icon
class="size-6"
:name="
entry.fileType === 'file'
? getFileIcon(entry.mimeType)
: 'lucide:folder'
"
/>
</div> </div>
<div <div

View File

@@ -1,6 +1,6 @@
export function getFileIcon(mimeType: string | null) { export function getFileIcon(mimeType: string | null) {
if (mimeType == null) { if (mimeType == null) {
return 'lucide:folder'; return 'lucide:file';
} }
if (mimeType.startsWith('image/')) { if (mimeType.startsWith('image/')) {