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:
@@ -2,6 +2,7 @@ use adw::prelude::*;
|
||||
use gtk::glib;
|
||||
|
||||
mod bus;
|
||||
mod enroll_dialog;
|
||||
mod error;
|
||||
mod keys_page;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user