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:
michael
2026-04-27 09:24:50 -07:00
parent f11047fbcb
commit 3fbd872a9c
4 changed files with 92 additions and 5 deletions

View File

@@ -2,6 +2,7 @@ use adw::prelude::*;
use gtk::glib;
mod bus;
mod enroll_dialog;
mod error;
mod keys_page;