Commit Graph

306 Commits (9e3f77baf37bea93d476a3a9d813ddf670c30970)

Author SHA1 Message Date
Ryan Wang 9cbd9b23d0
fix: username length validation in user creation form is not working (#6806)
#### What type of PR is this?

/area ui
/kind bug
/milestone 2.20.x

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

修复创建用户表单的用户名长度校验不生效的问题。

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

```release-note
修复创建用户表单的用户名长度校验不生效的问题。
```
2024-10-10 03:05:00 +00:00
Ryan Wang d7aba83485 Refine password validation 2024-10-10 10:43:20 +08:00
Ryan Wang 845893944c
Merge pull request #6739 from guqing/refactor/6722
refactor: system initialization process to adapt to the new login method
2024-10-09 14:58:14 +08:00
Ryan Wang 82fb91fc7b
refactor: improve password input toggle button state display (#6800)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.20.x

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

优化密码输入框的明文切换图标的状态显示。

before:

<img width="508" alt="image" src="https://github.com/user-attachments/assets/5ae12beb-ce23-40a2-ad08-8e47c2eb6813">

after:

<img width="519" alt="image" src="https://github.com/user-attachments/assets/712e1735-a7ad-40f4-8900-a8c92eda7e54">


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

```release-note
优化密码输入框的明文切换图标的状态显示。
```
2024-10-09 06:52:56 +00:00
Ryan Wang 5df755d4a8 Refine setup page 2024-10-09 12:20:54 +08:00
guqing 2585636c48
feat: allow users to manage their attachments in uc (#6731)
#### What type of PR is this?
/kind feature
/milestone 2.20.x
/area core

#### What this PR does / why we need it:
支持用户在个人中心管理自己的附件(需要具有对应权限)

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

#### Does this PR introduce a user-facing change?
```release-note
支持用户在个人中心管理自己的附件(需要具有对应权限)
```
2024-10-08 14:56:55 +00:00
Ryan Wang 672b2d86c7
fix: style issue of the fullscreen button in Code input (#6785)
#### What type of PR is this?

/area ui
/kind bug
/milestone 2.20.x

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

为 Code Input 设置默认高度,修复全屏按钮被遮挡的问题。

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

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

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

```release-note
为 Code Input 设置默认高度,修复全屏按钮被遮挡的问题。
```
2024-10-08 14:50:56 +00:00
Ryan Wang 1d31d32312
fix: resolve issue with code input can not displaying fullscreen in modal component (#6787)
#### What type of PR is this?

/area ui
/kind bug
/milestone 2.20.x

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

修复 Code 输入框在模态框(VModal)组件中无法正常全屏显示的问题。

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

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

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

```release-note
修复 Code 输入框在模态框(VModal)组件中无法正常全屏显示的问题。
```
2024-10-08 08:06:53 +00:00
Takagi f632322dba
pref: remove anonymous and ghost users from the userSelect (#6781)
#### What type of PR is this?

/kind improvement
/area ui
/milsetone 2.20.x

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

在 userSelect 查询用户列表时,移除匿名与已删除用户这两个保留用户。

#### How to test it?

在文章设置,用户列表中不存在匿名与已删除用户即可。

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

Fixes #6665 

#### Does this PR introduce a user-facing change?
```release-note
在 user select 中不再显示匿名与已删除用户。
```
2024-10-08 07:28:54 +00:00
John Niang dfbab283ef
Merge pull request #6729 from guqing/feature/5851
feat: support deleting posts in user center
2024-10-07 17:48:26 +08:00
Ryan Wang f78f7dad02
feat: add support to check access permissions for /console (#6775)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.20.x

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

支持检查是否有权限访问 /console。

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

Fixes #6773 

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

```release-note
None
```
2024-10-07 09:38:51 +00:00
guqing 04e195f034
fix: unique index conflict issue after backup restoration preventing startup (#6701)
#### What type of PR is this?
/kind bug
/area core
/milestone 2.20.x
/sig docs

#### What this PR does / why we need it:
修复恢复备份后可能会因为与之前的数据冲突导致无法启动的问题

如果恢复时发生不可预知的错误,需要重启之后重新初始化再进行恢复

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

#### Does this PR introduce a user-facing change?
```release-note
修复恢复备份后可能会因为与恢复之前存在的数据冲突导致无法启动的问题
```
2024-10-07 09:20:50 +00:00
Ryan Wang ea491f2386
chore: bump tiptap version to 2.8.x (#6777)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.20.x

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

Bump tiptap verison to [2.8.x](https://github.com/ueberdosis/tiptap/releases/tag/v2.8.0)

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

```release-note
升级编辑器依赖 Tiptap 的版本至 [2.8.x](https://github.com/ueberdosis/tiptap/releases/tag/v2.8.0)。
```
2024-10-07 04:28:51 +00:00
Ryan Wang d6489283b8
refactor: remove redirect-on-login setting option from role editing form (#6776)
#### What type of PR is this?

/area ui
/kind api-change
/milestone 2.20.x

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

See #6774 

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

Fixes #6774 

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

```release-note
移除角色的 **登录之后默认跳转位置** 设置选项。
```
2024-10-07 04:26:50 +00:00
Ryan Wang b0ad0406b9
fix: resolve issue with logout functionality in Console not working (#6766)
#### What type of PR is this?

/area ui
/kind bug
/milestone 2.20.x

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

修复 Console 中退出登录功能失效的问题。

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

Fixes #6756 

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

```release-note
None
```
2024-10-05 06:38:44 +00:00
Ryan Wang 8896e16615
feat: disallow deletion of system-protected attachment policies (#6735)
#### What type of PR is this?

/area core
/kind improvement
/milestone 2.20.x

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

为系统默认的存储策略添加保护措施,不允许删除。

<img width="893" alt="image" src="https://github.com/user-attachments/assets/990f834f-3d97-4ee8-9c24-01cc188b7be6">


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

```release-note
为系统默认的存储策略添加保护措施,不允许删除。
```
2024-10-04 14:10:44 +00:00
Ryan Wang 1852784a4c
chore: bump vue version to 3.5.11 (#6764)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.20.x

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

Bump vue version to [3.5.11](https://github.com/vuejs/core/blob/main/CHANGELOG.md#3511-2024-10-03)

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

```release-note
None
```
2024-10-04 12:22:43 +00:00
Ryan Wang c22fab2b34
fix: correct formatting issues in DefaultEditor component (#6752)
#### What type of PR is this?

/area ui
/kind cleanup

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

修复 DefaultEditor 组件中的格式问题。

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

```release-note
None
```
2024-10-04 06:20:42 +00:00
Yttrium 545a5a63cc
fix: prevent hidden English characters in post title input (#6749)
#### What type of PR is this?

/area ui
/kind improvement

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


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

#6748 

Fixes #6748 
#### Special notes for your reviewer:

使英文标题中字母不被截断 

![image](https://github.com/user-attachments/assets/10b677c1-a30a-4261-85fc-d2cf328b003e)

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

```release-note
修复文章编辑页面标题输入框中,英文字符可能会被隐藏的问题
```
2024-10-03 10:01:39 +00:00
Ryan Wang e11a494c96
feat: add login expiration notification (#6738)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.20.x

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

添加登录失效的引导。

<img width="1080" alt="image" src="https://github.com/user-attachments/assets/a84c0059-b0ef-4105-b8e9-ae6b3d39d89d">


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

```release-note
None 
```
2024-09-30 11:01:52 +00:00
Ryan Wang c80ceb460d
feat: add support for setting uniqueId in Dialog to prevent duplicate creation (#6737)
#### What type of PR is this?

/area ui
/kind feature
/milestone 2.20.x

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

Dialog API 支持传入 uniqueId,以限制同一时间仅打开一个。

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

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

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

```release-note
Dialog API 支持传入 uniqueId,以限制同一时间仅打开一个。
```
2024-09-30 09:29:52 +00:00
Ryan Wang 5b2bdfdf17 Refine i18n
Signed-off-by: Ryan Wang <i@ryanc.cc>
2024-09-29 17:57:49 +08:00
Ryan Wang 944d0a5cb4 feat: add supports for delete own posts in uc
Signed-off-by: Ryan Wang <i@ryanc.cc>
2024-09-29 17:42:10 +08:00
Ryan Wang 2c849d8361
chore: regenerate api client for login-related (#6728)
#### What type of PR is this?

/area core
/kind cleanup
/milestone 2.20.x

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

重新生成 OpenAPI 定义和 API Client,在 https://github.com/halo-dev/halo/pull/6488 中忘了重新生成。

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

```release-note
None
```
2024-09-29 07:47:46 +00:00
Ryan Wang 3fe1afb952
fix: resolve issue with underline not displaying in input field (#6694)
#### What type of PR is this?

/area ui
/kind bug
/milestone 2.20.x

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

修复部分设备或者浏览器下,输入框中的下划线可能无法正常显示的问题。

before:

<img width="678" alt="image" src="https://github.com/user-attachments/assets/11a34729-3bed-4898-b222-0027ac71830d">

after:

<img width="681" alt="image" src="https://github.com/user-attachments/assets/8065c36a-6c94-4ac9-b859-8369dcb7d1e3">


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

Fixes #5651 

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

```release-note
修复部分设备或者浏览器下,输入框中的下划线可能无法正常显示的问题。
```
2024-09-28 10:39:42 +00:00
Ryan Wang 774678fd65
fix: resolve issue with editor not detecting image paste in Firefox (#6693)
#### What type of PR is this?

/area ui
/kind bug
/milestone 2.20.x

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

修复在 FireFox 浏览器下的编辑器中无法通过粘贴文件上传的问题。

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

Fixes #6684 

#### Special notes for your reviewer:

在 FireFox 浏览器中,复制一张本地的图片,尝试在编辑器中粘贴,观察是否上传成功。

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

```release-note
修复在 FireFox 浏览器下的编辑器中无法通过粘贴文件上传的问题。
```
2024-09-28 10:37:41 +00:00
John Niang 9305fd51d8
Merge pull request #6688 from guqing/refactor/6468
fix: resolve 403 error on menu page when system config access is missing
2024-09-28 18:30:50 +08:00
Ryan Wang d5233963fb
refactor: remove login-related pages from UI project (#6712)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.20.x

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

移除 UI 项目中和登录、注册相关的页面和代码,后续将由后端统一提供:https://github.com/halo-dev/halo/pull/6488

相关 issue:https://github.com/halo-dev/halo/issues/5214

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

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

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

```release-note
None 
```
2024-09-28 10:19:41 +00:00
John Niang a4c906706f
Merge pull request #6661 from guqing/refactor/setting-config-update
feat: support JSON-based retrieval and update for theme and plugin configs
2024-09-28 18:17:32 +08:00
Ryan Wang 982a45bd32
Merge branch 'main' into refactor/setting-config-update 2024-09-28 17:52:12 +08:00
Ryan Wang 8547ffe613 Add frontend support for customizing login and logout pages
Signed-off-by: JohnNiang <johnniang@foxmail.com>
2024-09-28 17:38:32 +08:00
Ryan Wang 56cb22ac31
refactor: remove async loading logic for editor (#6707)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.20.x

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

取消异步加载默认编辑器,在之前的版本中,由于编辑器体积较大,所以做了异步加载的处理,但近期的版本中,为了让插件可以使用编辑器或者扩展编辑器,已经将编辑器依赖作为全局加载,如果这个时候还是异步加载编辑器组件的话,进入编辑页面的时候出现短暂的灰屏闪烁。

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

```release-note
优化默认编辑器的加载方式,防止出现灰屏闪烁的问题。
```
2024-09-27 05:03:35 +00:00
Ryan Wang a860cb5ad8
refactor: simplify page title of deleted page (#6708)
#### What type of PR is this?

/kind improvement
/area ui
/milestone 2.20.x

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

简化页面回收站的页面标题。

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

```release-note
简化页面回收站的页面标题。
```
2024-09-26 08:49:33 +00:00
Ryan Wang 565dc1cbc8
refactor: unified empty state UI action button styles (#6704)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.20.x

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

统一空状态界面中操作按钮的风格。

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

```release-note
统一空状态界面中操作按钮的风格。
```
2024-09-26 08:47:31 +00:00
Ryan Wang fd40770ebc
chore: bump vue version to 3.5 (#6696)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.20.x

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

升级 UI 项目的 Vue 版本至 3.5.x。

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

```release-note
升级 UI 项目的 Vue 版本至 3.5.x。
```
2024-09-26 08:11:31 +00:00
Ryan Wang 7e911e9738 Refine UI 2024-09-25 16:15:56 +08:00
Ryan Wang 035207b8db
chore: remove unused code related to system configMap (#6695)
#### What type of PR is this?

/area ui
/kind cleanup
/milestone 2.20.x

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

清理 UI 中关于获取 system configmap 的无用代码,目前观察到已经没有任何地方在使用这个数据。

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

```release-note
None
```
2024-09-24 06:57:20 +00:00
Ryan Wang c945a9443c Refine UI 2024-09-24 12:50:25 +08:00
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