Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
benma committed Jul 1, 2024
1 parent 4784c90 commit 447411d
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 40 deletions.
135 changes: 99 additions & 36 deletions 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 bitbox-bridge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ windows-service = "0.7.0"
clap = { version = "4.5", features = ["cargo"] }
warp = "0.3.7"
tera = "1.20"
rfd = "0.14"
rfd = { git = "https://github.com/benma/rfd.git", rev = "2568d48" }

[dependencies.u2fframing]
version = "0.1"
Expand Down
8 changes: 5 additions & 3 deletions bitbox-bridge/src/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,14 @@ impl AllowedOrigins {
return true;
}
}
let answer = rfd::AsyncMessageDialog::new()
// The AsyncMessageDialog does not work in rfd on macOS yet witout a main window.
// https://github.com/PolyMeilex/rfd/issues/104
// So we use the regular blocking MessageDialog.
let answer = rfd::MessageDialog::new()
.set_title("BitBoxBridge")
.set_description("Do you want to proceed?")
.set_buttons(rfd::MessageButtons::YesNo)
.show()
.await;
.show();
let ok = answer == rfd::MessageDialogResult::Yes;
if ok {
self.0.lock().unwrap().insert(origin.into());
Expand Down

0 comments on commit 447411d

Please sign in to comment.