logout confirm
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
314d7f4387
commit
ebd8903c9b
@ -675,3 +675,22 @@ Future<bool?> verificationCodeDialog(UserPayload? user) async {
|
|||||||
|
|
||||||
return res;
|
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,
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -1385,7 +1385,7 @@ class _AccountState extends State<_Account> {
|
|||||||
() => {
|
() => {
|
||||||
gFFI.userModel.userName.value.isEmpty
|
gFFI.userModel.userName.value.isEmpty
|
||||||
? loginDialog()
|
? loginDialog()
|
||||||
: gFFI.userModel.logOut()
|
: logOutConfirmDialog()
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1503,7 +1503,7 @@ class _PluginState extends State<_Plugin> {
|
|||||||
() => {
|
() => {
|
||||||
gFFI.userModel.userName.value.isEmpty
|
gFFI.userModel.userName.value.isEmpty
|
||||||
? loginDialog()
|
? loginDialog()
|
||||||
: gFFI.userModel.logOut()
|
: logOutConfirmDialog()
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -275,7 +275,7 @@ class _WebMenuState extends State<WebMenu> {
|
|||||||
if (gFFI.userModel.userName.value.isEmpty) {
|
if (gFFI.userModel.userName.value.isEmpty) {
|
||||||
loginDialog();
|
loginDialog();
|
||||||
} else {
|
} else {
|
||||||
gFFI.userModel.logOut();
|
logOutConfirmDialog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (value == 'scan') {
|
if (value == 'scan') {
|
||||||
|
@ -392,7 +392,7 @@ class _SettingsState extends State<SettingsPage> with WidgetsBindingObserver {
|
|||||||
if (gFFI.userModel.userName.value.isEmpty) {
|
if (gFFI.userModel.userName.value.isEmpty) {
|
||||||
loginDialog();
|
loginDialog();
|
||||||
} else {
|
} else {
|
||||||
gFFI.userModel.logOut();
|
logOutConfirmDialog();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", ""),
|
("Outgoing connection", ""),
|
||||||
("Exit", ""),
|
("Exit", ""),
|
||||||
("Open", ""),
|
("Open", ""),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", "发起的连接"),
|
("Outgoing connection", "发起的连接"),
|
||||||
("Exit", "退出"),
|
("Exit", "退出"),
|
||||||
("Open", "打开"),
|
("Open", "打开"),
|
||||||
|
("logout_tip", "确定要退出登录吗?"),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", ""),
|
("Outgoing connection", ""),
|
||||||
("Exit", ""),
|
("Exit", ""),
|
||||||
("Open", ""),
|
("Open", ""),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", ""),
|
("Outgoing connection", ""),
|
||||||
("Exit", ""),
|
("Exit", ""),
|
||||||
("Open", ""),
|
("Open", ""),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", "Ausgehende Verbindung"),
|
("Outgoing connection", "Ausgehende Verbindung"),
|
||||||
("Exit", "Beenden"),
|
("Exit", "Beenden"),
|
||||||
("Open", "Öffnen"),
|
("Open", "Öffnen"),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", ""),
|
("Outgoing connection", ""),
|
||||||
("Exit", ""),
|
("Exit", ""),
|
||||||
("Open", ""),
|
("Open", ""),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -71,5 +71,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("resolution_custom_tip", "Custom resolution"),
|
("resolution_custom_tip", "Custom resolution"),
|
||||||
("accept_and_elevate_btn_tooltip", "Accept the connection and elevate UAC permissions."),
|
("accept_and_elevate_btn_tooltip", "Accept the connection and elevate UAC permissions."),
|
||||||
("clipboard_wait_response_timeout_tip", "Timed out waiting for copy response."),
|
("clipboard_wait_response_timeout_tip", "Timed out waiting for copy response."),
|
||||||
|
("logout_tip", "Are you sure you want to log out ?")
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", ""),
|
("Outgoing connection", ""),
|
||||||
("Exit", ""),
|
("Exit", ""),
|
||||||
("Open", ""),
|
("Open", ""),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", ""),
|
("Outgoing connection", ""),
|
||||||
("Exit", ""),
|
("Exit", ""),
|
||||||
("Open", ""),
|
("Open", ""),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", "اتصال خروجی"),
|
("Outgoing connection", "اتصال خروجی"),
|
||||||
("Exit", "خروج"),
|
("Exit", "خروج"),
|
||||||
("Open", "باز کردن"),
|
("Open", "باز کردن"),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", ""),
|
("Outgoing connection", ""),
|
||||||
("Exit", ""),
|
("Exit", ""),
|
||||||
("Open", ""),
|
("Open", ""),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", ""),
|
("Outgoing connection", ""),
|
||||||
("Exit", ""),
|
("Exit", ""),
|
||||||
("Open", ""),
|
("Open", ""),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", ""),
|
("Outgoing connection", ""),
|
||||||
("Exit", ""),
|
("Exit", ""),
|
||||||
("Open", ""),
|
("Open", ""),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", "Conenssioni in uscita"),
|
("Outgoing connection", "Conenssioni in uscita"),
|
||||||
("Exit", "Esci da RustDesk"),
|
("Exit", "Esci da RustDesk"),
|
||||||
("Open", "Apri RustDesk"),
|
("Open", "Apri RustDesk"),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", ""),
|
("Outgoing connection", ""),
|
||||||
("Exit", ""),
|
("Exit", ""),
|
||||||
("Open", ""),
|
("Open", ""),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", ""),
|
("Outgoing connection", ""),
|
||||||
("Exit", ""),
|
("Exit", ""),
|
||||||
("Open", ""),
|
("Open", ""),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", ""),
|
("Outgoing connection", ""),
|
||||||
("Exit", ""),
|
("Exit", ""),
|
||||||
("Open", ""),
|
("Open", ""),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", ""),
|
("Outgoing connection", ""),
|
||||||
("Exit", ""),
|
("Exit", ""),
|
||||||
("Open", ""),
|
("Open", ""),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", "Uitgaande verbinding"),
|
("Outgoing connection", "Uitgaande verbinding"),
|
||||||
("Exit", "Verlaten"),
|
("Exit", "Verlaten"),
|
||||||
("Open", "Open"),
|
("Open", "Open"),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", ""),
|
("Outgoing connection", ""),
|
||||||
("Exit", ""),
|
("Exit", ""),
|
||||||
("Open", ""),
|
("Open", ""),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", ""),
|
("Outgoing connection", ""),
|
||||||
("Exit", ""),
|
("Exit", ""),
|
||||||
("Open", ""),
|
("Open", ""),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", ""),
|
("Outgoing connection", ""),
|
||||||
("Exit", ""),
|
("Exit", ""),
|
||||||
("Open", ""),
|
("Open", ""),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", ""),
|
("Outgoing connection", ""),
|
||||||
("Exit", ""),
|
("Exit", ""),
|
||||||
("Open", ""),
|
("Open", ""),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", "Исходящее подключение"),
|
("Outgoing connection", "Исходящее подключение"),
|
||||||
("Exit", "Выход"),
|
("Exit", "Выход"),
|
||||||
("Open", "Открыть"),
|
("Open", "Открыть"),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", ""),
|
("Outgoing connection", ""),
|
||||||
("Exit", ""),
|
("Exit", ""),
|
||||||
("Open", ""),
|
("Open", ""),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", ""),
|
("Outgoing connection", ""),
|
||||||
("Exit", ""),
|
("Exit", ""),
|
||||||
("Open", ""),
|
("Open", ""),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", ""),
|
("Outgoing connection", ""),
|
||||||
("Exit", ""),
|
("Exit", ""),
|
||||||
("Open", ""),
|
("Open", ""),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", ""),
|
("Outgoing connection", ""),
|
||||||
("Exit", ""),
|
("Exit", ""),
|
||||||
("Open", ""),
|
("Open", ""),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", ""),
|
("Outgoing connection", ""),
|
||||||
("Exit", ""),
|
("Exit", ""),
|
||||||
("Open", ""),
|
("Open", ""),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", ""),
|
("Outgoing connection", ""),
|
||||||
("Exit", ""),
|
("Exit", ""),
|
||||||
("Open", ""),
|
("Open", ""),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", ""),
|
("Outgoing connection", ""),
|
||||||
("Exit", ""),
|
("Exit", ""),
|
||||||
("Open", ""),
|
("Open", ""),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", ""),
|
("Outgoing connection", ""),
|
||||||
("Exit", ""),
|
("Exit", ""),
|
||||||
("Open", ""),
|
("Open", ""),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", "發起的連接"),
|
("Outgoing connection", "發起的連接"),
|
||||||
("Exit", "退出"),
|
("Exit", "退出"),
|
||||||
("Open", "開啟"),
|
("Open", "開啟"),
|
||||||
|
("logout_tip", "確定要退出登錄嗎?"),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", ""),
|
("Outgoing connection", ""),
|
||||||
("Exit", ""),
|
("Exit", ""),
|
||||||
("Open", ""),
|
("Open", ""),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
@ -517,5 +517,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("Outgoing connection", ""),
|
("Outgoing connection", ""),
|
||||||
("Exit", ""),
|
("Exit", ""),
|
||||||
("Open", ""),
|
("Open", ""),
|
||||||
|
("logout_tip", ""),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user