From c82f04efcf9b471558164935c4b6781986ebe61f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B4=94=E5=BA=86=E6=89=8D=E4=B8=A8=E9=9D=99=E8=A7=85?= Date: Wed, 3 Jan 2024 01:12:47 +0800 Subject: [PATCH] Add login modal experience (#16) --- ...-8ef393bb-8bf8-4e7c-b165-250df21c65ac.json | 7 +++ src/App.vue | 5 +- src/components/chat/InputBox.vue | 2 +- src/components/common/AuthPanel.vue | 60 +++++++++++++++++++ src/components/common/Navigator.vue | 9 ++- src/components/common/SuccessInfo.vue | 6 +- src/i18n/zh/distribution/message.ts | 2 +- src/layouts/Console.vue | 5 +- src/operators/instance.ts | 12 ++-- src/pages/auth/Callback.vue | 4 +- src/pages/console/distribution/Index.vue | 3 +- 11 files changed, 95 insertions(+), 20 deletions(-) create mode 100644 change/@zhishuyun-hub-8ef393bb-8bf8-4e7c-b165-250df21c65ac.json create mode 100644 src/components/common/AuthPanel.vue diff --git a/change/@zhishuyun-hub-8ef393bb-8bf8-4e7c-b165-250df21c65ac.json b/change/@zhishuyun-hub-8ef393bb-8bf8-4e7c-b165-250df21c65ac.json new file mode 100644 index 0000000..84c70db --- /dev/null +++ b/change/@zhishuyun-hub-8ef393bb-8bf8-4e7c-b165-250df21c65ac.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "add auth modal", + "packageName": "@zhishuyun/hub", + "email": "cqc@cuiqingcai.com", + "dependentChangeType": "patch" +} diff --git a/src/App.vue b/src/App.vue index c3040eb..3b139f4 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,6 +1,7 @@ @@ -9,10 +10,12 @@ import { defineComponent } from 'vue'; import { ElConfigProvider } from 'element-plus'; import zhCn from 'element-plus/dist/locale/zh-cn.mjs'; import { getDomain, getPath, setCookie } from './utils'; +import AuthPanel from './components/common/AuthPanel.vue'; export default defineComponent({ components: { - ElConfigProvider + ElConfigProvider, + AuthPanel }, data() { return { diff --git a/src/components/chat/InputBox.vue b/src/components/chat/InputBox.vue index c9da824..2c7be77 100644 --- a/src/components/chat/InputBox.vue +++ b/src/components/chat/InputBox.vue @@ -184,7 +184,7 @@ export default defineComponent({ } .btn { display: block; - z-index: 10000; + z-index: 100; cursor: pointer; position: absolute; top: 7px; diff --git a/src/components/common/AuthPanel.vue b/src/components/common/AuthPanel.vue new file mode 100644 index 0000000..f0b6192 --- /dev/null +++ b/src/components/common/AuthPanel.vue @@ -0,0 +1,60 @@ +