|
@@ -28,6 +28,14 @@
|
|
import { deleteFileById } from '$lib/apis/files';
|
|
import { deleteFileById } from '$lib/apis/files';
|
|
|
|
|
|
let showModal = false;
|
|
let showModal = false;
|
|
|
|
+
|
|
|
|
+ const decodeString = (str: string) => {
|
|
|
|
+ try {
|
|
|
|
+ return decodeURIComponent(str);
|
|
|
|
+ } catch (e) {
|
|
|
|
+ return str;
|
|
|
|
+ }
|
|
|
|
+ };
|
|
</script>
|
|
</script>
|
|
|
|
|
|
{#if item}
|
|
{#if item}
|
|
@@ -82,7 +90,7 @@
|
|
{#if !small}
|
|
{#if !small}
|
|
<div class="flex flex-col justify-center -space-y-0.5 px-2.5 w-full">
|
|
<div class="flex flex-col justify-center -space-y-0.5 px-2.5 w-full">
|
|
<div class=" dark:text-gray-100 text-sm font-medium line-clamp-1 mb-1">
|
|
<div class=" dark:text-gray-100 text-sm font-medium line-clamp-1 mb-1">
|
|
- {decodeURIComponent(name)}
|
|
|
|
|
|
+ {decodeString(name)}
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class=" flex justify-between text-gray-500 text-xs line-clamp-1">
|
|
<div class=" flex justify-between text-gray-500 text-xs line-clamp-1">
|
|
@@ -101,11 +109,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{:else}
|
|
{:else}
|
|
- <Tooltip
|
|
|
|
- content={decodeURIComponent(name)}
|
|
|
|
- className="flex flex-col w-full"
|
|
|
|
- placement="top-start"
|
|
|
|
- >
|
|
|
|
|
|
+ <Tooltip content={decodeString(name)} className="flex flex-col w-full" placement="top-start">
|
|
<div class="flex flex-col justify-center -space-y-0.5 px-2.5 w-full">
|
|
<div class="flex flex-col justify-center -space-y-0.5 px-2.5 w-full">
|
|
<div class=" dark:text-gray-100 text-sm flex justify-between items-center">
|
|
<div class=" dark:text-gray-100 text-sm flex justify-between items-center">
|
|
{#if loading}
|
|
{#if loading}
|
|
@@ -113,7 +117,7 @@
|
|
<Spinner className="size-4" />
|
|
<Spinner className="size-4" />
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
{/if}
|
|
- <div class="font-medium line-clamp-1 flex-1">{decodeURIComponent(name)}</div>
|
|
|
|
|
|
+ <div class="font-medium line-clamp-1 flex-1">{decodeString(name)}</div>
|
|
<div class="text-gray-500 text-xs capitalize shrink-0">{formatFileSize(size)}</div>
|
|
<div class="text-gray-500 text-xs capitalize shrink-0">{formatFileSize(size)}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|