Skip to content

Commit

Permalink
feat(core): add file drop handler (#1352)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Mar 13, 2021
1 parent 53910ff commit 2db901e
Show file tree
Hide file tree
Showing 11 changed files with 304 additions and 207 deletions.
5 changes: 5 additions & 0 deletions .changes/file-drop-events.md
@@ -0,0 +1,5 @@
---
"tauri": minor
---

Tauri now emits events on file drops on the webview window.
4 changes: 2 additions & 2 deletions api/src/shell.ts
Expand Up @@ -7,7 +7,7 @@ import { invokeTauriCommand } from './helpers/tauri'
* @param [args] command args
* @return promise resolving to the stdout text
*/
async function execute (
async function execute(
command: string,
args?: string | string[]
): Promise<string> {
Expand All @@ -32,7 +32,7 @@ async function execute (
* @param path the path or URL to open
* @param openWith the app to open the file or URL with
*/
async function open (path: string, openWith?: string): Promise<void> {
async function open(path: string, openWith?: string): Promise<void> {
return invokeTauriCommand({
__tauriModule: 'Shell',
message: {
Expand Down
4 changes: 2 additions & 2 deletions cli/core/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tauri/Cargo.toml
Expand Up @@ -30,7 +30,7 @@ thiserror = "1.0.24"
once_cell = "1.7.2"
tauri-api = { version = "0.7.5", path = "../tauri-api" }
tauri-macros = { version = "0.1", path = "../tauri-macros" }
wry = { git = "https://github.com/tauri-apps/wry", rev = "729fdc182eaf4af44d822dfc9396deb3f5f5810a" }
wry = { git = "https://github.com/tauri-apps/wry", rev = "39575983dbd128fbbcde933d742b33b691fd1def" }
rand = "0.8"

[build-dependencies]
Expand Down

0 comments on commit 2db901e

Please sign in to comment.