mirror of
https://github.com/makeplane/plane.git
synced 2026-07-13 05:49:40 +02:00
Merge pull request #275 from makeplane/sync/ce-ee
sync: merge conflicts need to be resolved
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -60,7 +60,7 @@ export const AuthenticationWrapper: FC<TAuthenticationWrapper> = observer((props
|
||||
return redirectionRoute;
|
||||
};
|
||||
|
||||
if (isUserSWRLoading || isUserLoading)
|
||||
if ((isUserSWRLoading || isUserLoading) && !currentUser?.id)
|
||||
return (
|
||||
<div className="relative flex h-screen w-full items-center justify-center">
|
||||
<LogoSpinner />
|
||||
|
||||
@@ -16,12 +16,12 @@ export const InstanceWrapper: FC<TInstanceWrapper> = observer((props) => {
|
||||
// store
|
||||
const { isLoading, instance, error, fetchInstanceInfo } = useInstance();
|
||||
|
||||
useSWR("INSTANCE_INFORMATION", () => fetchInstanceInfo(), {
|
||||
const { isLoading: isInstanceSWRLoading } = useSWR("INSTANCE_INFORMATION", () => fetchInstanceInfo(), {
|
||||
revalidateOnFocus: false,
|
||||
});
|
||||
|
||||
// loading state
|
||||
if (isLoading)
|
||||
if ((isLoading || isInstanceSWRLoading) && !instance)
|
||||
return (
|
||||
<div className="relative flex h-screen w-full items-center justify-center">
|
||||
<LogoSpinner />
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user