Skip to content

Commit

Permalink
累积策略更新并修复页面相关问题 (#16)
Browse files Browse the repository at this point in the history
修复 窗口小图标不显示的问题
调整 README.md
调整 Github Action执行逻辑
更新 策略配置文件至123.0.2400.1版本
  • Loading branch information
NXY666 authored Feb 18, 2024
1 parent cb1b82d commit aca98b1
Show file tree
Hide file tree
Showing 15 changed files with 50 additions and 41 deletions.
31 changes: 21 additions & 10 deletions .github/workflows/create_release.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@ function retry(fn, retryCount = 0) {
}

(async () => {
const {
GITHUB_TOKEN,
GITEE_TOKEN,
PUBLISH_VERSION,
EDGE_POLICY_VERSION,
PUBLISH_DATETIME,
COMMIT_TITLE,
COMMIT_BODY,
CONFIG
} = process.env;

const owner = github.context.repo.owner;
const repo = github.context.repo.repo;

Expand Down Expand Up @@ -73,15 +84,15 @@ function retry(fn, retryCount = 0) {
let releaseInfo;
{
const githubO = new Octokit({
auth: process.env.GITHUB_TOKEN
auth: GITHUB_TOKEN
});

const release = await githubO.repos.createRelease({
owner, repo,
tag_name: `v${process.env.PUBLISH_VERSION}`,
name: `Release ${process.env.PUBLISH_VERSION}`,
body: `## 更新日志\n\n概述:**${process.env.COMMIT_TITLE}**\n\n<details>\n\n${process.env.COMMIT_BODY}\n\n</details>\n\n<hr>\n\n> 发布时间:${process.env.PUBLISH_DATETIME}\n\n> 策略版本:${process.env.EDGE_POLICY_VERSION}`,
draft: false,
tag_name: `v${PUBLISH_VERSION}`,
name: CONFIG === 'Debug' ? `TestOnly ${PUBLISH_VERSION}` : `Release ${PUBLISH_VERSION}`,
body: `## 更新日志\n\n概述:**${COMMIT_TITLE}**\n\n<details>\n\n${COMMIT_BODY}\n\n</details>\n\n<hr>\n\n> 发布时间:${PUBLISH_DATETIME}\n\n> 策略版本:${EDGE_POLICY_VERSION}`,
draft: CONFIG === 'Debug',
prerelease: false
});

Expand All @@ -108,7 +119,7 @@ function retry(fn, retryCount = 0) {
{
const giteeO = new Octokit({
baseUrl: 'https://gitee.com/api/v5',
auth: process.env.GITEE_TOKEN
auth: GITEE_TOKEN
});

function fileSizeString(size) {
Expand All @@ -133,10 +144,10 @@ function retry(fn, retryCount = 0) {

await retry(() => giteeO.repos.createRelease({
owner, repo,
tag_name: `v${process.env.PUBLISH_VERSION}`,
target_commitish: process.env.CONFIG === 'debug' ? 'test' : 'master',
name: `发行版 ${process.env.PUBLISH_VERSION}`,
body: `## 更新日志\n\n概述:**${process.env.COMMIT_TITLE}**\n\n<details>\n\n${process.env.COMMIT_BODY}\n\n</details>\n\n<hr>\n\n> 发布时间:${process.env.PUBLISH_DATETIME}\n\n> 策略版本:${process.env.EDGE_POLICY_VERSION}\n\n${assetsTable}`,
tag_name: CONFIG === 'Debug' ? 'test' : `v${PUBLISH_VERSION}`,
target_commitish: CONFIG === 'Debug' ? 'test' : 'master',
name: CONFIG === 'Debug' ? `仅供测试 ${PUBLISH_VERSION}` : `发行版 ${PUBLISH_VERSION}`,
body: `## 更新日志\n\n概述:**${COMMIT_TITLE}**\n\n<details>\n\n${COMMIT_BODY}\n\n</details>\n\n<hr>\n\n> 发布时间:${PUBLISH_DATETIME}\n\n> 策略版本:${EDGE_POLICY_VERSION}\n\n${assetsTable}`,
prerelease: false
}));
}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/edit_version.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const {XMLParser, XMLBuilder} = require('fast-xml-parser');

(async () => {
const {PUBLISH_VERSION} = process.env;
const {PUBLISH_VERSION, CONFIG} = process.env;

const csprojPath = './PolicyManager.csproj';
const csprojData = fs.readFileSync(csprojPath);
Expand All @@ -12,7 +12,7 @@ const {XMLParser, XMLBuilder} = require('fast-xml-parser');
ignoreAttributes: false,
attributeNamePrefix: '@',
suppressEmptyNode: true,
format: process.env.CONFIG === 'debug'
format: CONFIG === 'Debug'
};

const parser = new XMLParser(options);
Expand Down
Binary file modified Assets/icon.ico
Binary file not shown.
2 changes: 2 additions & 0 deletions MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using PolicyManager.Utils;
using WinUIEx;

namespace PolicyManager;

Expand All @@ -8,6 +9,7 @@ public MainWindow()
{
InitializeComponent();

this.SetIcon("Assets/icon.ico");
Title = ResourceUtil.GetString("MainWindow/Title");

var mainPage = new MainPage();
Expand Down
8 changes: 2 additions & 6 deletions PolicyManager.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<SelfContained>true</SelfContained>
<PublishTrimmed>true</PublishTrimmed>
<TrimMode>partial</TrimMode>
<DebugType>embedded</DebugType>
<ApplicationIcon>Assets\icon.ico</ApplicationIcon>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<Version>0.0.0.0</Version>
Expand Down Expand Up @@ -79,7 +80,7 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.240124002-experimental2" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26031-preview" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.2428" />
<Manifest Include="$(ApplicationManifest)" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="WinUIEx" Version="2.3.3" />
Expand Down Expand Up @@ -132,11 +133,6 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
</PropertyGroup>

<Target Name="ConfigureTrimming" BeforeTargets="PrepareForILLink">
<ItemGroup>
<TrimmableAssembly Include="Microsoft.Windows.SDK.NET" />
</ItemGroup>
</Target>
<Target Name="RemovePublishFoldersWithMuiFiles" AfterTargets="GenerateNuspec;Publish">
<ItemGroup>
<!-- Create a list of the languages your need to keep.-->
Expand Down
28 changes: 14 additions & 14 deletions README.zh-TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,45 +26,45 @@ Edge 作為系統內建的瀏覽器,功能繁雜且冗餘。不僅如此,微

### 原則瀏覽與配置

> 支援查看和配置原則,並在未配置的情況下展示通過文檔推斷的預設值
> 支援查看和配置原則,並在未配置的情況下展示通過文件推斷的預設值
![原則瀏覽與配置截圖](https://github.com/NXY666/EdgePolicyManager/assets/62371554/63720df0-35d2-4db3-bc2e-e1789fdca361)

### 詳細文檔查詢
### 詳細文件查詢

> 支援查看原則的詳細文檔,內容及其翻譯由微軟審核並[提供](https://www.microsoft.com/edge/business/download)
> 支援查看原則的詳細文件,內容及其翻譯由微軟審核並[提供](https://www.microsoft.com/edge/business/download)
![詳細文檔查詢截圖](https://github.com/NXY666/EdgePolicyManager/assets/62371554/97e5aaf9-a4a2-4db7-8c1d-4b30ad3e8004)
![詳細文件查詢截圖](https://github.com/NXY666/EdgePolicyManager/assets/62371554/97e5aaf9-a4a2-4db7-8c1d-4b30ad3e8004)

### 關鍵字模糊檢索

> 支援根據關鍵字模糊搜索原則,並根據相關度排序。
![關鍵字模糊檢索截圖](https://github.com/NXY666/EdgePolicyManager/assets/62371554/9bd48073-2259-4676-9b9d-3800fbe204fb)

### 匯入與匯出配置文件
### 導入與導出設定檔

> 支援匯入和匯出原則配置文件,方便備份和共享。
> 支援導入和導出原則設定檔,方便備份和共享。
![匯入與匯出配置文件截圖](https://github.com/NXY666/EdgePolicyManager/assets/62371554/7fc6e305-334c-4bf4-b185-bda08163638f)
![導入與導出設定檔截圖](https://github.com/NXY666/EdgePolicyManager/assets/62371554/7fc6e305-334c-4bf4-b185-bda08163638f)

### 多語言支援

> 可用的顯示語言有簡體中文(中國大陸)、繁體中文(中國台灣)、英語(美國)、英語(英國)。
### 註冊表安全鎖
### 登錄檔安全鎖

> 遇到意外的註冊表路徑時,將阻止對註冊表的寫入、刪除操作。
> 遇到意外的登錄檔路徑時,將阻止對登錄檔的寫入、刪除操作。
## 構建

> 如有需要可以克隆倉庫後自行構建發行版,與 Release 中的發行版完全相同。
> 如有需要可以取得儲存庫後自行構建發行版,與 Release 中的發行版完全相同。
```bash
# 克隆倉庫
# 取得儲存庫
git clone https://github.com/NXY666/EdgePolicyManager.git

# 進入倉庫目錄
# 進入儲存庫目錄
cd EdgePolicyManager

# 構建發行版(x64)
Expand All @@ -80,5 +80,5 @@ dotnet publish -p:Platform=ARM64 -p:PublishProfile=Properties/PublishProfiles/wi
## 說明

* 本工具的程式碼 100% 開源,請遵守開源協議。
* 由於需要編輯註冊表,工具必須以管理員權限運行,Windows 可能會因此彈出安全警告提示,忽略即可。
* 預設值根據文檔內容推斷,僅供參考。如有錯誤可提交 Issue ,將儘快修正。
* 由於需要編輯登錄檔,工具必須以管理員權限運行,Windows 可能會因此彈出安全警告提示,忽略即可。
* 預設值根據文件內容推斷,僅供參考。如有錯誤可提交 Issue ,將儘快修正。
2 changes: 1 addition & 1 deletion StaticModels/Policy/Edge/en-US/PolicyDetailMap.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion StaticModels/Policy/Edge/en-US/PolicyMenuList.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion StaticModels/Policy/Edge/zh-CN/PolicyDetailMap.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion StaticModels/Policy/Edge/zh-CN/PolicyMenuList.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion StaticModels/Policy/Edge/zh-TW/PolicyDetailMap.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion StaticModels/Policy/Edge/zh-TW/PolicyMenuList.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion StaticModels/Policy/SUPPORT_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
122.0.2365.3
123.0.2400.1
2 changes: 1 addition & 1 deletion StaticModels/Policy/TEMPLATE_MD5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c8acbc4291e53147f14619db3eb6fd8a
1f94c59902d45bbef2966c6cae95b190
2 changes: 1 addition & 1 deletion Strings/zh-TW/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
<value>導入成功</value>
</data>
<data name="WelcomePage.GithubButtonText.Text" xml:space="preserve">
<value>Github 倉庫</value>
<value>Github 儲存庫</value>
</data>
<data name="PolicyPage.AllNavigate.AllPolicyName" xml:space="preserve">
<value>全部原則</value>
Expand Down

0 comments on commit aca98b1

Please sign in to comment.