Remove execute config as is
This commit is contained in:
@@ -177,8 +177,6 @@
|
||||
"misc": "Misc Options"
|
||||
},
|
||||
"pageTitle": "Config Options",
|
||||
"executeConfigAsIs": "Execute Config As Is",
|
||||
"executeConfigAsIsMsg": "Executes the SingBox configs with minimal changes. Can cause problems.",
|
||||
"logLevel": "Log Level",
|
||||
"resolveDestination": "Resolve Destination",
|
||||
"ipv6Mode": "IPv6 Route",
|
||||
|
||||
@@ -177,8 +177,6 @@
|
||||
"misc": "تنظیمات متفرقه"
|
||||
},
|
||||
"pageTitle": "تنظیمات کانفیگ",
|
||||
"executeConfigAsIs": "اجرای کانفیگ بدون تغییر",
|
||||
"executeConfigAsIsMsg": "کانفیگ موجود را با تغییرات حداقلی اجرا میکند. فقط برای کانفیگهای سینگباکس کار میکند",
|
||||
"logLevel": "سطح لاگ",
|
||||
"resolveDestination": "جایگذاری IP مقصد",
|
||||
"ipv6Mode": "مسیریابی IPV6 در تونل",
|
||||
|
||||
@@ -177,8 +177,6 @@
|
||||
"misc": "Разные параметры"
|
||||
},
|
||||
"pageTitle": "Параметры конфигурации",
|
||||
"executeConfigAsIs": "Использовать конфигурацию как есть",
|
||||
"executeConfigAsIsMsg": "Использовать конфигурации SingBox с минимальными изменениями.",
|
||||
"logLevel": "Подробность журналирования",
|
||||
"resolveDestination": "Определять назначение",
|
||||
"ipv6Mode": "Маршрутизация IPv6",
|
||||
|
||||
@@ -177,8 +177,6 @@
|
||||
"misc": "其他选项"
|
||||
},
|
||||
"pageTitle": "配置选项",
|
||||
"executeConfigAsIs": "按原样执行配置",
|
||||
"executeConfigAsIsMsg": "以最小的修改执行 SingBox 配置。可能会导致问题。",
|
||||
"logLevel": "日志级别",
|
||||
"resolveDestination": "解析目标地址",
|
||||
"ipv6Mode": "IPv6 路由",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// ignore_for_file: avoid_manual_providers_as_generated_provider_dependency
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:hiddify/core/prefs/prefs.dart';
|
||||
import 'package:hiddify/data/data_providers.dart';
|
||||
import 'package:hiddify/domain/singbox/singbox.dart';
|
||||
@@ -8,11 +9,9 @@ import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
|
||||
part 'config_options_store.g.dart';
|
||||
|
||||
bool _debugConfigBuilder = false;
|
||||
final _default = ConfigOptions.initial;
|
||||
|
||||
final executeConfigAsIs =
|
||||
PrefNotifier.provider("execute-config-as-is", _default.executeConfigAsIs);
|
||||
|
||||
@Riverpod(keepAlive: true)
|
||||
class CoreModeStore extends _$CoreModeStore {
|
||||
late final _pref = Pref(
|
||||
@@ -128,8 +127,7 @@ List<Rule> rules(RulesRef ref) => switch (ref.watch(regionNotifierProvider)) {
|
||||
ConfigOptions configOptions(ConfigOptionsRef ref) {
|
||||
final mode = ref.watch(coreModeStoreProvider);
|
||||
return ConfigOptions(
|
||||
executeConfigAsIs:
|
||||
ref.watch(debugModeNotifierProvider) && ref.watch(executeConfigAsIs),
|
||||
executeConfigAsIs: kDebugMode && _debugConfigBuilder,
|
||||
logLevel: ref.watch(logLevelStore),
|
||||
resolveDestination: ref.watch(resolveDestinationStore),
|
||||
ipv6Mode: ref.watch(ipv6ModeStore),
|
||||
|
||||
@@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hiddify/core/core_providers.dart';
|
||||
import 'package:hiddify/core/prefs/prefs.dart';
|
||||
import 'package:hiddify/data/repository/config_options_store.dart';
|
||||
import 'package:hiddify/domain/singbox/singbox.dart';
|
||||
import 'package:hiddify/features/settings/widgets/widgets.dart';
|
||||
@@ -43,13 +42,6 @@ class ConfigOptionsPage extends HookConsumerWidget {
|
||||
),
|
||||
body: ListView(
|
||||
children: [
|
||||
if (ref.watch(debugModeNotifierProvider))
|
||||
SwitchListTile(
|
||||
title: Text(t.settings.config.executeConfigAsIs),
|
||||
subtitle: Text(t.settings.config.executeConfigAsIsMsg),
|
||||
value: options.executeConfigAsIs,
|
||||
onChanged: ref.read(executeConfigAsIs.notifier).update,
|
||||
),
|
||||
ListTile(
|
||||
title: Text(t.settings.config.logLevel),
|
||||
subtitle: Text(options.logLevel.name.toUpperCase()),
|
||||
|
||||
Reference in New Issue
Block a user