diff --git a/src/lib/components/AddFilesPlaceholder.svelte b/src/lib/components/AddFilesPlaceholder.svelte index d3d700795..6d72ee0e6 100644 --- a/src/lib/components/AddFilesPlaceholder.svelte +++ b/src/lib/components/AddFilesPlaceholder.svelte @@ -21,7 +21,7 @@ {#if content} {content} {:else} - {$i18n.t('Drop any files here to add to the conversation')} + {$i18n.t('Drop any files here to upload')} {/if} diff --git a/src/lib/components/notes/NoteEditor.svelte b/src/lib/components/notes/NoteEditor.svelte index e00e843cc..067715e50 100644 --- a/src/lib/components/notes/NoteEditor.svelte +++ b/src/lib/components/notes/NoteEditor.svelte @@ -48,6 +48,7 @@ import { uploadFile } from '$lib/apis/files'; import Image from '../common/Image.svelte'; import FileItem from '../common/FileItem.svelte'; + import FilesOverlay from '../chat/MessageInput/FilesOverlay.svelte'; export let id: null | string = null; @@ -288,6 +289,8 @@ }); + +
{#if loading}
@@ -297,7 +300,7 @@
{:else}
-
+
-
+
+
+
{#if note.data?.files} -
- {#each note.data.files as file} -
+
+ {#each note.data.files as file, fileIdx} +
{#if file.type === 'image'} { - files = files.filter((item) => item?.id !== file.id); + files = files.filter((item, idx) => idx !== fileIdx); note.data.files = files.length > 0 ? files : null; }} /> @@ -357,11 +362,9 @@ {/each}
{/if} -
-