Commit Graph

306 Commits (9e3f77baf37bea93d476a3a9d813ddf670c30970)

Author SHA1 Message Date
guqing c22b4e9ef4
refactor: optimize auth provider sorting with drag-and-drop support (#5914)
#### What type of PR is this?
/kind feature
/area core
/area ui
/milestone 2.16.x

#### What this PR does / why we need it:
优化认证方式的排序并支持拖动

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

#### Does this PR introduce a user-facing change?
```release-note
优化认证方式的排序并支持拖动
```
2024-05-20 08:30:42 +00:00
Ryan Wang fc10ffaeb2
chore: bump tiptap version to 2.4.0 (#5951)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.16.x

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

升级 Tiptap 依赖至 2.4.0,https://github.com/ueberdosis/tiptap/releases/tag/v2.4.0

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

```release-note
升级 Tiptap 依赖至 [2.4.0](https://github.com/ueberdosis/tiptap/releases/tag/v2.4.0)
```
2024-05-20 04:54:41 +00:00
Takagi 607898b172
fix: incorrect column width calculation after merging cells in the table (#5803)
#### What type of PR is this?

/kind bug
/area editor
/milestone 2.16.x

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

默认编辑器中的表格**首行被合并单元格**之后,将会出现当前表在刷新之后宽度被重置为默认。此 PR 改正了计算宽度,使其首次刷新时,也能返回正确的数组。

#### How to test it?

1. 将表格首行使用合并单元格之后,改变表格宽度。
2. 刷新表格,查看表格宽度是否不再变为默认宽度。

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

Fixes #5767 

#### Does this PR introduce a user-facing change?
```release-note
解决默认编辑器中的表格首行合并单元格后会出现宽度重置的问题
```
2024-05-16 07:06:37 +00:00
Takagi 33e6c9e38d
fix: cursor misalignment when scrolling through the table (#5928)
#### What type of PR is this?

/kind bug
/area editor
/milestone 2.16.x

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

目前表格在监听到滚动时,会重新设置 `TextSelection` 用于阴影的显示。
本 PR 将设置 `TextSelection` 更改为重新执行一次 `Transaction` 。这样可以解决在滚动时光标错位的问题。

#### How to test it?

编写表格时,测试当编写内容出现滚动条时,是否会导致文本错位。
测试滚动表格时,光标位置是否会发生改变。

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

Fixes #5924 

#### Does this PR introduce a user-facing change?
```release-note
解决默认编辑器中滚动表格时会导致光标变换的问题
```
2024-05-16 07:02:35 +00:00
Ryan Wang b47015a36d
chore: bump vite to 5.x (#5920)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.16.x

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

升级 Vite 至 5.x。

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

```release-note
升级 UI 部分的 Vite 版本至 5.x。
```
2024-05-16 06:18:36 +00:00
guqing f24b08c7db
feat: add an API to invalidate theme template cache (#5906)
#### What type of PR is this?
/kind feature
/area core
/area theme
/milestone 2.16.x

#### What this PR does / why we need it:
为主题管理增加在线清理缓存功能

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

#### Does this PR introduce a user-facing change?
```release-note
为主题管理增加在线清理缓存功能
```
2024-05-16 02:36:36 +00:00
Takagi e5bc699fb2
feat: support filtering attachments in the library by file media type (#5893)
#### What type of PR is this?

/kind feature
/area core
/area ui

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

为 `/apis/api.console.halo.run/v1alpha1/attachments` 接口增加了 `accepts` 可选参数,用于根据附件的 `MediaType` 进行筛选。

为附件库增加通过文件的 MediaType 类型进行筛选的筛选项。

同时支持使用了 `CoreSelectorProvider` 组件的文件选择框的筛选。现在只会显示 `accepts` 所支持的文件。

#### How to test it?

测试 ui 端文件选择框的类型筛选是否正确有效。
测试使用了 `CoreSelectorProvider` 组件的 `accepts` 是否有效。

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

Fixes #5054

#### Does this PR introduce a user-facing change?
```release-note
附件库支持按文件类型进行过滤
```
2024-05-16 02:32:35 +00:00
lan-yonghui 587dafa66c
fix: remove close button for reserved alert in role detail page (#5909)
#### What type of PR is this?

/kind bug
/area core
/area ui

#### What this PR does / why we need it:
用户角色详情页面,权限设置提示框关闭按钮不能关闭,增加对应关闭事件!
![image](https://github.com/halo-dev/halo/assets/81747598/2aa93550-8f97-413d-8b88-0d6731587ca7)

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


```release-note
用户-角色设置-权限设置提示框关闭按钮
```
2024-05-14 07:02:33 +00:00
lan-yonghui d7b655267e
feat: Add title slot to alert component (#5911)
#### What type of PR is this?

/kind feature
/area core
/area ui

#### What this PR does / why we need it:
alert 组件增加标题插槽,可以更好的自定义标题内容!

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

```release-note
为 VAlert 组件增加标题插槽
```
2024-05-14 02:06:33 +00:00
lan-yonghui 0d524e1ba2
fix: style issue of dialog component icon (#5910)
#### What type of PR is this?

/kind bug
/area core
/area ui

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

dialog 组件在标题内容过多的时候,icon 会很小,样式出现错位!

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

```release-note
修复当 Dialog 标题过长时,提示图标的样式问题。
```
2024-05-14 02:04:32 +00:00
John Niang fa286f74ee
Support excluding node_modules for idea IDE (#5857)
#### What type of PR is this?

/kind cleanup
/area core

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

There are too many unrelated results from node_modules folders when we try to search in files using IDEA IDE. This PR adapts the IDEA IDE using Gradle plugin `idea` to reduce search results.

Before:

<img width="700" alt="image" src="https://github.com/halo-dev/halo/assets/16865714/0e730896-6327-445c-b30e-0b0773f1743d">

After:

<img width="686" alt="image" src="https://github.com/halo-dev/halo/assets/16865714/2fc080cd-939c-4658-9309-e066e143bc30">

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

```release-note
None
```
2024-05-05 06:51:34 +00:00
John Niang 7ea414dd6d
Prepare for developing 2.16.0 (#5856)
#### What type of PR is this?

/kind cleanup
/area core

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

This is a regular action after releasing a minor version.

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

```release-note
None
```
2024-05-05 01:37:33 +00:00
Ryan Wang 2178bd8b80
fix: show plugin error message (#5838)
#### What type of PR is this?

/area ui
/kind bug
/milestone 2.15.0

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

修复插件异常启动时,指示器显示不正确的问题。

Fixes https://github.com/halo-dev/halo/pull/5520

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

```release-note
None
```
2024-04-30 06:40:24 +00:00
Ryan Wang 966558d1ce
feat: add cleanup feature for post snapshots (#5822)
#### What type of PR is this?

/area ui
/kind feature
/milestone 2.15.x

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

支持清理所有无用的文章历史快照,仅保留已发布、基础版本、正在编辑的版本。

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

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

#### Special notes for your reviewer:

需要在历史版本页面测试清理功能是否符合预期。

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

```release-note
None
```
2024-04-29 08:41:08 +00:00
Ryan Wang d1d4705705
refactor: improve editor ui (#5828)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.15.x

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

优化编辑器的部分 UI。

1. 优化顶部工具栏的样式。
2. 统一格式刷和清除格式的图标。

before:

<img width="1001" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/4d3f2e9a-a79d-429e-aaa4-70313f61da6c">

after:

<img width="1021" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/676ce83b-da87-4c5b-bc63-1405106827f8">

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

```release-note
优化编辑器的部分 UI。
```
2024-04-29 07:59:34 +00:00
Takagi 8abae05be7
fix: excel tables copied into editor become images (#5793)
#### What type of PR is this?

/kind bug
/area ui
/area editor

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

在进行图片上传的前置处理中,将剪切板属性中的 `text/plain` 类型与 `text/html` 类型进行过滤,用于解决将 Excel 表格粘贴至默认编辑器时,会导致其变为了图片而不是表格。

#### How to test it?

从 Excel 中复制一个表格,在默认编辑器中使用粘贴,查看其是否成功粘贴为表格而不是图片。

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

Fixes #5761 

#### Does this PR introduce a user-facing change?
```release-note
解决 Excel 表格粘贴至默认编辑器后会变为图片的问题。
```
2024-04-26 10:32:40 +00:00
guqing 0e17d53ede
feat: subscription support for expression-based subscribing (#5705)
#### What type of PR is this?
/kind feature
/area core
/milestone 2.15.x

#### What this PR does / why we need it:
通知订阅支持基于表达式订阅

see #5632 for more details

how to test it?
1. 测试系统通知功能的文章、页面有新评论通知和评论有新回复通知的功能是否正常
2. 测试 2.14 创建的文章、评论和回复升级到此版本后是否能继续收到相应通知,如文章有新评论

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

#### Does this PR introduce a user-facing change?
```release-note
通知订阅支持基于表达式订阅避免订阅随数据量增长同时自动优化之前的订阅数据
```
2024-04-26 10:26:41 +00:00
Ryan Wang 58f82d2cc2
feat: add features for view post history snapshots (#5787)
* Add snapshots related api

* feat: add features for view post history snapshots

---------

Co-authored-by: guqing <i@guqing.email>
2024-04-26 18:10:06 +08:00
guqing 1ade8493da
feat: require password verification for email updates (#5780)
#### What type of PR is this?
/kind feature
/milestone 2.15.x
/area core

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

增加了在用户尝试更新邮箱地址时进行密码验证的步骤。此举提高了安全性,确保邮箱修改操作由经过身份验证的用户执行。

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

#### Does this PR introduce a user-facing change?
```release-note
更新邮箱地址时需进行密码验证
```
2024-04-26 10:06:32 +00:00
Takagi cb6836aa8c
feat: add tab shortcut function to the default editor table (#5784)
#### What type of PR is this?

/kind feature
/area editor

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

为默认编辑器表格增加 `Tab` 与 `Shift-Tab` 切换至上一个单元格或下一个单元格。具体功能如下:

1. 使用 Tab 快捷键从左向右切换至下一个单元格,当光标在最后一个单元格时,使用 Tab 键新建一行并跳转至新一行的第一个单元格。
2. 使用 Shift + Tab 快捷键从右向左来切换至上一个单元格。

#### How to test it?

测试在默认编辑器中 `Tab` 快捷键切换单元格是否生效。
测试在合并单元格等各种表格操作下,切换单元格是否生效。

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

Fixes #5771 

#### Does this PR introduce a user-facing change?
```release-note
为默认编辑器表格增加 Tab 快捷键切换单元格的功能
```
2024-04-26 10:00:10 +00:00
Ryan Wang ee76f19572
feat: add issues field for plugin and theme manifest (#5755)
#### What type of PR is this?

/area core
/area ui
/kind feature
/kind api-change

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

为主题和插件的定义文件添加 issues 字段,用于填写问题反馈地址。方便使用者可以清楚的知道可以在哪里反馈问题。

<img width="767" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/b7dfce3f-8362-4964-82b8-cc018b85bb82">


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

Fixes #5715 

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

```release-note
为主题和插件的定义文件添加问题反馈(issues)字段
```
2024-04-26 07:20:31 +00:00
Ryan Wang f2b883f2e9
feat: add verified badge for email field in profile detail page (#5783)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.15.x

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

在个人中心的个人资料页面添加邮箱已验证的标识,方便用户知晓。

<img width="596" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/77cd83e1-cefe-453c-ad12-689ee893c8ee">

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

```release-note
在个人中心的个人资料页面添加邮箱已验证的标识。
```
2024-04-26 04:36:59 +00:00
Ryan Wang 5a0f735efb
feat: show the startup status of the plugin (#5520)
#### What type of PR is this?

/area ui
/kind feature
/milestone 2.14.x

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

Show the startup status of the plugin

<img width="444" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/0f5d47c2-9d81-4cb7-b114-6b2eebe753c5">


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

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

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

```release-note
插件支持显示启动中的状态。
```
2024-04-25 08:21:13 +00:00
Ryan Wang 924aad1304
feat: toast the http request error (#5796)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.15.x

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

优化 Console 的请求异常提示,如果异常不满足原有的判断逻辑,最终将提示 status + statusText,不再显示未知错误,方便使用者根据异常提示进行排查。

<img width="246" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/86111068-69a1-4ac1-b405-eea69a95e141">

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

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

#### Special notes for your reviewer:

我的测试方式:

使用 Caddy 模拟请求异常:

```
:9000

encode gzip

@blocked {
   path /apis/content.halo.run/v1alpha1/posts/**
}

respond @blocked 413

reverse_proxy 127.0.0.1:8090
```

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

```release-note
优化 Console 的请求异常提示,方便异常排查。
```
2024-04-25 08:13:12 +00:00
Ryan Wang a644c40cfd
refactor: implementation of browser tab title (#5794)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.15.x

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

重构 Console 和 UC 的浏览器标题切换。

1. 将代码逻辑封装为统一的 Hook。
2. 移除 index.html 默认的标题,防止加载中的时候显示不正确。

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

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

#### Special notes for your reviewer:

测试各个页面的标题显示正常即可。

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

```release-note
重构 Console 和 UC 的浏览器标题切换。
```
2024-04-25 03:43:10 +00:00
Ryan Wang fbf2b06432
feat: add extension points for user detail tab (#5763)
#### What type of PR is this?

/area ui
/kind feature
/milestone 2.15.x

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

为 Console 的用户详情页面的选项卡和个人中心的个人资料页面选项卡添加扩展点,支持通过插件扩展选项卡。

todo:

- [x] 完善 docs.halo.run 的开发文档 https://github.com/halo-dev/docs/pull/340

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

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

#### Special notes for your reviewer:

可以使用 [plugin-starter-1.3.2-SNAPSHOT.jar.zip](https://github.com/halo-dev/halo/files/15059291/plugin-starter-1.3.2-SNAPSHOT.jar.zip) 进行测试。

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

```release-note
为 Console 的用户详情页面的选项卡和个人中心的个人资料页面选项卡添加扩展点
```
2024-04-25 00:33:09 +00:00
Takagi a692c622c9
feat: add search and filtering functions to post tags (#5710) 2024-04-23 17:26:29 +08:00
guqing 06e0b63b5b
feat: invalidate all sessions of a user after password changed (#5757)
* feat: invalidate all sessions of a user after password changed

* fix: unit test case

* refactor: use spring session 3.3 to adapt

* refactor: compatible with session timeout configuration

* refactor: indexed session repository

* Reload page after changed the password

Signed-off-by: Ryan Wang <i@ryanc.cc>

* chore: update session repository

---------

Signed-off-by: Ryan Wang <i@ryanc.cc>
Co-authored-by: Ryan Wang <i@ryanc.cc>
2024-04-23 15:21:24 +08:00
Takagi 944a244186
feat: add the order of the posts according to last modify time (#5727)
* feat: add the order of the posts according to last modify time

* replace es change
2024-04-23 11:28:53 +08:00
guqing f07c09b243
feat: add original password verification for password change (#5748)
* feat: add original password verification for password change

* chore: update properties file

* Refine ui

Signed-off-by: Ryan Wang <i@ryanc.cc>

* chore: update properties file

* fix: confirm assword

* fix: unit test case

* feat: add new api for change own password

* chore: regenerate api client

* chore: adapt to UI

* chore: enusre old password not blank

---------

Signed-off-by: Ryan Wang <i@ryanc.cc>
Co-authored-by: Ryan Wang <i@ryanc.cc>
2024-04-21 15:07:46 +08:00
Ryan Wang 571df5f865
feat: refine fields in plugin detail page (#5724)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.15.x

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

优化插件详情页面的字段显示,适配 https://github.com/halo-dev/halo/pull/4061

1. 显示 metadata.name。
2. 显示源码仓库地址(spec.repo)。
3. 显示网站地址(spec.homepage)。

<img width="663" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/a1b2a561-4351-4c18-b959-6b398532a9af">

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

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

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

```release-note
优化插件详情页面的字段显示
```
2024-04-19 02:40:08 +00:00
Ryan Wang 1ed54a1c20
feat: refine fields in theme detail page (#5723)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.15.x

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

优化主题详情页面的字段显示,适配 https://github.com/halo-dev/halo/pull/4061

1. 将 spec.website 字段改为 spec.homepage,并兼容 website。
2. 显示 spec.license 字段。
3. 显示 spec.description 字段。

<img width="794" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/13bf6ef8-4111-4889-bd10-8a8865e247e8">

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

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

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

```release-note
优化主题详情页面的字段显示
```
2024-04-19 02:38:09 +00:00
John Niang 3c20ce3c55
Generate API docs and regenerate API client (#5742)
#### What type of PR is this?

/kind cleanup
/area core

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

This PR adds support for generating API docs into project and generate API client according the API docs.

To generate/update latest API docs, execute the following command:

```bash
./gradlew clean generateOpenApiDocs
```

To generate/update latest API client, execute the following command:

```bash
make -C ui api-client-gen
```

Meanwhile, I also remove the lint on API client due to unnecessary.

Supersedes of https://github.com/halo-dev/halo/pull/5637

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

```release-note
None
```
2024-04-19 02:34:07 +00:00
Ryan Wang 90e3c2c017
refactor: username validation rules for signup form (#5740)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.15.x

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

优化注册表单的用户名校验规则,改为最低要求 4 个字符,并完善规则提示。

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

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

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

```release-note
优化注册表单的用户名校验规则
```
2024-04-18 09:44:06 +00:00
Ryan Wang b05ed5814c
chore: bump tiptap version to 2.3.0 (#5655)
#### What type of PR is this?

/area ui
/kind improvement

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

升级 Tiptap 的版本为 2.3.0。

- https://github.com/ueberdosis/tiptap/releases/tag/v2.3.0
- https://github.com/ueberdosis/tiptap/releases/tag/v2.2.6
- https://github.com/ueberdosis/tiptap/releases/tag/v2.2.5
- https://github.com/ueberdosis/tiptap/releases/tag/v2.2.4

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

```release-note
升级 Tiptap 的版本为 2.3.0。
```
2024-04-18 09:40:07 +00:00
Takagi ac6896d0f3
pref: optimize the toolbar space and fold the same type of function (#5683)
#### What type of PR is this?

/kind improvement
/area editor
/milestone 2.15.x

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

本 PR 对富文本编辑器中工具栏和冒泡菜单进行精简。

- 对默认富文本冒泡菜单及顶部工具栏相同类型的功能进行了折叠。
- 删除在 text 的冒泡菜单中,不属于当前选中文本的功能,例如转换为代码块等,这些实际上是段落的功能,并非是文本的功能。而 textAlign 目前也仅仅用在标题和行上,因此也移除。

#### How to test it?

查看默认富文本编辑器工具栏中,折叠的功能是否正常。选中文本,查看文本中是否不包含段落相关的功能。

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

Fixes #5669 

#### Does this PR introduce a user-facing change?
```release-note
对默认富文本编辑器中的工具栏进行折叠及精简优化。
```
2024-04-18 09:30:06 +00:00
Takagi fdc2453cc8
fix: code block content insertion location error (#5737)
#### What type of PR is this?

/kind bug
/area editor
/milestone 2.15.x

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

在编写多行文本后,粘贴代码块时,会出现粘贴的内容插入错误,其与代码块分割开。

[例如 #5736 中的示例所示](https://github.com/halo-dev/halo/assets/44745967/4b1ef8dc-60bf-47fd-b64d-23b0d6537d9e)

在本 PR 中,在创建 CodeBlock 时,将 Text 转为 `TextNode` 后,一同传入作为 `CodeBlock` 的 content。
另外为了保证插入代码块之后,光标处于代码块中,将会从插入位置的 from 开始往文档顶部搜索。

#### How to test it?

测试示例中的场景下,代码块插入是否正常。

测试在代码块前后放入其他代码块或者其他块,插入代码块后光标是否在代码块中。

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

Fixes #5736 

#### Does this PR introduce a user-facing change?
```release-note
修复默认编辑器中粘贴代码块会出现错行的问题
```
2024-04-18 04:42:06 +00:00
Takagi 410a7557f9
feat: add the format brush extension to the default rich text editor (#5603)
#### What type of PR is this?

/kind feature
/area editor
/area ui

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

为默认富文本编辑器添加格式刷扩展。用以给 text node 复制格式。

使用方式:

1. 选中一串具有格式的文本
2. 点击格式刷或者使用 `Shift + Mod + c` 快捷键复制格式。
3. 选中需要进行格式处理的文本
4. 松开鼠标,格式刷生效。

#### How to test it?

测试格式刷功能是否正常可用。需要测试 text node 以及 block node 内部的 text 格式功能。

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

Fixes #5591 

#### Does this PR introduce a user-facing change?
```release-note
为默认富文本编辑器添加格式刷扩展。
```
2024-04-18 04:26:07 +00:00
Takagi 0ba50b806e
pref: optimize the pop-up mode of toolbar submenu (#5682)
#### What type of PR is this?

/kind improvement
/area editor

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

优化默认富文本编辑器中,顶部工具栏子菜单的弹出方式,将原有的鼠标移入弹出改为点击左键弹出。并且为了显示效果,将会在具有子菜单的工具栏后方显示额外的下拉图标。

#### How to test it?

查看顶部工具栏子菜单弹出方式是否已改变。(插入组件未进行更改,仍旧保持原有鼠标移入弹出方式)

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

Fixes #5668 

#### Does this PR introduce a user-facing change?
```release-note
优化默认富文本编辑器中顶部工具栏的子菜单弹出方式
```
2024-04-18 04:24:06 +00:00
Aero ab7c598f7b
fix: layout height triggers page background color not fully filling scroll area (#5698)
<!--  Thanks for sending a pull request!  Here are some tips for you:
1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/main/CONTRIBUTING.md>。
1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/main/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
/area ui
<!--
添加其中一个类别:
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:
布局高度引发页面背景色未完全填充滚动区域的问题;

另外,为了不影响全局 `footer` 置于页面底部,对 `BasicLayout.vue` 容器也添加了最小高度 `100vh`
#### 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 #5678

#### Special notes for your reviewer:
当 Console 出现滚动条时,如:https://demo.halo.run/console/attachments?page=1&group= 

注意观察对布局设置最小高度 `100vh` 后与设置之前的背景色变化;

注意是否会对其它布局高度造成影响

#### 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
布局高度引发页面背景色未完全填充滚动区域的问题
```
2024-04-16 09:32:07 +00:00
mashirot d4f38dc6c6
feat: set selectedRole as required when creating a new user (#5697)
#### What type of PR is this?

/kind improvement
/area ui

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

Fixes #5677 

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

```release-note
将新建用户的表单中的角色设置设为必填
```
2024-04-15 04:30:10 +00:00
Takagi 505f38a145
pref: optimize the rich text editor link paste logic (#5680)
#### What type of PR is this?

/kind improvement
/area editor
/area ui
/milestone 2.15.x

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

优化默认富文本编辑器中自动创建链接的逻辑。

- 移除了粘贴文本时,如果文本为链接则会自动转为链接的问题。
- 移除输入链接文本之后回车,会自动转化为链接的问题。
- 新增当选中的文本内容为链接时,点击链接按钮,将会自动转化选中的文本为链接。

#### How to test it?

在富文本编辑器中,测试如下场景:

1. 在浏览器地址栏复制一个链接,粘贴后不会再转为链接,而是一个普通文本。
2. 输入一段链接文本,按回车后是否不会再被转为链接。
3. 选中一段可以被解析为链接的地址,选中此地址,点击链接按钮,此地址是否会被默认转为链接。

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

Fixes #5653 

#### Does this PR introduce a user-facing change?
```release-note
优化默认富文本编辑器中文本自动转为链接的相关逻辑
```
2024-04-13 00:50:08 +00:00
Takagi 37f530b619
pref: limit the datetime year of the post or page to four digits (#5666)
#### What type of PR is this?

/kind improvement
/area ui

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

限定文章或页面中的发布日期中的年份为四位数,方便用户输入四位年份之后自定跳转至月份。

#### How to test it?

测试在 `chrome` 上输入四位年份之后,是否会自动跳转至月份。

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

Fixes #5630 

#### Does this PR introduce a user-facing change?
```release-note
限定文章或页面中的发布日期中的年份为四位数
```
2024-04-12 11:28:09 +00:00
Takagi a317ec9563
feat: add the clear format function to the default rich text editor (#5685)
#### What type of PR is this?

/kind feature
/area editor
/milestone 2.15.x

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

为默认富文本编辑器添加清除格式的功能。快捷键为 `Mod + \`。

#### How to test it?

输入文本,使用加粗、链接、斜体等 mark 相关功能,之后使用清除格式,查看格式是否被清除。

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

Fixes #5684 

#### Does this PR introduce a user-facing change?
```release-note
为默认富文本编辑器添加清除格式的功能。
```
2024-04-12 11:26:09 +00:00
Takagi 60f113110b
feat: change the tab title to the site title of the website (#5696)
#### What type of PR is this?

/kind feature
/area ui
/area core
/milestone 2.15.x

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

将 Console 与 UC 页面的标签页标题改为网站实际标题

#### How to test it?

查看 Console 页面与 UC 页面的标题页标题是否变为网站实际标题

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

Fixes #5679 

#### Does this PR introduce a user-facing change?
```release-note
将 Console 与 UC 的标签页标题改为网站实际标题
```
2024-04-12 09:48:08 +00:00
Takagi 6ed8cdf5bc
fix: the details of the attachment may be empty (#5695)
#### What type of PR is this?

/kind bug
/area ui
/milestone 2.15.x

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

修复由于 modal 延迟 200ms 所导致的数据可能为空的问题。

See #5078 

#### How to test it?

反复点击并关闭附件库详情弹窗,查看是否会有空数据的问题

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

Fixes #5689 

#### Does this PR introduce a user-facing change?
```release-note
修复附件详情弹窗可能无法显示数据的问题
```
2024-04-12 09:46:07 +00:00
ZhengHaoYu 817963c15e
feat: support sorting posts by views and comment count (#5614)
#### What type of PR is this?
/kind feature

#### What this PR does / why we need it:
文章支持根据访问量和评论量排序

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

Fixes #3216 

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

```release-note
文章支持根据访问量和评论量排序
```
2024-04-11 10:10:11 +00:00
Takagi fc79de70fd
feat: add line-height setting feature for the default editor (#5681)
#### What type of PR is this?

/kind feature
/area editor
/milestone 2.15.x

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

此 PR 为默认富文本编辑器中的 P 标签设置了 `line-height` 属性,因此可以支持为某一行设置行高。

#### How to test it?

测试行高功能是否正常。测试在不同组件下功能是否正常。

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

Fixes #5660 

#### Does this PR introduce a user-facing change?
```release-note
为默认富文本编辑器增加行高设置
```
2024-04-11 08:02:10 +00:00
Takagi 26db6036a7
refactor: post tag management page (#5593)
#### What type of PR is this?

/kind improvement
/area ui

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

使用分页列表的形式重新展示文章标签页,移除原有的 grid 形式。

#### How to test it?

查看文章标签页面的分页列表功能显示是否正常。
完成增、删、改之后是否能够正常回显。

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

Fixes #5415 

#### Does this PR introduce a user-facing change?
```release-note
使用分页列表的形式重构文章标签页 UI
```
2024-04-11 07:50:10 +00:00
John Niang aab367a1f7
Prepare for developing 2.15.0 (#5635)
#### What type of PR is this?

/kind cleanup
/area core

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

Upgrade version to `2.15.0-SNAPSHOT`.

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

```release-note
None
```
2024-04-02 02:20:07 +00:00
Ryan Wang ae274db893
refactor: hide the custom annotations form by defaults (#5595)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.14.x

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

默认隐藏自定义元数据表单,通常这不会让用户自行修改,默认显示反而会给使用者造成心智负担。

<img width="807" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/f80813e2-00c8-483e-bb16-fe4671c5450e">

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

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

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

```release-note
默认隐藏文章设置等界面的自定义元数据表单。
```
2024-03-31 14:20:06 +00:00
Ryan Wang 35cc323585
refactor: simplify the dialogs title (#5601)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.14.x

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

简化部分确认框的标题。

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

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

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

```release-note
简化部分确认框的标题。
```
2024-03-27 14:20:07 +00:00
Takagi ec4c390e1f
fix: wrong router navigation when redirect to /uc (#5609)
#### What type of PR is this?

/kind bug
/area ui

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

修复当角色勾选禁止访问 Console 后,redirect_uri 参数无效的问题

#### How to test it?

测试角色禁止访问 console 时,当链接中携带 redirect_uri 参数,能否正常跳转

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

Fixes #5417 

#### Does this PR introduce a user-facing change?
```release-note
修复当角色禁止访问 Console 后,redirect_uri 参数无效的问题
```
2024-03-27 13:14:06 +00:00
Ryan Wang c2a71545aa
refactor: ignore case when matching editor raw types (#5602)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.14.x

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

编辑文章匹配编辑器类型时,忽略大小写。

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

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

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

```release-note
None
```
2024-03-27 05:00:07 +00:00
Takagi 1a19bdcb54
fix: resolving the issue of the draggable extension not working in the editor (#5570)
#### What type of PR is this?

/kind bug
/area editor
/milestone 2.14.x

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

解决在默认编辑器中,插件扩展 getDraggable 方法可能无效的问题。向 handleDrop 中添加属性 `selection`,方便插件对当前拖拽元素进行处理。

部分插件拖拽之后可能无效果,此时需要插件自行实现 `handleDrop` 方法来处理拖拽后的情况。

#### How to test it?

测试 getDraggable 方法是否正常。插件中使用此方法是否显示拖拽图标。

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

Fixes #5208 

#### Does this PR introduce a user-facing change?
```release-note
解决默认编辑器 getDraggable 在部分插件中失效的问题。
```
2024-03-27 04:26:06 +00:00
Takagi b8293faafd
fix: error occurs when opening attachment library in the uc (#5590)
#### What type of PR is this?

/kind bug
/area ui

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

在个人中心,使用默认富文本编辑器上传附件库时,由于在 UC 中不存在附件库列表,因此会出现错误。

本 PR 通过对默认富文本编辑器上传组件进行调整,调整如下:

1. 当不具有 uc 和 system 的附件权限时,用户仅能通过链接插入图片、音频等,且不允许拖拽和粘贴上传。
2. 当用户具有 uc 但没有 system 的附件权限时,用户可以通过拖拽和粘贴的方式上传,但不允许通过附件库上传。
3. 当用户具有 system 附件权限时,允许通过所有方式(上传、附件库、链接、拖拽和粘贴)进行上传。

#### How to test it?

测试默认富文本编辑器中,用户在不同附件库权限下上传图片是否能够按照逻辑正常处理。

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

Fixes #5581

#### Does this PR introduce a user-facing change?
```release-note
修复在个人中心中使用默认富文本编辑器的附件库而导致的报错问题
```
2024-03-26 14:44:07 +00:00
Ryan Wang 78b60a0a29
refactor: rendering conditions for plugin installation components (#5577)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.14.x

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

优化插件安装弹框组件的渲染时机,改为在未打开时不进行渲染,可以避免一些不必要的请求,尤其是在安装了应用市场插件之后。

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

Fixes #5573 

#### Special notes for your reviewer:

测试插件安装和升级功能是否正常即可。

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

```release-note
优化插件安装弹框组件的渲染时机,避免不必要的请求。
```
2024-03-26 10:48:07 +00:00
Takagi 1fb4c82e1f
fix: selecting the previous post leads to a negative page (#5594)
#### What type of PR is this?

/kind bug
/area ui

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

修复当选中首个文章设置时,点击上一个还可以继续修改 `page` 的问题。

#### How to test it?

测试选中首个文章设置之后,点击上一个是否不再修改 `page` 值

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

Fixes #5475 

#### Does this PR introduce a user-facing change?
```release-note
修复在文章列表设置中可以无限点击上一个的问题
```
2024-03-26 08:50:07 +00:00
Takagi a2810156da
feat: add verification function to the notification settings for the mailbox (#5464)
#### What type of PR is this?

/kind feature
/area ui
/area core
/milestone 2.14.x

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

为邮件的 `通知设置` 添加验证的功能。

同时为 formkit 增加了一个新的组件 (verificationForm),用于支持验证,它的定义方式如下:
```
- $formkit: verificationForm
  action: "http://localhost:8090/verify/user"
  label: 用户验证
  children:
    - $formkit: text
      label: "用户名"
      name: username
      validation: required
    - $formkit: password
      label: "密码"
      name: password
      validation: required
```

verificationForm 支持 `action` 属性,当前端数据验证通过时,会将其下所包含的子节点数据发送至 action 所代表的接口上。
按上述示例,则验证数据会提交至 `http://localhost:8090/verify/user` 进行验证。验证的数据为 `{name: xxx, password: xxx}`

需要注意的是,verificationForm 只用于包装需要验证的数据,不会破坏原始数据的格式。因此上述数据在提交保存后仍旧为 `{name: xxx, password: xxx}` 而不会变成 `{verificationForm1: {name: xxx, password: xxx}}`

#### How to test it?

1. 测试邮箱中的 `通知设置` 新增的验证按钮是否可以正常验证邮箱。
2. 查看数据是否正常回显

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

Fixes #4714 

#### Does this PR introduce a user-facing change?
```release-note
在邮件通知设置中增加了发送测试的功能。
```
2024-03-26 08:00:07 +00:00
Ryan Wang 78c00a28f3
feat: add retry mechanism for saving posts on the UC end (#5578)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.14.x

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

为 UC 端保存文章的操作添加重试机制,防止出现因为锁导致的保存失败问题。

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

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

#### Special notes for your reviewer:

需要多次尝试编辑文章,以及设置表单的保存功能。

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

```release-note
为 UC 端保存文章的操作添加重试机制,防止出现因为锁导致的保存失败问题。
```
2024-03-25 04:38:08 +00:00
Ryan Wang db0fa1e103
chore: create shared common chunks during the ui build (#5580)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.14.x

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

对 UI 的部分依赖进行分包处理。改动之后,如果下次构建 Halo,而这些依赖没有进行变更,那么 vendor 的 hash 后缀就不会变更,用户在升级之后这些依赖也可以有效命中缓存。

<img width="998" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/60095e08-45f5-4b56-8f79-2999238ebfc5">

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

```release-note
对 UI 的部分依赖进行分包处理。
```
2024-03-25 04:18:09 +00:00
Ryan Wang 2af92396d4
feat: add image editor feature for attachment upload component (#5585)
#### What type of PR is this?

/area ui
/kind feature
/milestone 2.14.x

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

为上传附件的组件添加基本的图片编辑功能。

<img width="747" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/6816e045-ae4a-4d26-b3a4-23494fb39d5f">

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

Fixes #5583 


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

```release-note
为上传附件的组件添加基本的图片编辑功能。
```
2024-03-25 04:16:08 +00:00
Takagi 499b9eabb5
pref: optimize the help style of some formkit components (#5521)
#### What type of PR is this?

/kind improvement
/area ui

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

优化 formkit 中 checkout、repeater、group 组件的 help 样式。

移除 checkout 的内边距
为 repeater、group 组件增加底部边距

#### How to test it?

观察上述组件的 help 样式是否正常。

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

Fixes #5411

#### Does this PR introduce a user-facing change?
```release-note
优化 formkit 中 checkout、repeater 及 group 组件的 help 样式
```
2024-03-25 03:00:08 +00:00
Takagi 4fd6353a58
fix: duplicate scroller issue in post edit page (#5537)
#### What type of PR is this?

/kind bug
/area editor
/milestone 2.14.x

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

在默认富文本编辑器下,当滚动时有概率会使页面小于正常大小。在文章最底部使用 AI 插件更加容易复现。

#### How to test it?

测试文章滚动时是否会小于正常大小,推荐在文章最底部使用 AI 插件来复现和测试。

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

Fixes #3853 

#### Does this PR introduce a user-facing change?
```release-note
修复文章编辑页面出现多个滚动条导致的页面高度样式问题。
```
2024-03-21 12:32:07 +00:00
Takagi dd3d53486c
pref: create while searching for tags or categories (#5526)
#### What type of PR is this?

/kind improvement
/area ui
/milestone 2.14.x

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

在 `TagSelect` 与 `CategorySelect` 组件中,当搜索的同时允许进行创建新的分类或标签。

#### How to test it?

测试在搜索标签或者分类时,能否创建新的标签或者分类

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

Fixes #4660

#### Does this PR introduce a user-facing change?
```release-note
在搜索标签或分类的同时允许进行创建新的分类或标签
```
2024-03-20 09:04:07 +00:00
SakuraZ 70e73faa78
feat: add Dart syntax highlighting for the code blocks in the editor (#5531)
添加代码块 dart 语言的高亮

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/main/CONTRIBUTING.md>。
1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/main/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 editor

<!--
添加其中一个类别:
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:
> 为默认编辑器的代码块导入 dart 语言高亮
#### Which issue(s) this PR fixes:
Fixes #5530 
<!--
PR 合并时自动关闭 issue。
Automatically closes linked issue when PR is merged.

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

#### 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
为需要代码块dart语言高亮的用户提供支持
```
2024-03-20 08:54:06 +00:00
Ryan Wang 47d837952b
fix: refactor the theme and post preview feature to solve the session expiration issue (#5518)
#### What type of PR is this?

/area ui
/kind bug
/milestone 2.14.x

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

重构文章预览和主题预览的页面加载方式,尝试解决在某些情况下打开预览导致登录 session 失效的问题。

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

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

#### Special notes for your reviewer:

需要测试:

1. 主题预览中的各个功能是否正常。
2. 文章预览功能是否正常。

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

```release-note
修复在某些情况下,打开文章预览或主题预览之后导致登录失效的问题。
```
2024-03-19 06:58:22 +00:00
Takagi fa26516ecc
fix: an extra line is added to the inline block (#5523)
#### What type of PR is this?

/kind bug
/area ui
/area editor
/milestone 2.14.x

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

解决默认编辑器中,行内块元素 `image`、`video` 及 `audio` 由于行内块导致其下方有额外一行的问题。

#### How to test it?

查看默认编辑器中上述组件是否还会出现在下方有额外空行的问题。

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

Fixes #5145 

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

```release-note
解决默认编辑器行内块元素下具有额外空行的问题
```
2024-03-18 09:30:08 +00:00
Ryan Wang 21bc7fee8a
fix: FormKit code input type error (#5522)
#### What type of PR is this?

/area ui
/kind bug
/milestone 2.14.0

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

修复 FormKit 中 code 输入框的类型异常,在此之前如果这样使用:

```vue
<FormKit type="code" v-model="text" />
```

那么 v-model 的类型会不正确。以前忽略了此问题的原因是在之前 code 类型的输入框没有以组件的形式使用过,系统中都是使用 FormKit Schema 调用的。

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

```release-note
None
```
2024-03-18 08:24:08 +00:00
Ryan Wang 581a738423
feat: add a title input box in the editor (#5465)
#### What type of PR is this?

/area editor
/area ui
/kind feature

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

为默认编辑器添加标题输入框。

<img width="1665" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/df903e02-76b0-45fe-89d9-6ac81af8f041">


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

Fixes #5427 

#### Special notes for your reviewer:

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

```release-note
为默认编辑器添加标题输入框。
```
2024-03-18 04:38:07 +00:00
guqing 26dc24cc00
fix: missing notifier descriptors permissions in notification role template (#5489)
#### What type of PR is this?
/kind bug
/area core
/milestone 2.14.x

#### What this PR does / why we need it:
修复分配通知器权限时一片空白的问题

- 隐藏了原先权限中展示的通知器配置权限选项
- 系统设置的权限中依赖了通知器配置权限,但需要有系统设置管理权限才会展示通知配置的 Tab

Fixes #5492

#### Does this PR introduce a user-facing change?
```release-note
修复仅拥有通知器配置权限时无法修改配置的问题
```
2024-03-15 15:38:08 +00:00
Ryan Wang 5cf4eae583
chore: redefine the actuator page as the overview page (#5509)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.14.x

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

将原来的 Actuator 页面改为 Overview。

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

Fixes #5508 

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

```release-note
None
```
2024-03-15 15:30:11 +00:00
John Niang 0843747abc
Collect Gradle plugin versions into root build.gradle (#5511)
#### What type of PR is this?

/kind cleanup
/area core

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

This PR collects all Gradle plugin versions into root build.gradle for easy management.

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

```release-note
None
```
2024-03-15 10:34:07 +00:00
Takagi f40014d005
fix: error occurs when the link is purely numerical (#5479)
#### What type of PR is this?

/kind bug
/area editor
/area ui
/milestone 2.14.x

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

在默认的富文本编辑器中,使用了 [tiptap link](b3ef574f3d/packages/extension-link/src/link.ts (L127C3-L135C5)) ,而其中的 renderHTML 会对 href 进行处理,但当链接为纯数字的时候,`HTMLAttributes.href` 将不会有 `startsWith` 方法。

此 PR 将在解析 renderHTML 时,将 `HTMLAttributes.href` 转为 string,进而解决这个问题。

#### How to test it?

测试使用默认富文本编辑器时,编写一个链接,并将其设置为纯数字。
刷新页面,查看是否具有报错。

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

Fixes #5478 

#### Does this PR introduce a user-facing change?
```release-note
解决在默认富文本编辑器中当链接为纯数字时报错的问题
```
2024-03-14 05:06:07 +00:00
Takagi 69c080a268
fix: unable to manually fill in the publish time (#5472)
#### What type of PR is this?

/kind bug
/area ui
/milestone 2.14.x

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

解决文章、页面中无法手动填写发布日期的问题

#### How to test it?

测试文章设置与页面设置中的发布日期是否能够使用键盘填写。

需要同步测试其他设置项是否正常。

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

Fixes #5389 

#### Does this PR introduce a user-facing change?
```release-note
解决文章设置及页面设置中无法手动填写发布日期的问题
```
2024-03-14 05:04:07 +00:00
Takagi 820c1038db
pref: refactor default editor audio block upload logic (#5421)
#### What type of PR is this?

/kind improvement
/area ui
/area editor

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

重构默认编辑器音频组件。使其支持上传、取消上传、从附件库选择、替换等功能。

#### How to test it?

直接拖动、复制或选择文件上传一个音频,查看是否显示上传进度条,取消、重试功能是否正常

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

Fixes #5239 

#### Does this PR introduce a user-facing change?
```release-note
重构编辑器音频组件的上传逻辑,增加选择文件上传、上传进度条、取消、重试等机制。
```
2024-03-14 05:02:07 +00:00
guqing e704e09807
refactor: optimize reply queries using index mechanisms (#5497)
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.14.x

#### What this PR does / why we need it:
使用索引机制优化回复功能的查询以提高查询速度

#### Does this PR introduce a user-facing change?
```release-note
使用索引机制优化回复功能的查询以提高查询速度
```
2024-03-13 08:44:08 +00:00
Ryan Wang 014625ff0e
feat: attachments supports sorting by display name (#5494)
#### What type of PR is this?

/area ui
/kind feature
/milestone 2.14.0

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

附件管理的排序功能支持按照文件名排序。

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

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

#### Special notes for your reviewer:

测试方式:

1. 上传若干附件。
2. 测试根据文件名降序/升序功能是否符合预期。

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

```release-note
附件管理的排序功能支持按照文件名排序。
```
2024-03-11 08:58:08 +00:00
Ryan Wang b4729b9dab
feat: add download feature for attachment (#5496)
#### What type of PR is this?

/kind feature
/area ui
/milestone 2.14.0

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

附件支持下载。

<img width="471" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/97909ef8-8117-4ea9-aa15-73295a1b7b01">


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

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

#### Special notes for your reviewer:

测试方式:

1. 上传若干附件。
2. 测试下载功能是否符合预期。

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

```release-note
为附件添加下载功能
```
2024-03-11 08:28:08 +00:00
Ryan Wang 029eb952f1
fix: default sort policy of attachment groups (#5495)
#### What type of PR is this?

/area ui
/kind bug
/milestone 2.14.0

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

为附件分组设置默认排序规则(按照创建时间升序),和 2.13.0 版本之间保持一致。

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

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

#### Special notes for your reviewer:

测试方式:

1. 创建若干附件分组。
2. 观察排序是否符合预期。

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

```release-note
修复附件管理中的分组排序不固定的问题。
```
2024-03-11 07:42:08 +00:00
Ryan Wang 10d834d2ef
chore: bump overlayscrollbars version to 2.5.0 (#5471)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.14.x

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

升级 OverlayScrollbars 的依赖版本至 [2.5.0](https://github.com/KingSora/OverlayScrollbars/releases/tag/v2.5.0)

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

```release-note
升级 OverlayScrollbars 的依赖版本至 [2.5.0](https://github.com/KingSora/OverlayScrollbars/releases/tag/v2.5.0)。
```
2024-03-11 00:46:08 +00:00
guqing 20d80f8f65
refactor: using index mechanisms to optimize comment queries (#5453)
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.14.x

#### What this PR does / why we need it:
使用索引机制优化评论数据查询以提高效率

how to test it?
- 测试 console 评论列表和筛选条件是否正确
- 测试主题端评论显示是否正确

#### Does this PR introduce a user-facing change?
```release-note
使用索引机制优化评论数据查询以提高效率
```
2024-03-08 13:32:06 +00:00
Takagi 92f2229460
pref: remove nofollow from the default editor link (#5477)
#### What type of PR is this?

/kind improvement
/area editor
/area ui
/milestone 2.14.x

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

将默认富文本编辑器中的链接中的 rel 属性由默认的 `noopener noreferrer nofollow` 属性改为 null,优化 SEO 。
 
#### How to test it?

查看使用默认富文本编辑器创建的链接,其 rel 属性是否不再是 `noopener noreferrer nofollow`

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

Fixes #5328 

#### Does this PR introduce a user-facing change?
```release-note
移除默认富文本编辑器中链接的 nofollow 等属性,优化 SEO。
```
2024-03-08 09:30:08 +00:00
Takagi 71d97b20c0
feat: add select all shortcut function to the table (#5443)
#### What type of PR is this?

/area editor
/area ui
/kind feature
/milestone 2.14.x

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

为默认富文本编辑器中的表格,增加全选快捷键。具体操作逻辑如下:

1. 当光标处于表格中单元格内时,按 `Mod + a` 全选快捷键后,若未选中当前单元格,则选中单元格。
2. 若其中包含有其他影响全选快捷键的组件,则以组件自身为准,例如代码块中的全选。
3. 若已经选中单元格,则再次按全选快捷键,选中整个表格。
4. 若已经选中表格,则再按全选快捷键不会触发其他全选事件。

#### How to test it?

按照操作逻辑测试全选快捷键逻辑是否无误。是否与其他快捷键产生冲突。

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

Fixes #5438 

#### Does this PR introduce a user-facing change?
```release-note
为富文本编辑器中的表格组件增加全选快捷键
```
2024-03-06 06:30:09 +00:00
John Niang 003d1f3db8
Prepare for developing 2.14 (#5448)
#### What type of PR is this?

/kind cleanup
/area core

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

Bump version to 2.14 to prepare for developing 2.14. This always happens after new version is released.

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

```release-note
None
```
2024-03-06 03:04:07 +00:00
Takagi 98523b2bd3
fix: error editing post when img component has file attribute (#5434)
#### What type of PR is this?

/kind bug
/area editor
/area ui
/milestone 2.14.x

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

使用默认编辑器时,当图片、视频中具有 `file` 属性时,进入编辑界面时会报错。此 PR 将不再从渲染后的 HTML 中获取 file 属性,并且在渲染 HTML 时,抛弃掉 file 属性用于解决这个问题。

#### How to test it?

测试图片上传、视频上传功能不受影响即可。

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

Fixes #5430 

#### Does this PR introduce a user-facing change?
```release-note
修复进入文章页面会偶现错误提示的问题
```
2024-03-05 07:20:09 +00:00
Takagi eef53ea81a
fix: rich text editor reuploads images or videos repeatedly during redraws (#5437)
#### What type of PR is this?

/area editor
/area ui
/kind bug
/milestone 2.14.x

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

在当前富文本编辑器中,当做出使图片、视频等组件需要重绘的事件时,会导致已经上传的文件重复上传。
本 PR 在上传完成后,将图片、视频组件 `file` 设置为空,用于解决此问题。

#### How to test it?

1. 使用复制、粘贴的方式在富文本编辑器中添加图片、视频
2. 将上传的图片、视频所处位置进行变更(需要向当前位置往后移动)。
3. 查看已上传的图片、视频是否会重复上传。

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

Fixes #5436 

#### Does this PR introduce a user-facing change?
```release-note
解决富文本编辑器中已上传的图片及视频会重复上传的问题
```
2024-03-05 07:16:07 +00:00
Ryan Wang f5a9889b47
chore: bump formkit version to 1.5.x (#5395)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.13.x

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

升级 FormKit 的依赖版本至 1.5.x

Please see https://formkit.com/changelog#_150

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

```release-note
升级 FormKit 的依赖版本至 1.5.x
```
2024-02-29 09:57:39 +00:00
guqing 11114416fa
refactor: optimize notification and subscription query using index (#5414)
### What type of PR is this?
/kind improvement
/area core
/milestone 2.13.x

### What this PR does / why we need it:
使用索引机制优化通知和订阅查询以提高性能

how to test it
测试通知列表不报错即可

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

```release-note
使用索引机制优化通知和订阅查询以提高性能
```
2024-02-27 11:53:13 +00:00
Ryan Wang 827030dd68
refactor: layout of login related page (#5413)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.13.0

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

优化登录相关页面的布局,修复在不同分辨率下的样式问题。

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

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

#### Special notes for your reviewer:

测试登录或者注册页面,任意放大或者缩小页面,观察页面样式是否正常。

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

```release-note
优化登录相关页面的布局,修复在不同分辨率下的样式问题。
```
2024-02-27 10:21:14 +00:00
Ryan Wang dc350ae62c
fix: missing code validation label in signup form (#5409)
#### What type of PR is this?

/area ui
/kind bug
/milestone 2.13.0

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

修复注册表单中,验证码的验证提示文字无法显示表单项标题的问题。

before:

<img width="333" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/14f640ce-8e81-4dd4-84e5-d74ca4830a96">

after:

<img width="307" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/f4eb2c30-40b4-4275-bd20-a49771c4bc0f">

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

```release-note
None
```
2024-02-27 08:53:13 +00:00
guqing a15a9587b8
refactor: optimize user query using index (#5396)
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.13.x

#### What this PR does / why we need it:
使用索引机制优化用户查询以提高性能

#### Does this PR introduce a user-facing change?
```release-note
使用索引机制优化用户查询以提高性能
```
2024-02-27 08:45:12 +00:00
Takagi 3eb9d165bf
pref: refactor default editor video block upload logic (#5302)
#### What type of PR is this?

/kind improvement
/area console
/area editor
/milestone 2.13.x

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

重构默认编辑器视频组件。使其支持上传、取消上传、从附件库选择、替换等功能。

#### How to test it?

直接拖动、复制或选择文件上传一个视频,查看是否显示上传进度条,取消、重试功能是否正常

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

Fixes #5240 

#### Does this PR introduce a user-facing change?
```release-note
重构编辑器视频组件的上传逻辑,增加选择文件上传、上传进度条、取消、重试等机制。
```
2024-02-27 04:00:13 +00:00
MashiroT 50fbe37be8
feat: add support for force verify email during user registration (#5320)
#### What type of PR is this?

/kind feature
/kind improvement
/area core
/area console
/kind api-change

#### What this PR does / why we need it:
增加对用户注册时必须验证邮箱的支持

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

Fixes #5016

#### Special notes for your reviewer:
`regRequireVerifyEmail` 为 `false` 时与现在的注册行为一致
为 `true` 时注册页显示验证码校验相关,注册成功后 `UserSpec.emailVerified` 即为 `true`
没有判断邮件通知是否开启,与现有的邮箱验证一致,如未开启则收不到邮件

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

```release-note
增加对用户注册时必须验证邮箱的支持
```
2024-02-22 09:44:06 +00:00
Ryan Wang 9e676712e4
chore: bump vue related packages version (#5384)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.13.x

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

升级 Vue 生态相关依赖至最新版本。

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

```release-note
升级 Vue 生态相关依赖至最新版本。
```
2024-02-22 03:12:07 +00:00
Ryan Wang 698bc30675
chore: bump axios version to 1.6.x (#5383)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.13.x

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

升级 Axios 依赖版本至 1.6.x

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

```release-note
升级 Axios 依赖版本至 1.6.x
```
2024-02-21 04:22:27 +00:00
Ryan Wang 14da9c919c
chore: bump tiptap version to 2.2.3 (#5382)
#### What type of PR is this?

/kind improvement
/area ui
/milestone 2.13.x

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

升级 Tiptap 依赖至 https://github.com/ueberdosis/tiptap/releases/tag/v2.2.3

- https://github.com/ueberdosis/tiptap/releases/tag/v2.2.0

#### Special notes for your reviewer:

测试方式:

1. `./gradlew :ui:build`
2. 测试编辑器的已有功能是否正常。
3. 安装若干已有编辑器插件,测试插件的功能是否正常。

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

```release-note
升级 Tiptap 依赖至 [2.2.3](https://github.com/ueberdosis/tiptap/releases/tag/v2.2.3)。
```
2024-02-21 03:40:28 +00:00
Takagi ca4f705f2d
fix: resolve the issue of text editing not being effective before the table (#5365)
#### What type of PR is this?

/kind bug
/area editor
/area console

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

在 #5191 中对表格新增了如果可以左右滚动时,则显示阴影的特性。而根据 `prosemirror` 的数据流处理策略,在 `decorations` 中,state 是 new EditorState,但通过 `this.editor.view` 获取到的 view 为 old EditorView,进而导致使用了最新的坐标,并且使用其坐标通过旧版本的 view 中获取 DOM 而产生的错误。

本 PR 使用 `NodeView` 而不是 `decorations` 来重新处理表格阴影。

#### How to test it?

在默认富文本编辑器中新建一个表格。在表格前使用拼音输入文本,查看此文本能否被输入。
同时查看表格阴影是否存在

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

Fixes #5352

#### Does this PR introduce a user-facing change?
```release-note
解决默认富文本编辑器表格前字符无法被编辑的问题。
```
2024-02-21 02:44:09 +00:00
guqing 80e14e97d7
refactor: optimize old attachment query parameters using index (#5363)
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.13.x

#### What this PR does / why we need it:
使用索引功能优化附件列表查询

#### Does this PR introduce a user-facing change?
```release-note
使用索引功能优化附件列表查询
```
2024-02-20 02:58:09 +00:00
Takagi 27c98aec36
fix: fix the error when saving settings for posts in the uc (#5370)
#### What type of PR is this?

/kind bug
/area ui

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

在个人中心的文章功能中,点击设置时并不会重新获取最新的 Post 数据,进而导致点击保存时的 `version` 并非最新版本而报错。
此 PR 将在个人中心的文章页面点击设置时,额外增加一次获取最新的 Post 数据的请求,用于解决此问题。

#### How to test it?

1. 进入个人中心
2. 点击文章菜单
3. 点击右上角创建按钮
4. 在编辑器中随便输入内容
5. 点击保存
6. 修改文章的设置后点击保存。
7. 关闭设置框,再次打开设置框,然后点击保存。
8. 查看是否会出现无法保存的问题。

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

Fixes #5344 

#### Does this PR introduce a user-facing change?
```release-note
解决个人中心文章设置时报错的问题
```
2024-02-20 02:36:07 +00:00
Ryan Wang 45d8391885
fix: fail to fetch correct user avatar (#5369)
#### What type of PR is this?

/area ui
/kind bug
/milestone 2.13.x

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

修复 Console 中用户头像无法正确获取的问题。

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

Fixes #5368 

#### Special notes for your reviewer:

测试方式:

1. 创建若干用户,并为部分用户设置不同的头像。
2. 分别进入不同用户的个人资料页面,观察头像是否符合预期。

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

```release-note
修复 Console 中用户头像无法正确获取的问题。
```
2024-02-19 07:23:28 +00:00
John Niang 07854c993f
Fix the problem of being unable to commit (#5362)
#### What type of PR is this?

/kind cleanup
/area core

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

The wrong `pre-commit` will prevent us from making a Git commit. The problem was caused by <https://github.com/halo-dev/halo/pull/5314>.

```bash
ui/.husky/pre-commit: line 4: cd: console: No such file or directory
husky - pre-commit hook exited with code 1 (error)
```

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

```release-note
None
```
2024-02-18 08:00:16 +00:00
owo 05e2682c4d
Improve traditional Chinese translation (#5353)
#### What type of PR is this?
/kind improvement

#### What this PR does / why we need it:
Correct some simplified Chinese characters that were not replaced in the yaml file of traditional Chinese.

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

Fixes #3672

#### Special notes for your reviewer:
I have read the CONTRIBUTING file, but I'm not familiar with PR operations. If there's anything I can do to improve it, please let me know.

> By the way, the [contribution guidelines](https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md) provided in the PR template and README still use `master` as the main branch, which may cause some confusion for new contributors.

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


```release-note
NONE
```
2024-02-17 05:00:15 +00:00
Ryan Wang 8ce6ab6af2
chore: rename console to ui in some files (#5347)
#### What type of PR is this?

/area ui
/kind cleanup

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

Rename console to ui in some files,

Ref https://github.com/halo-dev/halo/pull/5314

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

```release-note
None
```
2024-02-07 14:40:08 +00:00
John Niang a3772fab1b Add build script for ui project
Signed-off-by: John Niang <johnniang@foxmail.com>
2024-02-03 22:51:50 +08:00
John Niang 15f7fe2d4f Move folder console to ui 2024-02-02 22:22:51 +08:00