mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
refactor: update login mode handling and simplify QR code tab logic
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
This commit is contained in:
parent
e4575389eb
commit
885b65cbbe
|
|
@ -346,7 +346,7 @@ function redirectAuth(authType: string, needMessage: boolean = false) {
|
|||
}
|
||||
|
||||
function changeMode(val: string) {
|
||||
loginMode.value = val === 'LDAP' ? val : 'LOCAL'
|
||||
loginMode.value = val === 'LDAP' ? val : ''
|
||||
if (val === 'QR_CODE') {
|
||||
loginMode.value = val
|
||||
showQrCodeTab.value = true
|
||||
|
|
@ -396,11 +396,8 @@ onBeforeMount(() => {
|
|||
: t('views.system.authentication.scanTheQRCode.lark'),
|
||||
})
|
||||
})
|
||||
if (modeList.value.length === 0) {
|
||||
showQrCodeTab.value = true
|
||||
} else {
|
||||
modeList.value = ['QR_CODE', ...modeList.value]
|
||||
}
|
||||
showQrCodeTab.value = true
|
||||
modeList.value = ['QR_CODE', ...modeList.value]
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue