diff options
| author | Ellie Huxtable <ellie@atuin.sh> | 2024-07-26 12:51:15 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-26 12:51:15 +0100 |
| commit | a34efd6c6bb6199da59b096196a97495b32d0c1f (patch) | |
| tree | af61addce7342c974e1b00486a7330bd5a8fa3b8 /ui/backend | |
| parent | feat(gui): directory block, re-org of some code (#2314) (diff) | |
| download | atuin-a34efd6c6bb6199da59b096196a97495b32d0c1f.zip | |
feat(gui): folder select dialogue for directory block (#2315)
Diffstat (limited to 'ui/backend')
| -rw-r--r-- | ui/backend/Cargo.lock | 74 | ||||
| -rw-r--r-- | ui/backend/Cargo.toml | 1 | ||||
| -rw-r--r-- | ui/backend/capabilities/migrated.json | 19 | ||||
| -rw-r--r-- | ui/backend/src/main.rs | 1 | ||||
| -rw-r--r-- | ui/backend/src/run/pty.rs | 4 |
5 files changed, 92 insertions, 7 deletions
diff --git a/ui/backend/Cargo.lock b/ui/backend/Cargo.lock index 11659c11..4c7ad8fe 100644 --- a/ui/backend/Cargo.lock +++ b/ui/backend/Cargo.lock @@ -168,6 +168,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] +name = "ashpd" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd884d7c72877a94102c3715f3b1cd09ff4fac28221add3e57cfbe25c236d093" +dependencies = [ + "enumflags2", + "futures-channel", + "futures-util", + "rand 0.8.5", + "serde", + "serde_repr", + "tokio", + "url", + "zbus", +] + +[[package]] name = "async-broadcast" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3349,6 +3366,17 @@ dependencies = [ ] [[package]] +name = "objc-foundation" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" +dependencies = [ + "block", + "objc", + "objc_id", +] + +[[package]] name = "objc-sys" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -4412,6 +4440,30 @@ dependencies = [ ] [[package]] +name = "rfd" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25a73a7337fc24366edfca76ec521f51877b114e42dab584008209cca6719251" +dependencies = [ + "ashpd", + "block", + "dispatch", + "glib-sys", + "gobject-sys", + "gtk-sys", + "js-sys", + "log", + "objc", + "objc-foundation", + "objc_id", + "raw-window-handle 0.6.2", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "windows-sys 0.48.0", +] + +[[package]] name = "ring" version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -5813,6 +5865,24 @@ dependencies = [ ] [[package]] +name = "tauri-plugin-dialog" +version = "2.0.0-beta.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8860dd73c96969eb14813f9f04d8665f2853342670456fb6619d637137ef0d09" +dependencies = [ + "dunce", + "log", + "raw-window-handle 0.6.2", + "rfd", + "serde", + "serde_json", + "tauri", + "tauri-plugin", + "tauri-plugin-fs", + "thiserror", +] + +[[package]] name = "tauri-plugin-fs" version = "2.0.0-beta.11" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -6174,6 +6244,7 @@ dependencies = [ "signal-hook-registry", "socket2", "tokio-macros", + "tracing", "windows-sys 0.52.0", ] @@ -6487,6 +6558,7 @@ dependencies = [ "syntect", "tauri", "tauri-build", + "tauri-plugin-dialog", "tauri-plugin-http", "tauri-plugin-os", "tauri-plugin-shell", @@ -7457,6 +7529,7 @@ dependencies = [ "serde_repr", "sha1", "static_assertions", + "tokio", "tracing", "uds_windows", "windows-sys 0.52.0", @@ -7541,6 +7614,7 @@ dependencies = [ "enumflags2", "serde", "static_assertions", + "url", "zvariant_derive", ] diff --git a/ui/backend/Cargo.toml b/ui/backend/Cargo.toml index 96a9b1c6..4477674e 100644 --- a/ui/backend/Cargo.toml +++ b/ui/backend/Cargo.toml @@ -37,6 +37,7 @@ tauri-plugin-http = "2.0.0-beta" tauri-plugin-single-instance = "2.0.0-beta" tauri-plugin-os = "2.0.0-beta.8" tauri-plugin-shell = "2.0.0-beta.7" +tauri-plugin-dialog = "2.0.0-beta.11" [target."cfg(target_os = \"macos\")".dependencies] cocoa = "0.25" diff --git a/ui/backend/capabilities/migrated.json b/ui/backend/capabilities/migrated.json index 60a713da..88d809ca 100644 --- a/ui/backend/capabilities/migrated.json +++ b/ui/backend/capabilities/migrated.json @@ -2,7 +2,9 @@ "identifier": "migrated", "description": "permissions that were migrated from v1", "context": "local", - "windows": ["main"], + "windows": [ + "main" + ], "permissions": [ "path:default", "event:default", @@ -19,9 +21,16 @@ "window:allow-start-dragging", { "identifier": "http:default", - "allow": ["https://api.atuin.sh/*"] + "allow": [ + "https://api.atuin.sh/*" + ] }, - "os:default" + "os:default", + "dialog:default" ], - "platforms": ["linux", "macOS", "windows"] -} + "platforms": [ + "linux", + "macOS", + "windows" + ] +}
\ No newline at end of file diff --git a/ui/backend/src/main.rs b/ui/backend/src/main.rs index c8a88136..eed6bfd3 100644 --- a/ui/backend/src/main.rs +++ b/ui/backend/src/main.rs @@ -282,6 +282,7 @@ fn show_window(app: &AppHandle) { fn main() { tauri::Builder::default() + .plugin(tauri_plugin_dialog::init()) .plugin(tauri_plugin_os::init()) .plugin(tauri_plugin_shell::init()) .invoke_handler(tauri::generate_handler