Incorporate PR feedback

This commit is contained in:
SleeplessOne1917 2023-07-10 19:53:45 -04:00
parent 1d1c338f12
commit 41f68bd2fc
6 changed files with 12 additions and 12 deletions

View file

@ -12,7 +12,7 @@ interface PasswordInputProps {
onInput: FormEventHandler<HTMLInputElement>; onInput: FormEventHandler<HTMLInputElement>;
className?: string; className?: string;
showStrength?: boolean; showStrength?: boolean;
label?: string; label?: string | null;
showForgotLink?: boolean; showForgotLink?: boolean;
} }
@ -96,7 +96,7 @@ class PasswordInput extends Component<PasswordInputProps, PasswordInputState> {
value={value} value={value}
required required
maxLength={60} maxLength={60}
minLength={showStrength ? 10 : 0} minLength={10}
/> />
<button <button
className="btn btn-outline-dark" className="btn btn-outline-dark"

View file

@ -95,7 +95,7 @@ export class Login extends Component<any, State> {
id="login-password" id="login-password"
value={this.state.form.password} value={this.state.form.password}
onInput={linkEvent(this, this.handleLoginPasswordChange)} onInput={linkEvent(this, this.handleLoginPasswordChange)}
label={I18NextService.i18n.t("password") ?? undefined} label={I18NextService.i18n.t("password")}
showForgotLink showForgotLink
/> />
</div> </div>

View file

@ -127,7 +127,7 @@ export class Setup extends Component<any, State> {
id="password" id="password"
value={this.state.form.password} value={this.state.form.password}
onInput={linkEvent(this, this.handleRegisterPasswordChange)} onInput={linkEvent(this, this.handleRegisterPasswordChange)}
label={I18NextService.i18n.t("password") ?? undefined} label={I18NextService.i18n.t("password")}
/> />
</div> </div>
<div className="mb-3"> <div className="mb-3">
@ -135,7 +135,7 @@ export class Setup extends Component<any, State> {
id="verify-password" id="verify-password"
value={this.state.form.password_verify} value={this.state.form.password_verify}
onInput={linkEvent(this, this.handleRegisterPasswordVerifyChange)} onInput={linkEvent(this, this.handleRegisterPasswordVerifyChange)}
label={I18NextService.i18n.t("verify_password") ?? undefined} label={I18NextService.i18n.t("verify_password")}
/> />
</div> </div>
<div className="mb-3 row"> <div className="mb-3 row">

View file

@ -188,7 +188,7 @@ export class Signup extends Component<any, State> {
value={this.state.form.password} value={this.state.form.password}
onInput={linkEvent(this, this.handleRegisterPasswordChange)} onInput={linkEvent(this, this.handleRegisterPasswordChange)}
showStrength showStrength
label={I18NextService.i18n.t("password") ?? undefined} label={I18NextService.i18n.t("password")}
/> />
</div> </div>
@ -197,7 +197,7 @@ export class Signup extends Component<any, State> {
id="register-verify-password" id="register-verify-password"
value={this.state.form.password_verify} value={this.state.form.password_verify}
onInput={linkEvent(this, this.handleRegisterPasswordVerifyChange)} onInput={linkEvent(this, this.handleRegisterPasswordVerifyChange)}
label={I18NextService.i18n.t("verify_password") ?? undefined} label={I18NextService.i18n.t("verify_password")}
/> />
</div> </div>

View file

@ -67,7 +67,7 @@ export class PasswordChange extends Component<any, State> {
value={this.state.form.password} value={this.state.form.password}
onInput={linkEvent(this, this.handlePasswordChange)} onInput={linkEvent(this, this.handlePasswordChange)}
showStrength showStrength
label={I18NextService.i18n.t("new_password") ?? undefined} label={I18NextService.i18n.t("new_password")}
/> />
</div> </div>
<div className="mb-3"> <div className="mb-3">
@ -75,7 +75,7 @@ export class PasswordChange extends Component<any, State> {
id="password" id="password"
value={this.state.form.password_verify} value={this.state.form.password_verify}
onInput={linkEvent(this, this.handleVerifyPasswordChange)} onInput={linkEvent(this, this.handleVerifyPasswordChange)}
label={I18NextService.i18n.t("verify_password") ?? undefined} label={I18NextService.i18n.t("verify_password")}
/> />
</div> </div>
<div className="mb-3 row"> <div className="mb-3 row">

View file

@ -325,7 +325,7 @@ export class Settings extends Component<any, SettingsState> {
value={this.state.changePasswordForm.new_password} value={this.state.changePasswordForm.new_password}
onInput={linkEvent(this, this.handleNewPasswordChange)} onInput={linkEvent(this, this.handleNewPasswordChange)}
showStrength showStrength
label={I18NextService.i18n.t("new_password") ?? undefined} label={I18NextService.i18n.t("new_password")}
/> />
</div> </div>
<div className="mb-3"> <div className="mb-3">
@ -333,7 +333,7 @@ export class Settings extends Component<any, SettingsState> {
id="verify-new-password" id="verify-new-password"
value={this.state.changePasswordForm.new_password_verify} value={this.state.changePasswordForm.new_password_verify}
onInput={linkEvent(this, this.handleNewPasswordVerifyChange)} onInput={linkEvent(this, this.handleNewPasswordVerifyChange)}
label={I18NextService.i18n.t("verify_password") ?? undefined} label={I18NextService.i18n.t("verify_password")}
/> />
</div> </div>
<div className="mb-3"> <div className="mb-3">
@ -341,7 +341,7 @@ export class Settings extends Component<any, SettingsState> {
id="user-old-password" id="user-old-password"
value={this.state.changePasswordForm.old_password} value={this.state.changePasswordForm.old_password}
onInput={linkEvent(this, this.handleOldPasswordChange)} onInput={linkEvent(this, this.handleOldPasswordChange)}
label={I18NextService.i18n.t("old_password") ?? undefined} label={I18NextService.i18n.t("old_password")}
/> />
</div> </div>
<div className="input-group mb-3"> <div className="input-group mb-3">