UX: Add show password on mobile login modal (#21003)

* UX: Add show password on mobile login modal

* Update app/assets/javascripts/discourse/app/templates/mobile/modal/login.hbs

Co-authored-by: Jarek Radosz <jradosz@gmail.com>

---------

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
This commit is contained in:
Canapin 2023-05-24 12:40:36 +02:00 committed by GitHub
parent 2b4dc97551
commit 69274cdb88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 6 deletions

View File

@ -42,7 +42,7 @@
<Input <Input
@value={{this.loginPassword}} @value={{this.loginPassword}}
class={{value-entered this.loginPassword}} class={{value-entered this.loginPassword}}
@type="password" @type={{if this.maskPassword "password" "text"}}
id="login-account-password" id="login-account-password"
maxlength="200" maxlength="200"
disabled={{this.showSecondFactor}} disabled={{this.showSecondFactor}}
@ -50,11 +50,17 @@
<label class="alt-placeholder" for="login-account-password">{{i18n <label class="alt-placeholder" for="login-account-password">{{i18n
"login.password" "login.password"
}}</label> }}</label>
<a <div class="login__password-links">
href <a
id="forgot-password-link" href
{{on "click" this.handleForgotPassword}} id="forgot-password-link"
>{{i18n "forgot_password.action"}}</a> {{on "click" this.handleForgotPassword}}
>{{i18n "forgot_password.action"}}</a>
<TogglePasswordMask
@maskPassword={{this.maskPassword}}
@togglePasswordMask={{this.togglePasswordMask}}
/>
</div>
</div> </div>
</div> </div>
<SecondFactorForm <SecondFactorForm