From 8e6c1abf19d1fd9db659f27512d1cc0eeeacdca8 Mon Sep 17 00:00:00 2001 From: Li Kui <90845831+likui628@users.noreply.github.com> Date: Thu, 11 Jul 2024 11:05:01 +0800 Subject: [PATCH] feat: login dialog (#37) * chore: login-dialog demo * Merge branch 'main' into login-dialog * chore: update dialog * Merge branch 'main' into login-dialog * chore: accept login params * chore: redirect to login or show login dialog --- apps/web-antd/src/layouts/basic.vue | 23 +++++-- apps/web-antd/src/router/guard.ts | 23 +++++-- apps/web-antd/src/store/modules/access.ts | 8 +++ .../ui-kit/layout-ui/src/vben-layout.vue | 1 + packages/business/layouts/package.json | 1 + .../business/layouts/src/basic/layout.vue | 4 ++ .../business/layouts/src/widgets/index.ts | 1 + .../layouts/src/widgets/login-dialog/index.ts | 1 + .../src/widgets/login-dialog/login-dialog.vue | 48 ++++++++++++++ .../universal-ui/src/authentication/index.ts | 6 +- .../universal-ui/src/authentication/login.vue | 65 +------------------ .../src/authentication/typings.ts | 63 ++++++++++++++++++ pnpm-lock.yaml | 3 + 13 files changed, 174 insertions(+), 73 deletions(-) create mode 100644 packages/business/layouts/src/widgets/login-dialog/index.ts create mode 100644 packages/business/layouts/src/widgets/login-dialog/login-dialog.vue diff --git a/apps/web-antd/src/layouts/basic.vue b/apps/web-antd/src/layouts/basic.vue index 0dcbb7c7..42cb3ea1 100644 --- a/apps/web-antd/src/layouts/basic.vue +++ b/apps/web-antd/src/layouts/basic.vue @@ -1,12 +1,16 @@ + + diff --git a/packages/business/universal-ui/src/authentication/index.ts b/packages/business/universal-ui/src/authentication/index.ts index 906fc563..f82360a4 100644 --- a/packages/business/universal-ui/src/authentication/index.ts +++ b/packages/business/universal-ui/src/authentication/index.ts @@ -3,4 +3,8 @@ export { default as AuthenticationForgetPassword } from './forget-password.vue'; export { default as AuthenticationLogin } from './login.vue'; export { default as AuthenticationQrCodeLogin } from './qrcode-login.vue'; export { default as AuthenticationRegister } from './register.vue'; -export type { LoginAndRegisterParams, LoginCodeParams } from './typings'; +export type { + AuthenticationProps, + LoginAndRegisterParams, + LoginCodeParams, +} from './typings'; diff --git a/packages/business/universal-ui/src/authentication/login.vue b/packages/business/universal-ui/src/authentication/login.vue index 61d04f35..12e55c0c 100644 --- a/packages/business/universal-ui/src/authentication/login.vue +++ b/packages/business/universal-ui/src/authentication/login.vue @@ -1,6 +1,4 @@