mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
ui: optimize two factor prompt (#747)
This commit is contained in:
1 parent
7df03f758c
commit
fd5631b88b
1 file changed
+2
-2
@@ -50,7 +50,7 @@ async function chooseAction(authn?: boolean) {
|
||||
<div>
|
||||
<label>${i18n('6-Digit Code')}
|
||||
<div class="textbox-container">
|
||||
<input class="textbox" type="text" name="tfa_code" autocomplete="off" autofocus>
|
||||
<input class="textbox" type="number" name="tfa_code" autocomplete="off" autofocus>
|
||||
</div>
|
||||
</label>
|
||||
<input value="${i18n('Use TFA Code')}" class="expanded rounded primary button" data-action="tfa">
|
||||
@@ -60,7 +60,7 @@ async function chooseAction(authn?: boolean) {
|
||||
$action: [],
|
||||
canCancel: false,
|
||||
onDispatch(action) {
|
||||
if (action === 'tfa' && $('[name="tfa_code"]').val() === null) {
|
||||
if (action === 'tfa' && $('[name="tfa_code"]').val() === '') {
|
||||
$('[name="tfa_code"]').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user