diff --git a/apps/space/core/components/account/auth-forms/email.tsx b/apps/space/core/components/account/auth-forms/email.tsx index 4815fef6ae..7761fd6697 100644 --- a/apps/space/core/components/account/auth-forms/email.tsx +++ b/apps/space/core/components/account/auth-forms/email.tsx @@ -68,7 +68,7 @@ export const AuthEmailForm: FC = observer((props) => { value={email} onChange={(e) => setEmail(e.target.value)} placeholder="name@company.com" - className={`disable-autofill-style h-[46px] w-full placeholder:text-onboarding-text-400 autofill:bg-red-500 border-0 focus:bg-none active:bg-transparent`} + className={`disable-autofill-style h-10 w-full placeholder:text-onboarding-text-400 autofill:bg-red-500 border-0 focus:bg-none active:bg-transparent`} autoComplete="on" autoFocus ref={inputRef} @@ -83,7 +83,7 @@ export const AuthEmailForm: FC = observer((props) => { }} tabIndex={-1} > - + )} diff --git a/apps/space/core/components/account/auth-forms/password.tsx b/apps/space/core/components/account/auth-forms/password.tsx index 1dbae80a3f..0817de93cd 100644 --- a/apps/space/core/components/account/auth-forms/password.tsx +++ b/apps/space/core/components/account/auth-forms/password.tsx @@ -130,7 +130,7 @@ export const AuthPasswordForm: React.FC = observer((props: Props) => { value={passwordFormData.email} onChange={(e) => handleFormChange("email", e.target.value)} placeholder="name@company.com" - className={`disable-autofill-style h-[46px] w-full placeholder:text-onboarding-text-400 border-0`} + className={`disable-autofill-style h-10 w-full placeholder:text-onboarding-text-400 border-0`} disabled /> {passwordFormData.email.length > 0 && ( @@ -153,7 +153,7 @@ export const AuthPasswordForm: React.FC = observer((props: Props) => { value={passwordFormData.password} onChange={(e) => handleFormChange("password", e.target.value)} placeholder="Enter password" - className="disable-autofill-style h-[46px] w-full border border-onboarding-border-100 !bg-onboarding-background-200 pr-12 placeholder:text-onboarding-text-400" + className="disable-autofill-style h-10 w-full border border-onboarding-border-100 !bg-onboarding-background-200 pr-12 placeholder:text-onboarding-text-400" onFocus={() => setIsPasswordInputFocused(true)} onBlur={() => setIsPasswordInputFocused(false)} autoComplete="on" @@ -186,7 +186,7 @@ export const AuthPasswordForm: React.FC = observer((props: Props) => { value={passwordFormData.confirm_password} onChange={(e) => handleFormChange("confirm_password", e.target.value)} placeholder="Confirm password" - className="disable-autofill-style h-[46px] w-full border border-onboarding-border-100 !bg-onboarding-background-200 pr-12 placeholder:text-onboarding-text-400" + className="disable-autofill-style h-10 w-full border border-onboarding-border-100 !bg-onboarding-background-200 pr-12 placeholder:text-onboarding-text-400" onFocus={() => setIsRetryPasswordInputFocused(true)} onBlur={() => setIsRetryPasswordInputFocused(false)} /> diff --git a/apps/space/core/components/account/auth-forms/unique-code.tsx b/apps/space/core/components/account/auth-forms/unique-code.tsx index abf233a297..df6d8d5a4f 100644 --- a/apps/space/core/components/account/auth-forms/unique-code.tsx +++ b/apps/space/core/components/account/auth-forms/unique-code.tsx @@ -94,7 +94,7 @@ export const AuthUniqueCodeForm: React.FC = (props) => { value={uniqueCodeFormData.email} onChange={(e) => handleFormChange("email", e.target.value)} placeholder="name@company.com" - className={`disable-autofill-style h-[46px] w-full placeholder:text-onboarding-text-400 border-0`} + className={`disable-autofill-style h-10 w-full placeholder:text-onboarding-text-400 border-0`} disabled /> {uniqueCodeFormData.email.length > 0 && ( @@ -115,7 +115,7 @@ export const AuthUniqueCodeForm: React.FC = (props) => { value={uniqueCodeFormData.code} onChange={(e) => handleFormChange("code", e.target.value)} placeholder="gets-sets-flys" - className="disable-autofill-style h-[46px] w-full border border-onboarding-border-100 !bg-onboarding-background-200 pr-12 placeholder:text-onboarding-text-400" + className="disable-autofill-style h-10 w-full border border-onboarding-border-100 !bg-onboarding-background-200 pr-12 placeholder:text-onboarding-text-400" autoFocus />
diff --git a/apps/web/app/m/auth/page.tsx b/apps/web/app/m/auth/page.tsx index ae68645930..eb0bf6eeab 100644 --- a/apps/web/app/m/auth/page.tsx +++ b/apps/web/app/m/auth/page.tsx @@ -2,32 +2,20 @@ import React from "react"; import { observer } from "mobx-react"; -import Image from "next/image"; -import { useTheme } from "next-themes"; import { TInstanceConfig } from "@plane/types"; // hooks import { useInstance } from "@/hooks/store"; // components import { AuthRoot } from "@/plane-web/components/mobile"; -// assets -import PlaneBackgroundPatternDark from "@/public/auth/background-pattern-dark.svg"; -import PlaneBackgroundPattern from "@/public/auth/background-pattern.svg"; const MobileAuth = observer(() => { - const { resolvedTheme } = useTheme(); // hooks const { config } = useInstance(); - // derived values - const pageBackgroundPattern = resolvedTheme === "dark" ? PlaneBackgroundPatternDark : PlaneBackgroundPattern; - return ( -
-
- Plane background pattern -
-
-
+
+
+
diff --git a/apps/web/core/components/account/auth-forms/auth-header.tsx b/apps/web/core/components/account/auth-forms/auth-header.tsx index a7866e19e6..7e88919421 100644 --- a/apps/web/core/components/account/auth-forms/auth-header.tsx +++ b/apps/web/core/components/account/auth-forms/auth-header.tsx @@ -103,10 +103,10 @@ export const AuthHeader: FC = observer((props) => { return (
- + {typeof header === "string" ? t(header) : header} - {subHeader} + {subHeader}
); }); diff --git a/apps/web/core/components/account/auth-forms/email.tsx b/apps/web/core/components/account/auth-forms/email.tsx index df394d7ef2..c4d3d890ef 100644 --- a/apps/web/core/components/account/auth-forms/email.tsx +++ b/apps/web/core/components/account/auth-forms/email.tsx @@ -67,7 +67,7 @@ export const AuthEmailForm: FC = observer((props) => { value={email} onChange={(e) => setEmail(e.target.value)} placeholder={t("auth.common.email.placeholder")} - className={`disable-autofill-style h-[46px] w-full placeholder:text-custom-text-400 autofill:bg-red-500 border-0 focus:bg-none active:bg-transparent`} + className={`disable-autofill-style h-10 w-full placeholder:text-custom-text-400 autofill:bg-red-500 border-0 focus:bg-none active:bg-transparent`} autoComplete="on" autoFocus ref={inputRef} diff --git a/apps/web/core/components/account/auth-forms/forgot-password.tsx b/apps/web/core/components/account/auth-forms/forgot-password.tsx index b6c530954e..6cef6018a2 100644 --- a/apps/web/core/components/account/auth-forms/forgot-password.tsx +++ b/apps/web/core/components/account/auth-forms/forgot-password.tsx @@ -111,7 +111,7 @@ export const ForgotPasswordForm = observer(() => { ref={ref} hasError={Boolean(errors.email)} placeholder={t("auth.common.email.placeholder")} - className="h-[46px] w-full border border-custom-border-300 !bg-custom-background-100 pr-12 placeholder:text-custom-text-400" + className="h-10 w-full border border-custom-border-300 !bg-custom-background-100 pr-12 placeholder:text-custom-text-400" autoComplete="on" disabled={resendTimerCode > 0} /> diff --git a/apps/web/core/components/account/auth-forms/password.tsx b/apps/web/core/components/account/auth-forms/password.tsx index 53a9c07a38..b22c91114c 100644 --- a/apps/web/core/components/account/auth-forms/password.tsx +++ b/apps/web/core/components/account/auth-forms/password.tsx @@ -195,7 +195,7 @@ export const AuthPasswordForm: React.FC = observer((props: Props) => { value={passwordFormData.email} onChange={(e) => handleFormChange("email", e.target.value)} placeholder={t("auth.common.email.placeholder")} - className={`disable-autofill-style h-[46px] w-full placeholder:text-custom-text-400 border-0`} + className={`disable-autofill-style h-10 w-full placeholder:text-custom-text-400 border-0`} disabled /> {passwordFormData.email.length > 0 && ( @@ -223,7 +223,7 @@ export const AuthPasswordForm: React.FC = observer((props: Props) => { value={passwordFormData.password} onChange={(e) => handleFormChange("password", e.target.value)} placeholder={t("auth.common.password.placeholder")} - className="disable-autofill-style h-[46px] w-full border border-custom-border-300 !bg-custom-background-100 pr-12 placeholder:text-custom-text-400" + className="disable-autofill-style h-10 w-full border border-custom-border-300 !bg-custom-background-100 pr-12 placeholder:text-custom-text-400" onFocus={() => setIsPasswordInputFocused(true)} onBlur={() => setIsPasswordInputFocused(false)} autoComplete="on" @@ -260,7 +260,7 @@ export const AuthPasswordForm: React.FC = observer((props: Props) => { value={passwordFormData.confirm_password} onChange={(e) => handleFormChange("confirm_password", e.target.value)} placeholder={t("auth.common.password.confirm_password.placeholder")} - className="disable-autofill-style h-[46px] w-full border border-custom-border-300 !bg-custom-background-100 pr-12 placeholder:text-custom-text-400" + className="disable-autofill-style h-10 w-full border border-custom-border-300 !bg-custom-background-100 pr-12 placeholder:text-custom-text-400" onFocus={() => setIsRetryPasswordInputFocused(true)} onBlur={() => setIsRetryPasswordInputFocused(false)} /> diff --git a/apps/web/core/components/account/auth-forms/reset-password.tsx b/apps/web/core/components/account/auth-forms/reset-password.tsx index 91a3a7a08b..14b1ad43b2 100644 --- a/apps/web/core/components/account/auth-forms/reset-password.tsx +++ b/apps/web/core/components/account/auth-forms/reset-password.tsx @@ -117,7 +117,7 @@ export const ResetPasswordForm = observer(() => { value={resetFormData.email} //hasError={Boolean(errors.email)} placeholder={t("auth.common.email.placeholder")} - className="h-[46px] w-full border border-custom-border-300 !bg-custom-background-100 pr-12 text-custom-text-400 cursor-not-allowed" + className="h-10 w-full border border-custom-border-300 !bg-custom-background-100 pr-12 text-custom-text-400 cursor-not-allowed" autoComplete="on" disabled /> @@ -135,7 +135,7 @@ export const ResetPasswordForm = observer(() => { onChange={(e) => handleFormChange("password", e.target.value)} //hasError={Boolean(errors.password)} placeholder={t("auth.common.password.placeholder")} - className="h-[46px] w-full border border-custom-border-300 !bg-custom-background-100 pr-12 placeholder:text-custom-text-400" + className="h-10 w-full border border-custom-border-300 !bg-custom-background-100 pr-12 placeholder:text-custom-text-400" minLength={8} onFocus={() => setIsPasswordInputFocused(true)} onBlur={() => setIsPasswordInputFocused(false)} @@ -167,7 +167,7 @@ export const ResetPasswordForm = observer(() => { value={resetFormData.confirm_password} onChange={(e) => handleFormChange("confirm_password", e.target.value)} placeholder={t("auth.common.password.confirm_password.placeholder")} - className="h-[46px] w-full border border-custom-border-300 !bg-custom-background-100 pr-12 placeholder:text-custom-text-400" + className="h-10 w-full border border-custom-border-300 !bg-custom-background-100 pr-12 placeholder:text-custom-text-400" onFocus={() => setIsRetryPasswordInputFocused(true)} onBlur={() => setIsRetryPasswordInputFocused(false)} /> diff --git a/apps/web/core/components/account/auth-forms/set-password.tsx b/apps/web/core/components/account/auth-forms/set-password.tsx index ebcb1ffde5..1510cdbd13 100644 --- a/apps/web/core/components/account/auth-forms/set-password.tsx +++ b/apps/web/core/components/account/auth-forms/set-password.tsx @@ -131,7 +131,7 @@ export const SetPasswordForm = observer(() => { value={user?.email} //hasError={Boolean(errors.email)} placeholder={t("auth.common.email.placeholder")} - className="h-[46px] w-full border border-custom-border-300 !bg-custom-background-100 pr-12 text-custom-text-400 cursor-not-allowed" + className="h-10 w-full border border-custom-border-300 !bg-custom-background-100 pr-12 text-custom-text-400 cursor-not-allowed" autoComplete="on" disabled /> @@ -149,7 +149,7 @@ export const SetPasswordForm = observer(() => { onChange={(e) => handleFormChange("password", e.target.value)} //hasError={Boolean(errors.password)} placeholder={t("auth.common.password.placeholder")} - className="h-[46px] w-full border border-custom-border-300 !bg-custom-background-100 pr-12 placeholder:text-custom-text-400" + className="h-10 w-full border border-custom-border-300 !bg-custom-background-100 pr-12 placeholder:text-custom-text-400" minLength={8} onFocus={() => setIsPasswordInputFocused(true)} onBlur={() => setIsPasswordInputFocused(false)} @@ -181,7 +181,7 @@ export const SetPasswordForm = observer(() => { value={passwordFormData.confirm_password} onChange={(e) => handleFormChange("confirm_password", e.target.value)} placeholder={t("auth.common.password.confirm_password.placeholder")} - className="h-[46px] w-full border border-custom-border-300 !bg-custom-background-100 pr-12 placeholder:text-custom-text-400" + className="h-10 w-full border border-custom-border-300 !bg-custom-background-100 pr-12 placeholder:text-custom-text-400" onFocus={() => setIsRetryPasswordInputFocused(true)} onBlur={() => setIsRetryPasswordInputFocused(false)} /> diff --git a/apps/web/core/components/account/auth-forms/unique-code.tsx b/apps/web/core/components/account/auth-forms/unique-code.tsx index 7d7a9db8c4..a8aac8dfb5 100644 --- a/apps/web/core/components/account/auth-forms/unique-code.tsx +++ b/apps/web/core/components/account/auth-forms/unique-code.tsx @@ -129,7 +129,7 @@ export const AuthUniqueCodeForm: React.FC = (props) => { value={uniqueCodeFormData.email} onChange={(e) => handleFormChange("email", e.target.value)} placeholder={t("auth.common.email.placeholder")} - className="disable-autofill-style h-[46px] w-full placeholder:text-custom-text-400 border-0" + className="disable-autofill-style h-10 w-full placeholder:text-custom-text-400 border-0" autoComplete="on" disabled /> @@ -156,7 +156,7 @@ export const AuthUniqueCodeForm: React.FC = (props) => { value={uniqueCodeFormData.code} onChange={(e) => handleFormChange("code", e.target.value)} placeholder={t("auth.common.unique_code.placeholder")} - className="disable-autofill-style h-[46px] w-full border border-custom-border-300 !bg-custom-background-100 pr-12 placeholder:text-custom-text-400" + className="disable-autofill-style h-10 w-full border border-custom-border-300 !bg-custom-background-100 pr-12 placeholder:text-custom-text-400" autoFocus />
diff --git a/apps/web/core/components/auth-screens/footer.tsx b/apps/web/core/components/auth-screens/footer.tsx index cadf605527..30ff878b58 100644 --- a/apps/web/core/components/auth-screens/footer.tsx +++ b/apps/web/core/components/auth-screens/footer.tsx @@ -26,7 +26,7 @@ const BRAND_LOGOS: { export const AuthFooter = () => (
- Join 10,000+ teams building with Plane + Join 10,000+ teams building with Plane
{BRAND_LOGOS.map((brand) => (
diff --git a/apps/web/ee/components/mobile/authentication/forms/email-confirmation.tsx b/apps/web/ee/components/mobile/authentication/forms/email-confirmation.tsx index 9ff0ab965c..8aee191a6b 100644 --- a/apps/web/ee/components/mobile/authentication/forms/email-confirmation.tsx +++ b/apps/web/ee/components/mobile/authentication/forms/email-confirmation.tsx @@ -135,14 +135,14 @@ export const MobileAuthEmailValidationForm: FC = value={email} onChange={(e) => setEmail(e.target.value)} placeholder="name@example.com" - className={`disable-autofill-style h-[46px] w-full placeholder:text-custom-text-400 autofill:bg-red-500 border-0 focus:bg-none active:bg-transparent`} + className={`disable-autofill-style h-10 w-full placeholder:text-custom-text-400 autofill:bg-red-500 border-0 focus:bg-none active:bg-transparent`} autoComplete="on" autoFocus ref={inputRef} /> {email.length > 0 && ( { setEmail(""); inputRef.current?.focus(); diff --git a/apps/web/ee/components/mobile/authentication/forms/password.tsx b/apps/web/ee/components/mobile/authentication/forms/password.tsx index c417a250af..8a962b292d 100644 --- a/apps/web/ee/components/mobile/authentication/forms/password.tsx +++ b/apps/web/ee/components/mobile/authentication/forms/password.tsx @@ -156,7 +156,7 @@ export const MobileAuthPasswordForm: FC = (props) => { value={formData.email} onChange={(e) => handleFormChange("email", e.target.value)} placeholder="name@company.com" - className={`disable-autofill-style h-[46px] w-full placeholder:text-custom-text-400 border-0`} + className={`disable-autofill-style h-10 w-full placeholder:text-custom-text-400 border-0`} disabled /> {formData.email.length > 0 && ( @@ -180,7 +180,7 @@ export const MobileAuthPasswordForm: FC = (props) => { value={formData.password} onChange={(e) => handleFormChange("password", e.target.value)} placeholder="Enter password" - className="disable-autofill-style h-[46px] w-full border border-custom-border-100 !bg-custom-background-100 pr-12 placeholder:text-custom-text-400" + className="disable-autofill-style h-10 w-full border border-custom-border-100 !bg-custom-background-100 pr-12 placeholder:text-custom-text-400" autoComplete="on" autoFocus onFocus={() => handlePasswordInputFocused("password")} @@ -218,7 +218,7 @@ export const MobileAuthPasswordForm: FC = (props) => { value={formData.passwordConfirmation} onChange={(e) => handleFormChange("passwordConfirmation", e.target.value)} placeholder="Enter password" - className="disable-autofill-style h-[46px] w-full border border-custom-border-100 !bg-custom-background-100 pr-12 placeholder:text-custom-text-400" + className="disable-autofill-style h-10 w-full border border-custom-border-100 !bg-custom-background-100 pr-12 placeholder:text-custom-text-400" disabled={!isPasswordConfirmationEnabled} onFocus={() => handlePasswordInputFocused("passwordConfirmation")} onBlur={() => handlePasswordInputFocused("passwordConfirmation")} diff --git a/apps/web/ee/components/mobile/authentication/forms/unique-code.tsx b/apps/web/ee/components/mobile/authentication/forms/unique-code.tsx index 3c6aaa805f..a6cb83ba04 100644 --- a/apps/web/ee/components/mobile/authentication/forms/unique-code.tsx +++ b/apps/web/ee/components/mobile/authentication/forms/unique-code.tsx @@ -114,7 +114,7 @@ export const MobileAuthUniqueCodeForm: FC = (props) = value={formData.email} onChange={(e) => handleFormChange("email", e.target.value)} placeholder="name@company.com" - className={`disable-autofill-style h-[46px] w-full placeholder:text-custom-text-400 border-0`} + className={`disable-autofill-style h-10 w-full placeholder:text-custom-text-400 border-0`} disabled /> {formData.email.length > 0 && ( @@ -137,7 +137,7 @@ export const MobileAuthUniqueCodeForm: FC = (props) = value={formData.code} onChange={(e) => handleFormChange("code", e.target.value)} placeholder="gets-sets-flys" - className="disable-autofill-style h-[46px] w-full border border-custom-border-100 !bg-custom-background-100 pr-12 placeholder:text-custom-text-400" + className="disable-autofill-style h-10 w-full border border-custom-border-100 !bg-custom-background-100 pr-12 placeholder:text-custom-text-400" autoComplete="on" autoFocus /> diff --git a/apps/web/ee/components/mobile/authentication/header.tsx b/apps/web/ee/components/mobile/authentication/header.tsx index d9dce1129e..b961478816 100644 --- a/apps/web/ee/components/mobile/authentication/header.tsx +++ b/apps/web/ee/components/mobile/authentication/header.tsx @@ -1,11 +1,9 @@ "use client"; import { FC } from "react"; -import Image from "next/image"; import { EMobileAuthModes, EMobileAuthSteps, TMobileAuthModes, TMobileAuthSteps } from "@plane/constants"; import { TMobileWorkspaceInvitation } from "@plane/types"; -// assets -import planeLogo from "@/public/plane-logos/blue-without-text.png"; +import { PlaneLogo } from "@plane/ui"; const AUTH_SIGNUP_HEADER_CONTENT_OPTIONS = { [EMobileAuthSteps.EMAIL]: { @@ -69,11 +67,9 @@ export const MobileAuthHeader: FC = (props) => { return (
-
- Plane logo -
-
-

{title}

+ +
+

{title}

{description &&

{description}

}
diff --git a/apps/web/ee/components/mobile/authentication/terms-and-conditions.tsx b/apps/web/ee/components/mobile/authentication/terms-and-conditions.tsx index b8974e7ea1..ed754bacf6 100644 --- a/apps/web/ee/components/mobile/authentication/terms-and-conditions.tsx +++ b/apps/web/ee/components/mobile/authentication/terms-and-conditions.tsx @@ -1,21 +1,37 @@ "use client"; -import { FC } from "react"; +import React from "react"; import Link from "next/link"; +import { EAuthModes } from "@plane/constants"; -export const MobileTermsAndConditions: FC = () => ( -
-
- By signing in, you agree to our -
- - Terms of Service - -  and  - - Privacy Policy - - . -
+interface TermsAndConditionsProps { + authType?: EAuthModes; +} + +// Constants for better maintainability +const LEGAL_LINKS = { + termsOfService: "https://plane.so/legals/terms-and-conditions", + privacyPolicy: "https://plane.so/legals/privacy-policy", +} as const; + +const MESSAGES = { + [EAuthModes.SIGN_UP]: "By creating an account", + [EAuthModes.SIGN_IN]: "By signing in", +} as const; + +// Reusable link component to reduce duplication +const LegalLink: React.FC<{ href: string; children: React.ReactNode }> = ({ href, children }) => ( + + {children} + +); + +export const MobileTermsAndConditions: React.FC = ({ authType = EAuthModes.SIGN_IN }) => ( +
+

+ {`${MESSAGES[authType]}, you understand and agree to \n our `} + Terms of Service and{" "} + Privacy Policy. +

);