show authorization code during device key approval

This commit is contained in:
2026-10-04 13:15:48 +07:00
parent 0bae051316
commit a8df0df0cd
4 changed files with 41 additions and 54 deletions
+5 -4
View File
@@ -106,14 +106,15 @@ impl Workspace {
// Observe all events emitted by the device registry
cx.subscribe_in(&device, window, |_this, _device, event, window, cx| {
match event {
DeviceEvent::Requesting => {
const MSG: &str =
"Please open other client and approve the request for encryption key.";
DeviceEvent::Requesting(code) => {
const MSG: &str = "Please open another client and approve the request \
for the encryption key. Compare the code with the \
one shown there before approving.";
let note = Notification::new()
.id::<DeviceNotifcation>()
.autohide(false)
.title("Wait for approval")
.title(format!("Wait for approval · {code}"))
.message(MSG)
.with_kind(NotificationKind::Info);