diff --git a/src/lib/components/notes/NoteEditor.svelte b/src/lib/components/notes/NoteEditor.svelte index ca5ae2ac6..fa878b2d0 100644 --- a/src/lib/components/notes/NoteEditor.svelte +++ b/src/lib/components/notes/NoteEditor.svelte @@ -166,6 +166,9 @@ } async function aiEnhanceContent(content) { + // fake delay + await new Promise((resolve) => setTimeout(resolve, 2000)); + const md = content.md + '_ai'; const html = marked.parse(md); @@ -612,7 +615,13 @@ -
+
+ {#if enhancing} +
+ {/if} + {#if files && files.length > 0}
{#each files as file, fileIdx} @@ -653,7 +662,7 @@ placeholder={$i18n.t('Write something...')} html={note.data?.content?.html} json={true} - editable={versionIdx === null} + editable={versionIdx === null && !enhancing} onChange={(content) => { note.data.content.html = content.html; note.data.content.md = content.md; @@ -665,7 +674,7 @@
@@ -769,13 +778,20 @@