diff --git a/apps/admin/app/(all)/(home)/auth-header.tsx b/apps/admin/app/(all)/(home)/auth-header.tsx new file mode 100644 index 00000000000..50fa066cd86 --- /dev/null +++ b/apps/admin/app/(all)/(home)/auth-header.tsx @@ -0,0 +1,12 @@ +"use client"; + +import Link from "next/link"; +import { PlaneLockup } from "@plane/ui"; + +export const AuthHeader = () => ( +
+ + + +
+); diff --git a/apps/admin/app/(all)/(home)/layout.tsx b/apps/admin/app/(all)/(home)/layout.tsx index 19cab04cb01..25638c67768 100644 --- a/apps/admin/app/(all)/(home)/layout.tsx +++ b/apps/admin/app/(all)/(home)/layout.tsx @@ -1,35 +1,9 @@ "use client"; -import Image from "next/image"; -import Link from "next/link"; -import { useTheme } from "next-themes"; -// logo assets -import PlaneBackgroundPatternDark from "public/auth/background-pattern-dark.svg"; -import PlaneBackgroundPattern from "public/auth/background-pattern.svg"; -import BlackHorizontalLogo from "public/plane-logos/black-horizontal-with-blue-logo.png"; -import WhiteHorizontalLogo from "public/plane-logos/white-horizontal-with-blue-logo.png"; - export default function RootLayout({ children }: { children: React.ReactNode }) { - const { resolvedTheme } = useTheme(); - - const patternBackground = resolvedTheme === "light" ? PlaneBackgroundPattern : PlaneBackgroundPatternDark; - const logo = resolvedTheme === "light" ? BlackHorizontalLogo : WhiteHorizontalLogo; - return ( -
-
-
-
- - Plane logo - -
-
-
- Plane background pattern -
-
{children}
-
+
+ {children}
); } diff --git a/apps/admin/app/(all)/(home)/page.tsx b/apps/admin/app/(all)/(home)/page.tsx index 80ea40ee61e..e6ebdf45592 100644 --- a/apps/admin/app/(all)/(home)/page.tsx +++ b/apps/admin/app/(all)/(home)/page.tsx @@ -2,8 +2,8 @@ import { observer } from "mobx-react"; // components +import { LogoSpinner } from "@/components/common/logo-spinner"; import { InstanceFailureView } from "@/components/instance/failure"; -import { InstanceLoading } from "@/components/instance/loading"; import { InstanceSetupForm } from "@/components/instance/setup-form"; // hooks import { useInstance } from "@/hooks/store"; @@ -17,46 +17,24 @@ const HomePage = () => { // if instance is not fetched, show loading if (!instance && !error) { return ( -
- +
+
); } // if instance fetch fails, show failure view if (error) { - return ( -
- -
- ); + return ; } // if instance is fetched and setup is not done, show setup form if (instance && !instance?.is_setup_done) { - return ( -
- -
- ); + return ; } // if instance is fetched and setup is done, show sign in form - return ( -
-
-
-

- Manage your Plane instance -

-

- Configure instance-wide settings to secure your instance -

-
- -
-
- ); + return ; }; export default observer(HomePage); diff --git a/apps/admin/app/(all)/(home)/sign-in-form.tsx b/apps/admin/app/(all)/(home)/sign-in-form.tsx index 12b250a93b9..a5a6ca3e33d 100644 --- a/apps/admin/app/(all)/(home)/sign-in-form.tsx +++ b/apps/admin/app/(all)/(home)/sign-in-form.tsx @@ -10,7 +10,9 @@ import { Button, Input, Spinner } from "@plane/ui"; // components import { Banner } from "@/components/common/banner"; // local components +import { FormHeader } from "../../../core/components/instance/form-header"; import { AuthBanner } from "./auth-banner"; +import { AuthHeader } from "./auth-header"; import { authErrorHandler } from "./auth-helpers"; // service initialization @@ -101,78 +103,91 @@ export const InstanceSignInForm: FC = () => { }, [errorCode]); return ( -
setIsSubmitting(true)} - onError={() => setIsSubmitting(false)} - > - {errorData.type && errorData?.message ? ( - - ) : ( - <>{errorInfo && setErrorInfo(value)} />} - )} - - -
- - handleFormChange("email", e.target.value)} - autoComplete="on" - autoFocus - /> -
- -
- -
- handleFormChange("password", e.target.value)} - autoComplete="on" + <> + +
+
+ - {showPassword ? ( - - ) : ( - - )} + setIsSubmitting(true)} + onError={() => setIsSubmitting(false)} + > + {errorData.type && errorData?.message ? ( + + ) : ( + <> + {errorInfo && setErrorInfo(value)} />} + + )} + + +
+ + handleFormChange("email", e.target.value)} + autoComplete="on" + autoFocus + /> +
+ +
+ +
+ handleFormChange("password", e.target.value)} + autoComplete="on" + /> + {showPassword ? ( + + ) : ( + + )} +
+
+
+ +
+
-
- -
- + ); }; diff --git a/apps/admin/core/components/common/logo-spinner.tsx b/apps/admin/core/components/common/logo-spinner.tsx index 621b685b8b3..fda44fca591 100644 --- a/apps/admin/core/components/common/logo-spinner.tsx +++ b/apps/admin/core/components/common/logo-spinner.tsx @@ -7,11 +7,11 @@ import LogoSpinnerLight from "@/public/images/logo-spinner-light.gif"; export const LogoSpinner = () => { const { resolvedTheme } = useTheme(); - const logoSrc = resolvedTheme === "dark" ? LogoSpinnerDark : LogoSpinnerLight; + const logoSrc = resolvedTheme === "dark" ? LogoSpinnerLight : LogoSpinnerDark; return (
- logo + logo
); }; diff --git a/apps/admin/core/components/instance/failure.tsx b/apps/admin/core/components/instance/failure.tsx index 735a74c8dbc..fac8287a58d 100644 --- a/apps/admin/core/components/instance/failure.tsx +++ b/apps/admin/core/components/instance/failure.tsx @@ -1,13 +1,15 @@ "use client"; import { FC } from "react"; +import { observer } from "mobx-react"; import Image from "next/image"; import { useTheme } from "next-themes"; import { Button } from "@plane/ui"; // assets +import { AuthHeader } from "@/app/(all)/(home)/auth-header"; import InstanceFailureDarkImage from "@/public/instance/instance-failure-dark.svg"; import InstanceFailureImage from "@/public/instance/instance-failure.svg"; -export const InstanceFailureView: FC = () => { +export const InstanceFailureView: FC = observer(() => { const { resolvedTheme } = useTheme(); const instanceImage = resolvedTheme === "dark" ? InstanceFailureDarkImage : InstanceFailureImage; @@ -17,22 +19,24 @@ export const InstanceFailureView: FC = () => { }; return ( -
-
-
- Plane Logo -

Unable to fetch instance details.

-

- We were unable to fetch the details of the instance.
- Fret not, it might just be a connectivity issue. -

-
-
- + <> + +
+
+
+ Plane Logo +

Unable to fetch instance details.

+

+ We were unable to fetch the details of the instance. Fret not, it might just be a connectivity issue. +

+
+
+ +
-
+ ); -}; +}); diff --git a/apps/admin/core/components/instance/form-header.tsx b/apps/admin/core/components/instance/form-header.tsx new file mode 100644 index 00000000000..d915ad293b3 --- /dev/null +++ b/apps/admin/core/components/instance/form-header.tsx @@ -0,0 +1,8 @@ +"use client"; + +export const FormHeader = ({ heading, subHeading }: { heading: string; subHeading: string }) => ( +
+ {heading} + {subHeading} +
+); diff --git a/apps/admin/core/components/instance/instance-not-ready.tsx b/apps/admin/core/components/instance/instance-not-ready.tsx index 874013f52fc..2940e81e746 100644 --- a/apps/admin/core/components/instance/instance-not-ready.tsx +++ b/apps/admin/core/components/instance/instance-not-ready.tsx @@ -13,7 +13,7 @@ export const InstanceNotReady: FC = () => (

Welcome aboard Plane!

Plane Logo -

+

Get started by setting up your instance and workspace

diff --git a/apps/admin/core/components/instance/loading.tsx b/apps/admin/core/components/instance/loading.tsx index a21319d9ee2..27dc4ae6e61 100644 --- a/apps/admin/core/components/instance/loading.tsx +++ b/apps/admin/core/components/instance/loading.tsx @@ -6,16 +6,12 @@ import LogoSpinnerLight from "@/public/images/logo-spinner-light.gif"; export const InstanceLoading = () => { const { resolvedTheme } = useTheme(); - const logoSrc = resolvedTheme === "dark" ? LogoSpinnerDark : LogoSpinnerLight; + + const logoSrc = resolvedTheme === "dark" ? LogoSpinnerLight : LogoSpinnerDark; return ( -
-
-
- logo -

Fetching instance details...

-
-
+
+ logo
); }; diff --git a/apps/admin/core/components/instance/setup-form.tsx b/apps/admin/core/components/instance/setup-form.tsx index e3169ed63e6..0dbec972de8 100644 --- a/apps/admin/core/components/instance/setup-form.tsx +++ b/apps/admin/core/components/instance/setup-form.tsx @@ -10,7 +10,9 @@ import { AuthService } from "@plane/services"; import { Button, Checkbox, Input, PasswordStrengthIndicator, Spinner } from "@plane/ui"; import { getPasswordStrength } from "@plane/utils"; // components +import { AuthHeader } from "@/app/(all)/(home)/auth-header"; import { Banner } from "@/components/common/banner"; +import { FormHeader } from "@/components/instance/form-header"; // service initialization const authService = new AuthService(); @@ -131,227 +133,221 @@ export const InstanceSetupForm: FC = (props) => { const renderPasswordMatchError = !isRetryPasswordInputFocused || confirmPassword.length >= password.length; return ( -
-
-
-

- Setup your Plane Instance -

-

- Post setup you will be able to manage this Plane instance. -

-
- - {errorData.type && - errorData?.message && - ![EErrorCodes.INVALID_EMAIL, EErrorCodes.INVALID_PASSWORD].includes(errorData.type) && ( - - )} + <> + +
+
+ + {errorData.type && + errorData?.message && + ![EErrorCodes.INVALID_EMAIL, EErrorCodes.INVALID_PASSWORD].includes(errorData.type) && ( + + )} +
setIsSubmitting(true)} + onError={() => setIsSubmitting(false)} + > + + - setIsSubmitting(true)} - onError={() => setIsSubmitting(false)} - > - - +
+
+ + handleFormChange("first_name", e.target.value)} + autoComplete="on" + autoFocus + /> +
+
+ + handleFormChange("last_name", e.target.value)} + autoComplete="on" + /> +
+
-
-
+
-
-
- -
- - handleFormChange("email", e.target.value)} - hasError={errorData.type && errorData.type === EErrorCodes.INVALID_EMAIL ? true : false} - autoComplete="on" - /> - {errorData.type && errorData.type === EErrorCodes.INVALID_EMAIL && errorData.message && ( -

{errorData.message}

- )} -
- -
- - handleFormChange("company_name", e.target.value)} - /> -
-
- -
- handleFormChange("password", e.target.value)} - hasError={errorData.type && errorData.type === EErrorCodes.INVALID_PASSWORD ? true : false} - onFocus={() => setIsPasswordInputFocused(true)} - onBlur={() => setIsPasswordInputFocused(false)} - autoComplete="on" - /> - {showPassword.password ? ( - - ) : ( - +
+ +
+ handleFormChange("password", e.target.value)} + hasError={errorData.type && errorData.type === EErrorCodes.INVALID_PASSWORD ? true : false} + onFocus={() => setIsPasswordInputFocused(true)} + onBlur={() => setIsPasswordInputFocused(false)} + autoComplete="on" + /> + {showPassword.password ? ( + + ) : ( + + )} +
+ {errorData.type && errorData.type === EErrorCodes.INVALID_PASSWORD && errorData.message && ( +

{errorData.message}

)} +
- {errorData.type && errorData.type === EErrorCodes.INVALID_PASSWORD && errorData.message && ( -

{errorData.message}

- )} - -
-
- -
- handleFormChange("confirm_password", e.target.value)} - placeholder="Confirm password" - className="w-full border border-onboarding-border-100 !bg-onboarding-background-200 pr-12 placeholder:text-onboarding-text-400" - onFocus={() => setIsRetryPasswordInputFocused(true)} - onBlur={() => setIsRetryPasswordInputFocused(false)} - /> - {showPassword.retypePassword ? ( - - ) : ( - + ) : ( + + )} +
+ {!!formData.confirm_password && + formData.password !== formData.confirm_password && + renderPasswordMatchError && Passwords don{"'"}t match} +
+ +
+
+ handleFormChange("is_telemetry_enabled", !formData.is_telemetry_enabled)} + checked={formData.is_telemetry_enabled} + /> +
+
- {!!formData.confirm_password && - formData.password !== formData.confirm_password && - renderPasswordMatchError && Passwords don{"'"}t match} -
-
-
- handleFormChange("is_telemetry_enabled", !formData.is_telemetry_enabled)} - checked={formData.is_telemetry_enabled} - /> +
+
- - - See More - -
- -
- -
- + +
-
+ ); }; diff --git a/apps/admin/public/images/logo-spinner-dark.gif b/apps/admin/public/images/logo-spinner-dark.gif index 4e0a1deb7b7..8bd08325569 100644 Binary files a/apps/admin/public/images/logo-spinner-dark.gif and b/apps/admin/public/images/logo-spinner-dark.gif differ diff --git a/apps/admin/public/images/logo-spinner-light.gif b/apps/admin/public/images/logo-spinner-light.gif index 7c9bfbe0ed1..8b571031424 100644 Binary files a/apps/admin/public/images/logo-spinner-light.gif and b/apps/admin/public/images/logo-spinner-light.gif differ diff --git a/apps/admin/public/plane-logos/black-horizontal-with-blue-logo.png b/apps/admin/public/plane-logos/black-horizontal-with-blue-logo.png deleted file mode 100644 index c14505a6f62..00000000000 Binary files a/apps/admin/public/plane-logos/black-horizontal-with-blue-logo.png and /dev/null differ diff --git a/apps/admin/public/plane-logos/blue-without-text.png b/apps/admin/public/plane-logos/blue-without-text.png deleted file mode 100644 index ea94aec7920..00000000000 Binary files a/apps/admin/public/plane-logos/blue-without-text.png and /dev/null differ diff --git a/apps/admin/public/plane-logos/white-horizontal-with-blue-logo.png b/apps/admin/public/plane-logos/white-horizontal-with-blue-logo.png deleted file mode 100644 index 97560fb9f92..00000000000 Binary files a/apps/admin/public/plane-logos/white-horizontal-with-blue-logo.png and /dev/null differ diff --git a/apps/admin/styles/globals.css b/apps/admin/styles/globals.css index 258fa2d8567..737015d261f 100644 --- a/apps/admin/styles/globals.css +++ b/apps/admin/styles/globals.css @@ -135,28 +135,6 @@ --color-border-300: 212, 212, 212; /* strong border- 1 */ --color-border-400: 185, 185, 185; /* strong border- 2 */ - /* onboarding colors */ - --gradient-onboarding-100: linear-gradient(106deg, #f2f6ff 29.8%, #e1eaff 99.34%); - --gradient-onboarding-200: linear-gradient(129deg, rgba(255, 255, 255, 0) -22.23%, rgba(255, 255, 255, 0.8) 62.98%); - --gradient-onboarding-300: linear-gradient(164deg, #fff 4.25%, rgba(255, 255, 255, 0.06) 93.5%); - --gradient-onboarding-400: linear-gradient(129deg, rgba(255, 255, 255, 0) -22.23%, rgba(255, 255, 255, 0.8) 62.98%); - - --color-onboarding-text-100: 23, 23, 23; - --color-onboarding-text-200: 58, 58, 58; - --color-onboarding-text-300: 82, 82, 82; - --color-onboarding-text-400: 163, 163, 163; - - --color-onboarding-background-100: 236, 241, 255; - --color-onboarding-background-200: 255, 255, 255; - --color-onboarding-background-300: 236, 241, 255; - --color-onboarding-background-400: 177, 206, 250; - - --color-onboarding-border-100: 229, 229, 229; - --color-onboarding-border-200: 217, 228, 255; - --color-onboarding-border-300: 229, 229, 229, 0.5; - - --color-onboarding-shadow-sm: 0px 4px 20px 0px rgba(126, 139, 171, 0.1); - /* toast theme */ --color-toast-success-text: 62, 155, 79; --color-toast-error-text: 220, 62, 66; @@ -244,27 +222,6 @@ --color-border-300: 46, 46, 46; /* strong border- 1 */ --color-border-400: 58, 58, 58; /* strong border- 2 */ - /* onboarding colors */ - --gradient-onboarding-100: linear-gradient(106deg, #18191b 25.17%, #18191b 99.34%); - --gradient-onboarding-200: linear-gradient(129deg, rgba(47, 49, 53, 0.8) -22.23%, rgba(33, 34, 37, 0.8) 62.98%); - --gradient-onboarding-300: linear-gradient(167deg, rgba(47, 49, 53, 0.45) 19.22%, #212225 98.48%); - - --color-onboarding-text-100: 237, 238, 240; - --color-onboarding-text-200: 176, 180, 187; - --color-onboarding-text-300: 118, 123, 132; - --color-onboarding-text-400: 105, 110, 119; - - --color-onboarding-background-100: 54, 58, 64; - --color-onboarding-background-200: 40, 42, 45; - --color-onboarding-background-300: 40, 42, 45; - --color-onboarding-background-400: 67, 72, 79; - - --color-onboarding-border-100: 54, 58, 64; - --color-onboarding-border-200: 54, 58, 64; - --color-onboarding-border-300: 34, 35, 38, 0.5; - - --color-onboarding-shadow-sm: 0px 4px 20px 0px rgba(39, 44, 56, 0.1); - /* toast theme */ --color-toast-success-text: 178, 221, 181; --color-toast-error-text: 206, 44, 49; diff --git a/apps/space/core/components/common/logo-spinner.tsx b/apps/space/core/components/common/logo-spinner.tsx index bac5e414b92..7b6a8e8ff9b 100644 --- a/apps/space/core/components/common/logo-spinner.tsx +++ b/apps/space/core/components/common/logo-spinner.tsx @@ -8,7 +8,7 @@ import LogoSpinnerLight from "@/public/images/logo-spinner-light.gif"; export const LogoSpinner = () => { const { resolvedTheme } = useTheme(); - const logoSrc = resolvedTheme === "dark" ? LogoSpinnerDark : LogoSpinnerLight; + const logoSrc = resolvedTheme === "dark" ? LogoSpinnerLight : LogoSpinnerDark; return (