Commit Graph

268 Commits (df195b12f2801b1de7119bd3552afa796ac44889)

Author SHA1 Message Date
Ryan Wang 46793af0bd
fix: correct ordered list styling issue in editor (#6656)
#### What type of PR is this?

/area ui
/kind bug
/milestone 2.20.x

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

修复编辑器中有序列表的样式问题。

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

Fixes #6615 

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

```release-note
修复编辑器中有序列表的样式问题。
```
2024-09-13 09:40:26 +00:00
Takagi 25eec1ec4f
pref: improve hover and pre-selection state for formkit select (#6607)
#### What type of PR is this?

/kind improvement
/area ui
/milestone 2.20.x

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

优化了 Formkit 中的 selec 组件,使得其使用快捷键与鼠标选中的预选状态始终只有一个。且在多选状态下按回车时,不再预选跳转至第一个选项。

#### How to test it?

在多选状态下测试使用键盘进行预选及使用鼠标 hover 进行预选的状态是否符合预期。

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

Fixes #6600

#### Does this PR introduce a user-facing change?
```release-note
优化 Formkit select 组件在多选状态下的待选中状态。
```
2024-09-13 02:22:26 +00:00
Ryan Wang 697963d628
feat: add menu select form item (#6642)
#### What type of PR is this?

/area ui
/kind feature
/milestone 2.20.x

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

为 FormKit 添加菜单选择输入类型

<img width="549" alt="image" src="https://github.com/user-attachments/assets/b5e40c1d-908f-4cdc-89d5-76f9b67ae298">

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

```release-note
为 FormKit 添加菜单选择输入类型
```
2024-09-12 05:28:20 +00:00
Takagi b02ab8d809
fix: resolve incorrect display of options in formkit selector with async data (#6629)
#### What type of PR is this?

/kind bug
/area ui
/milestone 2.20.x

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

为 formkit select 组件优化逻辑,目前将可以监听到 options 的变化,用于在变化时设置值。用于解决当 options 是异步获取,而 value 是初始设置时,无法显示正常的 label。

#### How to test it?

测试 options 比设置 value 晚时,数据能否正常显示 label。

#### Does this PR introduce a user-facing change?
```release-note
解决当 formkit select 组件中的 options 延迟设置时无法正常回显的问题。
```
2024-09-10 08:16:10 +00:00
Takagi 3c785cb7c8
fix: correct boolean value display issue in formkit selector component (#6624)
#### What type of PR is this?

/kind bug
/area ui
/milestone 2.20.x

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

解决 Formkit Selector 在值为布尔或者数字类型时,回显时内容不正常的问题。

#### How to test it?

测试当 FormKit Select 组件的值为布尔或者数字时,回显的内容是否正常。 

#### Does this PR introduce a user-facing change?
```release-note
修复 FormKit Select 组件中布尔值的显示问题。
```
2024-09-10 07:56:10 +00:00
Takagi cf2837d744
fix: formkit select component not emitting event or updating selection on value change (#6602)
#### What type of PR is this?

/kind bug
/area ui
/milestone 2.20.x

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

重新修改 formkit select 初始化值的监听方式,用于当 value 发生变化时,使选项值可以发生变化。

另外在更新数据时,如果数据发生变化,则发出 `onChange` 事件。

> 需要注意的是,通过 v-modal 传入默认值,再将此值改为 `undefined` 时无法触发 `watch` 及 formkit 的 `input` 事件,原因暂时未知,将此值设置为 `""` 即可正常触发。

#### How to test it?

由于此 PR 改动了初始化的方式,因此需要全量测试所有使用 `Select` 组件的位置。包括多选与单选,本地源与远程源。确保功能符合预期。

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

Fixes #6594 

#### Does this PR introduce a user-facing change?
```release-note
解决 Formkit Select 组件在值变更时不会发出事件及修改选项值的问题。
```
2024-09-06 09:45:51 +00:00
Takagi 6cdd2a7588
fix: resolve issue with disabled property in options not working (#6595)
#### What type of PR is this?

/kind bug
/area ui

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

解决 formkit select 组件中,option 使用 `attrs: { disabled: true }` 无效的问题。

#### How to test it?

测试在 formkit select 组件中,option 设置 disabled 属性是否有效。

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

Fixed #6592 

#### Does this PR introduce a user-facing change?
```release-note
解决 formkit select 组件的 Option 设置 disabled 无效的问题
```
2024-09-06 09:25:52 +00:00
Takagi 51609abc57
pref: add parameter to formkit select component for remote search by specific field (#6591)
#### What type of PR is this?

/kind improvment
/area ui
/milestone 2.20.x

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

为 Formkit Select 组件增加 `fieldSelectorKey` 字段,用于在使用 `fieldSelector` 字段远程查询时,指定查询所使用的 Key。

例如指定 `fieldSelectorKey` 为 `metadata.name` 则接口调用时的参数为 `fieldSelector: metadata.name=(admin)`。

#### How to test it?

测试在远程搜索时,`fieldSelector` 的查询 key 是否为设置的内容。

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

Fixes #6589 

#### Does this PR introduce a user-facing change?
```release-note
为 Formkit Select 组件远程查询增加指定 Key 的字段。
```
2024-09-06 09:23:52 +00:00
Takagi b80522e486
docs: add documentation for formkit select allowCreate property (#6590)
#### What type of PR is this?

/kind documentation
/area docs

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

补充 formkit select 组件中关于 allowCreate 属性的文档

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

Fixes halo-dev/docs#408 

#### Does this PR introduce a user-facing change?
```release-note
None
```
2024-09-05 07:29:47 +00:00
Takagi 733679d5ac
fix: resolve error when adding tables in default editor (#6587)
#### What type of PR is this?

/kind bug
/area ui
/milestone 2.20.x

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

在过滤默认编辑器重复扩展时,移除将扩展扁平化的操作。并且若扩展没有 name,则不对其进行过滤,用于解决一些潜在的问题。

#### How to test it?

测试在默认编辑器中新增 table ,是否会出现报错。

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

Fixes #6585 

#### Does this PR introduce a user-facing change?
```release-note
解决在默认编辑器中添加表格报错的问题
```
2024-09-04 14:11:44 +00:00
John Niang 7281a48325
Prepare for developing 2.20.0 (#6575)
#### What type of PR is this?

/kind cleanup
/area core

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

This PR bumps all version to 2.20.0 to prepare for next development.

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

```release-note
None
```
2024-09-02 09:41:37 +00:00
Takagi 3c46358293
fix: formkit selector not listening to data after defaulting to first option (#6571)
#### What type of PR is this?

/kind bug
/area ui
/milestone 2.20.x

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

当 formkit 选择器初始没有值的情况下,会默认选择第一项,但这同时会导致监听器取消监听,进而无法监听到后续的 value 值变更。

此 PR 将选择值的逻辑与自动选择第一项分开,用于解决此问题。

#### How to test it?

测试当选择器不存在初始值时,后续通过 v-model 传入的值是否还会使当前选项进行变更。

#### Does this PR introduce a user-facing change?
```release-note
解决 formkit 选择器回显数据异常的问题
```
2024-09-02 08:47: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 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
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
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
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
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
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
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 72e7b19697
chore: update Halo official website URL (#6514)
Co-authored-by: John Niang <johnniang@foxmail.com>
2024-08-26 15:53:04 +08: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
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
Ryan Wang 487b0d343c
fix: correct API endpoints related to backup issues (#6506)
#### 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
```
2024-08-23 09:08:58 +00:00
Takagi d9bc8cfd03
chore: upgrade tiptap to 2.6.5 (#6503)
#### 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
```
2024-08-23 07:36:58 +00:00
Ryan Wang 6428b2f0e2
refactor: improve conditions for determining if a plugin needs to be reloaded (#6498)
#### 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
```
2024-08-23 07:16:58 +00:00
Takagi 9b99698f1c
pref: use whitelist for allowed href values (#6499)
#### 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 用于解决潜在的安全问题。
```
2024-08-23 04:46:57 +00:00
Ryan Wang 6cd8dc8555 Adapt console for restoring from backup root
Signed-off-by: JohnNiang <johnniang@foxmail.com>
2024-08-21 11:46:30 +08:00
guqing 7ba5fc671f
chore: cleanup unused index for notification (#6481)
#### 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
```
2024-08-20 06:52:47 +00:00
Ryan Wang a938712739
chore: bump vite-related dependencies (#6482)
#### 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
```
2024-08-20 03:28:47 +00:00
Ryan Wang 7774eb1a3a
refactor: use patch api to refactor menu drag-and-drop sorting feature (#6462)
#### 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 接口重构菜单项拖动排序功能。
```
2024-08-16 14:42:33 +00:00
Ryan Wang d19c27ba52 feat: add prompt for users to reload page after plugin update 2024-08-15 17:30:01 +08:00
Ryan Wang d011beb89b
refactor: improve part of the post operation logic using the patch api (#6464)
#### 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 接口重构文章的恢复、可见性修改等逻辑。
```
2024-08-14 06:59:57 +00:00
Ryan Wang d78547f963
refactor: use patch api to refactor category drag-and-drop sorting feature (#6461)
#### 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 接口重构分类拖动排序功能。
```
2024-08-14 06:57:56 +00:00
Ryan Wang c2ac19f9d3
feat: add full-screen support to code input (#6453)
#### What type of PR is this?

/area ui
/kind feature
/milestone 2.19.x

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

Code 输入框支持全屏编辑。

<img width="530" alt="image" src="https://github.com/user-attachments/assets/c8465388-10fa-4b04-be52-c6a5bda6a2bc">

<img width="1906" alt="image" src="https://github.com/user-attachments/assets/aa6d14da-ef35-49b9-8d63-fde928d1f8e4">


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

Fixes #6308 

#### Special notes for your reviewer:

需要在任意 Code 输入框中测试全屏功能是否正常。

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

```release-note
Code 输入框支持全屏编辑。
```
2024-08-13 03:44:56 +00:00
Ryan Wang ddd59680e9
refactor: improve part of the page operation logic using the patch api (#6463)
#### 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 接口重构页面的删除、可见性修改等逻辑。
```
2024-08-13 03:42:55 +00:00
Takagi 332f4f8728
pref: pin save button to the bottom of the page in theme preview (#6449)
#### 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
在主题预览界面中将保存按钮固定在底部
```
2024-08-08 08:24:37 +00:00
Takagi 94f28cc76e
fix: backspace on empty line doesn’t return to previous list item (#6445)
#### 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
解决默认编辑器中在空白行中按退格键无法回退到列表项中的问题
```
2024-08-08 08:22:38 +00:00
Takagi 6cfc92b29e
fix: saving settings in theme preview returns to homepage (#6447)
#### 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
解决预览主题时保存设置,页面会跳转至首页的问题。
```
2024-08-08 08:20:38 +00:00
Takagi 457508f1cd
feat: support for previewing avif images in attachments (#6446)
#### 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 类型的图片
```
2024-08-07 08:50:35 +00:00
困困鱼 4a4f8b655d
feat: make comment and reply list item operations extendable (#6438)
#### What type of PR is this?

/area console
/kind feature
/milestone 2.18.x

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

评论和回复管理列表项的操作按钮支持被插件扩展。
![image](https://github.com/user-attachments/assets/20174eda-ec46-4ab2-b1d9-c27e4aaa6cba)
![image](https://github.com/user-attachments/assets/ac44c221-71f5-4077-8116-a92245c22697)


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

Fixes #6392 

#### Special notes for your reviewer:

需要评论和回复的关于列表的已有功能是否正常。

如果需要测试扩展点是否有效,可以使用此插件测试:[plugin-starter-1.0.0-SNAPSHOT.jar.zip](https://github.com/user-attachments/files/16482348/plugin-starter-1.0.0-SNAPSHOT.jar.zip)

```
export default definePlugin({
  components: {},
  routes: [],
  extensionPoints: {
    "comment:list-item:operation:create": (comment: Ref<ListedComment>) => {
      return [
        {
          priority: 21,
          component: markRaw(VDropdownItem),
          label: "测试评论菜单",
          visible: true,
          permissions: [],
          action: () => {
            console.log(comment)
          },
        },
      ];
    },
    "reply:list-item:operation:create": (reply: Ref<ListedReply>) => {
      return [
        {
          priority: 11,
          component: markRaw(VDropdownItem),
          label: "测试回复菜单",
          visible: true,
          permissions: [],
          action: () => {
            console.log(reply)
          },
        },
      ];
    },
  },
});
```

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

```release-note
Console 评论和回复管理列表项的操作按钮支持被插件扩展。
```
2024-08-05 06:56:25 +00:00
Ryan Wang 684c3b045b
chore: bump typescript version to 5.5.x (#6440)
#### 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
```
2024-08-05 05:46:25 +00:00