diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6fa8ddb..7c72c4d 100644 Binary files a/pnpm-lock.yaml and b/pnpm-lock.yaml differ diff --git a/src/app/components/ChatCompose.svelte b/src/app/components/ChatCompose.svelte index ed8f179..9a5a57b 100644 --- a/src/app/components/ChatCompose.svelte +++ b/src/app/components/ChatCompose.svelte @@ -20,6 +20,8 @@ export const focus = () => editor.then(ed => ed.chain().focus().run()) + const uploadFiles = () => editor.then(ed => ed.chain().selectFiles().run()) + const submit = async () => { if ($uploading) return @@ -40,11 +42,21 @@ submit, uploading, aggressive: true, - disableFileUpload: true, })
+
diff --git a/src/app/components/ContentLinkBlockImage.svelte b/src/app/components/ContentLinkBlockImage.svelte index 87db740..36a02e6 100644 --- a/src/app/components/ContentLinkBlockImage.svelte +++ b/src/app/components/ContentLinkBlockImage.svelte @@ -1,14 +1,39 @@ diff --git a/src/app/editor/index.ts b/src/app/editor/index.ts index c560a50..cab84a0 100644 --- a/src/app/editor/index.ts +++ b/src/app/editor/index.ts @@ -35,7 +35,6 @@ export const makeEditor = async ({ submit, uploading, wordCount, - disableFileUpload, }: { aggressive?: boolean autofocus?: boolean @@ -46,7 +45,6 @@ export const makeEditor = async ({ submit: () => void uploading?: Writable wordCount?: Writable - disableFileUpload?: boolean }) => { return new Editor({ content, @@ -69,18 +67,17 @@ export const makeEditor = async ({ aggressive, }, }, - fileUpload: disableFileUpload - ? false - : { - config: { - onDrop() { - uploading?.set(true) - }, - onComplete() { - uploading?.set(false) - }, - }, + fileUpload: { + config: { + encryptionAlgorithm: "aes-gcm", + onDrop() { + uploading?.set(true) }, + onComplete() { + uploading?.set(false) + }, + }, + }, nprofile: { extend: { addNodeView: () => makeMentionNodeView(url),