mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +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>
|
<div>
|
||||||
<label>${i18n('6-Digit Code')}
|
<label>${i18n('6-Digit Code')}
|
||||||
<div class="textbox-container">
|
<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>
|
</div>
|
||||||
</label>
|
</label>
|
||||||
<input value="${i18n('Use TFA Code')}" class="expanded rounded primary button" data-action="tfa">
|
<input value="${i18n('Use TFA Code')}" class="expanded rounded primary button" data-action="tfa">
|
||||||
@@ -60,7 +60,7 @@ async function chooseAction(authn?: boolean) {
|
|||||||
$action: [],
|
$action: [],
|
||||||
canCancel: false,
|
canCancel: false,
|
||||||
onDispatch(action) {
|
onDispatch(action) {
|
||||||
if (action === 'tfa' && $('[name="tfa_code"]').val() === null) {
|
if (action === 'tfa' && $('[name="tfa_code"]').val() === '') {
|
||||||
$('[name="tfa_code"]').focus();
|
$('[name="tfa_code"]').focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user