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

@@ -534,15 +534,15 @@ Future<List<TToggleMenu>> toolbarDisplayToggle(
perms['file'] != false &&
(isSupportIfPeer_1_2_3 || isSupportIfPeer_1_2_4)) {
final enabled = !ffiModel.viewOnly;
final option = 'enable-file-transfer';
final value =
bind.sessionGetToggleOptionSync(sessionId: sessionId, arg: option);
final value = bind.sessionGetToggleOptionSync(
sessionId: sessionId, arg: kOptionEnableFileCopyPaste);
v.add(TToggleMenu(
value: value,
onChanged: enabled
? (value) {
if (value == null) return;
bind.sessionToggleOption(sessionId: sessionId, value: option);
bind.sessionToggleOption(
sessionId: sessionId, value: kOptionEnableFileCopyPaste);
}
: null,
child: Text(translate('Enable file copy and paste'))));