Commit Graph

4789 Commits (014625ff0ed1c3320c0ee587e164f277735ed7be)

Author SHA1 Message Date
John Niang 9d9b1527bc
Upgrade Spring Boot to 3.2.2 (#5232)
#### What type of PR is this?

/kind improvement
/area core

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

See https://github.com/spring-projects/spring-boot/releases/tag/v3.2.2 for more.

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

```release-note
升级依赖 Spring Boot 至 3.2.2
```
2024-01-23 05:11:41 +00:00
Ryan Wang 95878b3bb8
refactor: update chinese display name of post editor role (#5224)
#### What type of PR is this?

/area core
/milestone 2.12.x

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

修改文章编辑角色的显示名称为**文章管理员**,这样会更加直观。

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

Fixes #5221 

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

```release-note
修改文章编辑角色的显示名称为**文章管理员**。
```
2024-01-22 07:20:10 +00:00
Takagi 14580b96b0
feat: refactor editor image block upload logic (#5159)
* feat: refactor editor image block upload logic
2024-01-19 17:39:06 +08:00
Ryan Wang df8bb3399a
chore: bump tiptap version to 2.1.16 (#5210)
#### What type of PR is this?

/area console
/area editor
/milestone 2.12.x
/kind bug

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

升级 tiptap 相关依赖,解决代码块中换行的问题。

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

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

#### Special notes for your reviewer:

测试方式:

1. 进入 console/packages/editor,更新依赖
2. 使用 pnpm dev 启动编辑器服务
3. 插入一个代码块,然后刷新页面,观察代码块是否显示正常

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

```release-note
None
```
2024-01-19 08:14:10 +00:00
guqing 6a37df07a8
feat: add index mechanism for extension (#5121)
#### What type of PR is this?
/kind feature
/area core
/milestone 2.12.x

#### What this PR does / why we need it:
新增自定义模型索引机制

默认为所有的自定义模型都添加了以下索引:
- metadata.name
- metadata.labels
- metadata.creationTimestamp
- metadata.deletionTimestamp

**how to test it?**
1. 测试应用的启动和停止
2. 测试 Reconciler 被正确执行,如创建文章发布文章,测试删除文章的某个 label 数据启动后能被 PostReconciler 恢复(即Reconciler 被正确执行)
3. 测试自定义模型自动生成的 list APIs
	1. 能根据 labels 正确过滤数据和分页
	2. 能根据 creationTimestamp 正确排序
	3. 测试插件启用后也能正确使用 list APIs 根据 labels 过滤数据和 creationTimestamp 排序
4. 能正确删除数据(则表示 GcReconciler 使用索引正确)
5. 测试在插件中为自定义模型注册索引
```java
public class DemoPlugin extension BasePlugin {
    private final SchemeManager schemeManager;

    public MomentsPlugin(PluginContext pluginContext, SchemeManager schemeManager) {
        super(pluginContext);
        this.schemeManager = schemeManager;
    }

    @Override
    public void start() {
        schemeManager.register(Moment.class, indexSpecs -> {
            indexSpecs.add(new IndexSpec()
                .setName("spec.tags")
                .setIndexFunc(multiValueAttribute(Moment.class, moment -> {
                    var tags = moment.getSpec().getTags();
                    return tags == null ? Set.of() : tags;
                }))
            );
            indexSpecs.add(new IndexSpec()
                .setName("spec.owner")
                .setIndexFunc(simpleAttribute(Moment.class,
                    moment -> moment.getSpec().getOwner())
                )
            );
            indexSpecs.add(new IndexSpec()
                .setName("spec.releaseTime")
                .setIndexFunc(simpleAttribute(Moment.class, moment -> {
                    var releaseTime = moment.getSpec().getReleaseTime();
                    return releaseTime == null ? null : releaseTime.toString();
                }))
            );

            indexSpecs.add(new IndexSpec()
                .setName("spec.visible")
                .setIndexFunc(simpleAttribute(Moment.class, moment -> {
                    var visible = moment.getSpec().getVisible();
                    return visible == null ? null : visible.toString();
                }))
            );
        });
    }

    @Override
    public void stop() {
        // unregister scheme 即可,不需要手动删除索引
    }
}
```
可以正确在自动生成的 list APIs 使用 fieldSelector 来过滤 `spec.slug` 和排序,可以自己添加其他的 indexSpec 测试
6. 测试唯一索引并添加重复数据,期望无法添加进去

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

#### Does this PR introduce a user-facing change?
```release-note
新增自定义模型索引机制
```
2024-01-19 06:36:09 +00:00
Ryan Wang 3ebb45c266
Refactor menu generation strategy to support sub-menu items. (#5177)
#### What type of PR is this?

/area console
/kind feature
/milestone 2.12.x

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

重构 Console 和 UC 的菜单生成逻辑,支持配置二级菜单项。

<img width="557" alt="图片" src="https://github.com/halo-dev/halo/assets/21301288/0f1717ce-bd30-448b-9625-24bfd5e1c5ae">

配置方式:

```ts
export default definePlugin({
  components: {},
  routes: [
    {
      parentName: "AttachmentsRoot",
      route: {
        name: "S3Link",
        path: "s3-link",
        component: markRaw(HomeView),
        meta: {
          title: "S3 关联",
          searchable: true,
          menu: {
            name: "S3 关联",
            icon: markRaw(IconAddCircle),
            priority: 0,
            mobile: true,
          },
        },
      },
    },
  ],
});
```

只需要指定 parentName 并在其下 route 需要配置 meta.menu 即可。

最终文档会补充在:https://github.com/halo-dev/docs/pull/291

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

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

#### Special notes for your reviewer:

1. 可以按照上述配置方式测试。
2. 可以安装 [plugin-s3-1.5.0-SNAPSHOT.jar.zip](https://github.com/halo-dev/halo/files/13959977/plugin-s3-1.5.0-SNAPSHOT.jar.zip) 进行测试。

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

```release-note
重构 Console 和 UC 的菜单生成逻辑,支持配置二级菜单项。
```
2024-01-19 05:34:10 +00:00
Takagi b42e046d54
pref: add additional attributes and colgroup for tables (#5176)
#### What type of PR is this?

/kind improvmenet
/area editor
/milestone 2.12.x

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

为默认编辑器 table 组件渲染后的结果中增加 `colgroup`,并为 table 增加 `width` 与 `minWidth` 属性。
用于解决渲染完成之后的 table html 宽度与编辑时不一致的问题。

#### How to test it?

拖拽修改默认编辑器表格列宽,查看生成后的 html 列宽是否同样发生了变化,并且查看生成的 html 结构下是否具有 `colgroup` html 元素。

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

Fixes #5138 

#### Does this PR introduce a user-facing change?
```release-note
为默认富文本编辑器 table 组件渲染后的 html 增加 colgroup 元素与 width 属性
```
2024-01-18 08:40:08 +00:00
John Niang 86e688a15d
Disable Swagger cache in development environment (#5200)
#### What type of PR is this?

/kind improvement
/area  core

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

When we are developing a plugin in development environment, APIs in plugin are frequently changed. But they are not reflected in Swagger UI instantly unless we restart Halo entirely.

This PR disables Swagger cache in that case.

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

```release-note
None
```
2024-01-18 02:52:06 +00:00
Ryan Wang 3de60dd938
Merge pull request #4737 from JohnNiang/feat/mfa
Support TOTP two-factor authentication
2024-01-15 17:15:58 +08:00
guqing daf4334029
Merge branch 'main' into feat/mfa 2024-01-15 16:44:12 +08:00
John Niang 7946585bb5 Support TOTP two-factor authentication for backend
Signed-off-by: John Niang <johnniang@foxmail.com>
2024-01-15 15:22:06 +08:00
Ryan Wang 5fab8aca5a Support TOTP two-factor authentication for frontend
Signed-off-by: John Niang <johnniang@foxmail.com>
2024-01-15 15:21:27 +08:00
John Niang 9615528ada
Merge pull request #5163 from LIlGG/feat/table-deletion-shortcut-key
feat: add shortcut for table deletion
2024-01-15 14:42:25 +08:00
John Niang b050e29e76
Merge pull request #5187 from JohnNiang/bug/codecov-upload
Add codecov action into workflow
2024-01-15 11:15:41 +08:00
John Niang c59aed6510 Add codecov action into workflow
Signed-off-by: John Niang <johnniang@foxmail.com>
2024-01-15 00:16:48 +08:00
John Niang 6d49047408
Refactor plugin reconciliation to ensure only one update on plugin (#5148)
Signed-off-by: John Niang <johnniang@foxmail.com>
2024-01-14 22:58:42 +08:00
Ryan Wang 7360a2eaca
fix: revert es i18n file (#5181)
#### What type of PR is this?

/area console
/kind bug
/milestone 2.12.x

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

取消对 es.yaml 的注释,这应该是在 https://github.com/halo-dev/halo/pull/4957 中临时注释之后,合并前没有取消注释。

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

```release-note
None
```
2024-01-13 06:32:06 +00:00
John Niang 68306600db
Merge pull request #5166 from LIlGG/fix/merge-cell-tr-height
fix: resolve the issue of reduced row count after merging cells
2024-01-11 21:36:09 +08:00
John Niang 962cf99cf9
Merge pull request #5169 from ruibaby/refactor/post-setting-modal
refactor: logic of post setting modal
2024-01-11 16:44:48 +08:00
John Niang 70cc4eccca
Merge pull request #5164 from ruibaby/refactor/load-core-modules
refactor: simplify the logic of importing module
2024-01-11 16:44:30 +08:00
John Niang ec5e1673e3
Merge pull request #5173 from ruibaby/chore/bump-tiptap-version
chore: bump tiptap version to 2.1.15
2024-01-11 16:44:18 +08:00
John Niang 0462a4808c
Merge pull request #5168 from ruibaby/refactor/email-verify-modal
refactor: logic of email verify modal
2024-01-11 14:55:11 +08:00
John Niang 5c00d9fe3d
Merge pull request #5165 from ruibaby/refactor/pat-creation-modal
refactor: logic of pat creation modal
2024-01-11 14:54:56 +08:00
Ryan Wang 9ae504ba6b chore: bump tiptap version to 2.1.5
Signed-off-by: Ryan Wang <i@ryanc.cc>
2024-01-10 17:45:20 +08:00
John Niang 5f0ac9f5ca
Merge pull request #5170 from JohnNiang/refactor/workflow
Refactor workflow by not using composite actions from halo-sigs/actions
2024-01-10 15:14:31 +08:00
Ryan Wang 05754534e3
chore: make editor lib external for plugin (#5167)
#### What type of PR is this?

/area console
/kind improvement
/milestone 2.12.x

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

将默认编辑器依赖添加到插件构建库的 external 中,基于 https://github.com/halo-dev/halo/pull/4924

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

```release-note
None
```
2024-01-10 06:42:23 +00:00
Ryan Wang 57e3394fc1 Fix imports
Signed-off-by: Ryan Wang <i@ryanc.cc>
2024-01-10 14:35:17 +08:00
John Niang 883c1fadb6 Refactor workflow by not using composite actions from halo-sigs/actions
Signed-off-by: John Niang <johnniang@foxmail.com>
2024-01-10 14:14:36 +08:00
Ryan Wang bd6a9ac2a2 refactor: logic of post setting modal
Signed-off-by: Ryan Wang <i@ryanc.cc>
2024-01-10 14:03:14 +08:00
Ryan Wang fb7dfe5a60 refactor: logic of email verify modal
Signed-off-by: Ryan Wang <i@ryanc.cc>
2024-01-10 13:51:05 +08:00
Ryan Wang 9f2bed7f86 refactor: logic of pat creation modal
Signed-off-by: Ryan Wang <i@ryanc.cc>
2024-01-10 12:50:26 +08:00
LIlGG 75247dfa43 fix: resolve the issue of reduced row count after merging cells 2024-01-10 12:49:37 +08:00
Ryan Wang 3ec3bd1054 Remove console.log
Signed-off-by: Ryan Wang <i@ryanc.cc>
2024-01-10 12:43:51 +08:00
Ryan Wang 2e0e0beb16 refactor: simplify the logic of importing module
Signed-off-by: Ryan Wang <i@ryanc.cc>
2024-01-10 12:42:05 +08:00
LIlGG a6eda8d611 remove editor import 2024-01-10 11:21:33 +08:00
LIlGG 0a812c497e feat: add shortcut for table deletion 2024-01-10 11:04:59 +08:00
Ryan Wang 0b30c0d98e
feat: add powered by information in page footer (#5153)
#### What type of PR is this?

/area console
/kind improvement
/milestone 2.12.x

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

在 Console 和 UC 的页面底部添加 Powered by 信息。

<img width="1920" alt="图片" src="https://github.com/halo-dev/halo/assets/21301288/3ce1304f-01dc-4e3f-a22a-a1cbd59fced8">

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

```release-note
在 Console 和 UC 的页面底部添加 Powered by 信息。
```
2024-01-08 15:06:41 +00:00
Takagi 694ad26c3f
fix: address styling issues with empty lines in code blocks (#5140)
#### What type of PR is this?

/kind bug

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

修改 code 内`br` 标签的 `display`,用于适配 firefox 浏览器

#### How to test it?

测试在 firefox 浏览器下,使用代码块回车等是否会出现样式问题。

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

Fixes #5064 

#### Does this PR introduce a user-facing change?
```release-note
解决在 Firefox 浏览器下的代码块编辑问题。
```
2024-01-02 10:20:12 +00:00
Ryan Wang 5a51c5d87e
chore: bump formkit version to 1.4.0 (#5137)
#### What type of PR is this?

/area console
/kind improvement
/milestone 2.12.x

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

升级 FormKit 的依赖至 [1.4.0](https://formkit.com/changelog#_140)。

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

```release-note
升级 FormKit 的依赖至 [1.4.0](https://formkit.com/changelog#_140)。
```
2024-01-02 06:26:12 +00:00
AirboZH c918f2c803
fix: Backspace does not work properly behind list (#5102)
<!--  Thanks for sending a pull request!  Here are some tips for you:
1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>。
1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>.
2. 请根据你解决问题的类型为 Pull Request 添加合适的标签。
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request.
3. 请确保你已经添加并运行了适当的测试。
3. Ensure you have added or ran the appropriate tests for your PR.
-->

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

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

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

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

#### What this PR does / why we need it:
增加 `@tiptap/extension-list-keymap` 扩展,优化列表的键盘操作

#### 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 #5065

#### Special notes for your reviewer:
测试方法:
1. 测试无序列表中和无序列表后对于删除键 `Delete` 和退格键 `backspace` 的支持是否符合预期
2. 测试有序列表中和有序列表后对于删除键 `Delete` 和退格键 `backspace` 的支持是否符合预期
![2023-12-22](https://github.com/halo-dev/halo/assets/50261327/ebdc1364-bfd6-4e2f-acf0-444a03f40299)
3. 测试选择部分列表项后对于删除键 `Delete` 和退格键 `backspace` 的支持是否符合预期
4. 测试 `Ctrl-A` 全选后对于删除键 `Delete` 和退格键 `backspace` 的支持是否符合预期
![selectAll](https://github.com/halo-dev/halo/assets/50261327/c9a69c7a-b8d7-4532-8931-16fa2bc0b41a)

#### 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-01-02 03:46:12 +00:00
Ryan Wang 9ef13faada
chore: bump uppy related packages version (#5128)
#### What type of PR is this?

/area console
/kind improvement
/milestone 2.12.x

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

升级 Uppy 相关的依赖。

https://github.com/transloadit/uppy/releases/tag/uppy%403.21.0

#### Special notes for your reviewer:

测试附件上传组件功能是否正常即可。

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

```release-note
升级 Uppy 相关的依赖。

```
2023-12-29 10:43:39 +00:00
Ryan Wang 44cb311fac
refactor: visible condition of modal component (#5078)
#### What type of PR is this?

/area console
/kind improvement
/milestone 2.12.x

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

重构 UI 的 Modal 组件,支持通过 v-if 控制是否显示(渲染)。

example:

```vue
<script lang="ts" setup>
import { ref } from "vue"
const visible = ref(false)
const modal = ref()

function open() {
  visible.value = true
}

function close() {
  modal.value.close()
}
</script>

<template>
  <button @click="open">Open</button>
    <VModal v-if="visible" ref="modal" title="test">
      <button @click="close">Close</button>
    </VModal>
</template>
```

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

Fixes #5077 

#### Special notes for your reviewer:

测试方式:

1. cd console && pnpm --filter "./packages/components" storybook
2. 测试 Modal 组件在文档中是否工作正常。
3. 启动 Console 或者 UC。
4. 观察以前页面上的弹框是否工作正常。

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

```release-note
重构 UI 的 Modal 组件,支持通过 v-if 控制是否显示(渲染)。
```
2023-12-29 07:15:39 +00:00
Ryan Wang 36ebc24aeb
chore: use lodash-es instead of lodash (#5125)
#### What type of PR is this?

/area console
/kind improvement
/milestone 2.12.x

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

优化 Lodash 依赖,使用 lodash-es 代替 lodash 库。

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

Fixes #5124 

#### Special notes for your reviewer:

CI 通过即可。

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

```release-note
None 
```
2023-12-28 09:13:38 +00:00
Ryan Wang 285ac6a77f
fix: cannot upload image when creating a new post in UC editor (#5114)
#### What type of PR is this?

/area console
/kind bug
/milestone 2.12.x

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

修复在个人中心的文章编辑器中创建新文章时无法上传图片的问题

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

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

#### Special notes for your reviewer:

测试在 UC 新建文章,在未保存时是否能上传图片。

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

```release-note
修复个人中心创建新文章时无法上传图片的问题
```
2023-12-27 03:50:09 +00:00
Takagi e7789929ec
fix: fix anchor positioning for identical table of contents names (#5101)
#### What type of PR is this?

/kind bug
/area editor
/milestone 2.12.x

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

重写了对默认编辑器标题的 id 生成逻辑。目前将会在对标题进行任意的修改之后,对所有的标题进行 id 计算,用以解决当标题名称具有重复时,生成了相同的 id.

需要注意的是,由于需要对任意标题进行修改之后才会进行生效,因此已经存在重名标题 id 的问题时,需要修改任意的标题使其生效。

#### How to test it?

在文章内新增多个相同内容的标题,查看是否可以正常跳转。

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

Fixes #5068 

#### Does this PR introduce a user-facing change?
```release-note
解决默认编辑器中具有重名标题时,锚点只会跳转至首个的问题。
```
2023-12-26 10:48:06 +00:00
Takagi a1fe8c3f6b
pref: export necessary extensions externally (#5104)
#### What type of PR is this?

/kind improvement
/area editor
/milestone 2.12.x

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

导出一些必要的默认编辑器扩展及工具类,例如 `Paragraph`

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

Fixes #5103 

#### Does this PR introduce a user-facing change?
```release-note
导出必要的默认编辑器扩展及工具类
```
2023-12-24 14:40:08 +00:00
Ryan Wang cdd5cb44bb
feat: record the user query conditions in the route query parameters (#5071)
#### What type of PR is this?

/area console
/kind feature
/milestone 2.12.x

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

在用户数据管理列表页面路由中记录查询条件,包括分页信息、筛选信息等。可以保证在刷新页面或者切换路由返回时保留之前的查询状态。

<img width="1671" alt="图片" src="https://github.com/halo-dev/halo/assets/21301288/f63240b8-800a-4dc8-be80-1542c43815ee">

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

Fixes #5060 

#### Special notes for your reviewer:

需要测试:

1. 用户管理列表的所有筛选项是否可以正常工作。
2. 尝试设置部分筛选,然后刷新页面,观察筛选条件是否正常保留。

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

```release-note
Console 端的用户管理列表支持在地址栏记录筛选条件。
```
2023-12-21 06:52:12 +00:00
Ryan Wang 240201305a
feat: add disallow tooltip for editor provider selector component (#5070)
#### What type of PR is this?

/area console
/kind improvement
/milestone 2.12.x

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

当编辑器切换组件中有不可用编辑器时,添加提示。

<img width="304" alt="图片" src="https://github.com/halo-dev/halo/assets/21301288/a5da0549-dfd6-4392-9375-16ddf2a57517">

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

Fixes #5059 

#### Special notes for your reviewer:

测试方式:

1. 安装若干不同类型的编辑器,并创建文章。
2. 修改文章时尝试选择不同类型的编辑器,观察是否有提示。

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

```release-note
当编辑器切换组件中有不可用编辑器时,添加提示。
```
2023-12-21 06:50:13 +00:00
Aero 61c4a226b0
feat: add tabbar component horizontal-scroll-indicator (#4979)
#### What type of PR is this?

/area console
/kind improvement

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

在 Tabbar 组件内容可滚动时,添加内容超出时的水平方向滚动指示器;解决由  #4582 指出的体验问题

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

Fixes #4582

#### Special notes for your reviewer:

注意观察各处使用 Tabbar 组件且内容可滚动时的情况(浏览器宽度变化也可生效)

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


```release-note
添加 Tabbar 组件内容超出时的水平方向滚动指示器
```
2023-12-21 06:44:12 +00:00
Ryan Wang b8d5d1f0e4
feat: add a warning about using the h2 database in actuator page (#5072)
#### What type of PR is this?

/area console
/kind feature
/milestone 2.12.x

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

在概览页面添加使用 H2 数据库的警告。

<img width="1138" alt="图片" src="https://github.com/halo-dev/halo/assets/21301288/d2ecee4a-c7f4-4b97-a721-11a697606579">

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

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

#### Special notes for your reviewer:

需要测试使用 H2 数据库运行 Halo,进入概览页面,观察是否有提示。

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

```release-note
在 Console 的概览页面添加使用 H2 数据库的警告。
```
2023-12-20 02:52:09 +00:00