diff --git a/eml-client/src-tauri/capabilities/migrated.json b/eml-client/src-tauri/capabilities/migrated.json index cac9603..918b68c 100644 --- a/eml-client/src-tauri/capabilities/migrated.json +++ b/eml-client/src-tauri/capabilities/migrated.json @@ -11,6 +11,7 @@ "resources:default", "menu:default", "tray:default", - "shell:allow-open" + "shell:allow-open", + "dialog:allow-open" ] } diff --git a/eml-client/src-tauri/gen/schemas/capabilities.json b/eml-client/src-tauri/gen/schemas/capabilities.json index 5066635..a0170a6 100644 --- a/eml-client/src-tauri/gen/schemas/capabilities.json +++ b/eml-client/src-tauri/gen/schemas/capabilities.json @@ -12,7 +12,8 @@ "resources:default", "menu:default", "tray:default", - "shell:allow-open" + "shell:allow-open", + "dialog:allow-open" ] } } diff --git a/eml-client/src/components/EmlCompose.svelte b/eml-client/src/components/EmlCompose.svelte index 266d2ec..db028a3 100644 --- a/eml-client/src/components/EmlCompose.svelte +++ b/eml-client/src/components/EmlCompose.svelte @@ -40,10 +40,10 @@ const addAttachment = () => { dialog.open() - .then((path) => { + .then((f) => { attachments[attachments.length] = { - name: path.replace(/.*\//, ""), - path, + name: f.name, + path: f.path, } }) }