refact: custom client, more advanced settings (#8085)

* refact: custom client, more advanced settings

Signed-off-by: fufesou <shuanglongchen@yeah.net>

* feat: custom client, more advanced settings

Signed-off-by: fufesou <shuanglongchen@yeah.net>

---------

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2024-05-18 23:13:54 +08:00
committed by GitHub
parent c2b7810c33
commit 96f41fcc02
34 changed files with 356 additions and 258 deletions

View File

@@ -660,7 +660,7 @@ export default class Connection {
const defaultToggleTrue = [
'show-remote-cursor',
'privacy-mode',
'enable-file-transfer',
'enable-file-copy-paste',
'allow_swap_key',
];
return this._options[name] || (defaultToggleTrue.includes(name) ? true : false);
@@ -906,7 +906,7 @@ export default class Connection {
case "privacy-mode":
option.privacy_mode = v2;
break;
case "enable-file-transfer":
case "enable-file-copy-paste":
option.enable_file_transfer = v2;
break;
case "block-input":
@@ -933,7 +933,7 @@ export default class Connection {
option.show_remote_cursor = this.getToggleOption("show-remote-cursor")
? message.OptionMessage_BoolOption.Yes
: message.OptionMessage_BoolOption.No;
option.enable_file_transfer = this.getToggleOption("enable-file-transfer")
option.enable_file_transfer = this.getToggleOption("enable-file-copy-paste")
? message.OptionMessage_BoolOption.Yes
: message.OptionMessage_BoolOption.No;
option.lock_after_session_end = this.getToggleOption("lock-after-session-end")