Commit Graph

260 Commits

Author SHA1 Message Date
Ryan Wang
760ba2347b Optimize editor styles (#7982)
* Refactor list toolbar items and unify icon sizing

* Replace MDI icons with Mingcute icons in editor extensions

* Replace MDI icons with Mingcute and other icon sets

* Unify button styles and icon sizing in editor UI

* Refactor editor icons and remove BlockCard component

* Refactor CommandsView menu styles and structure

* Add transition-colors to interactive UI components

* Refactor toolbar and toolbox item props typing

* Refactor BubbleItem props to use shared type

* Fix optional chaining for isActive prop in LinkBubbleButton

* Replace MDI icons with Mingcute icons in editor UI

* Refactor editor layout and styles for improved flexibility

* Refactor editor layout and update styles

* Replace icon set in CodeBlockViewRenderer

* Extend props types for toolbar, bubble, and toolbox items

* Refactor bubble components into subfolder

* Add BubbleButton component and update usage

* Refactor dropdown and toolbar item components

* Add image position dropdown to image bubble menu

* Refactor editor extension isActive checks to use class names

* Refactor gallery bubble items to use new UI components

* Refactor iframe align actions into dedicated component

* Refactor video position bubble to dropdown component

* Refactor input components and unify input UI

* Increase input container width from w-60 to w-64

* Refactor video size UI and update link popper widths

* Add audio position alignment to editor extension

* Refactor iframe and video size controls, update icons

* Add ResourceReplaceButton and refactor media replace UI

* Add configurable gap for gallery items

* Increase group size options to 10 in gallery

Expanded the selectable group size options in BubbleItemGroupSize.vue from 6 to 10, allowing users to choose larger group sizes for gallery items.

* Add danger type to cover delete dropdown item

* Add auto-focus to Input components in editor bubbles

* Add top margin to GalleryView node wrapper
2025-12-10 14:37:45 +08:00
Ryan Wang
a3eda32f01 Refactor attachment grid item and image preview components (#7989) 2025-12-08 10:14:40 +08:00
Ryan Wang
fca4c32519 Refactor dropdown component (#7978)
* Refactor dropdown components to use floating-vue directly

* Replace floating-vue with @halo-dev/components in editor

* Remove Dropdown.vue and update story usage

* Remove unused popper class and related styles

* Refactor gallery dropdowns to use VDropdownItem
2025-12-01 11:32:23 +08:00
Ryan Wang
488f9cc7c4 Make content fields required in post and content models (#7972)
#### What type of PR is this?

/area core
/kind improvement
/milestone 2.22.x

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

See #7967 

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

Fixes #7967 

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

```release-note
None
```
2025-12-01 02:39:37 +00: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
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
64620140e5 Refactor auth provider setting form logic (#7954)
Removed useSettingFormConvert composable and refactored AuthProviderDetail.vue to handle setting form schema and config map data directly. Improved reactivity, simplified data flow, and updated form submission logic for better maintainability.
2025-11-21 15:04:29 +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
e65f653e03 Refactor FormKit input prop types and update dependencies (#7955) 2025-11-21 11:01:20 +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
e446512565 Add route-based quick action support to dashboard (#7939)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.22.x

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

Introduces DashboardWidgetQuickActionRouteItem type to allow quick actions that navigate to routes instead of executing callbacks.

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

```release-note
None
```
2025-11-17 02:02:54 +00: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
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
ec22d038ca Refactor comment components to use async imports (#7932)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.22.x

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

Refactor comment components to use async imports.

before:

<img width="705" height="274" alt="image" src="https://github.com/user-attachments/assets/2e424722-90e4-4333-80f8-ef494f1e763d" />

after:

<img width="703" height="243" alt="image" src="https://github.com/user-attachments/assets/17045d1b-54fe-4a0b-860c-62ab47e9338f" />

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

```release-note
None
```
2025-11-13 08:38:48 +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
d9c3b1ffa1 Refactor extension point composables to use vue-query (#7915) 2025-11-07 18:03:53 +08:00
Ryan Wang
eae5a599c5 Refactor to use StatusDotState type for status props (#7913) 2025-11-06 21:27:43 +08:00
Ryan Wang
2d50736719 Expose dayjs in utils.date to allow users to call dayjs methods directly (#7906) 2025-11-06 12:24:20 +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
fc475f6bf9 Add shared event bus for plugin config updates (#7895) 2025-11-04 22:08:45 +08:00
Ryan Wang
3d4ccb7256 Add system reserved plugin label and UI indicator 2025-10-28 18:19:54 +08:00
Ryan Wang
7fcec8fd0b Refactor filter status values to use string type (#7873)
#### What type of PR is this?

/area ui
/kind bug
/milestone 2.22.x

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

Fix comment and plugin list filtering not working correctly

This issue might have been caused by the VueUse dependency upgrade in #7819.

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

```release-note
None
```
2025-10-27 12:46:16 +00: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
f0e0ffd4a9 Add help text for attachment display name form (#7851)
Added a help message to the display name field in the attachment edit form, clarifying that the custom name is only for management interface display and does not affect the file name or access link.
2025-10-23 11:26:35 +08: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
1f4219ff3a Remove unused element visibility logic (#7826)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.22.x

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

Eliminated useTemplateRef and useElementVisibility from AttachmentThumbnailList.vue as they were no longer needed. The visibility check for the wrapper div was removed, simplifying the component.

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

```release-note
None
```
2025-10-18 12:16:18 +00:00
Ryan Wang
8da9ab6520 Add display priority to attachment policies (#7805)
Signed-off-by: Ryan Wang <i@ryanc.cc>
2025-10-18 12:13:32 +08: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
b21e77b911 Add hidden flag for attachment policies in upload UI (#7792)
#### What type of PR is this?

/area ui
/milestone 2.22.x
/kind feature

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

This PR adds an option in the storage policy settings to hide a policy from the upload interface.

This is useful because some storage policies are not intended for direct user uploads. Hiding them can help declutter the UI and prevent users from selecting them by mistake.

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

Fixes #7787 

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

```release-note
支持在附件上传界面隐藏部分存储策略
```
2025-10-03 17:04:28 +00:00
Ryan Wang
838b97b812 Refactor attachment policy form (#7790)
#### What type of PR is this?

/area ui
/milestone 2.22.x

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

Refactored AttachmentPolicyEditingModal.vue to group policy config fields under a 'config' group and improved the update logic to use JSON patch for displayName

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

```release-note
None
```
2025-10-03 03:42:26 +00: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
6bc81a9866 Improve navigation logic after publishing content (#7775) 2025-09-20 23:35:36 +08:00
Ryan Wang
ba23e6c07b Improve flex layout for category and menu list items (#7760) 2025-09-20 23:35: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
bdbbbdf3af Disable persistence of selected group and policy in attachment upload modal (#7738)
#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.21.x

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

In the attachment upload modal, we previously persisted the user’s selected storage policy and group to make future uploads more convenient. However, this overlooked a common usage scenario—users often apply filters for storage policy and group in the attachment list before uploading. Persisting those previous selections could then conflict with the current filters and cause confusion. This PR removes the persistence of selected group and storage policy to avoid such mismatches.

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

Fixes #7713 

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

```release-note
在附件上传组件中取消所选分组和存储策略的持久化,默认选择为附件列表筛选条件相同的策略和分组。
```
2025-09-06 02:09:38 +00:00
Ryan Wang
568ebf5b70 Fix pending comments calculation in post list item (#7703)
#### What type of PR is this?

/area ui
/kind bug
/milestone 2.21.x

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

Fix pending comments calculation in post list item

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

```release-note
None
```
2025-08-19 07:03:16 +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