mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 14:33:44 +08:00
refactor: Hide Clash Field Option when Disable Filter (#63)
This commit is contained in:
parent
7ced009e92
commit
7534f8fc37
@ -77,7 +77,7 @@ pub struct IVerge {
|
|||||||
/// 默认的延迟测试连接
|
/// 默认的延迟测试连接
|
||||||
pub default_latency_test: Option<String>,
|
pub default_latency_test: Option<String>,
|
||||||
|
|
||||||
/// 支持关闭字段过滤,避免meta的新字段都被过滤掉,默认为真
|
/// 支持关闭字段过滤,避免meta的新字段都被过滤掉,默认为关闭
|
||||||
pub enable_clash_fields: Option<bool>,
|
pub enable_clash_fields: Option<bool>,
|
||||||
|
|
||||||
/// 是否使用内部的脚本支持,默认为真
|
/// 是否使用内部的脚本支持,默认为真
|
||||||
@ -151,7 +151,7 @@ impl IVerge {
|
|||||||
proxy_guard_duration: Some(30),
|
proxy_guard_duration: Some(30),
|
||||||
auto_close_connection: Some(true),
|
auto_close_connection: Some(true),
|
||||||
enable_builtin_enhanced: Some(true),
|
enable_builtin_enhanced: Some(true),
|
||||||
enable_clash_fields: Some(true),
|
enable_clash_fields: Some(false),
|
||||||
auto_log_clean: Some(3),
|
auto_log_clean: Some(3),
|
||||||
..Self::default()
|
..Self::default()
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,11 @@ const SettingClash = ({ onError }: Props) => {
|
|||||||
|
|
||||||
const { ipv6, "allow-lan": allowLan, "log-level": logLevel } = clash ?? {};
|
const { ipv6, "allow-lan": allowLan, "log-level": logLevel } = clash ?? {};
|
||||||
|
|
||||||
const { enable_random_port = false, verge_mixed_port } = verge ?? {};
|
const {
|
||||||
|
enable_random_port = false,
|
||||||
|
verge_mixed_port,
|
||||||
|
enable_clash_fields = false,
|
||||||
|
} = verge ?? {};
|
||||||
|
|
||||||
const webRef = useRef<DialogRef>(null);
|
const webRef = useRef<DialogRef>(null);
|
||||||
const fieldRef = useRef<DialogRef>(null);
|
const fieldRef = useRef<DialogRef>(null);
|
||||||
@ -162,6 +166,7 @@ const SettingClash = ({ onError }: Props) => {
|
|||||||
</IconButton>
|
</IconButton>
|
||||||
</SettingItem>
|
</SettingItem>
|
||||||
|
|
||||||
|
{enable_clash_fields && (
|
||||||
<SettingItem label={t("Clash Field")}>
|
<SettingItem label={t("Clash Field")}>
|
||||||
<IconButton
|
<IconButton
|
||||||
color="inherit"
|
color="inherit"
|
||||||
@ -172,6 +177,7 @@ const SettingClash = ({ onError }: Props) => {
|
|||||||
<ArrowForward />
|
<ArrowForward />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</SettingItem>
|
</SettingItem>
|
||||||
|
)}
|
||||||
|
|
||||||
<SettingItem
|
<SettingItem
|
||||||
label={t("Clash Core")}
|
label={t("Clash Core")}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user