Commit Graph

102 Commits

Author SHA1 Message Date
Ryan Wang
a3eda32f01 Refactor attachment grid item and image preview components (#7989) 2025-12-08 10:14:40 +08:00
Ryan Wang
a204fbc86a Refactor editor package (#7968)
* Move extensions

Signed-off-by: Ryan Wang <i@ryanc.cc>

* Refactor editor extensions to use explicit naming

* Refactor attachment selector integration in editor

* Remove vue-demi from Vite external dependencies

* Add README for richtext-editor package

* Refactor attachment composable and update upload permissions

* Refactor editor i18n keys and move upload strings

* Refactor AllExtensions to ExtensionsKit and update usage

* Move heading id attribute to extension implementation

* Refactor i18n usage to use i18n.global.t

* Update README to reflect changes in editor extensions, replacing AllExtensions with ExtensionsKit

---------

Signed-off-by: Ryan Wang <i@ryanc.cc>
2025-11-28 13:02:34 +08:00
Ryan Wang
1e33ae4cdd Improve auth provider logo display styling (#7964) 2025-11-26 15:04:22 +08:00
Ryan Wang
6f711fc0cb Upgrade dev dependencies versions (#7960)
#### What type of PR is this?

/area ui
/kind cleanup

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

Upgrade dev dependencies versions

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

```release-note
None
```
2025-11-23 06:03:11 +00:00
Ryan Wang
889ec5881f Refactor profile authentication tab (#7950) 2025-11-21 15:04:12 +08:00
Ryan Wang
f69ec15b17 Refactor module and permission setup for console and uc (#7951) 2025-11-21 14:57:11 +08:00
Ryan Wang
d1c347ab37 Refactor attachment image preview section (#7944) 2025-11-18 11:56:03 +08:00
Ryan Wang
a94993a056 Add confirmType 'danger' to destructive dialogs (#7943) 2025-11-18 11:55:37 +08:00
Ryan Wang
b434574166 Refactor to use async component imports (#7941)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.22.x

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

Lazy load partial routes to optimize initial load speed

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

```release-note
None
```
2025-11-17 01:36:53 +00:00
Ryan Wang
10e3f162f5 Lazy load profile tabs with async components (#7935)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.22.x

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

Optimize profile page loading speed

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

```release-note
None
```
2025-11-14 07:00:49 +00:00
Ryan Wang
ede40ad698 Enhance type hints for globally registered components (#7933)
* Enhance type hints for globally registered components

* Refactor Codemirror props and language support

* Update

Signed-off-by: Ryan Wang <i@ryanc.cc>

---------

Signed-off-by: Ryan Wang <i@ryanc.cc>
2025-11-14 14:51:55 +08:00
Ryan Wang
2068b72e27 Refactor user profile to use Pinia currentUser store (#7936)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.22.x

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

Refactor user profile to use Pinia currentUser store

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

```release-note
None
```
2025-11-14 06:46:50 +00:00
Ryan Wang
ea315904a1 Add support for async language pack loading (#7931)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.22.x

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

This PR supports asynchronously loading the required language packs, which can significantly improve the initial page load speed.

before:

<img width="732" height="285" alt="image" src="https://github.com/user-attachments/assets/6d682010-751a-4c07-8651-8c6ade8a5f2e" />

after:

<img width="748" height="280" alt="image" src="https://github.com/user-attachments/assets/1c22d295-5ba9-423b-b941-3e7d536e1660" />


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

```release-note
Console 和 UC 支持异步加载所需语言包,提升首屏加载速度。
```
2025-11-13 08:36:47 +00:00
Ryan Wang
dab1ceb537 Lazy load some routes to improve initial render performance (#7930)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.22.x

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

Lazy load some routes to improve initial render performance

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

```release-note
懒加载 Console 和 UC 的部分路由,优化首屏渲染速度
```
2025-11-13 06:28:46 +00:00
Ryan Wang
ac88ee70cb Rename @halo-dev/console-shared to @halo-dev/ui-shared (#7926)
#### What type of PR is this?

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

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

See #7925 

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

Fixes #7925 

#### Special notes for your reviewer:

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

```release-note
将 `@halo-dev/console-shared` 重命名为 `@halo-dev/ui-shared`
```
2025-11-10 16:20:41 +00:00
Ryan Wang
eae5a599c5 Refactor to use StatusDotState type for status props (#7913) 2025-11-06 21:27:43 +08:00
Ryan Wang
aa7fb11946 Remove deprecated plugin registration fallback (#7910) 2025-11-06 12:02:17 +08:00
Ryan Wang
0241951776 Remove route whitelist from auth-check guards (#7909) 2025-11-06 12:02:05 +08:00
Ryan Wang
ad3b5c0680 Refactor UUID generation to shared utils.id.uuid (#7898) 2025-11-05 11:13:35 +08:00
Ryan Wang
150db051f8 Replace lodash-es with es-toolkit across codebase (#7896) 2025-11-05 11:08:57 +08:00
Ryan Wang
e53bfd4edb Refactor user and global info stores to shared package (#7858)
#### What type of PR is this?

/area ui
/kind feature
/milestone 2.22.x

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

This PR moves the `currentUser` and `globalInfo` stores to the `@halo-dev/console-shared` package, making them easily accessible for plugins.

In addition, it’s now possible for plugins to define their own global stores using Pinia.

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

```release-note
- 在 `@halo-dev/console-shared` 包中提供 `stores` 对象,包含 currentUser 和 globalInfo。
- 支持在插件的 UI 中使用 Pinia 定义全局 Store
```
2025-10-23 10:32:14 +00:00
Ryan Wang
cc4ba4a361 Refactor permission checks to use shared utils (#7853)
#### What type of PR is this?

/area ui
/kind feature
/milestone 2.22.x

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

This PR introduces a developer-friendly utility for checking UI permissions, which is also exposed for use by plugins.

Usage:

```ts
import { utils } from "@halo-dev/console-shared"

utils.permission.has(['any:permission'])
```

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

```release-note
在 `@halo-dev/console-shared` 包中提供 UI 权限检查工具
```
2025-10-23 09:44:13 +00:00
Ryan Wang
75ae6215a0 Refactor date and attachment utils to shared package (#7847)
#### What type of PR is this?

/area ui
/kind feature
/milestone 2.22.x

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

This PR introduces date and attachment utilities into the `@halo-dev/console-shared` package. This makes it convenient for plugins to share and reuse these common functions.

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

```release-note
在 `@halo-dev/console-shared` 包中提供统一的 date 和 attachment 工具
```
2025-10-22 10:02:14 +00:00
Ryan Wang
825a932453 Refactor to use shallowRef for tab and provider arrays (#7837)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.22.x

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

This PR refactors the code to use shallowRef instead of ref in scenarios where deep reactivity for the properties of an object or array is unnecessary.

Using shallowRef is more performant in these cases as it avoids the overhead of making the entire data structure deeply reactive.

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

```release-note
None
```
2025-10-21 15:10:13 +00:00
Ryan Wang
5521965b9b Refactor AttachmentSelectorModal visibility handling (#7832)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.22.x

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

Replaces the 'visible' prop and v-model usage with internal modal ref and event-based close handling in AttachmentSelectorModal components. Updates all usages to use explicit visibility state and @close event, improving modal control and code consistency.

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

```release-note
None
```
2025-10-21 15:06:14 +00:00
Ryan Wang
86660fae86 Refactor attachment thumbnail preview components (#7819)
* Refactor attachment thumbnail preview components

Replaces AttachmentSingleThumbnailList and AttachmentSingleThumbnailItem with a new AttachmentThumbnailList component for improved thumbnail preview in attachment detail modals. Updates AttachmentDetailModal.vue in both console and user center modules to use the new component. Also removes the 'click to exit preview' feature and cleans up related code.

* Update vueuse packages and improve thumbnail visibility

Upgraded @vueuse dependencies to version 12.8.2 for improved compatibility and features. Modified AttachmentThumbnailList.vue to use the 'once' option with useElementVisibility for better performance.
2025-10-18 12:13:18 +08:00
Ryan Wang
f72977b9a7 Add cover image support to post editor (#7809)
#### What type of PR is this?

/area ui
/kind feature
/milestone 2.22.x

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

This PR adds support for setting a cover image directly in the post editor, making the process more intuitive and convenient.

<img width="948" height="341" alt="image" src="https://github.com/user-attachments/assets/e518c198-c10d-479b-854b-bd0af094d5e2" />
<img width="1284" height="743" alt="image" src="https://github.com/user-attachments/assets/3f7e3828-6df3-4185-bef9-b9d8b7c7d64a" />

Fixes https://github.com/halo-dev/halo/issues/7033
Fixes https://github.com/halo-dev/halo/issues/5699

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

```release-note
支持在文章编辑页面设置封面图
```
2025-10-17 10:27:51 +00:00
Ryan Wang
3bc0e8610d Bump rolldown-vite to 7.1.17 (#7804)
Signed-off-by: Ryan Wang <i@ryanc.cc>
2025-10-15 12:48:20 +08:00
Ryan Wang
80d407cc6d Update external link visibility to use opacity transition (#7786)
Replaces 'hidden' and 'inline-block' classes with 'opacity-0' and 'group-hover:opacity-100' for external link icons in multiple components. This change enables smoother transitions and better control over the visibility of external link icons on hover.
2025-10-02 11:53:43 +08:00
Ryan Wang
5e6de80570 Remove thumbnails management feature and adapt new implementation 2025-10-02 10:31:17 +08:00
Ryan Wang
d0f050ff86 Enable auto-height for textarea fields in forms (#7749)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.21.x

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

Add auto-height prop to  formkit textarea to support automatic resizing based on content length.

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

```release-note
Console 端的部分多行文本输入框支持自动高度。
```
2025-09-20 15:16:03 +00:00
Ryan Wang
157a8eb42d Support async route permissions in guards (#7700)
#### What type of PR is this?

/area ui
/kind bug
/milestone 2.21.x

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

Fix routing navigation issue with async route permission functions

Caused by https://github.com/halo-dev/halo/pull/7688

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

```release-note
None
```
2025-08-19 07:01:15 +00:00
Ryan Wang
3f5b69d5d0 Support async permission checks in route menu generator (#7688)
#### What type of PR is this?

/area ui
/kind feature
/milestone 2.21.x

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

Support async permission checks in route menu generator

example:

```ts
{
  path: "",
  name: "Foo",
  component: Foo,
  meta: {
    title: "Foo",
    searchable: true,
    permissions: async () => {
      const { data } = await checkPermission();
      return data;
    },
    menu: {
      name: "Foo",
      group: "content",
      icon: markRaw(MingcuteBook2Line),
      priority: 4,
      mobile: false,
    },
  },
}
```

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

Fixes #

#### Special notes for your reviewer:

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

```release-note
开发者相关:路由的权限检查支持函数
```
2025-08-17 15:43:10 +00:00
Ryan Wang
2bcfbbc371 Optimize comment notification template to support rich text rendering (#7683)
#### What type of PR is this?

/area core
/area ui
/milestone 2.21.x
/kind feature

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

Optimize comment notification template to support rich text rendering

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

```release-note
None
```
2025-08-13 07:32:50 +00:00
Ryan Wang
2cf0d6853a feat: add slug existence check when creating posts (#7617)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.21.x

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

This PR adds frontend support for checking whether an slug already exists when creating posts.

Note:

1. The current implementation isn’t perfect, some actions (like clicking the “Publish” button) don’t check for duplicate slug yet.
2. Slug checking in the user center might not be accurate, since it may not have permission to query all posts.

<img width="695" alt="image" src="https://github.com/user-attachments/assets/baa37a82-49c2-43be-a4d8-0e0f22a9d73b" />

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

Fixes https://github.com/halo-dev/halo/issues/7615
Fixes https://github.com/halo-dev/halo/issues/3332

#### Special notes for your reviewer:

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

```release-note
创建文章时支持检查别名是否重复
```
2025-07-27 05:19:17 +00:00
Ryan Wang
471195d6b0 refactor: add chunked execution mechanism for notification batch deletions (#7634)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.21.x

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

Use `Promise.all` to execute part of the batch deletion logic of the notification in chunks to optimize the execution performance.

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

Fixes #

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

```release-note
优化通知批量删除的执行性能
```
2025-07-22 12:48:18 +00:00
Ryan Wang
5e28c6db0c chore: update prettier and simplify config (#7589)
#### What type of PR is this?

/area ui
/kind cleanup

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

Upgrade Prettier and related plugins, and simplify Prettier configuration.

Now, formatting for all packages will be managed by Prettier in the project root directory.

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

```release-note
None
```
2025-06-25 09:47:21 +00:00
Ryan Wang
1826c7dcbb chore: migrate eslint 9 (#7588)
#### What type of PR is this?

/area ui
/kind cleanup

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

Migrate to ESLint 9, use flat config file, and simplify ESLint configuration.

Now, linting for all packages will be managed by the configuration in the project root directory.

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

```release-note
None
```
2025-06-25 00:37:20 +00:00
Ryan Wang
7b257917bc chore: use rolldown-vite (#7489)
#### What type of PR is this?

/area ui
/kind improvement

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

Using rolldown-vite to improve the build speed of the UI project, but some features are still not supported and need to wait.

before:

<img width="953" alt="image" src="https://github.com/user-attachments/assets/551b202e-c486-44e9-9737-56de8e2a8ed2" />

after:

<img width="881" alt="image" src="https://github.com/user-attachments/assets/5750d242-27d6-43e6-ab82-0c11644d4b35" />

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

Fixes #

#### Special notes for your reviewer:

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

```release-note
None
```
2025-06-19 16:31:11 +00:00
Ryan Wang
4ca0a09281 refactor: adjust max width of post title field (#7564)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.21.x

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

before:

<img width="552" alt="image" src="https://github.com/user-attachments/assets/679a0b38-e215-4fb8-bee6-737504e03a7f" />

after:

<img width="696" alt="image" src="https://github.com/user-attachments/assets/7106c351-97ab-4a3c-978d-cfd9f8c20392" />

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

Fixes #7561 

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

```release-note
调整 Console 文章列表的标题区域最大宽度
```
2025-06-19 08:03:00 +00:00
Ryan Wang
f59e3a2909 refactor: remove unused width prop for post title field (#7545)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.21.x

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

Remove unused width prop for post title field

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

```release-note
None
```
2025-06-13 06:50:42 +00:00
Ryan Wang
d39a571e46 refactor: adapt page header styles for responsive design (#7544)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.21.x

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

Adapt page header styles for responsive design

before:

<img width="415" alt="image" src="https://github.com/user-attachments/assets/feee6f09-9a77-4bbf-94c2-77725c9ce76b" />

after:

<img width="416" alt="image" src="https://github.com/user-attachments/assets/60bb07a3-5d34-4cf6-b103-5d1f2206d62d" />

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

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

#### Special notes for your reviewer:

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

```release-note
优化移动端下文章编辑页面的样式
```
2025-06-13 06:06:42 +00:00
Ryan Wang
663ee22147 feat: improve menu bar in mobile devices (#7542)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.21.x

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

<img width="408" alt="image" src="https://github.com/user-attachments/assets/296c631f-59e2-4aaa-9c0b-cabb0f8ee2d9" />

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

Fixes https://github.com/halo-dev/halo/issues/7410
Fixes https://github.com/halo-dev/halo/issues/2885

#### Special notes for your reviewer:

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

```release-note
优化移动端的菜单,支持切换 Console / UC,支持退出登录和返回到首页。
```
2025-06-13 05:28:42 +00:00
Ryan Wang
2cba28d21d feat: add cover for post list in uc (#7534)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.21.x

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

Add cover image display for the post list in the uc.

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

```release-note
None
```
2025-06-10 15:16:36 +00:00
Ryan Wang
204113bd87 refactor: improve button component styles (#7517)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.21.x

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

1. Add ghost variant
2. Improve icon style
3. Refactoring css using scss functions

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

```release-note
None
```
2025-06-09 15:38:34 +00:00
Ryan Wang
3fa6532d9b refactor: convert post publish dates to human-readable format (#7526)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.21.x

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

<img width="1202" alt="image" src="https://github.com/user-attachments/assets/cac050d2-b984-4b48-afe0-e18db220ec19" />

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

```release-note
将 Console 端文章列表的发布时间改为语义化时间
```
2025-06-09 15:02:34 +00:00
Ryan Wang
677caca403 chore: bump vue-related dependencies (#7523)
Signed-off-by: Ryan Wang <i@ryanc.cc>
2025-06-09 15:34:14 +08:00
Ryan Wang
7162b8da92 fix: correct attachment selection state after new upload (#7487)
#### What type of PR is this?

/area ui
/kind bug
/milestone 2.21.x

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

Fix correct attachment selection state after new upload.

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

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

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

```release-note
修复当有已选择附件时,上传新附件导致所选附件状态异常的问题。
```
2025-05-30 10:10:28 +00:00
Ryan Wang
b309bc532b refactor: improve entity component layout for better device responsiveness (#7383)
* refactor: improve entity component layout for better device responsiveness

Signed-off-by: Ryan Wang <i@ryanc.cc>

* Resolve CSS style conflicts

Signed-off-by: Ryan Wang <i@ryanc.cc>

* Update missing translaions

Signed-off-by: Ryan Wang <i@ryanc.cc>

---------

Signed-off-by: Ryan Wang <i@ryanc.cc>
2025-05-21 11:29:41 +08:00
Zhe Xue
d8bfecb86b fix: resolve issue of duplicate post creation (#7313)
<!--  Thanks for sending a pull request!  Here are some tips for you:
1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/main/CONTRIBUTING.md>。
1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/main/CONTRIBUTING.md>.
2. 请根据你解决问题的类型为 Pull Request 添加合适的标签。
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request.
3. 请确保你已经添加并运行了适当的测试。
3. Ensure you have added or ran the appropriate tests for your PR.
-->

#### What type of PR is this?

<!--
添加其中一个类别:
Add one of the following kinds:

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

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

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

/area ui
/kind bug

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

See #6994

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

<!--
PR 合并时自动关闭 issue。
Automatically closes linked issue when PR is merged.

用法:`Fixes #<issue 号>`,或者 `Fixes (粘贴 issue 完整链接)`
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes #6994

#### Special notes for your reviewer:

统一了发布文章时的行为,均先确保服务端创建草稿后保存内容。

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

<!--
如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。
否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change),
Release Note 需要以 `action required` 开头。
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->

```release-note
修复文章重复生成的问题
```
2025-03-31 06:01:47 +00:00