mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-26 14:21:13 +00:00
Tweak look
This commit is contained in:
parent
1d8e3a4513
commit
22d1dad0e1
2 changed files with 4 additions and 21 deletions
|
@ -12,7 +12,6 @@ interface PasswordInputProps {
|
||||||
onInput: FormEventHandler<HTMLInputElement>;
|
onInput: FormEventHandler<HTMLInputElement>;
|
||||||
className?: string;
|
className?: string;
|
||||||
showStrength?: boolean;
|
showStrength?: boolean;
|
||||||
cols?: number | null;
|
|
||||||
label?: string;
|
label?: string;
|
||||||
showForgotLink?: boolean;
|
showForgotLink?: boolean;
|
||||||
}
|
}
|
||||||
|
@ -72,7 +71,6 @@ class PasswordInput extends Component<PasswordInputProps, PasswordInputState> {
|
||||||
onInput,
|
onInput,
|
||||||
className,
|
className,
|
||||||
showStrength,
|
showStrength,
|
||||||
cols = 10,
|
|
||||||
label,
|
label,
|
||||||
showForgotLink,
|
showForgotLink,
|
||||||
},
|
},
|
||||||
|
@ -81,24 +79,13 @@ class PasswordInput extends Component<PasswordInputProps, PasswordInputState> {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div
|
<div className={classNames("row", className)}>
|
||||||
className={classNames(className, {
|
|
||||||
row: !!cols,
|
|
||||||
})}
|
|
||||||
>
|
|
||||||
{label && (
|
{label && (
|
||||||
<label
|
<label className="col-sm-2 col-form-label" htmlFor={id}>
|
||||||
className={`col-sm-${12 - (cols ?? 0)} col-form-label`}
|
|
||||||
htmlFor={id}
|
|
||||||
>
|
|
||||||
{label}
|
{label}
|
||||||
</label>
|
</label>
|
||||||
)}
|
)}
|
||||||
<div
|
<div className={`col-sm-${label ? 10 : 12}`}>
|
||||||
className={classNames({
|
|
||||||
[`col-sm-${cols}`]: !!cols,
|
|
||||||
})}
|
|
||||||
>
|
|
||||||
<div className="input-group">
|
<div className="input-group">
|
||||||
<input
|
<input
|
||||||
type={show ? "text" : "password"}
|
type={show ? "text" : "password"}
|
||||||
|
|
|
@ -324,7 +324,6 @@ export class Settings extends Component<any, SettingsState> {
|
||||||
id="new-password"
|
id="new-password"
|
||||||
value={this.state.changePasswordForm.new_password}
|
value={this.state.changePasswordForm.new_password}
|
||||||
onInput={linkEvent(this, this.handleNewPasswordChange)}
|
onInput={linkEvent(this, this.handleNewPasswordChange)}
|
||||||
cols={7}
|
|
||||||
showStrength
|
showStrength
|
||||||
label={I18NextService.i18n.t("new_password") ?? undefined}
|
label={I18NextService.i18n.t("new_password") ?? undefined}
|
||||||
/>
|
/>
|
||||||
|
@ -334,7 +333,6 @@ 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)}
|
||||||
cols={7}
|
|
||||||
label={I18NextService.i18n.t("verify_password") ?? undefined}
|
label={I18NextService.i18n.t("verify_password") ?? undefined}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -343,7 +341,6 @@ 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)}
|
||||||
cols={7}
|
|
||||||
label={I18NextService.i18n.t("old_password") ?? undefined}
|
label={I18NextService.i18n.t("old_password") ?? undefined}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -788,7 +785,7 @@ export class Settings extends Component<any, SettingsState> {
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
<div className="input-group mb-3">
|
<div className="mb-3">
|
||||||
<button
|
<button
|
||||||
className="btn d-block btn-danger"
|
className="btn d-block btn-danger"
|
||||||
onClick={linkEvent(
|
onClick={linkEvent(
|
||||||
|
@ -815,7 +812,6 @@ export class Settings extends Component<any, SettingsState> {
|
||||||
this.handleDeleteAccountPasswordChange
|
this.handleDeleteAccountPasswordChange
|
||||||
)}
|
)}
|
||||||
className="my-2"
|
className="my-2"
|
||||||
cols={null}
|
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
className="btn btn-danger me-4"
|
className="btn btn-danger me-4"
|
||||||
|
|
Loading…
Reference in a new issue