feat(gui): bus::Daemon::{get_pending_status,clear_pending_flag} client wrappers
clear_pending_flag is added alongside get_pending_status because Phase 10 needs both — its first-login modal checks status on startup and clears the flag on successful enrollment. Bundling here keeps the Phase 10 lane free of bus.rs edits. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
//! `glib::MainContext::spawn_local`, which polls the future on the GTK main
|
||||
//! thread; tokio's reactor wakes the future when zbus I/O is ready.
|
||||
|
||||
use authforge_common::types::Credential;
|
||||
use authforge_common::types::{Credential, PendingStatus};
|
||||
|
||||
const BUS_NAME: &str = "io.dangerousthings.AuthForge";
|
||||
const OBJECT_PATH: &str = "/io/dangerousthings/AuthForge";
|
||||
@@ -48,6 +48,14 @@ impl Daemon {
|
||||
) -> zbus::Result<zbus::proxy::SignalStream<'static>> {
|
||||
self.proxy.receive_signal("EnrollmentFailed").await
|
||||
}
|
||||
|
||||
pub async fn get_pending_status(&self, user: &str) -> zbus::Result<PendingStatus> {
|
||||
self.proxy.call("GetPendingStatus", &(user,)).await
|
||||
}
|
||||
|
||||
pub async fn clear_pending_flag(&self, user: &str) -> zbus::Result<()> {
|
||||
self.proxy.call("ClearPendingFlag", &(user,)).await
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)] // wired through keys_page.rs in Task 4.
|
||||
|
||||
Reference in New Issue
Block a user