refactor: expose root presentation apis via root context trait
Rust / build (macos-latest, stable) (push) Waiting to run
Rust / build (ubuntu-latest, stable) (push) Waiting to run
Rust / build (windows-latest, stable) (push) Waiting to run

This commit is contained in:
2026-11-23 02:55:29 +07:00
parent ccaa48a112
commit efb5761c56
3 changed files with 63 additions and 23 deletions
+3 -3
View File
@@ -13,7 +13,7 @@ use signed_state::{Backend, BackendEvent};
use ui::common::{h_flex, v_flex};
use ui::icons::IconRole;
use ui::layout::panel::PanelRow;
use ui::layout::root::Root;
use ui::layout::root::RootContext as _;
use ui::layout::titlebar::Titlebar;
use ui::toast::Toast;
@@ -61,7 +61,7 @@ impl AppRoot {
this.open_passphrase(cx);
}
BackendEvent::Error(message) => {
Root::push_toast(Toast::new(message.clone()).icon(IconRole::Warning), cx);
cx.toast(Toast::new(message.clone()).icon(IconRole::Warning));
}
BackendEvent::SignerChanged => {
this.workspace.update(cx, |workspace, cx| {
@@ -104,7 +104,7 @@ impl AppRoot {
}
let dialog = PassphraseDialog::new(cx);
self.passphrase = Some(dialog.clone());
Root::open_dialog(dialog, cx);
cx.open_dialog(dialog);
}
}