Skip to content

Commit

Permalink
Fix attachments not working, no dialog since tauri v2
Browse files Browse the repository at this point in the history
  • Loading branch information
OJFord committed Mar 27, 2024
1 parent 9f3229e commit a35b00a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion eml-client/src-tauri/capabilities/migrated.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"resources:default",
"menu:default",
"tray:default",
"shell:allow-open"
"shell:allow-open",
"dialog:allow-open"
]
}
3 changes: 2 additions & 1 deletion eml-client/src-tauri/gen/schemas/capabilities.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"resources:default",
"menu:default",
"tray:default",
"shell:allow-open"
"shell:allow-open",
"dialog:allow-open"
]
}
}
6 changes: 3 additions & 3 deletions eml-client/src/components/EmlCompose.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
})
}
Expand Down

0 comments on commit a35b00a

Please sign in to comment.