The first letter of the guiconfig attribute must be capitalized.

This commit is contained in:
2dust
2024-10-23 17:19:57 +08:00
parent 3c550c094a
commit ffb38129e2
27 changed files with 232 additions and 250 deletions
@@ -36,10 +36,10 @@ namespace ServiceLib.ViewModels
await SaveRulesAsync();
});
if (rulesItem.id.IsNullOrEmpty())
if (rulesItem.Id.IsNullOrEmpty())
{
rulesItem.id = Utils.GetGuid(false);
rulesItem.outboundTag = Global.ProxyTag;
rulesItem.Id = Utils.GetGuid(false);
rulesItem.OutboundTag = Global.ProxyTag;
rulesItem.Enabled = true;
SelectedSource = rulesItem;
}
@@ -48,9 +48,9 @@ namespace ServiceLib.ViewModels
SelectedSource = rulesItem;
}
Domain = Utils.List2String(SelectedSource.domain, true);
IP = Utils.List2String(SelectedSource.ip, true);
Process = Utils.List2String(SelectedSource.process, true);
Domain = Utils.List2String(SelectedSource.Domain, true);
IP = Utils.List2String(SelectedSource.Ip, true);
Process = Utils.List2String(SelectedSource.Process, true);
}
private async Task SaveRulesAsync()
@@ -61,24 +61,24 @@ namespace ServiceLib.ViewModels
if (AutoSort)
{
SelectedSource.domain = Utils.String2ListSorted(Domain);
SelectedSource.ip = Utils.String2ListSorted(IP);
SelectedSource.process = Utils.String2ListSorted(Process);
SelectedSource.Domain = Utils.String2ListSorted(Domain);
SelectedSource.Ip = Utils.String2ListSorted(IP);
SelectedSource.Process = Utils.String2ListSorted(Process);
}
else
{
SelectedSource.domain = Utils.String2List(Domain);
SelectedSource.ip = Utils.String2List(IP);
SelectedSource.process = Utils.String2List(Process);
SelectedSource.Domain = Utils.String2List(Domain);
SelectedSource.Ip = Utils.String2List(IP);
SelectedSource.Process = Utils.String2List(Process);
}
SelectedSource.protocol = ProtocolItems?.ToList();
SelectedSource.inboundTag = InboundTagItems?.ToList();
SelectedSource.Protocol = ProtocolItems?.ToList();
SelectedSource.InboundTag = InboundTagItems?.ToList();
bool hasRule = SelectedSource.domain?.Count > 0
|| SelectedSource.ip?.Count > 0
|| SelectedSource.protocol?.Count > 0
|| SelectedSource.process?.Count > 0
|| Utils.IsNotEmpty(SelectedSource.port);
bool hasRule = SelectedSource.Domain?.Count > 0
|| SelectedSource.Ip?.Count > 0
|| SelectedSource.Protocol?.Count > 0
|| SelectedSource.Process?.Count > 0
|| Utils.IsNotEmpty(SelectedSource.Port);
if (!hasRule)
{