* 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>
#### What type of PR is this?
/kind bug
/area core
/milestone 2.15.x
#### What this PR does / why we need it:
修复分页遍历数据的查询参数
此问题由 #5504 和 #5656 重构导致,如果数据超过分页限制会导致无法结束的致命问题
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### 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
```
#### 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
优化注册表单的用户名校验规则
```
#### 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
对默认富文本编辑器中的工具栏进行折叠及精简优化。
```
#### 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
修复默认编辑器中粘贴代码块会出现错行的问题
```
#### 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
为默认富文本编辑器添加格式刷扩展。
```
#### 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
优化默认富文本编辑器中顶部工具栏的子菜单弹出方式
```
<!-- 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
布局高度引发页面背景色未完全填充滚动区域的问题
```
#### What type of PR is this?
/kind cleanup
/area core
#### What this PR does / why we need it:
This PR upgrades SpringDoc to [2.5.0](https://github.com/springdoc/springdoc-openapi/releases/tag/v2.5.0).
#### Does this PR introduce a user-facing change?
```release-note
升级 SpringDoc 至 2.5.0
```
#### 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
将新建用户的表单中的角色设置设为必填
```
#### 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
优化默认富文本编辑器中文本自动转为链接的相关逻辑
```
#### 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
限定文章或页面中的发布日期中的年份为四位数
```
#### 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
为默认富文本编辑器添加清除格式的功能。
```
#### 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 的标签页标题改为网站实际标题
```
#### 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
修复附件详情弹窗可能无法显示数据的问题
```
#### 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
文章支持根据访问量和评论量排序
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.15.x
#### What this PR does / why we need it:
优化文章上一篇下一篇的查询方式避免瞬时内存占用过高
#### Does this PR introduce a user-facing change?
```release-note
优化文章上一篇下一篇的查询方式避免瞬时内存占用过高
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.15.x
#### What this PR does / why we need it:
优化通知订阅数据查询
#### Does this PR introduce a user-facing change?
```release-note
优化通知订阅数据查询以解决由于数据过多导致查询慢进而阻塞调用方的问题
```
#### 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
为默认富文本编辑器增加行高设置
```
#### 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
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.15.x
#### What this PR does / why we need it:
优化分类关联文章数量的查询避免因查询数据量过大而导致的阻塞或内存溢出
#### Does this PR introduce a user-facing change?
```release-note
优化分类关联文章数量的查询避免因查询数据量过大而导致的阻塞或内存溢出
```
#### 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
```
#### What type of PR is this?
/area core
/kind improvement
/milestone 2.14.0
#### What this PR does / why we need it:
在 Halo 完成动态数据的 i18n 之前,使用中文描述存储策略名称。
Ref https://github.com/halo-dev/plugin-s3/pull/128
#### Does this PR introduce a user-facing change?
```release-note
将默认存储策略模板的显示名称改为中文
```
#### 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
简化部分确认框的标题。
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.14.x
#### What this PR does / why we need it:
减少文章更新因版本号冲突而失败的次数
#### Which issue(s) this PR fixes:
Fixes#5579
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### 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 参数无效的问题
```
<!-- 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 documentation
<!--
添加其中一个类别:
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:
同时使用 `-it` 和 `-d`,`-d` 会覆盖 `-it`,容器将会在后台运行,而 `-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)`.
-->
#### 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
None
```
#### 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
```
#### 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 在部分插件中失效的问题。
```
#### 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
修复在个人中心中使用默认富文本编辑器的附件库而导致的报错问题
```
#### 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
优化插件安装弹框组件的渲染时机,避免不必要的请求。
```
#### What type of PR is this?
/kind bug
/area core
#### What this PR does / why we need it:
修复在个人中心下,用户无法修改发布时间的问题。
#### How to test it?
需要测试两种情况:
1. 用户首次发布文章时,修改发布时间是否有效。
2. 用户后续编辑文章发布时间时是否生效。
#### Which issue(s) this PR fixes:
Fixes#5473
#### Does this PR introduce a user-facing change?
```release-note
修复个人中心中用户无法修改文章发布时间的问题
```
#### 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
修复在文章列表设置中可以无限点击上一个的问题
```
#### 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 端保存文章的操作添加重试机制,防止出现因为锁导致的保存失败问题。
```