Skip to content

Commit

Permalink
Improve confirm code input UX for easier typing (#22)
Browse files Browse the repository at this point in the history
* Improve user experience when typing confirm code

* update
  • Loading branch information
datlechin authored Feb 1, 2024
1 parent 6db6e03 commit 6e24051
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/src/forum/components/TwoFactorEnableModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,14 @@ export default class TwoFactorEnableModal extends Modal {
<form onsubmit={this.onSubmit.bind(this)}>
<div className="Form-group">
<input
type="text"
className="FormControl"
name="token"
bidi={this.token}
placeholder={app.translator.trans('ianm-twofactor.forum.security.enter_token')}
inputmode="numeric"
pattern="[0-9]*"
autocomplete="one-time-code"
/>
</div>
<div className="Form-group">
Expand Down
3 changes: 3 additions & 0 deletions js/src/forum/extendLogInModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ export default function extendLogInModal() {
placeholder={app.translator.trans('ianm-twofactor.forum.log_in.two_factor_placeholder')}
value={this.twoFactorToken()}
disabled={this.loading}
inputmode="numeric"
pattern="[0-9]*"
autocomplete="one-time-code"
oninput={(e) => {
this.twoFactorToken(e.currentTarget.value);

Expand Down

0 comments on commit 6e24051

Please sign in to comment.