The first letter of the guiconfig attribute must be capitalized.

This commit is contained in:
2dust
2024-10-23 17:00:33 +08:00
parent 2d143687b8
commit 3c550c094a
75 changed files with 1355 additions and 1451 deletions
@@ -71,7 +71,7 @@ namespace ServiceLib.ViewModels
var canEditRemove = this.WhenAnyValue(
x => x.SelectedSource,
selectedSource => selectedSource != null && !selectedSource.remarks.IsNullOrEmpty());
selectedSource => selectedSource != null && !selectedSource.Remarks.IsNullOrEmpty());
this.WhenAnyValue(
x => x.enableRoutingAdvanced)
@@ -130,16 +130,16 @@ namespace ServiceLib.ViewModels
{
_lockedItem = new RoutingItem()
{
remarks = "locked",
url = string.Empty,
locked = true,
Remarks = "locked",
Url = string.Empty,
Locked = true,
};
await ConfigHandler.AddBatchRoutingRules(_lockedItem, Utils.GetEmbedText(Global.CustomRoutingFileName + "locked"));
}
if (_lockedItem != null)
{
_lockedRules = JsonUtils.Deserialize<List<RulesItem>>(_lockedItem.ruleSet);
_lockedRules = JsonUtils.Deserialize<List<RulesItem>>(_lockedItem.RuleSet);
ProxyDomain = Utils.List2String(_lockedRules[0].domain, true);
ProxyIP = Utils.List2String(_lockedRules[0].ip, true);
@@ -164,7 +164,7 @@ namespace ServiceLib.ViewModels
_lockedRules[2].domain = Utils.String2List(Utils.Convert2Comma(BlockDomain.TrimEx()));
_lockedRules[2].ip = Utils.String2List(Utils.Convert2Comma(BlockIP.TrimEx()));
_lockedItem.ruleSet = JsonUtils.Serialize(_lockedRules, false);
_lockedItem.RuleSet = JsonUtils.Serialize(_lockedRules, false);
await ConfigHandler.SaveRoutingItem(_config, _lockedItem);
}
@@ -182,21 +182,21 @@ namespace ServiceLib.ViewModels
foreach (var item in routings)
{
bool def = false;
if (item.id == _config.RoutingBasicItem.RoutingIndexId)
if (item.Id == _config.RoutingBasicItem.RoutingIndexId)
{
def = true;
}
var it = new RoutingItemModel()
{
isActive = def,
ruleNum = item.ruleNum,
id = item.id,
remarks = item.remarks,
url = item.url,
customIcon = item.customIcon,
customRulesetPath4Singbox = item.customRulesetPath4Singbox,
sort = item.sort,
IsActive = def,
RuleNum = item.RuleNum,
Id = item.Id,
Remarks = item.Remarks,
Url = item.Url,
CustomIcon = item.CustomIcon,
CustomRulesetPath4Singbox = item.CustomRulesetPath4Singbox,
Sort = item.Sort,
};
_routingItems.Add(it);
}
@@ -245,7 +245,7 @@ namespace ServiceLib.ViewModels
}
else
{
item = await AppHandler.Instance.GetRoutingItem(SelectedSource?.id);
item = await AppHandler.Instance.GetRoutingItem(SelectedSource?.Id);
if (item is null)
{
return;
@@ -260,7 +260,7 @@ namespace ServiceLib.ViewModels
public async Task RoutingAdvancedRemoveAsync()
{
if (SelectedSource is null || SelectedSource.remarks.IsNullOrEmpty())
if (SelectedSource is null || SelectedSource.Remarks.IsNullOrEmpty())
{
NoticeHandler.Instance.Enqueue(ResUI.PleaseSelectRules);
return;
@@ -271,7 +271,7 @@ namespace ServiceLib.ViewModels
}
foreach (var it in SelectedSources ?? [SelectedSource])
{
var item = await AppHandler.Instance.GetRoutingItem(it?.id);
var item = await AppHandler.Instance.GetRoutingItem(it?.Id);
if (item != null)
{
await ConfigHandler.RemoveRoutingItem(item);
@@ -284,7 +284,7 @@ namespace ServiceLib.ViewModels
public async Task RoutingAdvancedSetDefault()
{
var item = await AppHandler.Instance.GetRoutingItem(SelectedSource?.id);
var item = await AppHandler.Instance.GetRoutingItem(SelectedSource?.Id);
if (item is null)
{
NoticeHandler.Instance.Enqueue(ResUI.PleaseSelectRules);