mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-06-11 20:53:13 +08:00
parent
dad841e493
commit
b525185d7f
@ -455,10 +455,14 @@ Future<bool?> loginDialog() async {
|
|||||||
resp.user, resp.secret, isEmailVerification);
|
resp.user, resp.secret, isEmailVerification);
|
||||||
} else {
|
} else {
|
||||||
setState(() => isInProgress = false);
|
setState(() => isInProgress = false);
|
||||||
|
// Workaround for web, close the dialog first, then show the verification code dialog.
|
||||||
|
// Otherwise, the text field will keep selecting the text and we can't input the code.
|
||||||
|
// Not sure why this happens.
|
||||||
|
if (isWeb && close != null) close(null);
|
||||||
final res = await verificationCodeDialog(
|
final res = await verificationCodeDialog(
|
||||||
resp.user, resp.secret, isEmailVerification);
|
resp.user, resp.secret, isEmailVerification);
|
||||||
if (res == true) {
|
if (res == true) {
|
||||||
if (close != null) close(false);
|
if (!isWeb && close != null) close(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1530,15 +1530,20 @@ class RustdeskImpl {
|
|||||||
|
|
||||||
Future<void> mainAccountAuth(
|
Future<void> mainAccountAuth(
|
||||||
{required String op, required bool rememberMe, dynamic hint}) {
|
{required String op, required bool rememberMe, dynamic hint}) {
|
||||||
throw UnimplementedError("mainAccountAuth");
|
return Future(() => js.context.callMethod('setByName', [
|
||||||
|
'account_auth',
|
||||||
|
jsonEncode({'op': op, 'remember': rememberMe})
|
||||||
|
]));
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> mainAccountAuthCancel({dynamic hint}) {
|
Future<void> mainAccountAuthCancel({dynamic hint}) {
|
||||||
throw UnimplementedError("mainAccountAuthCancel");
|
return Future(
|
||||||
|
() => js.context.callMethod('setByName', ['account_auth_cancel']));
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<String> mainAccountAuthResult({dynamic hint}) {
|
Future<String> mainAccountAuthResult({dynamic hint}) {
|
||||||
throw UnimplementedError("mainAccountAuthResult");
|
return Future(
|
||||||
|
() => js.context.callMethod('getByName', ['account_auth_result']));
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> mainOnMainWindowClose({dynamic hint}) {
|
Future<void> mainOnMainWindowClose({dynamic hint}) {
|
||||||
|
Loading…
Reference in New Issue
Block a user