halo/ui
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
..
.husky Fix the problem of being unable to commit (#5362) 2024-02-18 08:00:16 +00:00
.vscode chore: add prettier-plugin-organize-imports plugin to organize imports (#6836) 2024-10-12 07:05:09 +00:00
console-src feat: add slug existence check when creating posts (#7617) 2025-07-27 05:19:17 +00:00
docs feat: refine i18n for dashboard widgets config form (#7511) 2025-06-09 16:20:33 +00:00
packages feat: add thumbnail records modal (#7630) 2025-07-22 13:54:18 +00:00
public Move folder console to ui 2024-02-02 22:22:51 +08:00
scripts feat: add i18n tooling scripts and refine translations (#7269) 2025-03-06 10:16:59 +00:00
src feat: add slug existence check when creating categories and tags (#7616) 2025-07-27 05:17:16 +00:00
uc-src feat: add slug existence check when creating posts (#7617) 2025-07-27 05:19:17 +00:00
.editorconfig Move folder console to ui 2024-02-02 22:22:51 +08:00
.env.development chore: remove unnecessary env (#6022) 2024-05-30 08:31:16 +00:00
.env.production chore: remove unnecessary env (#6022) 2024-05-30 08:31:16 +00:00
.gitignore Move folder console to ui 2024-02-02 22:22:51 +08:00
.npmrc Move folder console to ui 2024-02-02 22:22:51 +08:00
.prettierignore chore: update prettier and simplify config (#7589) 2025-06-25 09:47:21 +00:00
Makefile Move folder console to ui 2024-02-02 22:22:51 +08:00
README.md chore: bump pnpm version to 10 (#7597) 2025-06-27 07:29:24 +00:00
build.gradle Refactor dependencies and plugins with version catelog 2025-05-19 16:05:56 +08:00
env.d.ts feat: add support for setting an owner for posts (#6178) 2024-06-27 10:10:55 +00:00
eslint.config.ts chore: migrate eslint 9 (#7588) 2025-06-25 00:37:20 +00:00
index.html chore: update prettier and simplify config (#7589) 2025-06-25 09:47:21 +00:00
package.json feat: add thumbnail records modal (#7630) 2025-07-22 13:54:18 +00:00
pnpm-lock.yaml feat: add thumbnail records modal (#7630) 2025-07-22 13:54:18 +00:00
pnpm-workspace.yaml chore: update prettier and simplify config (#7589) 2025-06-25 09:47:21 +00:00
postcss.config.cjs chore: bump vite to 5.x (#5920) 2024-05-16 06:18:36 +00:00
tailwind.config.ts chore: bump tailwindcss version to 3.4 (#7604) 2025-06-29 02:25:27 +00:00
tsconfig.app.json chore: bump vue version to 3.5 (#6696) 2024-09-26 08:11:31 +00:00
tsconfig.json Move folder console to ui 2024-02-02 22:22:51 +08:00
tsconfig.node.json chore: bump tailwindcss version to 3.4 (#7604) 2025-06-29 02:25:27 +00:00
tsconfig.vitest.json Move folder console to ui 2024-02-02 22:22:51 +08:00
vite.config.ts chore: organize and fix imports (#6152) 2024-06-26 10:42:50 +00:00
vite.uc.config.ts chore: organize and fix imports (#6152) 2024-06-26 10:42:50 +00:00
vitest.config.ts chore: use rolldown-vite (#7489) 2025-06-19 16:31:11 +00:00

README.md

README

Halo logo

Halo 2.0 的管理端项目(原 halo-admin

GitHub release GitHub GitHub last commit GitHub Workflow Status Gitpod ready-to-code


当前仓库已经将 halo-admin 改为了 console。但对于 Halo 1.x 版本,依旧保持 halo-admin 的概念。

开发环境运行

npm install -g pnpm@10
pnpm install
pnpm build:packages
pnpm dev

生产构建

pnpm build

状态

Repobeats analytics