Merge pull request #275 from makeplane/sync/ce-ee

sync: merge conflicts need to be resolved
This commit is contained in:
sriram veeraghanta
2024-05-20 12:12:18 +05:30
committed by GitHub
4 changed files with 9 additions and 4 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

@@ -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 />

View File

@@ -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 />

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>