[WEB-1319] chore: auth fixes and enhancement (#4519)

* chore: onboarding invite member button overflow fix

* chore: change password enhancement
This commit is contained in:
Anmol Singh Bhatia 2024-05-20 12:05:19 +05:30 committed by GitHub
parent edf8109735
commit b4b111e297
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -415,7 +415,7 @@ export const InviteMembers: React.FC<Props> = (props) => {
Add another
</button>
</div>
<div className="flex flex-col mx-auto px-8 sm:px-2 items-center justify-center gap-4 w-96">
<div className="flex flex-col mx-auto px-8 sm:px-2 items-center justify-center gap-4 w-full max-w-96">
<Button
variant="primary"
type="submit"

View File

@ -68,6 +68,8 @@ const ChangePasswordPage: NextPageWithLayout = observer(() => {
const password = watch("new_password");
const confirmPassword = watch("confirm_password");
const isNewPasswordSameAsOldPassword = oldPassword !== "" && password !== "" && password === oldPassword;
const handleShowPassword = (key: keyof typeof showPassword) =>
setShowPassword((prev) => ({ ...prev, [key]: !prev[key] }));
@ -211,6 +213,9 @@ const ChangePasswordPage: NextPageWithLayout = observer(() => {
)}
</div>
{passwordSupport}
{isNewPasswordSameAsOldPassword && !isPasswordInputFocused && (
<span className="text-xs text-red-500">New password must be different from old password</span>
)}
</div>
<div className="space-y-1">
<h4 className="text-sm">Confirm password</h4>