mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-13 03:28:03 +00:00
refact: custom client proxy (#8093)
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -2170,6 +2170,11 @@ void changeSocks5Proxy() async {
|
||||
var pwdController = TextEditingController(text: password);
|
||||
RxBool obscure = true.obs;
|
||||
|
||||
// proxy settings
|
||||
// The following option is a not real key, it is just used for custom client advanced settings.
|
||||
const String optionProxyUrl = "proxy-url";
|
||||
final isOptFixed = isOptionFixed(optionProxyUrl);
|
||||
|
||||
var isInProgress = false;
|
||||
gFFI.dialogManager.show((setState, close, context) {
|
||||
submit() async {
|
||||
@@ -2247,6 +2252,7 @@ void changeSocks5Proxy() async {
|
||||
),
|
||||
controller: proxyController,
|
||||
autofocus: true,
|
||||
enabled: !isOptFixed,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -2262,6 +2268,7 @@ void changeSocks5Proxy() async {
|
||||
Expanded(
|
||||
child: TextField(
|
||||
controller: userController,
|
||||
enabled: isInProgress,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -2284,6 +2291,7 @@ void changeSocks5Proxy() async {
|
||||
? Icons.visibility_off
|
||||
: Icons.visibility))),
|
||||
controller: pwdController,
|
||||
enabled: !isOptFixed,
|
||||
)),
|
||||
),
|
||||
],
|
||||
@@ -2296,7 +2304,7 @@ void changeSocks5Proxy() async {
|
||||
),
|
||||
actions: [
|
||||
dialogButton('Cancel', onPressed: close, isOutline: true),
|
||||
dialogButton('OK', onPressed: submit),
|
||||
if (!isOptFixed) dialogButton('OK', onPressed: submit),
|
||||
],
|
||||
onSubmit: submit,
|
||||
onCancel: close,
|
||||
|
||||
Reference in New Issue
Block a user