feat(gui): TouchDialog modal racing EnrollOwn against EnrollmentFailed signal
Adds enroll_dialog::present which opens an adw::AlertDialog with a spinner and races the EnrollOwn call against the EnrollmentFailed signal stream: - Call returns Ok(_cred) -> close dialog, fire on_success refresh callback. - Call returns Err -> swap dialog body to the user-message form. - Signal arrives first -> swap to the signal payload (faster than waiting for the call's typed Err to traverse the bus). KeysPage::start_enroll wires the activated row to present(), passing the parent window for modal anchoring and a refresh closure as on_success. Plan deviation: AlertDialog is libadwaita v1_5-gated, so gui/Cargo.toml enables that feature. Targets Ubuntu 24.04+ (libadwaita 1.5).
This commit is contained in:
@@ -10,7 +10,7 @@ path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
gtk = { package = "gtk4", version = "0.8" }
|
||||
adw = { package = "libadwaita", version = "0.6" }
|
||||
adw = { package = "libadwaita", version = "0.6", features = ["v1_5"] }
|
||||
authforge-common = { path = "../common" }
|
||||
anyhow = { workspace = true }
|
||||
zbus = { workspace = true }
|
||||
|
||||
Reference in New Issue
Block a user