Go to file
Ryan Wang 8d4fffb277 perf: improve error message of login (halo-dev/console#851)
#### What type of PR is this?

/kind improvement

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

改进登录异常的提示信息,目前大致分为三种:

1. 用户名或密码错误
2. 跨域或网络请求异常
3. CSRF Token 失效

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

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

#### Screenshots:

<img width="1402" alt="image" src="https://user-images.githubusercontent.com/21301288/218319203-19517ab7-7740-41f9-8579-f10a60aa6e51.png">
<img width="1673" alt="image" src="https://user-images.githubusercontent.com/21301288/218319221-2fc332f4-4de7-4417-a277-0c4a396d6389.png">


#### Special notes for your reviewer:

测试方式:

1. 进入浏览器控制台清理 Cookie,以测试 CSRF Token 失效的情况。
2. 使用 3000 端口访问 Console,以测试跨域的情况。
3. 观察以上两种情况的登录请求异常提示信息是否符合要求。

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

```release-note
优化 Console 端登录请求异常的提示
```
2023-02-17 06:28:18 +00:00
.changeset refactor: rename admin to console (halo-dev/console#634) 2022-10-09 06:56:33 +00:00
.github chore: remove build jobs of github action (halo-dev/console#759) 2022-12-07 18:04:33 +08:00
.husky chore: use lint-staged to improve dx (halo-dev/console#768) 2022-12-13 15:38:48 +00:00
.vscode chore: update vscode extension recommendations 2022-08-31 23:35:46 +08:00
cypress chore: next major version base project (halo-dev/console#478) 2022-03-03 18:26:15 +08:00
docs feat: add full-functional post category select component for formkit (halo-dev/console#818) 2023-01-16 08:02:13 +00:00
packages fix: the width of the code input type is not full (halo-dev/console#838) 2023-02-07 06:04:12 +00:00
public feat: add support for setting console's favicon (halo-dev/console#788) 2022-12-22 07:58:31 +00:00
src perf: improve error message of login (halo-dev/console#851) 2023-02-17 06:28:18 +00:00
.dockerignore Add dockerignore file to ignore node_modules folder while building docker image (halo-dev/console#588) 2022-07-19 07:50:05 +00:00
.editorconfig refactor: upgrade codemirror version. (halo-dev/console#354) 2021-09-15 21:44:00 +08:00
.env.development refactor: set the root path of the development environment to /console (halo-dev/console#638) 2022-10-11 15:32:14 +00:00
.env.production refactor: improve login-related logic (halo-dev/console#617) 2022-09-22 12:46:12 +00:00
.eslintrc.cjs chore: use vue/vue3-recommended eslint plugin 2022-08-30 17:30:43 +08:00
.gitignore chore: use pnpm's workspace feature to manage base components (halo-dev/console#579) 2022-06-14 15:56:55 +08:00
.gitpod.yml chore: update gitpod config 2022-09-09 19:17:22 +08:00
.npmignore refactor: refactor post preview and private post view. 2019-12-19 17:50:23 +08:00
.npmrc chore: bump @halo-dev/richtext-editor to supports more feature about media (halo-dev/console#834) 2023-01-31 14:10:09 +00:00
.prettierignore chore: use lint-staged to improve dx (halo-dev/console#768) 2022-12-13 15:38:48 +00:00
Dockerfile Refactor GitHub workflow configuration (halo-dev/console#589) 2022-07-19 19:31:11 +08:00
LICENSE release: 1.2.0. 2020-01-05 22:39:18 +08:00
Makefile Add Makefile for convenient operations (halo-dev/console#641) 2022-10-13 10:00:16 +00:00
OWNERS chore: add @LIlGG to reviewers list (halo-dev/console#850) 2023-02-13 03:48:18 +00:00
README.md docs: update github workflow badge (halo-dev/console#775) 2022-12-16 02:54:11 +00:00
cypress.json chore: next major version base project (halo-dev/console#478) 2022-03-03 18:26:15 +08:00
env.d.ts feat: api client requests support configuring the mute parameter to hide exception toast (halo-dev/console#744) 2022-12-05 09:40:12 +00:00
index.html feat: add support for setting console's favicon (halo-dev/console#788) 2022-12-22 07:58:31 +00:00
package.json chore: release 2.2.0 (halo-dev/console#835) 2023-02-01 02:52:10 +00:00
pnpm-lock.yaml feat: default editor supports pasting or dragging pictures to upload (halo-dev/console#825) 2023-02-01 02:50:10 +00:00
pnpm-workspace.yaml chore: use pnpm's workspace feature to manage base components (halo-dev/console#579) 2022-06-14 15:56:55 +08:00
postcss.config.js chore: configure tailwind css (halo-dev/console#504) 2022-03-11 11:51:40 +08:00
prettier.config.js chore: add tailwindcss prettier plugin and reformat code 2022-05-29 23:55:06 +08:00
tailwind.config.js refactor: widgets of dashboard page (halo-dev/console#736) 2022-11-30 14:51:49 +00:00
tsconfig.app.json feat: add attachment management support (halo-dev/console#600) 2022-09-04 17:06:11 +00:00
tsconfig.json chore: next major version base project (halo-dev/console#478) 2022-03-03 18:26:15 +08:00
tsconfig.vite-config.json refactor: external static libraries 2022-09-26 13:16:40 +08:00
tsconfig.vitest.json chore: next major version base project (halo-dev/console#478) 2022-03-03 18:26:15 +08:00
vite.config.ts refactor: widgets of dashboard page (halo-dev/console#736) 2022-11-30 14:51:49 +00:00
vitest.config.ts refactor: load the logo as an inline svg (halo-dev/console#664) 2022-10-26 03:10:14 +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 的概念。

开发环境运行

# pnpm@7.0.0+
npm install -g pnpm
pnpm install 
pnpm build:packages
pnpm dev

生产构建

pnpm build

状态

Repobeats analytics