Merge branch 'main' into d-v3

# Conflicts:
#	BetterGenshinImpact/ViewModel/Pages/ScriptControlViewModel.cs
This commit is contained in:
辉鸭蛋
2025-11-16 00:59:24 +08:00
157 changed files with 8077 additions and 1784 deletions

View File

@@ -106,6 +106,22 @@ public partial class ScriptGroupProject : ObservableObject
[ObservableProperty]
private bool? _allowJsNotification = true;
[ObservableProperty]
private string? _allowJsHTTPHash = "";
/// <summary>
/// 是否允许JS脚本发送HTTP请求通过验证Hash来控制
/// </summary>
[JsonIgnore]
public bool AllowJsHTTP
{
get
{
return GetHttpAllowedUrlsHash() == AllowJsHTTPHash;
}
}
public ScriptGroupProject()
{
}
@@ -163,6 +179,19 @@ public partial class ScriptGroupProject : ObservableObject
Project = new ScriptProject(FolderName);
}
public string GetHttpAllowedUrlsHash()
{
if (Project == null)
{
BuildScriptProjectRelation();
}
if (Project == null)
{
return "";
}
return string.Join("|", Project.Manifest.HttpAllowedUrls);
}
public async Task Run()
{
//执行记录