logout confirm

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages 2023-07-15 07:21:54 +08:00
parent 314d7f4387
commit ebd8903c9b
39 changed files with 58 additions and 4 deletions

View File

@ -675,3 +675,22 @@ Future<bool?> verificationCodeDialog(UserPayload? user) async {
return res;
}
void logOutConfirmDialog() {
gFFI.dialogManager.show((setState, close, context) {
submit() {
close();
gFFI.userModel.logOut();
}
return CustomAlertDialog(
content: Text(translate("logout_tip")),
actions: [
dialogButton(translate("Cancel"), onPressed: close, isOutline: true),
dialogButton(translate("OK"), onPressed: submit),
],
onSubmit: submit,
onCancel: close,
);
});
}

View File

@ -1385,7 +1385,7 @@ class _AccountState extends State<_Account> {
() => {
gFFI.userModel.userName.value.isEmpty
? loginDialog()
: gFFI.userModel.logOut()
: logOutConfirmDialog()
}));
}
@ -1503,7 +1503,7 @@ class _PluginState extends State<_Plugin> {
() => {
gFFI.userModel.userName.value.isEmpty
? loginDialog()
: gFFI.userModel.logOut()
: logOutConfirmDialog()
}));
}
}

View File

@ -275,7 +275,7 @@ class _WebMenuState extends State<WebMenu> {
if (gFFI.userModel.userName.value.isEmpty) {
loginDialog();
} else {
gFFI.userModel.logOut();
logOutConfirmDialog();
}
}
if (value == 'scan') {

View File

@ -392,7 +392,7 @@ class _SettingsState extends State<SettingsPage> with WidgetsBindingObserver {
if (gFFI.userModel.userName.value.isEmpty) {
loginDialog();
} else {
gFFI.userModel.logOut();
logOutConfirmDialog();
}
},
),

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", ""),
("Exit", ""),
("Open", ""),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", "发起的连接"),
("Exit", "退出"),
("Open", "打开"),
("logout_tip", "确定要退出登录吗?"),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", ""),
("Exit", ""),
("Open", ""),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", ""),
("Exit", ""),
("Open", ""),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", "Ausgehende Verbindung"),
("Exit", "Beenden"),
("Open", "Öffnen"),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", ""),
("Exit", ""),
("Open", ""),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -71,5 +71,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("resolution_custom_tip", "Custom resolution"),
("accept_and_elevate_btn_tooltip", "Accept the connection and elevate UAC permissions."),
("clipboard_wait_response_timeout_tip", "Timed out waiting for copy response."),
("logout_tip", "Are you sure you want to log out ?")
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", ""),
("Exit", ""),
("Open", ""),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", ""),
("Exit", ""),
("Open", ""),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", "اتصال خروجی"),
("Exit", "خروج"),
("Open", "باز کردن"),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", ""),
("Exit", ""),
("Open", ""),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", ""),
("Exit", ""),
("Open", ""),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", ""),
("Exit", ""),
("Open", ""),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", "Conenssioni in uscita"),
("Exit", "Esci da RustDesk"),
("Open", "Apri RustDesk"),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", ""),
("Exit", ""),
("Open", ""),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", ""),
("Exit", ""),
("Open", ""),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", ""),
("Exit", ""),
("Open", ""),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", ""),
("Exit", ""),
("Open", ""),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", "Uitgaande verbinding"),
("Exit", "Verlaten"),
("Open", "Open"),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", ""),
("Exit", ""),
("Open", ""),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", ""),
("Exit", ""),
("Open", ""),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", ""),
("Exit", ""),
("Open", ""),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", ""),
("Exit", ""),
("Open", ""),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", "Исходящее подключение"),
("Exit", "Выход"),
("Open", "Открыть"),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", ""),
("Exit", ""),
("Open", ""),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", ""),
("Exit", ""),
("Open", ""),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", ""),
("Exit", ""),
("Open", ""),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", ""),
("Exit", ""),
("Open", ""),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", ""),
("Exit", ""),
("Open", ""),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", ""),
("Exit", ""),
("Open", ""),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", ""),
("Exit", ""),
("Open", ""),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", ""),
("Exit", ""),
("Open", ""),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", "發起的連接"),
("Exit", "退出"),
("Open", "開啟"),
("logout_tip", "確定要退出登錄嗎?"),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", ""),
("Exit", ""),
("Open", ""),
("logout_tip", ""),
].iter().cloned().collect();
}

View File

@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Outgoing connection", ""),
("Exit", ""),
("Open", ""),
("logout_tip", ""),
].iter().cloned().collect();
}