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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 356 additions and 258 deletions

View file

@ -204,6 +204,7 @@ void changeWhiteList({Function()? callback}) async {
errorText: msg.isEmpty ? null : translate(msg),
),
controller: controller,
enabled: !isOptFixed,
autofocus: true),
),
],
@ -217,15 +218,15 @@ void changeWhiteList({Function()? callback}) async {
),
actions: [
dialogButton("Cancel", onPressed: close, isOutline: true),
dialogButton("Clear", onPressed: isOptFixed ? null : () async {
if (!isOptFixed)dialogButton("Clear", onPressed: () async {
await bind.mainSetOption(
key: kOptionWhitelist, value: defaultOptionWhitelist);
callback?.call();
close();
}, isOutline: true),
dialogButton(
if (!isOptFixed) dialogButton(
"OK",
onPressed: isOptFixed ? null : () async {
onPressed: () async {
setState(() {
msg = "";
isInProgress = true;