Commit Graph

5201 Commits (release-2.19)

Author SHA1 Message Date
Halo Dev Bot 9ffb1bbc10
[release-2.19] refactor: optimize request headers when generating thumbnails from URI (#6633)
This is an automated cherry-pick of #6628

/assign JohnNiang

```release-note
None
```
2024-09-10 09:40:10 +00:00
Takagi a5ff816af5
[release-2.19] fix: resolve incorrect display of options in formkit selector with async data (#6631)
This is an automated cherry-pick of #6629

/assign LIlGG

```release-note
解决当 formkit select 组件中的 options 延迟设置时无法正常回显的问题。
```
2024-09-10 08:42:10 +00:00
Halo Dev Bot 527a49e3b8
[release-2.19] fix: correct boolean value display issue in formkit selector component (#6630)
This is an automated cherry-pick of #6624

/assign LIlGG

```release-note
修复 FormKit Select 组件中布尔值的显示问题。
```
2024-09-10 08:10:11 +00:00
Halo Dev Bot 7f68de392a
[release-2.19] Prevent null role while getting permissions (#6613)
This is an automated cherry-pick of #6612

/assign JohnNiang

```release-note
修复取消用户角色后无法正常渲染用户列表的问题
```
2024-09-06 14:15:52 +00:00
Takagi dfa10c06a4
[release-2.19] fix: formkit select component not emitting event or updating selection on value change (#6610)
This is an automated cherry-pick of #6602 

/assign LIlGG

```release-note
解决 Formkit Select 组件在值变更时不会发出事件及修改选项值的问题。
```
2024-09-06 10:15:52 +00:00
Halo Dev Bot f538f2f6d3
[release-2.19] fix: skip thumbnail generation for GIF images (#6609)
This is an automated cherry-pick of #6597

/assign guqing

```release-note
修复 GIF 缩略图生成只会保留第一帧的问题
```
2024-09-06 09:39:52 +00:00
Halo Dev Bot 17342aeaad
[release-2.19] fix: resolve issue with disabled property in options not working (#6608)
This is an automated cherry-pick of #6595

/assign LIlGG

```release-note
解决 formkit select 组件的 Option 设置 disabled 无效的问题
```
2024-09-06 09:37:52 +00:00
Halo Dev Bot a0a8c33bee
[release-2.19] pref: add parameter to formkit select component for remote search by specific field (#6606)
This is an automated cherry-pick of #6591

/assign LIlGG

```release-note
为 Formkit Select 组件远程查询增加指定 Key 的字段。
```
2024-09-06 09:35:52 +00:00
Halo Dev Bot a45ebb0825
[release-2.19] fix: resolve error when adding tables in default editor (#6588)
This is an automated cherry-pick of #6587

/assign LIlGG

```release-note
解决在默认编辑器中添加表格报错的问题
```
2024-09-04 14:49:45 +00:00
Halo Dev Bot 30d054a009
[release-2.19] refactor: preserve original image if smaller than requested thumbnail size (#6583)
This is an automated cherry-pick of #6582

/assign ruibaby

```release-note
当生成缩略图时如果原图尺寸小于请求尺寸则返回原图以保持其质量
```
2024-09-04 06:21:43 +00:00
Halo Dev Bot 32f563bd30
[release-2.19] Fix the problem that Lucene lock is held by VM (#6576)
This is an automated cherry-pick of #6570

/assign JohnNiang

```release-note
修复重启后无法搜索部分文档的问题
```
2024-09-03 05:23:40 +00:00
Halo Dev Bot a0af1c2f4b
[release-2.19] fix: formkit selector not listening to data after defaulting to first option (#6574)
This is an automated cherry-pick of #6571

/assign LIlGG

```release-note
解决 formkit 选择器回显数据异常的问题
```
2024-09-02 09:07:37 +00:00
Takagi 142f46b435
fix: solving the issue of the default editor format brush being incorectly filtered (#6566)
#### What type of PR is this?

/kind bug
/area editor
/milestone 2.19.x

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

为默认编辑器格式刷及清除格式扩展增加 name,用于解决其重名而导致被错误过滤的问题

Fixes #6562 

#### How to test it?

查看默认编辑中格式刷及清除格式功能是否存在且运行正常。

#### Does this PR introduce a user-facing change?
```release-note
解决默认编辑器格式刷及清除格式功能不存在的问题
```
2024-09-01 15:07:36 +00:00
Ryan Wang 710777a10a
refactor: change scalingMethod parameter to automatic for thumbnail generation (#6563)
#### What type of PR is this?

/area core
/kind improvement
/milestone 2.19.0

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

将缩略图生成的模式改为自动,速度优先会导致图片失真率较高,部分图片在 w1600 的尺寸下看起来会比较模糊。

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

```release-note
None
```
2024-09-01 14:49:34 +00:00
Ryan Wang f6747327e9
refactor: add warning alert for H2 database on data initialization page (#6564)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.19.0

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

将 H2 数据库使用警告放置在数据初始化页面,之前放在初始化表单页面无法正确判断,因为没有登录,无法调用 /actuator/info 接口获取数据库数据。

<img width="638" alt="image" src="https://github.com/user-attachments/assets/18868104-321a-4146-a893-5babf4573146">

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

#### Special notes for your reviewer:

需要使用此 PR 测试使用 H2 数据库全新安装,观察是否在数据初始化页面有 H2 数据库的使用提示。

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

```release-note
None
```
2024-09-01 14:07:34 +00:00
guqing 9a0ebdad25
refactor: redirect to original image if thumbnail is inaccessible (#6556)
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.19.x

#### What this PR does / why we need it:
获取缩略图时检查缩略图链接是否可访问否则重定向到原图链接

#### Does this PR introduce a user-facing change?
```release-note
获取缩略图时检查缩略图链接是否可访问否则重定向到原图链接
```
2024-08-30 09:45:29 +00:00
guqing ba49dcab35
refactor: optimize key comparator for indicates key sort (#6555)
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.19.x

#### What this PR does / why we need it:
重构 KeyComparator 并通过更多的测试用例来确保排序功能的正确性

同时修复了可能存在溢出导致比较结果不正确的问题,目前:
1. 字符串长度比较:在 compareStrings 方法中,字符串的长度比较使用 Integer.compare,这部分代码不会产生整数溢出问题。
2. 数字部分的比较:在 compareNumbers 方法中,数字的比较是基于字符比较的(即逐位比较每个数字字符),没有涉及到将数3. 字字符串转化为 int 或 long 类型的操作,所以不会存在整数溢出问题。
4. 处理小数部分的比较:在 compareDecimalNumbers 方法中,类似地,比较操作也是基于字符的,不涉及到数值转换,因此也不存在整数溢出问题

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

#### Does this PR introduce a user-facing change?
```release-note
修复由于索引比较时可能出现整数溢出导致文章偶尔无法访问的问题
```
2024-08-30 09:39:28 +00:00
Takagi 856d61537d
fix: resolve error when deleting images in default editor (#6551)
#### What type of PR is this?

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

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

在上传的文件中执行 `resetUpload` 方法之前,提前验证是否可以进行更新。

#### How to test it?

测试删除图片或变更图片位置时,默认编辑器是否会进行报错。

#### Does this PR introduce a user-facing change?
```release-note
解决默认编辑器删除图片后报错的问题
```
2024-08-30 09:25:28 +00:00
Ryan Wang 998f4ccb45
refactor: improve axios instance parameters (#6550)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.19.0

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

优化默认的 axios 实例的参数:

1. baseURL 改为空字符串。
2. 默认优化数组参数。

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

```release-note
None
```
2024-08-30 03:41:27 +00:00
Takagi 9c9ac1b38f
fix: prevent anonymous extensions from being filtered due to duplicate names (#6548)
#### What type of PR is this?

/kind bug
/area editor
/milestone 2.19.x

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

为匿名的 `Extension` 添加 name 值,解决由于匿名的 `Extension` name 相同而导致被过滤的问题。

#### How to test it?

测试默认编辑器附件库是否可以被打开。

#### Does this PR introduce a user-facing change?
```release-note
解决默认编辑器附件库无法被打开的问题
```
2024-08-29 09:07:25 +00:00
Ryan Wang 5bd6d910f2
chore: set up preview release with pkg.pr.new (#6547) 2024-08-29 13:49:22 +08:00
John Niang e476ddac71
Make slug of single page be not unique (#6545)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.19.0

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

For backward compatibility, the slug of single page should not be unique.

BTW, the problem was introduced by <https://github.com/halo-dev/halo/pull/6540>.

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

```release-note
None
```
2024-08-29 04:17:25 +00:00
Takagi 19049c1302
feat: add default selection option to formkit select component (#6538)
#### What type of PR is this?

/kind improvement
/area ui
/milestone 2.19.x

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

为 formkit select 增加属性 `autoSelect`。

这个属性仅会作用于单选,且目的是为了初始化数据所用。当 value 或者 placeholder 存在时,此属性无效。

会查找第一个 option 不为 disabled 的数据。

#### Does this PR introduce a user-facing change?
```release-note
None
```
2024-08-29 04:15:24 +00:00
guqing ad267ebed7
refactor: optimize comment and reply logic to reduce duplicate code (#6542)
#### What type of PR is this?
/kind improvement
/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
```
2024-08-29 04:07:25 +00:00
guqing 0a13981c0d
fix: post list sorting parameter not working (#6544)
#### What type of PR is this?
/kind bug
/area core
/milestone 2.19.x

#### What this PR does / why we need it:
修复 postFinder 的 list 排序参数不生效的问题

此问题由于 https://github.com/halo-dev/halo/pull/6531 导致

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

#### Does this PR introduce a user-facing change?
```release-note
None
```
2024-08-29 03:25:24 +00:00
John Niang 157b7ad281
Fix the problem of LockObtainFailedException while performing a rolling update (#6543)
#### What type of PR is this?

/kind bug
/area core
/milestone 2.19.0

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

This PR refactors LuceneSearchEngine to let IndexWriter and SearcherManager load lazily to prevent LockObtainFailedException from performing a rolling update.

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

Fixes #6541 

#### Special notes for your reviewer:

1. Use MySQL or PostgreSQL as database for Halo
2. Start an instance of Halo
3. Try to initialize Halo and search posts
4. Change the `server.port` and start another instance of Halo
5. Check the status of another instance

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

```release-note
修复滚动更新时无法启动新的 Halo 实例的问题
```
2024-08-29 03:05:24 +00:00
John Niang f61f846a7f
Cleanup code with SortableRequest (#6540)
#### What type of PR is this?

/kind cleanup
/kind improvement
/area core
/milestone 2.19.0

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

This PR refactors some requests with sort parameter by reusing SortableRequest, and refactors some queries with indexer.

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

```release-note
None
```
2024-08-29 02:39:24 +00:00
Ryan Wang 15a3e78e61
refactor: simplify post settings form fields (#6539)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.19.0

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

简化文章设置表单的部分表单项。

<img width="760" alt="image" src="https://github.com/user-attachments/assets/337a728e-8cc6-4c9e-aa85-dc4c64b72de5">


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

```release-note
简化文章设置表单的部分表单项。
```
2024-08-29 02:31:24 +00:00
Takagi 9fbf66d496
fix: resolve incorrect parameters in fomkit select remote request (#6536)
#### 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
```
2024-08-28 04:35:22 +00:00
Takagi 281567877a
pref: implement business selector using new selector component (#6525)
#### 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 组件来实现业务选择器。
```
2024-08-27 12:39:21 +00:00
guqing a5c6d6672f
chore: rename thumbnail parameter from width to size for clarity (#6533)
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.19.x

#### What this PR does / why we need it:
重命名缩略图大小的参数名以便和主题端 finder 用法保持一致
同时确保通过 encode 或者没有 encode 的 uri 都可以获取到缩略图

#### Does this PR introduce a user-facing change?
```release-note
None
```
2024-08-27 10:19:19 +00:00
guqing ac0700e668
feat: add unified parameter list method for post finder (#6531)
#### What type of PR is this?
/kind feature
/milestone 2.19.x
/area core

#### What this PR does / why we need it:
为 postFinder 添加一个统一参数的 list 方法并支持传递排序参数

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

#### Does this PR introduce a user-facing change?
```release-note
为 postFinder 添加一个统一参数的 list 方法并支持传递排序参数
```
2024-08-27 10:17:18 +00:00
Ryan Wang 25893c0386
refactor: optimize user filter component to support remote search (#6529)
#### 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
重构用户筛选组件,支持远程搜索。

```
2024-08-27 09:53:19 +00:00
John Niang 97257f9577
Fix the problem that return empty result while listing users (#6532)
#### What type of PR is this?

/kind bug
/area core
/milestone 2.19.0

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

This PR makes the return value of method `DefaultRoleService#getRolesByUsernames` never be `Mono#empty`.

See https://github.com/halo-dev/halo/issues/6528 for more.

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

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

#### Special notes for your reviewer:

1. Try to execute command `http -a admin:admin http://127.0.0.1:8090/apis/api.console.halo.run/v1alpha1/users?keyword=xyz`.
2. See the output

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

```release-note
修复获取用户列表时可能返回空结果的问题
```
2024-08-27 09:23:18 +00:00
John Niang b6222f48a4
Fix the incorrect list options builder while listing aggregated roles (#6530)
#### What type of PR is this?

/kind bug
/area core
/milestone 2.19.0

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

This PR corrects list options builder for listing aggregated roles, because I wrongly used the label selector in <https://github.com/halo-dev/halo/pull/6471>.

#### Special notes for your reviewer:

1. Try to install the plugin <https://www.halo.run/store/apps/app-YXyaD>
2. Enable the plugin and enable setting `匿名评论需要验证码`
3. **Anonymous** request any of posts with comment enabled
4. Check the captcha in comment area

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

```release-note
修复可能无法正常访问插件提供的接口的问题
```
2024-08-27 07:09:18 +00:00
Ryan Wang ab6c20a204
fix: wrong condition in h2 warning alert (#6526)
#### 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
```
2024-08-26 15:55:15 +00:00
guqing ef37aa794b
feat: implement new mechanisms for generating and managing attachment thumbnails (#6454)
#### What type of PR is this?
/kind feature
/area core
/milestone 2.19.x

#### What this PR does / why we need it:
实现了图片类型的附件缩略图生成和管理的新机制

实现依据 RFC:https://github.com/halo-dev/rfcs/pull/24

使用缩略图前需要配置 externalUrl 才能生成

**How to test it?**
1. 测试本地缩略图的文件是否正确,每个图片对应到相应 size 的目录如 thumbnails/w400 应该是一对一
2. 每个图片生成缩略图的只会在 `http://localhost:8090/apis/storage.halo.run/v1alpha1/thumbnails` 中存在一份记录
3. 测试删除附件会删除对应的缩略图文件和 [thumbnails](http://localhost:8090/apis/storage.halo.run/v1alpha1/thumbnails) 
记录
4. 修改 externalUrl 以上功能均不会受到影响

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

#### Does this PR introduce a user-facing change?
```release-note
附件图片支持生成多尺寸图片,文章支持响应式图片。
```
2024-08-26 10:27:14 +00:00
guqing 8405a6376e
refactor: add post-index build validation to ensure data count matches index (#6507)
#### What type of PR is this?
/kind improvement
/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
```
2024-08-26 09:05:14 +00:00
Takagi 3be91fcb6f
refactor: enhance formkit select component to support additional features (#6473)
#### What type of PR is this?

/kind feature
/area ui
/milestone 2.19.x

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

此 PR 使用自定义的 Select 组件替换了原有的 Formkit Select 组件,原 Select 组件类型变为 `nativeSelect`。

新的 Select 组件具有如下功能:
- 增加多选、单选两种模式。
- 支持对内容进行搜索、过滤。
- 可使用接口远程加载,并可自定义数据获取。
- 支持扩展远程加载方式。
- 可创建新选项。
- 支持清空所有已选择项。
- 多选状态下可控制最大选择数量。
- 多选状态下可进行排序。

重构后的 Select 组件将自动兼容旧版组件。

使用方式如下:

```vue
<FormKit
  type="select"
  label="What country makes the best food?"
  name="countries"
  placeholder="Select a country"
  allow-create
  clearable
  sortable
  multiple
  searchable
  :max-count="3"
  :options="[
    { label: 'France', value: 'fr'},
    { label: 'Germany', value: 'de'},
    { label: 'Spain', value: 'es'},
    { label: 'Italy', value: 'ie' },
    { label: 'Greece', value: 'gr'},
  ]"
  help="Don’t worry, you can’t get this one wrong."
/>
```

#### How to test it?

1. 需要测试已使用的 Select 组件功能是否发生了变化。

测试在多选、单选状态下,Select 组件的功能是否可以正常使用。

测试在远程加载时,数据获取是否正常,是否可正常分页,加载状态是否显示。

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

see https://github.com/halo-dev/halo/issues/4931#issuecomment-2060637101
see #6369 

#### Does this PR introduce a user-facing change?
```release-note
重构 FormKit 选择器组件以支持更多功能
```
2024-08-26 09:03:14 +00:00
Ryan Wang 3db80bfaf3
chore: bump preset plugins version (#6517)
#### What type of PR is this?

/kind improvement
/area core
/milestone 2.19.0

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

升级预设插件的版本。

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

```release-note
None
```
2024-08-26 08:21:13 +00:00
Ryan Wang d77c258951
chore: update default theme version to 1.9.0 (#6516)
#### What type of PR is this?

/area core
/kind feature
/milestone 2.19.x

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

升级默认主题的版本为 [1.9.0](https://github.com/halo-dev/theme-earth/releases/tag/v1.9.0)。

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

```release-note
None
```
2024-08-26 08:11:13 +00:00
Ryan Wang 72e7b19697
chore: update Halo official website URL (#6514)
Co-authored-by: John Niang <johnniang@foxmail.com>
2024-08-26 15:53:04 +08:00
John Niang d68dca931b
Fix "Missing exception attribute in ServerWebExchange" error after upgrading Spring Boot 3.3.3 (#6515)
#### What type of PR is this?

/kind bug
/area core
/milestone 2.19.0

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

After merging https://github.com/halo-dev/halo/pull/6512 and https://github.com/halo-dev/halo/pull/6511, unit tests fail due to the changes of <05b73ceeec>.

This PR fixes the problem by letting `run.halo.app.infra.exception.handlers.ProblemDetailErrorAttributes` extend  `org.springframework.boot.web.reactive.error.DefaultErrorAttributes`.

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

```release-note
None
```
2024-08-26 07:49:13 +00:00
Takagi e5bbbb3b7b
feat: API to save external links as attachments (#6364)
#### 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
增加通过链接转存第三方资源至附件库的接口
```
2024-08-26 06:31:14 +00:00
Takagi 21db06a507
refactor: editor code block to be extensible by plugins (#6428)
#### 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
重构默认编辑器代码块使其能够被插件扩展。
```
2024-08-26 02:55:13 +00:00
John Niang fe842e8d77
Upgrade Spring Boot to 3.3.3 (#6512)
#### What type of PR is this?

/kind improvement
/area core
/milestone 2.19.0

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

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

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

```release-note
升级 Spring Boot 至 3.3.3
```
2024-08-26 02:51:13 +00:00
John Niang 50adc29e42
Respond not found if no theme template found (#6511)
#### What type of PR is this?

/kind improvement
/area core
/milestone 2.19.0

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

This PR refactors "Template Not Found Exception" into "NotFoundException" to prevent too many exception stacktraces in logs file.

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

Fixes #6501 

#### Special notes for your reviewer:

1. Activate default theme
2. Request <http://localhost:8090/categories>
3. See the result

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

```release-note
优化当主题模板找不到的异常提示
```
2024-08-26 02:47:12 +00:00
Ryan Wang 3767a5a239
feat: add H2 database usage warning to setup page (#6502)
#### 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 数据库的警告。
```
2024-08-26 02:29:12 +00:00
Ryan Wang 2b84b41987
feat: support changing attachment display name (#6504)
#### What type of PR is this?

/area ui
/kind feature
/milestone 2.19.x

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

支持修改附件的显示名称。

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

<img width="669" alt="image" src="https://github.com/user-attachments/assets/03571048-dfed-4714-ae86-f527ea6f0b08">

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

```release-note
支持修改附件的显示名称。
```
2024-08-25 15:11:11 +00:00
Ryan Wang c92bbd754a
feat: add filter options for attachment selector component (#6505)
#### What type of PR is this?

/area ui
/kind feature
/milestone 2.19.0

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

为附件选择组件添加更多筛选项支持。


<img width="1277" alt="image" src="https://github.com/user-attachments/assets/6c61a8cf-ae5d-4496-9a87-9403c5d4fc28">

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

Fixes https://github.com/halo-dev/halo/issues/4605
Fixes https://github.com/halo-dev/halo/issues/6352

#### Special notes for your reviewer:

需要测试附件选择组件的各项功能是否符合预期。

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

```release-note
为附件选择组件添加更多筛选项支持。
```
2024-08-25 15:05:11 +00:00