fix(custom-client): show options, incoming-only (#15394)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2026-06-24 00:26:09 +08:00
committed by GitHub
parent 09bc9056c9
commit 58ee593e26

View File

@@ -483,13 +483,15 @@ class _GeneralState extends State<_General> {
} }
Widget other() { Widget other() {
final incomingOnly = bind.isIncomingOnly();
final outgoingOnly = bind.isOutgoingOnly();
final showAutoUpdate = isWindows && bind.mainIsInstalled(); final showAutoUpdate = isWindows && bind.mainIsInstalled();
final children = <Widget>[ final children = <Widget>[
if (!isWeb && !bind.isIncomingOnly()) if (!isWeb && !incomingOnly)
_OptionCheckBox(context, 'Confirm before closing multiple tabs', _OptionCheckBox(context, 'Confirm before closing multiple tabs',
kOptionEnableConfirmClosingTabs, kOptionEnableConfirmClosingTabs,
isServer: false), isServer: false),
if (!bind.isIncomingOnly()) if (!incomingOnly)
_OptionCheckBox( _OptionCheckBox(
context, context,
'allow-remote-toolbar-docking-any-edge', 'allow-remote-toolbar-docking-any-edge',
@@ -499,9 +501,10 @@ class _GeneralState extends State<_General> {
reloadAllWindows(); reloadAllWindows();
}, },
), ),
_OptionCheckBox(context, 'Adaptive bitrate', kOptionEnableAbr), if (!isWeb && !outgoingOnly)
_OptionCheckBox(context, 'Adaptive bitrate', kOptionEnableAbr),
if (!isWeb) wallpaper(), if (!isWeb) wallpaper(),
if (!isWeb && !bind.isIncomingOnly()) ...[ if (!isWeb && !incomingOnly) ...[
_OptionCheckBox( _OptionCheckBox(
context, context,
'Open connection in new tab', 'Open connection in new tab',
@@ -540,40 +543,40 @@ class _GeneralState extends State<_General> {
isServer: false, isServer: false,
), ),
), ),
if (!isWeb && !bind.isCustomClient()) ],
_OptionCheckBox( if (!isWeb && !bind.isCustomClient())
context, _OptionCheckBox(
'Check for software update on startup', context,
kOptionEnableCheckUpdate, 'Check for software update on startup',
isServer: false, kOptionEnableCheckUpdate,
), isServer: false,
if (showAutoUpdate) ),
_OptionCheckBox( if (showAutoUpdate)
context, _OptionCheckBox(
'Auto update', context,
kOptionAllowAutoUpdate, 'Auto update',
isServer: true, kOptionAllowAutoUpdate,
), isServer: true,
if (isWindows && !bind.isOutgoingOnly()) ),
_OptionCheckBox( if (isWindows && !outgoingOnly)
context, _OptionCheckBox(
'Capture screen using DirectX', context,
kOptionDirectxCapture, 'Capture screen using DirectX',
), kOptionDirectxCapture,
if (!bind.isIncomingOnly()) ...[ ),
_OptionCheckBox( if (!isWeb && !incomingOnly) ...[
context, _OptionCheckBox(
'Enable UDP hole punching', context,
kOptionEnableUdpPunch, 'Enable UDP hole punching',
isServer: false, kOptionEnableUdpPunch,
), isServer: false,
_OptionCheckBox( ),
context, _OptionCheckBox(
'Enable IPv6 P2P connection', context,
kOptionEnableIpv6Punch, 'Enable IPv6 P2P connection',
isServer: false, kOptionEnableIpv6Punch,
), isServer: false,
], ),
], ],
]; ];