mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-24 04:12:20 +08:00
Fix #616: add rustdesk://password/<password> for android only
This commit is contained in:
parent
aa7d0471db
commit
9d0f8d9886
@ -1970,6 +1970,16 @@ List<String>? urlLinkToCmdArgs(Uri uri) {
|
||||
importConfig(null, null, config);
|
||||
});
|
||||
return null;
|
||||
} else if (uri.authority == "password") {
|
||||
if (Platform.isAndroid) {
|
||||
final password = uri.path.substring("/".length);
|
||||
if (password.isNotEmpty) {
|
||||
Timer(Duration(seconds: 1), () async {
|
||||
await bind.mainSetPermanentPassword(password: password);
|
||||
showToast(translate('Successful'));
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if (options.contains(uri.authority)) {
|
||||
final optionIndex = options.indexOf(uri.authority);
|
||||
command = '--${uri.authority}';
|
||||
|
Loading…
Reference in New Issue
Block a user