#### What type of PR is this?
/kind bug
/area ui
/milestone 2.19.x
#### What this PR does / why we need it:
解决 formkit select 远程请求时的参数错误问题。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area ui
/milestone 2.19.x
#### What this PR does / why we need it:
使用 #6473 中重构的 Formkit Select 组件来实现用户、文章、页面等各种业务搜索组件。
Fixes https://github.com/halo-dev/halo/issues/4931
#### How to test it?
测试各类搜索组件是否正常可用。
测试从旧版本升级后,原有数据是否可以正常显示。
#### Does this PR introduce a user-facing change?
```release-note
使用重构的 Formkit Select 组件来实现业务选择器。
```
#### What type of PR is this?
/area ui
/kind feature
/milestone 2.19.0
#### What this PR does / why we need it:
重构用户筛选组件,支持远程搜索,避免在用户量大的时候产生性能问题。
<img width="383" alt="image" src="https://github.com/user-attachments/assets/3f878b0b-3da0-48fe-97ee-add115d23801">
#### Does this PR introduce a user-facing change?
```release-note
重构用户筛选组件,支持远程搜索。
```
#### What type of PR is this?
/area ui
/kind bug
/milestone 2.19.0
#### What this PR does / why we need it:
修复 H2 数据库提示判断有误的问题。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind api-change
/kind feature
/area core
#### What this PR does / why we need it:
see #2335
增加将第三方资源转存为附件资源的接口。
`/apis/api.console.halo.run/v1alpha1/attachments/-/upload-from-url`
UC:
`/apis/uc.api.content.halo.run/v1alpha1/attachments/-/upload-from-url`
其中参数为
```json
{
"url": "string",
"filename": "string",
"groupName": "string",
"policyName": "string"
}
```
#### How to test it?
测试能否将第三方接口的资源保存至附件中。
测试各类附件,例如图片、视频、文本等。
#### Does this PR introduce a user-facing change?
```release-note
增加通过链接转存第三方资源至附件库的接口
```
#### What type of PR is this?
/kind improvement
/area editor
/area ui
#### What this PR does / why we need it:
此 PR 重构了默认编辑器中代码块的相关代码,使编辑器能够被插件扩展。这样做的优点是当用户使用例如 [highlightjs](https://github.com/halo-sigs/plugin-highlightjs) 这类的高亮插件时,可以保证在 Console 端选择的语言及主题可以在主题端完美适配。
具体做了以下几处重构:
1. 在默认编辑器的代码块中,不再提供高亮样式,代码块高亮将完全交由插件来适配。(但可以在默认的代码块中自定义输入语言,主题端自行处理)。
2. 为了防止出现重复的插件功能,将会根据插件优先级及加载顺序(后加载优先级高于先加载),对同类型且同名的插件进行过滤,只保留一个。
3. 重构代码块 `Select` 组件,使得选择语言或主题更加方便。
4. 为代码块提供主题的扩展设置项。
建议在此 PR 合并之后,由 Halo 默认提供一个高亮插件作为预设插件,这样可以用于解决原有功能升级之后丢失的问题。
<img width="1067" alt="image" src="https://github.com/user-attachments/assets/f9e2c5eb-a48a-4d2c-9fee-442e9d16ef19">
#### How to test it?
测试是否会改变已有代码块的语言等。
测试使用第三方插件之后,是否具有高亮。
设置高亮语言后,保存并刷新,查看高亮语言是否存在。主题同理。
查看主题端是否能够正常渲染。
#### Does this PR introduce a user-facing change?
```release-note
重构默认编辑器代码块使其能够被插件扩展。
```
#### What type of PR is this?
/area ui
/kind improvement
/milestone 2.19.x
#### What this PR does / why we need it:
在初始化页面添加使用 H2 数据库的警告。
<img width="773" alt="image" src="https://github.com/user-attachments/assets/3be83064-2075-4d3d-9511-9c67ffb68076">
#### Special notes for your reviewer:
需要测试在首次安装的时候使用 H2 数据库时,初始化页面是否有警告界面。
#### Does this PR introduce a user-facing change?
```release-note
在初始化页面添加使用 H2 数据库的警告。
```
#### What type of PR is this?
/area ui
/kind bug
/milestone 2.19.x
#### What this PR does / why we need it:
修复备份相关的 API 接口地址错误的问题,此问题由 https://github.com/halo-dev/halo/pull/6486 引入,后端修改地址之后,前端没有对应修改。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area ui
/milestone 2.19.x
#### What this PR does / why we need it:
升级 tiptap 相关依赖至 [2.6.5](https://github.com/ueberdosis/tiptap/releases/tag/v2.6.5)
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area ui
/kind improvement
/milestone 2.19.x
#### What this PR does / why we need it:
优化插件是否需要重载页面的判断条件,否则从低版本升级到 2.19 时,所有插件都会提示需要重载。
因为在 https://github.com/halo-dev/halo/pull/6470 中修改了 bundle.js 的结构,但升级到 2.19 之后可能并不会及时抛弃 bundle.js 的缓存,因为插件本身的 version 并没有改变,bundle.js 的 hash 参数也不会改变。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area editor
/milestone 2.19.x
#### What this PR does / why we need it:
使用白名单校验替换原有的黑名单校验,解决 a 标签潜在的安全问题。
移除自定义的解决方案,使用 Tiptap 所提供的白名单方案。
#### How to test it?
测试 a 标签的 href 链接是否会受到 xss 的影响。
同时测试 #5479 的情况是否还会发生。即默认富文本编辑器中当链接为纯数字时是否还会报错。
#### Does this PR introduce a user-facing change?
```release-note
使用白名单校验 a 标签的 href 用于解决潜在的安全问题。
```
#### What type of PR is this?
/kind cleanup
/area core
/milestone 2.19.x
#### What this PR does / why we need it:
清理没有用到的索引
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area ui
/kind improvement
/milestone 2.19.x
#### What this PR does / why we need it:
Bump vite-related dependencies
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area ui
/kind improvement
/milestone 2.19.x
#### What this PR does / why we need it:
使用 patch 接口重构菜单项拖动排序等功能。
#### Which issue(s) this PR fixes:
None
#### Special notes for your reviewer:
需要测试菜单项的拖动排序功能是否符合预期。
#### Does this PR introduce a user-facing change?
```release-note
使用 patch 接口重构菜单项拖动排序功能。
```
#### What type of PR is this?
/area ui
/kind improvement
/milestone 2.19.x
#### What this PR does / why we need it:
使用 patch 接口重构文章的恢复、可见性修改等逻辑。
#### Which issue(s) this PR fixes:
None
#### Special notes for your reviewer:
测试文章删除、恢复、可见性修改功能是否符合预期。
#### Does this PR introduce a user-facing change?
```release-note
使用 patch 接口重构文章的恢复、可见性修改等逻辑。
```
#### What type of PR is this?
/area ui
/kind improvement
/milestone 2.19.x
#### What this PR does / why we need it:
使用 patch 接口重构分类拖动排序功能。
#### Which issue(s) this PR fixes:
None
#### Special notes for your reviewer:
需要测试文章分类的拖动排序功能是否符合预期。
#### Does this PR introduce a user-facing change?
```release-note
使用 patch 接口重构分类拖动排序功能。
```
#### What type of PR is this?
/area ui
/kind improvement
/milestone 2.19.x
#### What this PR does / why we need it:
使用 patch 接口重构页面的删除、可见性修改等逻辑。
#### Which issue(s) this PR fixes:
None
#### Special notes for your reviewer:
测试页面删除、可见性修改功能是否符合预期。
#### Does this PR introduce a user-facing change?
```release-note
使用 patch 接口重构页面的删除、可见性修改等逻辑。
```
#### What type of PR is this?
/kind improvement
/area ui
/milestone 2.19.x
#### What this PR does / why we need it:
将主题预览中的保存功能固定在底部,方便当主题设置项过多时进行保存。
为了不影响保存功能,因此此 PR 移除了本来在左下角悬浮的选择主题按钮。选择主题可以直接在右上角进行点击。
#### Which issue(s) this PR fixes:
Fixes#6448
#### Does this PR introduce a user-facing change?
```release-note
在主题预览界面中将保存按钮固定在底部
```
#### What type of PR is this?
/kind bug
/area editor
/milestone 2.19.x
#### What this PR does / why we need it:
修复默认编辑器中,当在列表的下一空白行使用退格键时,会导致无法回退至列表项中的问题。
#### How to test it?
1. 在编辑器中增加一个列表项。
2. 按两次回车跳出列表编辑器。
3. 按退格键。
查看退格键是否按一次就可以回到列表项,并且再次按时执行列表项的删除。
#### Which issue(s) this PR fixes:
Fixes#6263
#### Does this PR introduce a user-facing change?
```release-note
解决默认编辑器中在空白行中按退格键无法回退到列表项中的问题
```
#### What type of PR is this?
/kind bug
/area ui
/milestone 2.19.x
#### What this PR does / why we need it:
此 PR 将主题预览及文章预览的 `iframe` 由 srcdoc 改为使用 src 加载。用于解决在主题预览时,如果点击保存设置,会导致主题端页面跳转至首页。
#### How to test it?
1. 打开主题预览界面。
2. 打开非首页的页面。
3. 点击保存配置。查看此时刷新页面后是否不再回到首页。
同时需要测试 #4047 中的场景是否还会再发生。
#### Which issue(s) this PR fixes:
Fixes#6371
#### Does this PR introduce a user-facing change?
```release-note
解决预览主题时保存设置,页面会跳转至首页的问题。
```
#### What type of PR is this?
/kind feature
/area ui
/milestone 2.19.x
#### What this PR does / why we need it:
支持在附件库中预览 `image/avif` 的图片。
#### Which issue(s) this PR fixes:
Fixes#6320
#### Does this PR introduce a user-facing change?
```release-note
支持在附件库中预览 avif 类型的图片
```
#### What type of PR is this?
/area ui
/kind improvement
/milestone 2.19.x
#### What this PR does / why we need it:
更新 typescript 依赖版本至 5.5.x,以尝试解决 VSCode Vue 插件频繁崩溃的问题。
#### 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 is a regular updates after a new release.
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
/area editor
/milestone 2.18.x
#### What this PR does / why we need it:
此 PR 解决了使用高亮插件之后按 `up` 或 `down` 按键被阻止的问题。
此问题的来源为 https://github.com/halo-sigs/richtext-editor/pull/56 ,在此前的 PR 中为了解决设置字体大小后再次设置高亮,会导致高亮无法完全笼罩字体的问题。
但经过仔细排查,发现上述问题之前的解决方式有误,正确的原因应该是设置字体大小的 `span` 标签与设置高亮的 `mark` 标签顺序相反导致。如下所示:
<img width="1019" alt="image" src="https://github.com/user-attachments/assets/90c0926e-caab-40b6-91ae-97c075ef7225">
正确的情况应该是在 `span` 中包裹 `mark`。此 PR 提升了 `TextStyle` 的优先级,结果如下所示:
<img width="1022" alt="image" src="https://github.com/user-attachments/assets/e5e61d54-defd-493b-818c-c09faf55a7c1">
#### How to test it?
测试对文本使用高亮功能之后按 `up` 或 `down` 按键是否生效。
测试对在文本设置大小之后,使用高亮、删除线等样式是否正确。
#### Which issue(s) this PR fixes:
Fixes#6381
#### Does this PR introduce a user-facing change?
```release-note
解决默认编辑器中对文本使用高亮会导致按键被阻止的问题
```
#### What type of PR is this?
/kind bug
/area editor
/milestone 2.18.x
#### What this PR does / why we need it:
目前当编辑器中列表内容为空时,需要按退格键多次才能删除掉此列表内容。
本 PR 在执行单行删除逻辑之前,会检查列表是否处于活动状态,如果是则不再执行单行删除的逻辑。列表会执行 ListKeyMap 相关快捷键。
#### How to test it?
1. 在默认富文本键入一个列表。
2. 使用退格键删除这个列表。
3. 查看是否可以一次就删除。
#### Which issue(s) this PR fixes:
Fixes#6389
#### Does this PR introduce a user-facing change?
```release-note
修复默认编辑器中列表项需要按多次退格键才可以删除的问题
```
#### What type of PR is this?
/area editor
/kind improvement
/milestone 2.18.x
#### What this PR does / why we need it:
移除编辑器 Column 的默认 padding 样式。
See https://github.com/halo-dev/halo/issues/6377#issue-2428912807
#### Which issue(s) this PR fixes:
Fixes#6377
#### Does this PR introduce a user-facing change?
```release-note
移除编辑器分栏卡片的默认 padding 样式。
```
#### What type of PR is this?
/area ui
/kind improvement
/milestone 2.18.x
#### What this PR does / why we need it:
为个人中心发布文章的操作添加重试机制,方式后端因为乐观锁出现异常错误。
#### Which issue(s) this PR fixes:
Fixes#6349
#### Does this PR introduce a user-facing change?
```release-note
为个人中心发布文章的操作添加重试机制,方式后端因为乐观锁出现异常错误。
```
#### What type of PR is this?
/area ui
/kind improvement
/milestone 2.18.x
#### What this PR does / why we need it:
升级 tiptap 的相关依赖至 2.5.7。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area ui
/kind improvement
/milestone 2.18.x
#### What this PR does / why we need it:
修改附件选择组件的默认显示数量,以解决因为图片数量过多或者图片过大导致的卡顿问题。
#### Which issue(s) this PR fixes:
Ref https://github.com/halo-dev/halo/issues/6352
#### Does this PR introduce a user-facing change?
```release-note
修改附件选择组件的默认显示数量,以解决因为图片数量过多或者图片过大导致的卡顿问题。
```
#### What type of PR is this?
/kind feature
/area editor
#### What this PR does / why we need it:
支持在默认编辑器中使用 Tab 键实现首行缩进的功能。
当光标处于文本首行时,按下 Tab 键会触发首行缩进。
在首行缩进的情况下或者选中一段文本,再次按下 Tab 键会触发整段缩进。
#### How to test it?
测试文本块及区域标题块首行按下 Tab 键是否可以正常触发首行缩进
#### Which issue(s) this PR fixes:
Fixes#6316
#### Does this PR introduce a user-facing change?
```release-note
默认编辑器增加 Tab 快捷键首行缩进功能
```
#### What type of PR is this?
/kind cleanup
/area core
#### What this PR does / why we need it:
Regenerate API docs and client to prevent unrelated changes from other PRs.
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
/area editor
/milestone 2.18.x
#### What this PR does / why we need it:
使用组合输入时,按下回车键不再执行编辑器获取焦点的事件。
#### Which issue(s) this PR fixes:
Fixes#6345
#### Does this PR introduce a user-facing change?
```release-note
解决默认编辑器标题在使用组合输入时,按下回车键会导致其失去焦点的问题。
```
#### What type of PR is this?
/kind bug
/area editor
/milestone 2.18.x
#### What this PR does / why we need it:
在默认编辑器中,选中一个跨多个节点的 text 时,selection 会变为 RangeSelection,此时冒泡菜单将不会出现。
此 RP 将 RangeSelection 添加至 text 的冒泡菜单验证中,使得冒泡菜单可以出现。
#### How to test it?
测试跨行选中多个无序列表时,是否出现冒泡菜单。
#### Which issue(s) this PR fixes:
Fixes#6267
#### 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:
This PR bumps Halo version into 2.18.0 for next development iteration.
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area ui
/kind improvement
/milestone 2.17.x
#### What this PR does / why we need it:
优化插件扩展管理页面的 UI 权限,限制只有超级管理员才能访问。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area ui
/kind cleanup
#### What this PR does / why we need it:
重新生成 api client,移除无用的文件。并且此 PR 改进了生成的脚本,会在生成前删除旧的 api client 文件,保证不会遗留旧文件。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area ui
/kind improvement
/milestone 2.17.x
#### What this PR does / why we need it:
完善插件扩展设置页面:
1. 完善 i18n。
2. 将入口移动至插件页面右上角的操作按钮区域。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area ui
/kind feature
/milestone 2.17.x
#### What this PR does / why we need it:
补充 2FA 相关的 i18n 定义。
#### Does this PR introduce a user-facing change?
```release-note
None
```
<!-- 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?
<!--
添加其中一个类别:
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
-->
/area ui
/kind improvement
#### What this PR does / why we need it:
当前多选框disabled与非disabled样式上无区别,不好分辨。
#### 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/5974
#### 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
增加多选框disabled样式
```
#### What type of PR is this?
/area core
/kind bug
/milestone 2.17.x
#### What this PR does / why we need it:
修复 Device 模型中,Kind 定义错误的问题。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/6221
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area ui
/kind feature
/milestone 2.17.x
#### What this PR does / why we need it:
支持在文章编辑页面创建文章时,也应用别名生成规则
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/5118
Fixes https://github.com/halo-dev/halo/issues/6155
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
```release-note
支持在文章编辑页面创建文章时,也应用别名生成规则
```
#### What type of PR is this?
/kind bug
/area ui
/milestone 2.17.x
#### What this PR does / why we need it:
修复 Secret Input 保存之后会多出 Secret Form 中数据的问题。
#### Which issue(s) this PR fixes:
Fixes#6193
#### Special notes for your reviewer:
测试方式:
1. 在保存 Secret 的表单选项前,打开一次编辑 Secret 的对话框。
2. 保存数据,检查内容是否多出了其他数据。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
#### Which issue(s) this PR fixes:
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area core
/kind api-change
/milestone 2.17.x
#### What this PR does / why we need it:
移除内置的页面静态缓存功能,后续将由 https://github.com/halo-sigs/plugin-page-cache 插件提供。
#### Which issue(s) this PR fixes:
Fixes#5639
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
```release-note
移除内置的页面静态缓存功能,后续由 https://github.com/halo-sigs/plugin-page-cache 插件提供。
```
#### What type of PR is this?
/area ui
/kind improvement
/milestone 2.17.x
#### What this PR does / why we need it:
添加对菜单的限制,不能删除已经设置为主菜单的菜单。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/4956
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area ui
/kind feature
/milestone 2.17.x
#### What this PR does / why we need it:
支持手动为文章设置作者。
<img width="734" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/b91b1754-4f50-4333-8478-6735d5846847">
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/5720
#### Special notes for your reviewer:
需要测试:
1. 打开任意文章的设置,在高级中设置作者并保存,观察是否成功。
2. 选择一批文章,点击批量设置,设置一个作者,观察是否设置成功。
#### Does this PR introduce a user-facing change?
```release-note
支持手动为文章设置作者。
```
#### What type of PR is this?
/kind improvement
/area editor
/milestone 2.17.x
#### What this PR does / why we need it:
为图片跳转链接增加在新窗口打开的选项。
#### How to test it?
测试新窗口打开是否正常可用。
#### Which issue(s) this PR fixes:
Fixes#6109
#### Does this PR introduce a user-facing change?
```release-note
默认编辑器图片跳转链接支持配置新窗口打开
```
#### What type of PR is this?
/area ui
/kind bug
/milestone 2.17.0
#### What this PR does / why we need it:
修复插件扩展点设置页面标题的颜色问题。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area editor
/milestone 2.17.x
#### What this PR does / why we need it:
为默认编辑器代码块增加折叠功能。
<img width="892" alt="image" src="https://github.com/halo-dev/halo/assets/31335418/8325cba9-08ce-4bd7-98b6-6bc28fe52daf">
#### How to test it?
测试折叠功能是否可用。
测试重新打开文章之后代码块是否仍旧处于折叠状态。
#### Which issue(s) this PR fixes:
Fixes#6166
#### Does this PR introduce a user-facing change?
```release-note
为默认编辑器代码块增加折叠功能
```
#### What type of PR is this?
/area ui
/kind bug
/milestone 2.17.x
#### What this PR does / why we need it:
Fix the vue injection warn in browser console
<img width="559" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/4160cbe4-fe8b-4b30-a1db-57d35d78e4f9">
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area ui
/kind documentation
/milestone 2.17.x
#### What this PR does / why we need it:
更新 `@halo-dev/api-client` 包的 readme。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area editor
/milestone 2.17.x
#### What this PR does / why we need it:
由于 RangeSelection 可能将一些并不想展示为模拟选中效果的节点进行了转换,因此将 RangeSelection 中模拟选中的效果,由默认的自动设置为 true,变为 false。
之后需要由节点自行设置 `fakeSelection: true` 后才会展示为模拟选中的效果,否则保持原本的选择样式。
#### How to test it?
测试使用 Mod-a 全选后,listItem 等节点是否会展示为模拟选中的效果。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area ui
/kind bug
/milestone 2.17.x
#### What this PR does / why we need it:
修复在扩展点设置页面切换扩展点定义后,扩展定义的选项被清空的问题。
#### Which issue(s) this PR fixes:
Fixes#6164
#### Does this PR introduce a user-facing change?
```release-note
修复在扩展点设置页面切换扩展点定义后,扩展定义的选项被清空的问题。
```
#### What type of PR is this?
/area ui
/kind bug
#### What this PR does / why we need it:
修复 https://github.com/halo-dev/halo/pull/6152 中因为改动了 css 文件的导入顺序带来的样式问题。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area ui
/kind improvement
/milestone 2.17.x
#### What this PR does / why we need it:
重新组织和固定 UI 部分代码的 imports 导入,防止后续因为 imports 的顺序造成不必要的 diff。
基于:https://github.com/halo-dev/halo/pull/6151
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area editor
/milestone 2.17.x
#### What this PR does / why we need it:
在用户设置 iframe 相关的 src 时,检测设置的链接是否符合白名单。如果不符合则不允许设置。
see https://github.com/ueberdosis/tiptap/pull/5160
#### How to test it?
测试在 iframe 中的 src 输入 `javascript: alert("1")` 时是否会触发 javascript
#### Does this PR introduce a user-facing change?
```release-note
处理默认编辑器中 iframe 标签的 src 属性可能存在的风险
```
#### What type of PR is this?
/kind feature
/area ui
/milestone 2.17.x
#### What this PR does / why we need it:
为 formkit 增加动态列表的 input。
使用方式:
```
- $formkit: list
name: users
label: Users
addLabel: Add User
min: 1
max: 3
itemType: string
children:
- $formkit: text
index: "$index"
validation: required
```
> [!NOTE]
> `list` 组件有且只有一个子节点,并且必须为子节点传递 `index` 属性。若想提供多个字段,则建议使用 `group` 组件包裹。
#### How to test it?
测试动态数组是否正常可用。保存的结果是否为 `{users: ["", ""]}`
#### Which issue(s) this PR fixes:
Fixes#6098
#### Does this PR introduce a user-facing change?
```release-note
为 Formkit 增加动态列表的 input 组件 list
```
#### What type of PR is this?
/kind feature
/area editor
/milestone 2.17.x
#### What this PR does / why we need it:
为默认编辑器添加 `RangeSelection` 选择器。
<img width="989" alt="image" src="https://github.com/halo-dev/halo/assets/31335418/c976cf99-0d6e-4346-9b05-8b9b0dc95183">
它的功能基本与 TextSelection 相反,例如:
1. TextSelection 支持光标展示,RangeSelection 不允许空内容,即它并不支持光标。
2. TextSelection 会抛弃被选择的 Node 节点部分偏移量,而 RangeSelection 会扩展偏移量至 Node 节点结束。
3. TextSelection 支持 Text 而 RangeSelection 支持 Node 节点。
`RangeSelection` 可以用于范围选中块节点并进行操作,可用于全选内容并进行删除操作。
#### How to test it?
测试使用点击,拖拽,释放鼠标的操作,能否选中某些节点。
测试删除选中的节点。
#### Which issue(s) this PR fixes:
Fixes#5194
#### Does this PR introduce a user-facing change?
```release-note
为默认编辑器添加 RangeSelection 选择器
```
#### What type of PR is this?
/kind bug
/area ui
/milestone 2.17.x
#### What this PR does / why we need it:
解决自动保存失效的问题
#### How to test it?
测试文章、页面输入内容后,点击其他页面是否能够自动保存。
#### Which issue(s) this PR fixes:
Fixes#6129
#### Does this PR introduce a user-facing change?
```release-note
解决文章自动保存失效的问题
```
#### What type of PR is this?
/area ui
/kind improvement
/milestone 2.17.x
#### What this PR does / why we need it:
移除用户创建/编辑表单的手机号字段,当前手机号在系统中没有任何使用。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area ui
/kind improvement
/milestone 2.17.x
#### What this PR does / why we need it:
在文章编辑页面,打开文章设置时,支持保存标题,防止已修改的标题恢复为之前的值。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/6058
#### Does this PR introduce a user-facing change?
```release-note
优化文章编辑页面自动保存标题的功能
```
#### What type of PR is this?
/area ui
/kind bug
#### What this PR does / why we need it:
修复 api client 默认请求根地址不正确的问题。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
/area ui
/milestone 2.17.x
#### What this PR does / why we need it:
修复关于 iconify 图标包的幽灵依赖问题,某些情况下,可能导致无法正常导入模块。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/6102
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area ui
/kind improvement
/milestone 2.17.x
#### What this PR does / why we need it:
使用新的 [patch](https://github.com/halo-dev/halo/pull/6031) 接口重构附件的移动功能。
#### Special notes for your reviewer:
1. 测试附件移动至其他分组的功能是否正常。
2. 测试删除附件分组,选择 **删除并将附件移动至未分组** 选项,观察删除分组之后,其中的附件是否已经移动到未分组。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area ui
/kind improvement
/milestone 2.17.x
#### What this PR does / why we need it:
简化插件启动的接口,改为之前单独提供的修改插件状态的接口,而不是修改 `spec.enabled`。
#### Special notes for your reviewer:
需要测试:
1. 手动安装插件之后,启动插件。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area ui
/kind improvement
/milestone 2.17.x
#### What this PR does / why we need it:
使用新的 patch 接口重构评论相关的逻辑。
#### Special notes for your reviewer:
需要测试:
1. 审核评论和回复功能。
2. 批量审核评论和回复功能。
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area ui
/kind bug
/milestone 2.17.x
#### What this PR does / why we need it:
修复首次上传附件时,没有默认选择第一个存储策略的问题。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/6094
#### Does this PR introduce a user-facing change?
```release-note
修复首次上传附件时,没有默认选择第一个存储策略的问题。
```
#### What type of PR is this?
/area ui
/kind bug
/milestone 2.17.x
#### What this PR does / why we need it:
修复新建文章时,没有自动选择之前所选编辑器的问题。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/6091
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
```release-note
修复新建文章时,没有自动选择之前所选编辑器的问题。
```