Commit Graph

4094 Commits (ce9c33c8163a3078aca12f3efaee41401970f7fa)

Author SHA1 Message Date
Ryan Wang ad1f7d484f fix: the flickering issue of tooltip (halo-dev/console#782)
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

修复 `v-tooltip` 指令的元素闪烁问题。

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/2994

#### Screenshots:

![2022-12-19 21 52 11](https://user-images.githubusercontent.com/21301288/208441007-2bffe6f6-0b48-4a90-86a0-31ce622f04bf.gif)

#### Special notes for your reviewer:

测试方式:

1. 创建一篇文章,仅保存不发布。
2. 回到文章管理列表,可以看到标题旁边有一个状态点,鼠标移入会显示提示。
3. 观察是否出现闪烁的问题。

#### Does this PR introduce a user-facing change?

```release-note
优化 Console 端状态提示的样式
```
2022-12-20 02:25:42 +00:00
will dee496b349
fix: default theme cannot be initialized in the jar distribution (#2991)
#### What type of PR is this?
/kind bug

#### What this PR does / why we need it:
To fix that default earth theme file not found in system initialization.

#### Which issue(s) this PR fixes:

Fixes #2910 

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?

```release-note
NONE
```
2022-12-19 15:00:16 +00:00
Ryan Wang 9e2d02c1da feat: add support for resetting configmap of plugin and theme (halo-dev/console#777)
#### What type of PR is this?

/kind feature

#### What this PR does / why we need it:

支持重置主题和插件的设置选项。适配 https://github.com/halo-dev/halo/pull/2964

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/2789

#### Screenshots:

<img width="366" alt="image" src="https://user-images.githubusercontent.com/21301288/208022668-288fb8c5-ddd1-456c-9633-ec8865f3b1ba.png">

#### Special notes for your reviewer:

测试方式:

1. 安装若干带有设置选项主题和插件。
2. 进入主题和插件设置,改变部分设置并保存。
3. 重置主题和插件的设置,然后进入设置表单,检查是否已经恢复为了默认。

#### Does this PR introduce a user-facing change?

```release-note
支持重置主题和插件的设置选项。
```
2022-12-19 08:25:47 +00:00
Ryan Wang ce2e00cbad perf: merge plugin uninstallation options button (halo-dev/console#779)
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

合并卸载插件的选项。

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/2978

#### Screenshots:

before:

![image](https://user-images.githubusercontent.com/21301288/208060524-fa9de196-ccd2-43dc-82e7-21eefddec44b.png)


after:

<img width="466" alt="image" src="https://user-images.githubusercontent.com/21301288/208060456-77514178-1935-43f4-9d50-13bc606d5573.png">


#### Special notes for your reviewer:

测试方式:

1. 测试插件卸载的两种选项是否功能正常。

#### Does this PR introduce a user-facing change?

```release-note
优化 Console 端的插件卸载选项布局
```
2022-12-19 03:26:10 +00:00
Ryan Wang f98c359428 perf: optimize the operation button style of the entity component (halo-dev/console#780)
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

优化 Entity 组件(数据列表)的操作按钮样式。

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/2971

#### Screenshots:

before:

![image](https://user-images.githubusercontent.com/21301288/208065926-9e0fb332-4075-43cf-b75f-4d040c80ccfa.png)


after:

<img width="1658" alt="image" src="https://user-images.githubusercontent.com/21301288/208066185-a48d5f84-e451-4fc7-9eea-b152ddb8db86.png">



#### Special notes for your reviewer:

None

#### Does this PR introduce a user-facing change?


```release-note
优化 Console 端数据列表的操作按钮样式
```
2022-12-19 03:10:12 +00:00
guqing 27775c9ac9
feat: add reset config API for theme and plugin (#2964)
#### What type of PR is this?
/kind feature
/kind api-change
/area core

#### What this PR does / why we need it:
为主题和插件提供重置设置项 API

此 PR 会重新读取配置对应的 Setting 资源,从其中读取默认值后更新到现有的 ConfigMap 中替换其 data
see #2789 for more details
#### Which issue(s) this PR fixes:

Fixes #2789

#### Special notes for your reviewer:
how to test it?
1. 在主题设置或插件设置配置一些设置项后保存
2. 执行重置配置
3. 配置恢复为了 Setting 中指定的默认值

/cc @halo-dev/sig-halo 
#### Does this PR introduce a user-facing change?

```release-note
为主题和插件提供重置设置项 API
```
2022-12-19 02:28:10 +00:00
will efc940df99
fix: not clearing the template engine cache after upgrading the theme (#2970)
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

通过在模板引擎管理器里添加clearCache方法,在升级主题后进行缓存刷新,让新模板内容生效。

#### Which issue(s) this PR fixes:

Fixes #2953 

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?

```release-note
NONE
```
2022-12-19 02:24:10 +00:00
will 64550d235f
Change log level to warn for optimistic locking failure error (#2957)
#### What type of PR is this?

/kind improvement
#### What this PR does / why we need it:

/kind api-change

#### Which issue(s) this PR fixes:
Fixes #2591

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?
```release-note
NONE
```
2022-12-16 07:09:49 +00:00
Ryan Wang c90f19211f
chore: add @minliacom to reviewer list (#2956)
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

将 @minliacom 添加到 Reviewer 列表。

他的贡献列表:

- https://github.com/halo-dev/halo/pulls?q=is%3Apr+author%3Aminliacom+
- https://github.com/halo-dev/halo/issues?q=+is%3Aissue+author%3Aminliacom+
- https://github.com/halo-sigs/awesome-halo/pulls?q=+is%3Apr+author%3Aminliacom+

欢迎 @minliacom 加入。

#### Does this PR introduce a user-facing change?


```release-note
None
```
2022-12-16 05:48:36 +00:00
John Niang 09d4b40da8
Apply specific headers for portal endpoints (#2972)
#### What type of PR is this?

/kind improvement
/area core

#### What this PR does / why we need it:

This PR separates security configuration of RESTful APIs and portal pages to configure specific headers for portal pages, such as `Referrer-Policy` and `X-Frame-Options`.

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/2900

#### Special notes for your reviewer:

You can see the response headers of index page:

```diff
HTTP/1.1 200 OK
Content-Type: text/html
Content-Language: en-US
+ X-Content-Type-Options: nosniff
+ X-Frame-Options: SAMEORIGIN
+ X-XSS-Protection: 0
+ Referrer-Policy: strict-origin-when-cross-origin
content-encoding: gzip
content-length: 4285
```

and request headers with `Referer`:
```diff
GET / HTTP/1.1
Host: localhost:8090
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
+ Referer: http://localhost:8090/archives/12341234
Connection: keep-alive
Cookie: _ga_Z907HJBP8W=GS1.1.1670164888.1.1.1670165603.0.0.0; _ga=GA1.1.807839437.1670164889; SESSION=539e060e-c11e-4b6d-a749-882905b30a88; XSRF-TOKEN=4b692b55-638c-4497-8a4b-be00986eda90
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
Sec-Fetch-User: ?1
```

#### Does this PR introduce a user-facing change?

```release-note
解决访问分析工具无法显示 referer 的问题
```
2022-12-16 03:32:35 +00:00
Ryan Wang 090b28b399
docs: update github workflow badge (#2974)
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

<img width="367" alt="image" src="https://user-images.githubusercontent.com/21301288/208009227-6c67b9c3-3455-4796-9c9e-59804d6d1c38.png">

see https://github.com/badges/shields/issues/8671


#### Does this PR introduce a user-facing change?

```release-note
None
```
2022-12-16 03:12:12 +00:00
Ryan Wang ec50e53339 chore: bump @halo-dev/richtext-editor to fix iframe display and add HTML syntax highlighting (halo-dev/console#773)
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

升级 `@halo-dev/richtext-editor` 版本,解决以下问题:

1. 修复嵌入网页不会回显的问题。 c8cfe8f7b1
2. 添加 HTML 语法的代码块高亮。 8d27ae81ee

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/2924
Fixes https://github.com/halo-dev/halo/issues/2913

#### Special notes for your reviewer:

测试方式:

1. 需要 `pnpm install`
2. 插件编辑器的代码块是否有 HTML 语言选项。
3. 插入一个嵌入网页的编辑块,保存文章之后再次进入编辑页面,检查加载是否正常。

#### Does this PR introduce a user-facing change?

```release-note
None
```
2022-12-16 03:08:12 +00:00
Ryan Wang 7ac6327d42 docs: update github workflow badge (halo-dev/console#775)
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

<img width="585" alt="image" src="https://user-images.githubusercontent.com/21301288/208009902-aa2b9139-b0e4-48a1-92f4-964242ae14cf.png">

see https://github.com/badges/shields/issues/8671

#### Does this PR introduce a user-facing change?


```release-note
None
```
2022-12-16 02:54:11 +00:00
Ryan Wang c97c0ea270 feat: add enable and upgrade support for theme list (halo-dev/console#774)
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

1. 在主题管理列表添加启用和升级的支持。
2. 优化主题页面右上角的按钮布局
3. 优化主题管理的代码结构。

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/2948

#### Screenshots:

<img width="1515" alt="image" src="https://user-images.githubusercontent.com/21301288/207893631-6db10293-d0ee-4af4-9c43-f137055df28e.png">
<img width="1665" alt="image" src="https://user-images.githubusercontent.com/21301288/207894016-dd1a5d27-9fff-4211-8869-381208932eaf.png">


#### Special notes for your reviewer:

测试方式:

1. 进入主题管理,点击右上角的主题管理。
4. 测试单个主题的启用和升级是否符合预期。

#### Does this PR introduce a user-facing change?

```release-note
Console 端的主题管理列表添加启用和升级的支持。
```
2022-12-16 02:46:11 +00:00
Kent Liao 2a9a394c9b
feat: archives in descending order by month (#2959)
<!--  Thanks for sending a pull request!  Here are some tips for you:
1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>。
1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>.
2. 请根据你解决问题的类型为 Pull Request 添加合适的标签。
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request.
3. 请确保你已经添加并运行了适当的测试。
3. Ensure you have added or ran the appropriate tests for your PR.
-->

#### What type of PR is this?
/kind improvement
<!--
添加其中一个类别:
Add one of the following kinds:

/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind improvement

适当添加其中一个或多个类别(可选):
Optionally add one or more of the following kinds if applicable:

/kind api-change
/kind deprecation
/kind failing-test
/kind flake
/kind regression
-->

#### What this PR does / why we need it:

优化归档页面数据排序,按月份降序

#### Which issue(s) this PR fixes:

<!--
PR 合并时自动关闭 issue。
Automatically closes linked issue when PR is merged.

用法:`Fixes #<issue 号>`,或者 `Fixes (粘贴 issue 完整链接)`
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes #2958 

#### Special notes for your reviewer:

/cc @halo-dev/sig-halo

#### Does this PR introduce a user-facing change?

<!--
如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。
否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change),
Release Note 需要以 `action required` 开头。
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->

```release-note
归档数据按月降序
```
2022-12-16 02:38:11 +00:00
wzrove be251c08cc feat: stop Implicit submission (halo-dev/console#766)
<!--  Thanks for sending a pull request!  Here are some tips for you:
1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>。
1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>.
2. 请根据你解决问题的类型为 Pull Request 添加合适的标签。
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request.
3. 请确保你已经添加并运行了适当的测试。
3. Ensure you have added or ran the appropriate tests for your PR.
-->

#### What type of PR is this?
/kind feature
/area console
<!--
添加其中一个类别:
Add one of the following kinds:
/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind optimization
适当添加其中一个或多个类别(可选):
Optionally add one or more of the following kinds if applicable:
/kind api-change
/kind deprecation
/kind failing-test
/kind flake
/kind regression
-->

#### What this PR does / why we need it:
阻止表单的[隐式提交](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#implicit-submission)

>For the purpose of the previous paragraph, an element is a field that blocks implicit submission of a element if it is an element whose [form owner](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#form-owner) is that element and whose attribute is in one of the following states: [Text](https://html.spec.whatwg.org/multipage/input.html#text-(type=text)-state-and-search-state-(type=search)), [Search](https://html.spec.whatwg.org/multipage/input.html#text-(type=text)-state-and-search-state-(type=search)), [URL](https://html.spec.whatwg.org/multipage/input.html#url-state-(type=url)), [Telephone](https://html.spec.whatwg.org/multipage/input.html#telephone-state-(type=tel)), [Email](https://html.spec.whatwg.org/multipage/input.html#email-state-(type=email)), [Password](https://html.spec.whatwg.org/multipage/input.html#password-state-(type=password)), [Date](https://html.spec.whatwg.org/multipage/input.html#date-state-(type=date)), [Month](https://html.spec.whatwg.org/multipage/input.html#month-state-(type=month)), [Week](https://html.spec.whatwg.org/multipage/input.html#week-state-(type=week)), [Time](https://html.spec.whatwg.org/multipage/input.html#time-state-(type=time)), [Local Date and Time](https://html.spec.whatwg.org/multipage/input.html#local-date-and-time-state-(type=datetime-local)), [Number](https://html.spec.whatwg.org/multipage/input.html#number-state-(type=number))

当form的子元素只有一个且tyep为 ` "text","search","url","email","password","date","month","week","time","datetime-local","number"`其中任一。 阻止键入`enter` 触发`submit` ,做法是在from表单上监听键盘事件,然后阻止。

#### Which issue(s) this PR fixes:

<!--
PR 合并时自动关闭 issue。
Automatically closes linked issue when PR is merged.
用法:`Fixes #<issue 号>`,或者 `Fixes (粘贴 issue 完整链接)`
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes https://github.com/halo-dev/halo/issues/2893

#### Screenshots:

<!--
如果此 PR 有 UI 的改动,最好截图说明这个 PR 的改动。
If there are UI changes to this PR, it is best to take a screenshot to illustrate the changes to this PR.
eg.
Before:
![screenshot-before](https://user-images.githubusercontent.com/screenshot.png)
After:
![screenshot-after](https://user-images.githubusercontent.com/screenshot.png)
-->

#### Special notes for your reviewer:

+ 进入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0ZW5lciglNUMlMjJrZXlkb3duJTVDJTIyJTJDJTIwaGFuZGxlS2V5ZG93biklM0IlNUNuJTIwJTIwJTIwJTIwJTIwJTIwJTdEJTVDbiUyMCUyMCUyMCUyMCU3RCklM0IlNUNuJTIwJTIwJTdEJTVDbiU3RCUzQiU1Q24lNUNuJTVDbmV4cG9ydCUyMGRlZmF1bHQlMjAlN0IlNUNuJTIwJTIwcGx1Z2lucyUzQSUyMCU1QmlucHV0UHJldmVudEZuJTIwJTVEJTVDbiU3RCU1Q24lMjIlMkMlMjJyZW1vdmFibGUlMjIlM0F0cnVlJTJDJTIyYWRkZWQlMjIlM0F0cnVlJTdEJTVE&imports=JTdCJTIybmFtZSUyMiUzQSUyMkltcG9ydE1hcCUyMiUyQyUyMmVkaXRvciUyMiUzQSUyMiU3QiU1Q24lMjAlMjAlNUMlMjJ2dWUlNUMlMjIlM0ElMjAlNUMlMjJodHRwcyUzQSUyRiUyRmNkbi5qc2RlbGl2ci5uZXQlMkZucG0lMkZ2dWUlNDAzJTJGZGlzdCUyRnZ1ZS5lc20tYnJvd3Nlci5taW4uanMlNUMlMjIlNUNuJTdEJTVDbiUyMiU3RA)
+ 点击表单元素,表单元素聚焦之后,之后键入`enter`观察是否触发`submit`
+ 打开`formkit.config.js`tab, 放开注释,阻止事件行为。重复第二点。观察`submit`事件。
#### Does this PR introduce a user-facing change?

<!--
如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。
否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change),
Release Note 需要以 `action required` 开头。
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->

```release-note
 禁止使用 Enter 提交,需要使用组合键(Ctrl + Enter)
```
2022-12-16 02:24:10 +00:00
will 037e14d4ad
Fixed the problem that comment reply cannot be displayed in the front end (#2954)
<!--  Thanks for sending a pull request!  Here are some tips for you:
1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>。
1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>.
2. 请根据你解决问题的类型为 Pull Request 添加合适的标签。
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request.
3. 请确保你已经添加并运行了适当的测试。
3. Ensure you have added or ran the appropriate tests for your PR.
-->

#### What type of PR is this?
/kind bug

<!--
添加其中一个类别:
Add one of the following kinds:

/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind improvement

适当添加其中一个或多个类别(可选):
Optionally add one or more of the following kinds if applicable:

/kind api-change
/kind deprecation
/kind failing-test
/kind flake
/kind regression
-->

#### What this PR does / why we need it:
/kind api-change

#### Which issue(s) this PR fixes:

<!--
PR 合并时自动关闭 issue。
Automatically closes linked issue when PR is merged.

用法:`Fixes #<issue 号>`,或者 `Fixes (粘贴 issue 完整链接)`
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes #2951 

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?

<!--
如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。
否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change),
Release Note 需要以 `action required` 开头。
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->

```release-note
修复开启评论审核的情况下无法显示评论回复的问题
```
2022-12-15 07:45:09 +00:00
Halo Dev Bot c6a1a86d84
[main] chore: update reviewers for OWNERS file (#2955)
This is an automated cherry-pick of #2319

/assign ruibaby

```release-note
none
```
2022-12-15 04:00:12 +00:00
guqing 686aece485
feat: supports exception page template for theme-side (#2925)
#### What type of PR is this?
/kind feature
/area core
#### What this PR does / why we need it:
主题端支持异常模板页面

异常模板必须放在主题目录的 `templates/error` 目录下:
- 支持按照 response status 名称模板页面,例如 404.html ,当发生 404 错误时会使用 404.html
- 支持 4xx.html、5xx.html,例如当发生 403 错误时,如果存在 403.html 则使用此页面,否则使用 4xx.html
error 模板中具有 model 示例:
```json
{
    "error": {
        "type": "about:blank",
        "title": "Not Found",
        "status": 404,
        "detail": "Extension run.halo.app.core.extension.Plugin with name amet ut magn not found",
        "instance": "/apis/plugin.halo.run/v1alpha1/plugins/amet%20ut%20magn"
    }
}
```
#### Which issue(s) this PR fixes:

Fixes #2690

#### Special notes for your reviewer:
/cc @halo-dev/sig-halo 
#### Does this PR introduce a user-facing change?

```release-note
主题端支持异常模板页面
```
2022-12-15 02:44:10 +00:00
guqing d5eb7b71cf
refactor: remove get root application context method from halo plugin manager (#2949)
#### What type of PR is this?
/kind improvement
/area core
#### What this PR does / why we need it:
HaloPluginManager 移除 getRootApplicationContext 方法

#### Which issue(s) this PR fixes:

Fixes #2943

#### Special notes for your reviewer:
/cc @halo-dev/sig-halo 
#### Does this PR introduce a user-facing change?

```release-note
HaloPluginManager 移除 getRootApplicationContext 方法
```
2022-12-15 02:40:10 +00:00
John Niang 843dcc0e4a
Support command-line arguments running with Docker (#2942)
#### What type of PR is this?

/kind improvement
/area core

#### What this PR does / why we need it:

Now, we can pass command-line arguments while using Docker. Please refer to <https://github.com/halo-dev/halo/issues/2902>.

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/2902

#### Special notes for your reviewer:

Steps to test:

1. Run Halo with command-line arguments:

    ```bash
    docker run --rm -it -p6666:6666 johnniang/halo:support-command-line-args --server.port=6666
    ```

1. Request <http://localhost:6666>

    ```bash
    curl -v http://localhost:6666
    ```

#### Does this PR introduce a user-facing change?

<!--
如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。
否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change),
Release Note 需要以 `action required` 开头。
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->

```release-note
支持命令行参数启动 Halo
```
2022-12-14 15:12:22 +00:00
guqing 7a2f5d0a99
feat: add author pages for theme-side (#2923)
#### What type of PR is this?
/kind feature
/area core

#### What this PR does / why we need it:
为主题端新增作者页面
see #2837 for more detail
#### Which issue(s) this PR fixes:

Fixes #2837

#### Special notes for your reviewer:
/cc @halo-dev/sig-halo 
#### Does this PR introduce a user-facing change?

```release-note
主题端支持作者页面
```
2022-12-14 09:32:18 +00:00
John Niang 3033ceb1ec
Support configuring Halo in working directory (#2935)
#### What type of PR is this?

/kind improvement
/area core
/milestone 2.1.x

#### What this PR does / why we need it:

Force to add environment variables `HALO_WORK_DIR` and `SPRING_CONFIG_LOCATION` into Dockerfile. After that, we can configure `application.yaml` in working directory as we want.

Please note that we can not configure Halo working directory in `/root/.halo2/application.yaml` directly. Use environment variable `HALO_WORK_DIR` instead.

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/2812

#### Special notes for your reviewer:

Steps to test:

1. Prepare custom configuration

    ```bash
    mkdir -p halo2

    cat <<EOF > halo2/application.yaml
    server:
      port: 12345
    EOF
    ```

2. Start up Halo using Docker
    
    ```bash
    docker run -it --rm -p12345:12345 -v `pwd`/halo2:/root/.halo2  johnniang/halo:configure-halo-in-work-dir
    ```

3. Request http://localhost:12345

    ```bash
    curl -v localhost:12345
    ```

#### Does this PR introduce a user-facing change?

```release-note
支持在工作目录添加自定义配置
```
2022-12-14 09:16:18 +00:00
Ryan Wang 97d2066d42 perf: improve the prompt for upload failure of the upload component (halo-dev/console#769)
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

优化上传组件的异常提示信息。

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/2933
Ref https://github.com/halo-dev/halo/issues/2932 https://github.com/halo-dev/halo/issues/2931

#### Screenshots:

<img width="794" alt="image" src="https://user-images.githubusercontent.com/21301288/207272593-b94efb0a-7033-4ec1-b1eb-f2e3871b34f0.png">
<img width="674" alt="image" src="https://user-images.githubusercontent.com/21301288/207272682-0c223d29-8c4f-45b0-a8d5-2432a97835c6.png">


#### Special notes for your reviewer:

测试方式:

1. 进入附件上传、插件安装、主题安装界面。
2. 上传不符合规则的文件,比如主题可以上传一个不是主题的 zip 或者 Halo 1.x 版本的 zip。
3. 观察是否有异常提示。

#### Does this PR introduce a user-facing change?

```release-note
优化 Console 端上传组件的异常提示信息。
```
2022-12-14 09:14:29 +00:00
guqing 925dec476f
fix: plugin logo cannot be loaded when it is not enabled (#2940)
#### What type of PR is this?
/kind bug
/area core

#### What this PR does / why we need it:
修复插件 logo 为相对路径时先启用再停后就无法加载 logo  的问题

原因是 reverse proxy reconciler 资源被删除要取消注册路由时没有确切指定名称,logo 这样的 ReverseProxy 是插件安装时初始化的这条初始化的规则要跟随插件的生命周期,只有插件卸载时才会被删除,而在此之前插件被停止时就被误取消注册了

see #2937 for more detail
#### Which issue(s) this PR fixes:

Fixes #2937

#### Special notes for your reviewer:
/cc @halo-dev/sig-halo 
#### Does this PR introduce a user-facing change?

```release-note
修复插件 logo 为相对路径时先启用再停后就无法加载 logo  的问题
```
2022-12-14 08:51:24 +00:00
guqing 07f5b0dbcd
fix: failed to load plugin when add fixedPluginPath dynamically in development mode (#2941)
#### What type of PR is this?
/kind bug
/area core

#### What this PR does / why we need it:
修复插件开发模式下后续增加的 fixedPluginPath 项无法被加载的问题
- 目前启动时会加载 pluginRepository 的所有 path,fixedPluginPath 被 DefaultDevelopmentPluginRepository 管理,所以在遍历 fixedPluginPath 加载时可能已经被加载过,需要判断是否被加载过,但即使被加载过也不能跳过而要继续执行创建/更新 plugin.yaml 资源的逻辑
- 创建/更新 plugin.yaml 时需要使用重试机制防止因为乐观锁冲突导致 Halo 无法启动

see #2939 for more detail
#### Which issue(s) this PR fixes:

Fixes #2939

#### Special notes for your reviewer:
/cc @halo-dev/sig-halo 
#### Does this PR introduce a user-facing change?

```release-note
修复插件开发模式下后续增加的 fixedPluginPath 项无法被加载的问题
```
2022-12-14 07:49:23 +00:00
Ryan Wang 9e1f0545a9 chore: add @wzrove to reviewer list (halo-dev/console#714) (halo-dev/console#771)
#### What type of PR is this?

/kind improvement


#### What this PR does / why we need it:

将 @wzrove 添加到 Reviewer 列表。

贡献列表:

- https://github.com/halo-dev/console/pulls?q=+is%3Apr+author%3Awzrove+
- https://github.com/halo-dev/halo/issues?q=is%3Aissue+author%3Awzrove+

欢迎 @wzrove 加入,期望一起维护和审查保证 Console 的质量。

#### Does this PR introduce a user-facing change?

```release-note
None
```
2022-12-14 02:08:48 +00:00
Ryan Wang df0e6cff49
perf: change the maximum limit of request body to 10MB (#2936)
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

将 http 请求体的最大字节数改为 10m。

Ref https://github.com/halo-dev/halo/issues/2861#issuecomment-1339526589

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/2861

#### Special notes for your reviewer:

测试方式:

1. 在 Console 端新建文章,保存大量文本内容(最快方式是截图或者复制图片到编辑器,这时候因为会转为 base64,所以内容会很大)
2. 保存文章,检查是否成功。

#### Does this PR introduce a user-facing change?

```release-note
修改 HTTP 请求体最大字节数的限制,修复保存大内容文章异常的问题。
```
2022-12-13 15:38:48 +00:00
wzrove ea27126f08 chore: use lint-staged to improve dx (halo-dev/console#768)
#### What type of PR is this?

/kind improvement


#### What this PR does / why we need it:

优化创建 commit 前的 prettier 和 ESLint 流程,使用 [lint-staged](https://www.npmjs.com/package/lint-staged),可以仅处理在 Git 缓存区的文件。

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/2928

#### Screenshots:

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?


```release-note
None
```
2022-12-13 15:38:48 +00:00
guqing a9a65dd408
refactor: metrics to fix post visits cannot be migrated (#2870)
#### What type of PR is this?
/kind improvement
/area core

#### What this PR does / why we need it:
重构访问量统计逻辑
1. 去掉了访问量总数存储在 Meter Counter 中的逻辑,因为迁移时是直接像 Counter 自定义模型创建数据,而文章被访问时是存储在 Meter Counter 后定时同步到数据库,这就存在双向同步问题且都有新数据无法知道该如何合并数据。
2. 目前访问时会发送一个事件,当得到事件后会缓存在队列中,每隔一分钟将增量更新到数据库中
3. 评论统计也去掉了 Meter Counter 改为事件队列处理
4. 如果后续要暴露 Metrics 应该使用 Gauge 监控 Counter 自定义模型
5. Counter 自定义模型的查询优化后续可以使用 Indexer 或者加缓存来实现而非将 Meter Counter 当作缓存
#### Which issue(s) this PR fixes:

Fixes #2820

#### Special notes for your reviewer:
1. 测试迁移导入看文章访问量是否正确
2. 创建评论及回复观察未读回复数量、评论回复数、最新回复时间是否正确
3. 多创建一些回复然后删除评论,看是否正确删除

/cc @halo-dev/sig-halo 
#### Does this PR introduce a user-facing change?

```release-note
重构访问量统计逻辑,修复文章visits无法迁移的问题
```
2022-12-13 03:42:44 +00:00
wzrove e523a3e309 fix: the global search keyboard event is not removed when the component is unmounted (halo-dev/console#767)
#### What type of PR is this?
/kind bug

#### What this PR does / why we need it:


![image](https://user-images.githubusercontent.com/88016243/207133131-aa2404b1-c9d3-49fc-a1a7-949dd557e30c.png)

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/2927

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?

```release-note
None
```
2022-12-13 03:30:44 +00:00
Ryan Wang 44dd95d415 refactor: remove form-related components (halo-dev/console#762)
#### What type of PR is this?

/kind improvement
/milestone 2.1.x

#### What this PR does / why we need it:

移除与表单相关的组件,比如 `VInput`、`VSelect` 等,以后均使用 FormKit 提供的表单元素

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/2905

#### Does this PR introduce a user-facing change?

```release-note
None
```
2022-12-12 09:12:42 +00:00
John Niang cfb66b0faa
Fix the problem of getting stuck on VM exit (#2919)
#### What type of PR is this?

/kind bug
/area core

#### What this PR does / why we need it:

Shutdown AsyncLogWriter on VM exit.

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/2901

#### Does this PR introduce a user-facing change?

```release-note
None
```
2022-12-12 08:06:42 +00:00
Ryan Wang 42d6342dc3 fix: cannot save post when the publishTime is blank (halo-dev/console#763)
#### What type of PR is this?

/kind bug

#### What this PR does / why we need it:

修复当文章设置中的发布时间为空字符串时,无法保存的问题。

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/2906

#### Special notes for your reviewer:

测试方式:

1. 进入新建文章页面。
2. 点击右上角发布按钮,填写必要的标题和别名,然后点击保存。
3. 点击右上角设置按钮,切换到高级设置,再次点击保存。
4. 观察是否正常保存。

#### Does this PR introduce a user-facing change?

```release-note
修复 Console 端文章设置中的发布时间为空字符串时,无法保存的问题。
```
2022-12-12 06:36:22 +00:00
guqing 52906f21c1
fix: single page does not count visits (#2918)
#### What type of PR is this?
/kind bug
/area core

#### What this PR does / why we need it:
修复自定义页面没有统计访问量的问题
#### Which issue(s) this PR fixes:

Fixes #2912

#### Special notes for your reviewer:
how to test it?
创建自定义页面并到主题端访问,可以看到访问量增加

/cc @halo-dev/sig-halo 
#### Does this PR introduce a user-facing change?
```release-note
修复自定义页面没有统计访问量的问题
```
2022-12-12 03:48:22 +00:00
will d06078893e
Silent prompt when plugins fail to load in development mode (#2907)
#### What type of PR is this?
/kind improvement
/area core

#### What this PR does / why we need it:
在插件开发模式下加载插件失败时不抛出异常改为静默提示

#### Which issue(s) this PR fixes:

A part of #2901

#### Special notes for your reviewer:
how to test it?
1. 配置 `halo.plugin.fixed-plugin-path` 为一些不合法的插件项目路径不影响 Halo 正常启动,且有错误提示
2. 配置合法路径,插件能正确启动

#### Does this PR introduce a user-facing change?

```release-note
插件开发模式下无法被加载时改为静默提示不抛出异常
```
2022-12-12 02:24:22 +00:00
ZXSheng 99ec7af198 perf: add tooltip for some icon buttons (halo-dev/console#745)
#### What type of PR is this?
/kind improvement

#### What this PR does / why we need it:
部分 UI 元素使用了图标代替文字,但某些情况下可能会导致无法直观的判断具体用途,添加 tooltip 以提示使用者。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2656

#### Screenshots:
![image](https://user-images.githubusercontent.com/28836989/205815182-4e599e7b-58b9-4b38-8a8f-11685c4f5f4d.png)
![image](https://user-images.githubusercontent.com/28836989/205815258-90bc111d-552c-456b-a9ce-d2a4e7a4f93d.png)

#### Does this PR introduce a user-facing change?

```release-note
Console 端为部分图标按钮添加操作提示,提升可访问性。
```
2022-12-09 07:16:15 +00:00
Ryan Wang 86e5366797
feat: improve the quick start section of the readme (#2899)
#### What type of PR is this?

/kind documentation

#### What this PR does / why we need it:

更新 Readme 中快速开始的命令,提供初始管理员账号和外部访问链接的环境变量设置。

```release-note
None
```
2022-12-09 03:28:15 +00:00
John Niang 8f21880683
Enable CI on release branches (#2876) 2022-12-08 10:46:26 +08:00
John Niang f40ba48aa3
Update Halo version to 2.0.1 (#2879) 2022-12-08 10:45:51 +08:00
Ryan Wang 307bbb7344 chore: remove build jobs of github action (halo-dev/console#759) 2022-12-07 18:04:33 +08:00
Ryan Wang 389fe943d3 docs: update readme for Halo 2.0 (halo-dev/console#758)
#### What type of PR is this?

/kind documentation

#### What this PR does / why we need it:

为 Halo 2.0 正式版更新 Readme。

#### Does this PR introduce a user-facing change?


```release-note
None
```
2022-12-07 09:58:53 +00:00
John Niang cd5cc74714
Set docker image name properly when releasing (#2872) 2022-12-07 15:56:03 +08:00
John Niang 3abc930150
Bump halo version to 2.1.0-SNAPSHOT for next release (#2871)
#### What type of PR is this?

/kind improvement
/area core

#### What this PR does / why we need it:

Bump halo version to 2.1.0-SNAPSHOT for next release.

#### Which issue(s) this PR fixes:

```release-note
None
```
2022-12-07 06:56:55 +00:00
Ryan Wang 198d3adde0 feat: refining the logic of user roles (halo-dev/console#749)
#### What type of PR is this?

/kind improvement
/milestone 2.0.1

#### What this PR does / why we need it:

完善用户角色的相关逻辑。适配 https://github.com/halo-dev/halo/pull/2865

1. 支持标识是否是系统保留角色。
2. 根据是否是系统保留角色,禁用修改和删除的操作。
3. 支持判断是否是超级管理员,如果是,默认勾选所有权限。
4. 优化 `包含 N 个权限` 文案的逻辑,超级管理员为 `包含所有权限`。
5. 优化 `基于此角色创建` 的逻辑,判断是否为超级管理员,如果是,需要设置所有角色模板到创建表单。

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/2844

#### Screenshots:

<img width="1663" alt="image" src="https://user-images.githubusercontent.com/21301288/205965292-b8f8e556-e06b-422b-b0be-8d87a68f18be.png">
<img width="1661" alt="image" src="https://user-images.githubusercontent.com/21301288/205965333-1491c023-6726-4cdd-b970-d868a30f3296.png">

#### Special notes for your reviewer:

测试方式:

1. Halo 需要切换到 https://github.com/halo-dev/halo/pull/2865 分支。
2. 测试角色相关的所有功能。

#### Does this PR introduce a user-facing change?


```release-note
完善 Console 端用户角色的相关逻辑
```
2022-12-07 04:40:53 +00:00
Ryan Wang e8908de3c7 fix: plugin failed to get settings when plugin is stopped (halo-dev/console#750)
#### What type of PR is this?

/kind bug
/milestone 2.0.1

#### What this PR does / why we need it:

修复插件停止时,仍然获取设置选项导致提示失败的问题。

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/2866

#### Special notes for your reviewer:

测试方式:

1. 安装一个插件,将其停止之后检查是否有获取 setting 的请求以及页面上是否有提示。

#### Does this PR introduce a user-facing change?

```release-note
修复在 Console 端停止插件时,仍然获取设置选项导致显示失败提示的问题。
```
2022-12-07 04:38:53 +00:00
Ryan Wang 194775bd53 perf: optimize the issue of animation when switching setting tabs (halo-dev/console#748)
#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

优化主题和插件详情页面切换 tab 时的页面闪动问题。

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/2856

#### Special notes for your reviewer:

测试方式:检查在主题和插件详情页面是否还存在 https://github.com/halo-dev/halo/issues/2856 中提到的问题。

#### Does this PR introduce a user-facing change?

```release-note
优化 Console 端的主题和插件详情页面切换选项卡时的页面闪动问题。
```
2022-12-07 04:26:54 +00:00
Ryan Wang 00447726fa fix: ui is not updated after the theme is activated in the production (halo-dev/console#746)
#### What type of PR is this?

/kind bug
/milestone 2.0.1

#### What this PR does / why we need it:

修复在生产环境,激活主题之后,界面数据没有更新的问题。

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/2850

#### Special notes for your reviewer:

测试方式:

1. 使用 `pnpm build` 构建此 PR。
2. 在 Halo 配置 `halo.console.location` 为 Console 项目的 dist 目录,比如:`file:/Users/ryanwang/Workspace/github/ruibaby/halo-console/dist/`
3. 安装若干主题,激活其中一个,检查页面 UI 元素是否更新。

#### Does this PR introduce a user-facing change?

```release-note
修复 Console 端激活主题之后页面没有更新数据的问题。
```
2022-12-07 02:50:53 +00:00
John Niang 5f0539d67f
Add forgotten label for system-reserved roles (#2865)
#### What type of PR is this?

/kind bug
/area core

#### What this PR does / why we need it:

Add forgotten label `rbac.authorization.halo.run/system-reserved` for system-reserved roles. See the screenshot below:

![image](https://user-images.githubusercontent.com/16865714/205936031-8a49d4ef-9d10-4c72-a125-973cd361771e.png)

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/2844

#### Special notes for your reviewer:

For @halo-dev/sig-halo-console : We have to determine whether the role is system-reserved by checking if label `rbac.authorization.halo.run/system-reserved` is equal to `true`.

#### Does this PR introduce a user-facing change?

<!--
如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。
否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change),
Release Note 需要以 `action required` 开头。
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->

```release-note
修复每个角色都显示系统保留标签的问题
```
2022-12-07 02:49:00 +00:00
Joy 9d4e980389 perf: improve the text of the upgrade theme button (halo-dev/console#747)
#### What type of PR is this?

/kind bug

#### What this PR does / why we need it:

修改主题升级文案

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/2857

#### Does this PR introduce a user-facing change?

```release-note
None
```
2022-12-06 10:52:15 +00:00