Skip to content

Commit 447411d

Browse files
committed
wip
1 parent 4784c90 commit 447411d

File tree

3 files changed

+105
-40
lines changed

3 files changed

+105
-40
lines changed

Cargo.lock

Lines changed: 99 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bitbox-bridge/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ windows-service = "0.7.0"
1919
clap = { version = "4.5", features = ["cargo"] }
2020
warp = "0.3.7"
2121
tera = "1.20"
22-
rfd = "0.14"
22+
rfd = { git = "https://github.com/benma/rfd.git", rev = "2568d48" }
2323

2424
[dependencies.u2fframing]
2525
version = "0.1"

bitbox-bridge/src/web.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,14 @@ impl AllowedOrigins {
102102
return true;
103103
}
104104
}
105-
let answer = rfd::AsyncMessageDialog::new()
105+
// The AsyncMessageDialog does not work in rfd on macOS yet witout a main window.
106+
// https://github.com/PolyMeilex/rfd/issues/104
107+
// So we use the regular blocking MessageDialog.
108+
let answer = rfd::MessageDialog::new()
106109
.set_title("BitBoxBridge")
107110
.set_description("Do you want to proceed?")
108111
.set_buttons(rfd::MessageButtons::YesNo)
109-
.show()
110-
.await;
112+
.show();
111113
let ok = answer == rfd::MessageDialogResult::Yes;
112114
if ok {
113115
self.0.lock().unwrap().insert(origin.into());

0 commit comments

Comments
 (0)