mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
[WEB-1385] chore: auth screen and space app improvement (#4529)
* chore: instance sign in page alginment * chore: strength indicator color updated * chore: confirm password input improvement * chore: space issue sidebar comment section validation added
This commit is contained in:
parent
c58e241159
commit
f77761b4f9
@ -128,6 +128,10 @@ export const InstanceSetupForm: FC = (props) => {
|
|||||||
[formData.confirm_password, formData.email, formData.first_name, formData.password, isSubmitting]
|
[formData.confirm_password, formData.email, formData.first_name, formData.password, isSubmitting]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const password = formData?.password ?? "";
|
||||||
|
const confirmPassword = formData?.confirm_password ?? "";
|
||||||
|
const renderPasswordMatchError = !isRetryPasswordInputFocused || confirmPassword.length >= password.length;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="max-w-lg lg:max-w-md w-full">
|
<div className="max-w-lg lg:max-w-md w-full">
|
||||||
<div className="relative flex flex-col space-y-6">
|
<div className="relative flex flex-col space-y-6">
|
||||||
@ -308,7 +312,7 @@ export const InstanceSetupForm: FC = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
{!!formData.confirm_password &&
|
{!!formData.confirm_password &&
|
||||||
formData.password !== formData.confirm_password &&
|
formData.password !== formData.confirm_password &&
|
||||||
!isRetryPasswordInputFocused && <span className="text-sm text-red-500">Passwords don{"'"}t match</span>}
|
renderPasswordMatchError && <span className="text-sm text-red-500">Passwords don{"'"}t match</span>}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="relative flex items-center pt-2 gap-2">
|
<div className="relative flex items-center pt-2 gap-2">
|
||||||
|
@ -94,7 +94,7 @@ export const InstanceSignInForm: FC = (props) => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="relative w-full h-full overflow-hidden container mx-auto max-w-lg px-10 lg:max-w-md lg:px-5 py-10 flex flex-col justify-center items-center">
|
<div className="flex-grow container mx-auto max-w-lg px-10 lg:max-w-md lg:px-5 py-10 lg:pt-28 transition-all">
|
||||||
<div className="relative flex flex-col space-y-6">
|
<div className="relative flex flex-col space-y-6">
|
||||||
<div className="text-center space-y-1">
|
<div className="text-center space-y-1">
|
||||||
<h3 className="flex gap-4 justify-center text-3xl font-bold text-onboarding-text-100">
|
<h3 className="flex gap-4 justify-center text-3xl font-bold text-onboarding-text-100">
|
||||||
|
@ -84,6 +84,10 @@ export const AuthPasswordForm: React.FC<Props> = observer((props: Props) => {
|
|||||||
[isSubmitting, mode, passwordFormData.confirm_password, passwordFormData.password]
|
[isSubmitting, mode, passwordFormData.confirm_password, passwordFormData.password]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const password = passwordFormData.password ?? "";
|
||||||
|
const confirmPassword = passwordFormData.confirm_password ?? "";
|
||||||
|
const renderPasswordMatchError = !isRetryPasswordInputFocused || confirmPassword.length >= password.length;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<form
|
<form
|
||||||
className="mt-5 space-y-4"
|
className="mt-5 space-y-4"
|
||||||
@ -181,7 +185,7 @@ export const AuthPasswordForm: React.FC<Props> = observer((props: Props) => {
|
|||||||
</div>
|
</div>
|
||||||
{!!passwordFormData.confirm_password &&
|
{!!passwordFormData.confirm_password &&
|
||||||
passwordFormData.password !== passwordFormData.confirm_password &&
|
passwordFormData.password !== passwordFormData.confirm_password &&
|
||||||
!isRetryPasswordInputFocused && <span className="text-sm text-red-500">Passwords don{"'"}t match</span>}
|
renderPasswordMatchError && <span className="text-sm text-red-500">Passwords don{"'"}t match</span>}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -7,6 +7,8 @@ import {
|
|||||||
PeekOverviewIssueDetails,
|
PeekOverviewIssueDetails,
|
||||||
PeekOverviewIssueProperties,
|
PeekOverviewIssueProperties,
|
||||||
} from "@/components/issues/peek-overview";
|
} from "@/components/issues/peek-overview";
|
||||||
|
// hooks
|
||||||
|
import { useProject } from "@/hooks/store";
|
||||||
// types
|
// types
|
||||||
import { IIssue } from "@/types/issue";
|
import { IIssue } from "@/types/issue";
|
||||||
|
|
||||||
@ -20,6 +22,8 @@ type Props = {
|
|||||||
export const SidePeekView: React.FC<Props> = observer((props) => {
|
export const SidePeekView: React.FC<Props> = observer((props) => {
|
||||||
const { handleClose, issueDetails, workspaceSlug, projectId } = props;
|
const { handleClose, issueDetails, workspaceSlug, projectId } = props;
|
||||||
|
|
||||||
|
const { settings } = useProject();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex h-full w-full flex-col overflow-hidden">
|
<div className="flex h-full w-full flex-col overflow-hidden">
|
||||||
<div className="w-full p-5">
|
<div className="w-full p-5">
|
||||||
@ -38,6 +42,7 @@ export const SidePeekView: React.FC<Props> = observer((props) => {
|
|||||||
{/* divider */}
|
{/* divider */}
|
||||||
<div className="my-5 h-[1] w-full border-t border-custom-border-200" />
|
<div className="my-5 h-[1] w-full border-t border-custom-border-200" />
|
||||||
{/* issue activity/comments */}
|
{/* issue activity/comments */}
|
||||||
|
{settings?.comments && (
|
||||||
<div className="w-full pb-5">
|
<div className="w-full pb-5">
|
||||||
<PeekOverviewIssueActivity
|
<PeekOverviewIssueActivity
|
||||||
issueDetails={issueDetails}
|
issueDetails={issueDetails}
|
||||||
@ -45,6 +50,7 @@ export const SidePeekView: React.FC<Props> = observer((props) => {
|
|||||||
projectId={projectId}
|
projectId={projectId}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<Loader className="px-6">
|
<Loader className="px-6">
|
||||||
|
@ -105,6 +105,10 @@ export const AuthPasswordForm: React.FC<Props> = observer((props: Props) => {
|
|||||||
[isSubmitting, mode, passwordFormData.confirm_password, passwordFormData.password]
|
[isSubmitting, mode, passwordFormData.confirm_password, passwordFormData.password]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const password = passwordFormData?.password ?? "";
|
||||||
|
const confirmPassword = passwordFormData?.confirm_password ?? "";
|
||||||
|
const renderPasswordMatchError = !isRetryPasswordInputFocused || confirmPassword.length >= password.length;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<form
|
<form
|
||||||
className="mt-5 space-y-4"
|
className="mt-5 space-y-4"
|
||||||
@ -201,7 +205,7 @@ export const AuthPasswordForm: React.FC<Props> = observer((props: Props) => {
|
|||||||
</div>
|
</div>
|
||||||
{!!passwordFormData.confirm_password &&
|
{!!passwordFormData.confirm_password &&
|
||||||
passwordFormData.password !== passwordFormData.confirm_password &&
|
passwordFormData.password !== passwordFormData.confirm_password &&
|
||||||
!isRetryPasswordInputFocused && <span className="text-sm text-red-500">Passwords don{"'"}t match</span>}
|
renderPasswordMatchError && <span className="text-sm text-red-500">Passwords don{"'"}t match</span>}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ export const PasswordStrengthMeter: React.FC<Props> = (props: Props) => {
|
|||||||
} else if (strength < 3) {
|
} else if (strength < 3) {
|
||||||
bars = [`bg-[#DC3E42]`, `bg-[#F0F0F3]`, `bg-[#F0F0F3]`];
|
bars = [`bg-[#DC3E42]`, `bg-[#F0F0F3]`, `bg-[#F0F0F3]`];
|
||||||
text = "Password is weak";
|
text = "Password is weak";
|
||||||
textColor = `text-[#F0F0F3]`;
|
textColor = `text-[#DC3E42]`;
|
||||||
} else {
|
} else {
|
||||||
bars = [`bg-[#3E9B4F]`, `bg-[#3E9B4F]`, `bg-[#3E9B4F]`];
|
bars = [`bg-[#3E9B4F]`, `bg-[#3E9B4F]`, `bg-[#3E9B4F]`];
|
||||||
text = "Password is strong";
|
text = "Password is strong";
|
||||||
|
@ -97,6 +97,10 @@ const ResetPasswordPage: NextPageWithLayout = () => {
|
|||||||
}
|
}
|
||||||
}, [error_code]);
|
}, [error_code]);
|
||||||
|
|
||||||
|
const password = resetFormData?.password ?? "";
|
||||||
|
const confirmPassword = resetFormData?.confirm_password ?? "";
|
||||||
|
const renderPasswordMatchError = !isRetryPasswordInputFocused || confirmPassword.length >= password.length;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="relative w-screen h-screen overflow-hidden">
|
<div className="relative w-screen h-screen overflow-hidden">
|
||||||
<PageHead title="Reset Password" />
|
<PageHead title="Reset Password" />
|
||||||
@ -209,9 +213,7 @@ const ResetPasswordPage: NextPageWithLayout = () => {
|
|||||||
</div>
|
</div>
|
||||||
{!!resetFormData.confirm_password &&
|
{!!resetFormData.confirm_password &&
|
||||||
resetFormData.password !== resetFormData.confirm_password &&
|
resetFormData.password !== resetFormData.confirm_password &&
|
||||||
!isRetryPasswordInputFocused && (
|
renderPasswordMatchError && <span className="text-sm text-red-500">Passwords don{"'"}t match</span>}
|
||||||
<span className="text-sm text-red-500">Passwords don{"'"}t match</span>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
<Button type="submit" variant="primary" className="w-full" size="lg" disabled={isButtonDisabled}>
|
<Button type="submit" variant="primary" className="w-full" size="lg" disabled={isButtonDisabled}>
|
||||||
Set password
|
Set password
|
||||||
|
@ -99,6 +99,10 @@ const SetPasswordPage: NextPageWithLayout = observer(() => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const password = passwordFormData?.password ?? "";
|
||||||
|
const confirmPassword = passwordFormData?.confirm_password ?? "";
|
||||||
|
const renderPasswordMatchError = !isRetryPasswordInputFocused || confirmPassword.length >= password.length;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="relative w-screen h-screen overflow-hidden">
|
<div className="relative w-screen h-screen overflow-hidden">
|
||||||
<PageHead title="Reset Password" />
|
<PageHead title="Reset Password" />
|
||||||
@ -203,9 +207,7 @@ const SetPasswordPage: NextPageWithLayout = observer(() => {
|
|||||||
</div>
|
</div>
|
||||||
{!!passwordFormData.confirm_password &&
|
{!!passwordFormData.confirm_password &&
|
||||||
passwordFormData.password !== passwordFormData.confirm_password &&
|
passwordFormData.password !== passwordFormData.confirm_password &&
|
||||||
!isRetryPasswordInputFocused && (
|
renderPasswordMatchError && <span className="text-sm text-red-500">Passwords don{"'"}t match</span>}
|
||||||
<span className="text-sm text-red-500">Passwords don{"'"}t match</span>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
<Button type="submit" variant="primary" className="w-full" size="lg" disabled={isButtonDisabled}>
|
<Button type="submit" variant="primary" className="w-full" size="lg" disabled={isButtonDisabled}>
|
||||||
Continue
|
Continue
|
||||||
|
@ -129,6 +129,8 @@ const ChangePasswordPage: NextPageWithLayout = observer(() => {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const renderPasswordMatchError = !isRetryPasswordInputFocused || confirmPassword.length >= password.length;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PageHead title="Profile - Change Password" />
|
<PageHead title="Profile - Change Password" />
|
||||||
@ -252,7 +254,7 @@ const ChangePasswordPage: NextPageWithLayout = observer(() => {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{!!confirmPassword && password !== confirmPassword && !isRetryPasswordInputFocused && (
|
{!!confirmPassword && password !== confirmPassword && renderPasswordMatchError && (
|
||||||
<span className="text-sm text-red-500">Passwords don{"'"}t match</span>
|
<span className="text-sm text-red-500">Passwords don{"'"}t match</span>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user