Skip to content

Commit 885b65c

Browse files
committed
refactor: update login mode handling and simplify QR code tab logic
1 parent e457538 commit 885b65c

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

ui/src/views/chat/user-login/index.vue

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ function redirectAuth(authType: string, needMessage: boolean = false) {
346346
}
347347
348348
function changeMode(val: string) {
349-
loginMode.value = val === 'LDAP' ? val : 'LOCAL'
349+
loginMode.value = val === 'LDAP' ? val : ''
350350
if (val === 'QR_CODE') {
351351
loginMode.value = val
352352
showQrCodeTab.value = true
@@ -396,11 +396,8 @@ onBeforeMount(() => {
396396
: t('views.system.authentication.scanTheQRCode.lark'),
397397
})
398398
})
399-
if (modeList.value.length === 0) {
400-
showQrCodeTab.value = true
401-
} else {
402-
modeList.value = ['QR_CODE', ...modeList.value]
403-
}
399+
showQrCodeTab.value = true
400+
modeList.value = ['QR_CODE', ...modeList.value]
404401
}
405402
}
406403
})

0 commit comments

Comments
 (0)