mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 05:33:45 +08:00
fix: compatibility
This commit is contained in:
parent
dc87097dfe
commit
6f4c59a15c
@ -1,4 +1,4 @@
|
||||
use super::prfitem::PrfItem;
|
||||
use super::{prfitem::PrfItem, PrfOption};
|
||||
use crate::utils::{dirs, help};
|
||||
use anyhow::{bail, Context, Result};
|
||||
use serde::{Deserialize, Serialize};
|
||||
@ -205,6 +205,7 @@ impl IProfiles {
|
||||
each.extra = item.extra;
|
||||
each.updated = item.updated;
|
||||
each.home = item.home;
|
||||
each.option = PrfOption::merge(each.option.clone(), item.option);
|
||||
// save the file data
|
||||
// move the field value after save
|
||||
if let Some(file_data) = item.file_data.take() {
|
||||
|
@ -211,27 +211,27 @@ export const ProfileItem = (props: Props) => {
|
||||
{
|
||||
label: "Edit Rules",
|
||||
handler: onEditRules,
|
||||
disabled: option?.rules === null,
|
||||
disabled: !option?.rules,
|
||||
},
|
||||
{
|
||||
label: "Edit Proxies",
|
||||
handler: onEditProxies,
|
||||
disabled: !option?.proxies,
|
||||
},
|
||||
{
|
||||
label: "Edit Groups",
|
||||
handler: onEditGroups,
|
||||
disabled: !option?.groups,
|
||||
},
|
||||
// {
|
||||
// label: "Edit Proxies",
|
||||
// handler: onEditProxies,
|
||||
// disabled: option?.proxies === null,
|
||||
// },
|
||||
// {
|
||||
// label: "Edit Groups",
|
||||
// handler: onEditGroups,
|
||||
// disabled: option?.groups === null,
|
||||
// },
|
||||
{
|
||||
label: "Extend Config",
|
||||
handler: onEditMerge,
|
||||
disabled: option?.merge === null,
|
||||
disabled: !option?.merge,
|
||||
},
|
||||
{
|
||||
label: "Extend Script",
|
||||
handler: onEditScript,
|
||||
disabled: option?.script === null,
|
||||
disabled: !option?.script,
|
||||
},
|
||||
{ label: "Open File", handler: onOpenFile, disabled: false },
|
||||
{ label: "Update", handler: () => onUpdate(0), disabled: false },
|
||||
@ -252,27 +252,27 @@ export const ProfileItem = (props: Props) => {
|
||||
{
|
||||
label: "Edit Rules",
|
||||
handler: onEditRules,
|
||||
disabled: option?.rules === null,
|
||||
disabled: !option?.rules,
|
||||
},
|
||||
{
|
||||
label: "Edit Proxies",
|
||||
handler: onEditProxies,
|
||||
disabled: !option?.proxies,
|
||||
},
|
||||
{
|
||||
label: "Edit Groups",
|
||||
handler: onEditGroups,
|
||||
disabled: !option?.groups,
|
||||
},
|
||||
// {
|
||||
// label: "Edit Proxies",
|
||||
// handler: onEditProxies,
|
||||
// disabled: option?.proxies === null,
|
||||
// },
|
||||
// {
|
||||
// label: "Edit Groups",
|
||||
// handler: onEditGroups,
|
||||
// disabled: option?.groups === null,
|
||||
// },
|
||||
{
|
||||
label: "Extend Config",
|
||||
handler: onEditMerge,
|
||||
disabled: option?.merge === null,
|
||||
disabled: !option?.merge,
|
||||
},
|
||||
{
|
||||
label: "Extend Script",
|
||||
handler: onEditScript,
|
||||
disabled: option?.script === null,
|
||||
disabled: !option?.script,
|
||||
},
|
||||
{ label: "Open File", handler: onOpenFile, disabled: false },
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user