show authorization code during device key approval
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user