mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-05-02 10:16:28 +02:00
fix(mobile): deeplink, disable by default (#14824)
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
@@ -2365,6 +2365,19 @@ List<String>? urlLinkToCmdArgs(Uri uri) {
|
||||
id = uri.path.substring("/new/".length);
|
||||
} else if (uri.authority == "config") {
|
||||
if (isAndroid || isIOS) {
|
||||
final allowDeepLinkServerSettings =
|
||||
bind.mainGetBuildinOption(key: kOptionAllowDeepLinkServerSettings) ==
|
||||
'Y';
|
||||
if (!allowDeepLinkServerSettings) {
|
||||
debugPrint(
|
||||
"Ignore rustdesk://config because $kOptionAllowDeepLinkServerSettings is not enabled.");
|
||||
// Keep the user-facing error generic; detailed rejection reason is in debug logs.
|
||||
// Delay toast to avoid missing overlay during cold-start deeplink handling.
|
||||
Timer(Duration(seconds: 1), () {
|
||||
showToast(translate('Failed'));
|
||||
});
|
||||
return null;
|
||||
}
|
||||
final config = uri.path.substring("/".length);
|
||||
// add a timer to make showToast work
|
||||
Timer(Duration(seconds: 1), () {
|
||||
@@ -2374,6 +2387,18 @@ List<String>? urlLinkToCmdArgs(Uri uri) {
|
||||
return null;
|
||||
} else if (uri.authority == "password") {
|
||||
if (isAndroid || isIOS) {
|
||||
final allowDeepLinkPassword =
|
||||
bind.mainGetBuildinOption(key: kOptionAllowDeepLinkPassword) == 'Y';
|
||||
if (!allowDeepLinkPassword) {
|
||||
debugPrint(
|
||||
"Ignore rustdesk://password because $kOptionAllowDeepLinkPassword is not enabled.");
|
||||
// Keep the user-facing error generic; detailed rejection reason is in debug logs.
|
||||
// Delay toast to avoid missing overlay during cold-start deeplink handling.
|
||||
Timer(Duration(seconds: 1), () {
|
||||
showToast(translate('Failed'));
|
||||
});
|
||||
return null;
|
||||
}
|
||||
final password = uri.path.substring("/".length);
|
||||
if (password.isNotEmpty) {
|
||||
Timer(Duration(seconds: 1), () async {
|
||||
|
||||
@@ -187,6 +187,9 @@ const String kOptionDisableChangeId = "disable-change-id";
|
||||
const String kOptionDisableUnlockPin = "disable-unlock-pin";
|
||||
const kHideUsernameOnCard = "hide-username-on-card";
|
||||
const String kOptionHideHelpCards = "hide-help-cards";
|
||||
const String kOptionAllowDeepLinkPassword = "allow-deep-link-password";
|
||||
const String kOptionAllowDeepLinkServerSettings =
|
||||
"allow-deep-link-server-settings";
|
||||
|
||||
const String kOptionToggleViewOnly = "view-only";
|
||||
const String kOptionToggleShowMyCursor = "show-my-cursor";
|
||||
|
||||
Submodule libs/hbb_common updated: 618922b2a7...87b11a7959
Reference in New Issue
Block a user