Skip to content

Commit 9595294

Browse files
perf: Third-Party Authentication Code Optimization
1 parent 0d78646 commit 9595294

File tree

9 files changed

+131
-438
lines changed

9 files changed

+131
-438
lines changed

frontend/src/i18n/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,8 @@
823823
"input_account": "Please enter account",
824824
"redirect_2_auth": "Redirecting to {0} authentication, {1} seconds...",
825825
"redirect_immediately": "Redirecting immediately",
826-
"permission_invalid": "Authentication invalid [Current account has insufficient permissions]"
826+
"permission_invalid": "Authentication invalid [Current account has insufficient permissions]",
827+
"scan_qr_login": " Scan QR Code"
827828
},
828829
"supplier": {
829830
"alibaba_cloud_bailian": "Alibaba Cloud Bailian",

frontend/src/i18n/ko-KR.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,8 @@
823823
"input_account": "계정을 입력해 주세요",
824824
"redirect_2_auth": "{0} 인증으로 리디렉션 중입니다, {1}초...",
825825
"redirect_immediately": "지금 이동",
826-
"permission_invalid": "인증 무효 [현재 계정의 권한이 부족합니다]"
826+
"permission_invalid": "인증 무효 [현재 계정의 권한이 부족합니다]",
827+
"scan_qr_login": " QR 코드 스캔"
827828
},
828829
"supplier": {
829830
"alibaba_cloud_bailian": "알리바바 클라우드 바이리엔",

frontend/src/i18n/zh-CN.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,8 @@
823823
"input_account": "请输入账号",
824824
"redirect_2_auth": "正在跳转至 {0} 认证,{1} 秒...",
825825
"redirect_immediately": "立即跳转",
826-
"permission_invalid": "认证无效【当前账号权限不够】"
826+
"permission_invalid": "认证无效【当前账号权限不够】",
827+
"scan_qr_login": "扫码登录"
827828
},
828829
"supplier": {
829830
"alibaba_cloud_bailian": "阿里云百炼",

frontend/src/views/login/index.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
</el-form>
6464
</div>
6565
<Handler
66-
ref="xpackLoginHandler"
6766
v-model:loading="showLoading"
6867
jsname="L2NvbXBvbmVudC9sb2dpbi9IYW5kbGVy"
6968
@switch-tab="switchTab"
@@ -92,7 +91,6 @@ const router = useRouter()
9291
const userStore = useUserStore()
9392
const appearanceStore = useAppearanceStoreWithOut()
9493
const { t } = useI18n()
95-
const xpackLoginHandler = ref<any>(null)
9694
const loginForm = ref({
9795
username: '',
9896
password: '',
@@ -202,7 +200,7 @@ const switchTab = (name: string) => {
202200
203201
.login-btn {
204202
width: 100%;
205-
height: 45px;
203+
height: 40px;
206204
font-size: 16px;
207205
border-radius: 4px;
208206
}

frontend/src/views/login/xpack/DingtalkQr.vue

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<template>
2-
<div id="de2-dingtalk-qr" :class="{ 'de2-dingtalk-qr': !isBind }" />
2+
<div class="dingtalk-qr-div">
3+
<div id="de2-dingtalk-qr" :class="{ 'de2-dingtalk-qr': !isBind }" />
4+
</div>
35
</template>
46

57
<script lang="ts" setup>
@@ -46,8 +48,6 @@ const loadQr = (client_id: string, STATE: string, REDIRECT_URI: string) => {
4648
window.DTFrameLogin(
4749
{
4850
id: 'de2-dingtalk-qr',
49-
width: 280,
50-
height: 300,
5151
},
5252
{
5353
redirect_uri: encodeURIComponent(REDIRECT_URI),
@@ -73,7 +73,16 @@ const loadQr = (client_id: string, STATE: string, REDIRECT_URI: string) => {
7373
init()
7474
</script>
7575
<style lang="less" scoped>
76-
.de2-dingtalk-qr {
77-
margin-top: -36px;
76+
.dingtalk-qr-div {
77+
// margin-top: -36px;
78+
width: 234px;
79+
height: 234px;
80+
.de2-dingtalk-qr {
81+
transform: scale(1.3);
82+
transform-origin: top left;
83+
width: 234px;
84+
height: 234px;
85+
margin: -80px;
86+
}
7887
}
7988
</style>

0 commit comments

Comments
 (0)