Commit Graph

4967 Commits (release-2.16)

Author SHA1 Message Date
Halo Dev Bot 6e1f0f31a5
[release-2.16] Fix the problem that bundle files are not changed in development mode (#6077)
This is an automated cherry-pick of #6073

/assign guqing

```release-note
None
```
2024-06-13 10:00:36 +00:00
Halo Dev Bot 7b2c8e45ff
[release-2.16] Fix the problem that theme assets could not be found after the first initialization (#6050)
This is an automated cherry-pick of #6049

/assign JohnNiang

```release-note
修复首次初始化后无法正常访问主题资源的问题
```
2024-06-07 03:46:23 +00:00
Halo Dev Bot 0bd8611144
[release-2.16] Fix concurrent issue during bundle file concurrent generation testing (#6045)
This is an automated cherry-pick of #6043

/assign JohnNiang

```release-note
None
```
2024-06-06 06:28:14 +00:00
Halo Dev Bot 3836b22090
[release-2.16] fix: missing default values for system settings (#6036)
This is an automated cherry-pick of #6035

/assign JohnNiang

```release-note
修复系统设置未保存导致无法正常注册的问题
```
2024-06-05 02:49:23 +00:00
John Niang ba96118b4e
Fix the problem that bundle files can be generated arbitrarily (#6028)
#### What type of PR is this?

/kind bug
/area  core
/area plugin
/milestone 2.16.0

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

Before the PR, any user can generate bundle files by providing random query param `v` while requesting bundle files.

This PR refactors the whole bundle file generation method.

1. Do nothing if users provide arbitrary bundle file version
2. Better lock for writing bundle files if not exist

#### Special notes for your reviewer:

1. Request `http://localhost:8090/apis/api.console.halo.run/v1alpha1/plugins/-/bundle.js?v=xyz` 
2. Check if the file `xyz.js` in folder `$TMPDIR/halo-plugin-bundle**`

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

```release-note
None
```
2024-06-03 02:42:13 +00:00
Ryan Wang a26b73e258
chore: remove unnecessary env (#6022)
#### What type of PR is this?

/area ui
/kind cleanup
/milestone 2.16.x

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

移除 UI 项目中不必要的环境变量配置。

1. VITE_API_URL:当前 Console 不会考虑独立部署,并且在开发环境是后端 Proxy 的 Console 请求,所以此变量没有任何意义。
2. VITE_BASE_URL:无意义,当前不考虑修改。

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

```release-note
None
```
2024-05-30 08:31:16 +00:00
Ryan Wang 296d8c5833
fix: dropdown component auto-destruction issue (#6021)
#### What type of PR is this?

/area ui
/kind bug
/milestone 2.16.x

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

修复 Dropdown 组件自动销毁的问题,这可能导致部分插件在 Dropdown 中的组件无法正常渲染。

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

```release-note
None 
```
2024-05-30 08:29:15 +00:00
guqing 9f6a441288
refactor: use index mechanism to query extension point definitions (#6011)
#### What type of PR is this?
/kind improvement
/area core
/kind milestone 2.16.x

#### What this PR does / why we need it:
使用索引机制来查询扩展点定义

#### Does this PR introduce a user-facing change?
```release-note
None
```
2024-05-30 07:49:15 +00:00
John Niang e881ee9a89
Refactor cache control for static resources (#6015)
#### What type of PR is this?

/kind improvement
/area core

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

This PR unifies cache control for static resources.

Example configuration of cache control:

```yaml
spring:
  web:
    resources:
      cache:
        cachecontrol:
          no-cache: true
          no-store: true
        use-last-modified: false
```

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

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

#### Special notes for your reviewer:

1. Run with `default` and `dev` profiles respectively.
2. See the difference of the `Cache-Control` header in HTTP response

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

```release-note
优化 HTTP 缓存控制
```
2024-05-30 07:05:15 +00:00
Ryan Wang 4c6abdcaa1
feat: enable asynchronous resolving for UI extension points (#6018)
#### What type of PR is this?

/area ui
/kind feature
/milestone 2.16.x

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

优化 UI 部分的扩展点获取实现,让部分扩展点支持异步获取,之前的实现与文档不符。

比如:

```ts
import { definePlugin } from "@halo-dev/console-shared";
import axios from "axios";

export default definePlugin({
  components: {},
  routes: [],
  extensionPoints: {
    "attachment:selector:create": async () => {
      const { data } = await axios.get(
        "/apis/v1alpha1/fake.halo.run/attachments/selectors"
      );

      return data;
    },
  },
});
```

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

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

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

```release-note
优化 UI 部分的扩展点获取实现,让部分扩展点支持异步获取。
```
2024-05-30 07:01:15 +00:00
Ryan Wang bf75a36df7
chore: revert @uppy/xhr-upload version to 3.6.0 (#6019)
#### What type of PR is this?

/area ui
/kind bug
/milestone 2.16.x

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

回退 `@uppy/xhr-upload` 的版本至 3.6.0,因为最新版本的 `@uppy/xhr-upload` 添加了重试机制和修改了错误异常的结构,并且当前重试参数并没有体现在文档和 API 中,所以暂时先回退至 3.6.0 以解决 https://github.com/halo-dev/halo/issues/6014

31cc47f3fb/packages/%40uppy/utils/src/fetcher.ts (L26)

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

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

#### Special notes for your reviewer:

需要测试:

1. 附件上传功能
2. 上传已安装的插件或者主题,观察是否有提示升级。

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

```release-note
None
```
2024-05-30 06:55:15 +00:00
guqing 6d3ba969ab
refactor: refine i18n prompts for themes (#6020)
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.16.x

#### What this PR does / why we need it:
优化主题安装时的中文提示

<img width="493" alt="image" src="https://github.com/halo-dev/halo/assets/38999863/cd5250ea-8438-4867-89bc-0ab7bc8485e4">

#### Does this PR introduce a user-facing change?
```release-note
None
```
2024-05-30 05:31:14 +00:00
Ryan Wang f87e78904c
feat: add version for themes and plugins when copying overview information (#6012)
#### What type of PR is this?

/area ui
/kind feature
/milestone 2.16.x

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

在概览页面复制信息时,为主题和插件添加版本号。

示例:

```
- 外部访问地址: 
- 启动时间: 2024-05-29 15:51
- 版本: 2.16.0-SNAPSHOT
- 构建时间: 2024-05-29 15:51
- Git Commit: 6204472
- Java: OpenJDK Runtime Environment / 17.0.11+0
- 数据库: PostgreSQL / 15.2 (Debian 15.2-1.pgdg110+1)
- 操作系统: Mac OS X / 14.5
- 已激活主题: [Earth 1.8.0](https://github.com/halo-dev/theme-earth.git)
- 已启动插件:
  - [静态网页服务 1.0.0-alpha.2](https://github.com/ruibaby/plugin-static-pages)
  - [评论组件 2.10.0-SNAPSHOT](https://github.com/halo-dev/plugin-comment-widget)
  - [OAuth2 认证 1.1.1](https://github.com/halo-sigs/plugin-oauth2)
  - [增强备份(Backup IMproved) 1.0.0-SNAPSHOT](https://www.halo.run/store/apps/app-dHakX)
  - [图库管理 1.3.0](https://github.com/halo-sigs/plugin-photos)
  - [Markdown / HTML 内容块 1.2.0](https://github.com/halo-dev/plugin-hybrid-edit-block)
  - AI 助手 1.0.0-alpha.2
  - [对象存储(Amazon S3 协议) 1.9.1](https://github.com/halo-dev/plugin-s3)
  - [链接管理 1.3.3](https://github.com/halo-sigs/plugin-links)
  - [Docsme 1.0.0-alpha.5](https://github.com/f2ccloud/plugin-docsme)
  - [ByteMD 1.4.0](https://github.com/ruibaby/plugin-bytemd)
  - [StackEdit 1.1.1](https://github.com/halo-sigs/plugin-stackedit)
  - [应用市场 1.3.0](https://www.halo.run/store/apps/app-VYJbF)
```

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

```release-note
在概览页面复制信息时,为主题和插件添加版本号。
```
2024-05-29 08:53:11 +00:00
John Niang 08ff7e6e00
Fix the problem where extension point might not be obtained when the plugin was started (#6006)
#### What type of PR is this?

/kind bug
/area plugin
/area core

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

This PR refactors SpringComponentsFinder to prevent unexpected cleanup, which might lead to not be able to obtain plugin extension when the plugin was started.

The real reason is that entries is initialized by AttachmentReconciler during initialization of some plugins.

Please note the problem cannot be reproduced stably.

Refs:

- e3125f2998/pf4j/src/main/java/org/pf4j/AbstractExtensionFinder.java (L229-L249)
- e3125f2998/pf4j/src/main/java/org/pf4j/AbstractExtensionFinder.java (L312-L316)

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

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

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

```release-note
修复插件启动成功但仍然可能无法获取扩展点导致页面无法访问的问题
```
2024-05-29 06:35:10 +00:00
John Niang 608f2bbca3
Fix the problem the PAT could not be created or restored while logging in with remember-me (#6007)
#### What type of PR is this?

/kind bug
/area core
/milestone 2.16.0

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

PAT could not be created or restored while logging in with remember-me due to lack of RememberMeAuthenticationToken check.

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

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

#### Special notes for your reviewer:

1. Log in with remember-me
2. Create a PAT or restore a PAT
3. See the result

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

```release-note
None
```
2024-05-29 03:13:10 +00:00
John Niang dad6610cce
Add support for serializing or deserializing HaloUser and 2FA (#6005)
#### What type of PR is this?

/kind improvement
/area core
/milestone 2.16.x

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

This PR adds support for serializing HaloUser and 2FA.

1. Refactor delegate of HaloUser using `org.springframework.security.core.userdetails.User`.
2. Add `HaloSecurityJackson2Module` to enable serialization/deserialization of Halo security module.

Below is code snippet of integration:

```java
        this.objectMapper = Jackson2ObjectMapperBuilder.json()
            .modules(SecurityJackson2Modules.getModules(this.getClass().getClassLoader()))
            .modules(modules -> modules.add(new HaloSecurityJackson2Module()))
            .indentOutput(true)
            .build();
```

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

```release-note
None
```
2024-05-28 09:13:06 +00:00
Ryan Wang afabffc546
refactor: typing component template refs for VModal (#5994)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.16.x

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

为 VModal 组件的引用添加类型。

See https://vuejs.org/guide/typescript/composition-api.html#typing-component-template-refs

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

```release-note
None
```
2024-05-27 08:56:57 +00:00
Ryan Wang 22ce60b0e9
chore: bump uppy version (#5997)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.16.x

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

更新上传库 Uppy 的包依赖。

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

```release-note
更新上传库 Uppy 的包依赖。
```
2024-05-27 08:34:56 +00:00
Ryan Wang 94826d44c0
refactor: improve ui/ux of attachment group and policy selector (#5996)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.16.x

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

优化附件分组、存储策略选择组件的 UI。

<img width="1649" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/194d6334-e600-4235-85f7-affb1d44c003">
<img width="953" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/d8cb2470-2500-4b2c-a251-5fdf45a9cccb">

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

```release-note
优化附件分组、存储策略选择组件的 UI。
```
2024-05-27 08:30:57 +00:00
Ryan Wang 19fb1c2311
feat: record the plugin query conditions in the route query parameters (#5995)
#### What type of PR is this?

/area ui
/kind feature
/milestone 2.16.x

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

在插件数据管理列表页面路由中记录查询条件,可以保证在刷新页面或者切换路由返回时保留之前的查询状态。

<img width="1663" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/2638dfc9-793b-48c6-81dd-f460a6c9214d">

#### Special notes for your reviewer:

需要测试:

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

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

```release-note
Console 端的插件管理列表支持在地址栏记录筛选条件。
```
2024-05-27 08:28:57 +00:00
Ryan Wang 54e088741e
refactor: logic of publishing post (#5987)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.16.x

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

重构文章的发布逻辑,以下是主要改动:

1. 如果文章未发布,点击文章设置的发布按钮时,会先保存文章。
2. 在文章列表的操作菜单中添加发布 / 取消发布的选项。
3. 重构文章设置中,发布 / 取消发布按钮的显示条件。
4. 优化文章设置对话框的显示条件,减少不必要的渲染开销和请求。

#### Special notes for your reviewer:

需要测试:

1. 文章正常新建和发布的逻辑。
2. 文章设置未来时间的发布逻辑。
3. 取消定时发布和已发布文章的逻辑。

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

```release-note
优化 Console 文章管理中的文章发布逻辑。
```
2024-05-27 08:26:58 +00:00
Ryan Wang 6124ab9831
feat: add retry feature for update last read time of comment (#5985)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.16.x

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

为更新评论的最后读取时间添加重试机制。Ref https://github.com/halo-dev/halo/pull/5903#issuecomment-2106855779

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

```release-note
None 
```
2024-05-27 08:24:59 +00:00
Ryan Wang d675c4a8b1
fix: update initial values when form data changes (#5993)
#### What type of PR is this?

/area ui
/kind bug
/milestone 2.16.x

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

修复部分表单数据更新时,引用的初始值对象被跟着更新的问题。

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

```release-note
None
```
2024-05-27 08:22:57 +00:00
John Niang 5df51bb715
Refactor plugin reconciliation for dependency mechanism (#5900)
#### What type of PR is this?

/kind improvement
/area core
/area plugin

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

This PR wholly refactors plugin reconciliation to implement dependency mechanism.

Currently,
- If we disable plugin which has dependents, the plugin must wait for dependents to be disabled.
- If we enable plugin which has dependencies , the plugin must wait for dependencies to be enabled.
- If we upgrade plugin which has dependents, the plugin must request dependents to be unloaded. After the plugin is unloaded, the plugin must cancel unload request for dependents.

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

Fixes #5872 

#### Special notes for your reviewer:

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

```release-note
优化被依赖的插件的升级,启用和禁用
```
2024-05-27 08:16:56 +00:00
Ryan Wang 769b19c23c
refactor: improve code base of role-related (#5984)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.16.x

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

优化和角色相关的对话框显示逻辑,减少不必要的渲染开销和请求。

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

```release-note
优化和角色相关的对话框显示逻辑,减少不必要的渲染开销和请求。
```
2024-05-24 07:18:51 +00:00
guqing cb2138580c
chore: provide post content retrieval bean for plugins (#5981)
#### What type of PR is this?
/kind improvement
/area core
/area plugin
/milestone 2.16.x

#### What this PR does / why we need it:
为插件提供文章内容获取的 bean 以简化文章内容获取

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

#### Does this PR introduce a user-facing change?
```release-note
为插件提供文章内容获取的 Bean
```
2024-05-24 06:46:51 +00:00
guqing 9ec608be3b
feat: add remember-me mechanism to enhance user login experience (#5929)
#### What type of PR is this?
/kind feature
/area core
/milestone 2.16.x

#### What this PR does / why we need it:
为登录增加记住我机制以优化登录体验

how to test it?
1. 勾选记住密码选项后登录
2. 退出浏览器后打开 console 期望依然可以访问而不需要登录
3. 测试修改密码功能,期望修改密码后所有会话需要重新登录包括当前设备和其他设备

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

#### Does this PR introduce a user-facing change?
```release-note
为登录增加记住我机制以优化登录体验
```
2024-05-24 06:20:50 +00:00
Ryan Wang 69c3a63618
fix: color style issue of code block in post content snapshot page (#5982)
#### What type of PR is this?

/area ui
/kind bug
/milestone 2.16.x

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

修复在文章版本历史内容预览中代码块颜色显示异常的问题。

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

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

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

```release-note
修复在文章版本历史内容预览中代码块颜色显示异常的问题。
```
2024-05-24 05:02:50 +00:00
guqing c1e8bdb568
feat: add scheduled post publishing feature (#5940)
#### What type of PR is this?
/kind feature
/area core
/milestone 2.16.x

#### What this PR does / why we need it:
新增文章定时发布功能

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

#### Does this PR introduce a user-facing change?
```release-note
新增文章定时发布功能
```
2024-05-24 04:58:51 +00:00
John Niang de85156067
Refactor CryptoService for simplifying RSA key generation (#5978)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.16.x

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

This PR removes PatJwkSupplier interface, scheduled RSA key generation, and move some of them into CryptoService.

Currently, we only use `pat_id_rsa` as private key for authentication modules instead of `id_rsa`(deprecated).

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

```release-note
None
```
2024-05-24 04:32:50 +00:00
Ryan Wang f3c3c91ca4
refactor: improve method name of api client (#5980)
#### What type of PR is this?

/area ui
/kind cleanup
/milestone 2.16.x

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

规范 api client 的方法名,之前生成的 api client 的方法名没有完全遵循驼峰命名。

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

Close https://github.com/halo-dev/halo/issues/5716

#### Special notes for your reviewer:

CI 通过即可。

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

```release-note
None
```
2024-05-24 04:04:50 +00:00
John Niang 49bb9c10aa
Upgrade SpringBoot to 3.3.0 (#5979)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.16.x

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

This PR upgrades dependency Spring Boot to [3.3.0](https://github.com/spring-projects/spring-boot/releases/tag/v3.3.0).

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

```release-note
升级 Spring Boot 至 3.3.0
```
2024-05-24 02:52:50 +00:00
Ryan Wang 34981f95ba
refactor: improve visible condition of global search component (#5976)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.16.x

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

优化 Console 的全局搜索对话框显示逻辑,改为未开启时不渲染组件。

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

```release-note
None
```
2024-05-23 06:34:50 +00:00
Ryan Wang 4d289c0a45
refactor: improve code base of user-related (#5975)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.16.x

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

优化和用户管理相关的所有对话框显示逻辑,减少不必要的渲染开销和请求。

#### Special notes for your reviewer:

改动范围如下:

1. 用户密码修改
2. 用户资料修改
3. 用户创建
4. 重新登录

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

```release-note
优化和用户管理相关的所有对话框显示逻辑,减少不必要的渲染开销和请求。
```
2024-05-23 06:32:49 +00:00
Ryan Wang c51f2f4d4f
refactor: logic of singlePage setting modal (#5968)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.16.x

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

优化页面设置弹窗的显示逻辑,改为在未打开弹窗组件的时候不渲染组件,减少不必要的请求。

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

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

```release-note
优化页面设置弹窗的显示逻辑,减少不必要的请求。
```
2024-05-23 03:02:49 +00:00
Ryan Wang 5a3c9f0601
refactor: logic of theme management modal (#5966)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.16.x

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

优化主题管理弹窗的显示逻辑,改为在未打开弹窗组件的时候不渲染组件,减少不必要的请求。

before:

<img width="1656" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/96cfe2f0-4fef-4140-a014-1a96efb0e2c0">

after:

<img width="1660" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/9624561f-ae94-43c9-8e05-32134ebb4091">

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

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

```release-note
优化主题管理弹窗的显示逻辑,减少不必要的请求。
```
2024-05-23 03:00:49 +00:00
Ryan Wang a8fb28a105
refactor: layout of reset password page (#5960)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.16.x

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

让 UC 端的重置密码页面使用和登录相关页面一样的 GatewayLayout 布局组件。

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

```release-note
None
```
2024-05-23 02:58:50 +00:00
Ryan Wang 99eae2f31b
refactor: simplify the code of reply creation modal (#5972)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.16.x

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

简化评论回复组件的代码。

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

```release-note
None 
```
2024-05-23 02:56:50 +00:00
Ryan Wang 89b20bf5a3
refactor: improve code base of attachment-related (#5967)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.16.x

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

优化附件管理的相关代码。

1. 优化附件管理相关的对话框组件,减少重复和不必要的请求。
2. 简化附件存储策略编辑组件的逻辑。

#### Special notes for your reviewer:

需要测试:

1. 附件上传的相关功能。
2. 附件存储策略的编辑和新建。
3. 附件筛选条件功能。

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

```release-note
优化附件管理相关代码,减少重复和不必要的请求。
```
2024-05-23 02:54:49 +00:00
Ryan Wang ce5757ae10
chore: bump up vue-related version (#5965)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.16.x

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

升级 Vue 生态的相关依赖,以及修复编译 packages 时的异常日志问题。

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

```release-note
升级 Vue 生态的相关依赖至最新版本。
```
2024-05-22 12:42:47 +00:00
Ryan Wang ea98ae5add
refactor: improve code base of post tag-related (#5959)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.16.x

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

优化文章标签的表单组件代码。

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

```release-note
None
```
2024-05-22 09:34:46 +00:00
John Niang bbc5c979b7
Unify security configurations into one (#5961)
#### What type of PR is this?

/kind improvement
/area core
/milestone 2.16.x

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

This PR unifies api and portal security configurations into one for a better maintenance.

Meanwhile, removing `HaloAnonymousAuthenticationWebFilter` introduced by <https://github.com/halo-dev/halo/pull/3152> may fix <https://github.com/halo-dev/halo/issues/4047>.

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

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

#### Special notes for your reviewer:

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

```release-note
修复登录成功后立即出现登录失效的问题
```
2024-05-22 03:00:46 +00:00
Ryan Wang 9bfe3a66d5
refactor: improve code base of post category-related (#5958)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.16.x

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

优化文章分类管理相关的 UI 代码。

1. 使用 vue-draggable-plus 库代替 vuedraggable 库实现拖拽排序。vue-draggable-plus 是在 https://github.com/halo-dev/halo/pull/5914 中引入,替换的原因是 vuedraggable 库已经不再积极维护。
2. 改进分类编辑表单的逻辑,清理无用代码。

#### Special notes for your reviewer:

需要测试:

1. 测试文章分类拖拽排序功能是否表现正常。
2. 测试新增/编辑文章分类功能是否表现正常。

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

```release-note
None
```
2024-05-22 02:52:46 +00:00
Takagi d29da319e7
fix: deleting selected text in a list with the backspace key causes the list to revert (#5938)
#### What type of PR is this?

/kind bug
/area editor
/milestone 2.16.x

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

移除使用 `Backspace` 进行缩进的功能。此功能会导致选中无序列表文本至起始位置时,按 `Backspace` 快捷键会导致无序列表解除当前层级。

#### How to test it?

测试从后往前选中无序列表文本至文本起始位置,然后按下 `Backspace` 快捷键。此时应当只删除文本而不会调整无序列表层级。

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

Fixes #5925 

#### Does this PR introduce a user-facing change?
```release-note
修复默认编辑器中列表使用 Backspace 快捷键删除选中文本的错误行为
```
2024-05-22 02:12:45 +00:00
Takagi b762a9dac7
pref: optimize code block backspace shortcut key logic (#5936)
#### What type of PR is this?

/kind improvement
/area editor
/milestone 2.16.x

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

优化默认编辑器代码块 `Backspace` 快捷键逻辑。如下所示:

1. 选中内容时进行删除,保证光标仍处于代码块内。
2. 光标处于代码块首位或者代码块没有内容时,不再删除代码块。

#### How to test it?

测试默认编辑器代码块功能。查看是否符合上述逻辑

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

Fixes #5927 

#### Does this PR introduce a user-facing change?
```release-note
优化默认编辑器代码块 Backspace 快捷键逻辑
```
2024-05-21 09:46:45 +00:00
Ryan Wang d29a377bbd
refactor: improve code base of menu-related (#5957)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.16.x

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

优化菜单管理相关的 UI 代码。

1. 使用 vue-draggable-plus 库代替 vuedraggable 库实现拖拽排序。vue-draggable-plus 是在 https://github.com/halo-dev/halo/pull/5914 中引入,替换的原因是 vuedraggable 库已经不再积极维护。
2. 改进菜单和菜单项编辑表单的逻辑,清理无用代码。

#### Special notes for your reviewer:

需要测试:

1. 测试菜单项拖拽排序功能是否表现正常。
2. 测试新增菜单、菜单项和修改菜单、菜单项功能是否表现正常。

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

```release-note
None
```
2024-05-21 07:10:44 +00:00
John Niang 2feaa20d05
Ignore includeSubdomains for hsts header (#5956)
#### What type of PR is this?

/kind improvement
/area core
/milestone 2.16.x

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

This PR ignores `includeSubdomains` for HSTS header. See https://github.com/halo-dev/halo/issues/4943 for more.

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

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

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

```release-note
修复开启 HSTS 可能会导致未开启 HSTS 的子域名站点无法访问的问题
```
2024-05-21 04:22:44 +00:00
Ryan Wang 248d075481
chore: bump pnpm version to 9 (#5953)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.16.x

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

升级 pnpm 的版本至 9,以及 GitHub Actions 的 Node 版本改为了 20。

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

```release-note
升级 pnpm 的版本至 9
```
2024-05-21 03:24:45 +00:00
guqing d2a9c804ce
refactor: email notifications are now sent only to verified email addresses (#5905)
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.16.x

#### What this PR does / why we need it:
邮件通知功能现在只向经过验证的邮箱地址发送通知匿名用户除外

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

#### Does this PR introduce a user-facing change?
```release-note
邮件通知功能现在只向经过验证的邮箱地址发送通知匿名用户除外
```
2024-05-20 09:22:42 +00:00
Takagi c5d63b1a8f
fix: toolbar menu being obscured after overflowing (#5930)
#### What type of PR is this?

/kind bug
/area editor
/milestone 2.16.x

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

当工具栏菜单出现溢出时,由于 `justify-content` 会始终保持居中状态,因此会导致溢出的内容被遮挡。

考虑到 [justify-content:safe](https://developer.mozilla.org/zh-CN/docs/Web/CSS/justify-content#safe) 在 safari 上具有兼容性问题,因此修改 HTML 结构,使用 `text-align` 来使菜单居中。

#### How to test it?

测试在菜单栏溢出时,溢出的内容是否被遮挡。

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

Fixes #5926 

#### Does this PR introduce a user-facing change?
```release-note
解决默认编辑器中顶部工具栏菜单溢出后被遮挡的问题
```
2024-05-20 08:54:42 +00:00