Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion flutter/lib/common/widgets/login.dart
Original file line number Diff line number Diff line change
Expand Up @@ -455,10 +455,14 @@ Future<bool?> loginDialog() async {
resp.user, resp.secret, isEmailVerification);
} else {
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(
resp.user, resp.secret, isEmailVerification);
if (res == true) {
if (close != null) close(false);
if (!isWeb && close != null) close(false);
return;
}
}
Expand Down
11 changes: 8 additions & 3 deletions flutter/lib/web/bridge.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1530,15 +1530,20 @@ class RustdeskImpl {

Future<void> mainAccountAuth(
{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}) {
throw UnimplementedError("mainAccountAuthCancel");
return Future(
() => js.context.callMethod('setByName', ['account_auth_cancel']));
}

Future<String> mainAccountAuthResult({dynamic hint}) {
throw UnimplementedError("mainAccountAuthResult");
return Future(
() => js.context.callMethod('getByName', ['account_auth_result']));
}

Future<void> mainOnMainWindowClose({dynamic hint}) {
Expand Down
2 changes: 1 addition & 1 deletion libs/hbb_common
Submodule hbb_common updated 1 files
+37 −0 src/config.rs
11 changes: 11 additions & 0 deletions src/core_main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,14 @@ pub fn core_main() -> Option<Vec<String>> {
if pos < max {
address_book_tag = Some(args[pos + 1].to_owned());
}
let mut address_book_alias = None;
let pos = args
.iter()
.position(|x| x == "--address_book_alias")
.unwrap_or(max);
if pos < max {
address_book_alias = Some(args[pos + 1].to_owned());
}
let mut device_group_name = None;
let pos = args
.iter()
Expand Down Expand Up @@ -523,6 +531,9 @@ pub fn core_main() -> Option<Vec<String>> {
if let Some(name) = address_book_tag {
body["address_book_tag"] = serde_json::json!(name);
}
if let Some(name) = address_book_alias {
body["address_book_alias"] = serde_json::json!(name);
}
}
if let Some(name) = device_group_name {
body["device_group_name"] = serde_json::json!(name);
Expand Down
Loading
Loading