mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 11:06:57 +00:00
remove special treatment when only use permanent passwrod but no password set (#8566)
1. Remove special treatment when only use permanent passwrod but no password set, it has no need and `Connection not allowd` prompt make user confusing. 2. When only use permanent password is chosen and the permanent password is empty, pop up the set-password dialog, if still not set in the dialog, back to the old choice 3. Add cancel confirm for 2fa and telegram bot Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
@@ -2188,3 +2188,31 @@ void setSharedAbPasswordDialog(String abName, Peer peer) {
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
void CommonConfirmDialog(OverlayDialogManager dialogManager, String content,
|
||||
VoidCallback onConfirm) {
|
||||
dialogManager.show((setState, close, context) {
|
||||
submit() {
|
||||
close();
|
||||
onConfirm.call();
|
||||
}
|
||||
|
||||
return CustomAlertDialog(
|
||||
content: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(content,
|
||||
style: const TextStyle(fontSize: 15),
|
||||
textAlign: TextAlign.start),
|
||||
),
|
||||
],
|
||||
).marginOnly(bottom: 12),
|
||||
actions: [
|
||||
dialogButton(translate("Cancel"), onPressed: close, isOutline: true),
|
||||
dialogButton(translate("OK"), onPressed: submit),
|
||||
],
|
||||
onSubmit: submit,
|
||||
onCancel: close,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user