diff --git a/plane-src/apps/web/app/(all)/create-workspace/page.tsx b/plane-src/apps/web/app/(all)/create-workspace/page.tsx index 3808718..80d17a1 100644 --- a/plane-src/apps/web/app/(all)/create-workspace/page.tsx +++ b/plane-src/apps/web/app/(all)/create-workspace/page.tsx @@ -6,14 +6,13 @@ import { useState } from "react"; import { observer } from "mobx-react"; -import Link from "next/link"; // plane imports import { useTranslation } from "@plane/i18n"; import { Button, getButtonStyling } from "@plane/propel/button"; -import { PlaneLogo } from "@plane/propel/icons"; import type { IWorkspace } from "@plane/types"; // assets import WorkspaceCreationDisabled from "@/app/assets/workspace/workspace-creation-disabled.png?url"; +import { AuthHeaderBase } from "@/components/auth-screens/header"; // components import { CreateWorkspaceForm } from "@/components/workspace/create-workspace-form"; // hooks @@ -58,55 +57,46 @@ const CreateWorkspacePage = observer(function CreateWorkspacePage() { return ( -
-
-
- - - -
- {currentUser?.email} -
-
-
+
+ +
{isWorkspaceCreationDisabled ? ( -
+
Workspace creation disabled -
+

{t("workspace_creation.errors.creation_disabled.title")} -

-

+ +

{t("workspace_creation.errors.creation_disabled.description")}

-
- - + {t("workspace_creation.errors.creation_disabled.request_button")}
-
+ ) : ( -
-

{t("workspace_creation.heading")}

-
- +
+
+

Работайте во всех измерениях.

+

Создайте рабочее пространство.

-
+ + )} -
+
); diff --git a/plane-src/apps/web/core/components/workspace/create-workspace-form.tsx b/plane-src/apps/web/core/components/workspace/create-workspace-form.tsx index 5bc558d..e887cfa 100644 --- a/plane-src/apps/web/core/components/workspace/create-workspace-form.tsx +++ b/plane-src/apps/web/core/components/workspace/create-workspace-form.tsx @@ -36,6 +36,7 @@ type Props = { loading: string; default: string; }; + variant?: "default" | "nodedc-auth"; }; const workspaceService = new WorkspaceService(); @@ -51,7 +52,25 @@ export const CreateWorkspaceForm = observer(function CreateWorkspaceForm(props: loading: "workspace_creation.button.loading", default: "workspace_creation.button.default", }, + variant = "default", } = props; + const isNodeDCAuth = variant === "nodedc-auth"; + const formClassName = isNodeDCAuth ? "space-y-7" : "space-y-6 sm:space-y-9"; + const fieldsClassName = isNodeDCAuth ? "space-y-5" : "space-y-6 sm:space-y-7"; + const fieldClassName = isNodeDCAuth ? "flex flex-col gap-2 text-12 text-secondary" : "flex flex-col gap-2 text-13"; + const inputShellClassName = isNodeDCAuth ? "nodedc-auth-input-shell flex w-full items-center px-4" : "flex flex-col gap-1"; + const inputClassName = isNodeDCAuth ? "nodedc-auth-input h-12 w-full px-0 py-0 text-14" : "w-full"; + const urlShellClassName = isNodeDCAuth + ? "nodedc-auth-input-shell flex w-full items-center px-4" + : "flex w-full items-center rounded-md border border-subtle bg-layer-2 px-3"; + const urlInputClassName = isNodeDCAuth + ? "nodedc-auth-input block h-12 w-full border-none bg-transparent !px-0 py-0 text-14" + : "block w-full rounded-md border-none bg-transparent !px-0 py-2 text-12"; + const dropdownClassName = isNodeDCAuth + ? "nodedc-auth-input-shell flex min-h-12 items-center px-4 text-14 shadow-none" + : "rounded-md border border-subtle bg-layer-2 px-3 py-2 text-13 shadow-none"; + const errorClassName = isNodeDCAuth ? "text-12 text-[rgb(var(--nodedc-accent-rgb))]" : "text-13 text-danger-primary"; + const requiredMark = isNodeDCAuth ? null : *; // states const [slugError, setSlugError] = useState(false); const [invalidSlug, setInvalidSlug] = useState(false); @@ -111,18 +130,18 @@ export const CreateWorkspaceForm = observer(function CreateWorkspaceForm(props: return (
{ void handleSubmit(handleCreateWorkspace)(e); }} > -
-
+
+
-
+
)} /> - {errors?.name?.message}
+ {errors?.name?.message}
-
+
-
- {window && window.location.host}/ +
+ {window && window.location.host}/ )} />
{slugError && ( -

+

{t("workspace_creation.errors.validation.url_already_taken")}

)} {invalidSlug && ( -

{t("workspace_creation.errors.validation.url_alphanumeric")}

+

{t("workspace_creation.errors.validation.url_alphanumeric")}

)} - {errors.slug && {errors.slug.message}} + {errors.slug && {errors.slug.message}}
-
+
{t("workspace_creation.form.organization_size.label")} - * + {requiredMark}
) } - menuButtonWrapperClassName="rounded-md border border-subtle bg-layer-2 px-3 py-2 text-13 shadow-none" + menuButtonWrapperClassName={dropdownClassName} /> )} /> {errors.organization_size && ( - {errors.organization_size.message} + {errors.organization_size.message} )}
-
+
{secondaryButton} - {!secondaryButton && ( - )} diff --git a/plane-src/apps/web/styles/globals.css b/plane-src/apps/web/styles/globals.css index e9e0854..40fc544 100644 --- a/plane-src/apps/web/styles/globals.css +++ b/plane-src/apps/web/styles/globals.css @@ -2585,6 +2585,36 @@ color: rgb(var(--nodedc-on-card-active-rgb)) !important; } + .nodedc-auth-secondary-button { + width: 100%; + min-height: 3rem; + border: 0 !important; + outline: none !important; + box-shadow: none !important; + border-radius: 1.15rem !important; + background: + linear-gradient(180deg, rgba(255, 255, 255, 0.028) 0%, rgba(255, 255, 255, 0.012) 100%), rgba(255, 255, 255, 0.03) !important; + color: var(--text-color-secondary) !important; + } + + .nodedc-auth-secondary-button:hover { + background: + linear-gradient(180deg, rgba(255, 255, 255, 0.038) 0%, rgba(255, 255, 255, 0.018) 100%), rgba(255, 255, 255, 0.05) !important; + color: var(--text-color-primary) !important; + } + + .nodedc-create-workspace-card { + max-width: 32rem; + } + + .nodedc-create-workspace-card input:-webkit-autofill, + .nodedc-create-workspace-card input:-webkit-autofill:hover, + .nodedc-create-workspace-card input:-webkit-autofill:focus { + -webkit-text-fill-color: var(--text-color-primary); + box-shadow: 0 0 0 1000px transparent inset !important; + transition: background-color 9999s ease-out 0s; + } + .nodedc-error-shell { width: 100%; max-width: 36rem;