2024-05-08 23:01:20 +05:30
|
|
|
"use client";
|
|
|
|
|
|
2024-06-20 14:08:52 +05:30
|
|
|
import { observer } from "mobx-react";
|
2024-05-08 23:01:20 +05:30
|
|
|
import Image from "next/image";
|
2024-11-26 23:57:41 +05:30
|
|
|
import Link from "next/link";
|
2025-11-06 00:09:35 -08:00
|
|
|
import { useTheme as useNextTheme } from "next-themes";
|
2024-05-08 23:01:20 +05:30
|
|
|
// ui
|
2025-09-30 15:31:00 +05:30
|
|
|
import { Button, getButtonStyling } from "@plane/propel/button";
|
2024-12-20 20:44:46 +05:30
|
|
|
import { resolveGeneralTheme } from "@plane/utils";
|
2024-05-10 02:32:42 +05:30
|
|
|
// hooks
|
2025-11-06 00:09:35 -08:00
|
|
|
import TakeoffIconDark from "@/app/assets/logos/takeoff-icon-dark.svg?url";
|
|
|
|
|
import TakeoffIconLight from "@/app/assets/logos/takeoff-icon-light.svg?url";
|
2024-05-24 16:59:49 +05:30
|
|
|
import { useTheme } from "@/hooks/store";
|
2024-05-08 23:01:20 +05:30
|
|
|
// icons
|
|
|
|
|
|
2025-11-06 00:09:35 -08:00
|
|
|
export const NewUserPopup = observer(() => {
|
2024-05-08 23:01:20 +05:30
|
|
|
// hooks
|
|
|
|
|
const { isNewUserPopup, toggleNewUserPopup } = useTheme();
|
|
|
|
|
// theme
|
2025-11-06 00:09:35 -08:00
|
|
|
const { resolvedTheme } = useNextTheme();
|
2024-05-08 23:01:20 +05:30
|
|
|
|
|
|
|
|
if (!isNewUserPopup) return <></>;
|
|
|
|
|
return (
|
|
|
|
|
<div className="absolute bottom-8 right-8 p-6 w-96 border border-custom-border-100 shadow-md rounded-lg bg-custom-background-100">
|
|
|
|
|
<div className="flex gap-4">
|
|
|
|
|
<div className="grow">
|
|
|
|
|
<div className="text-base font-semibold">Create workspace</div>
|
|
|
|
|
<div className="py-2 text-sm font-medium text-custom-text-300">
|
|
|
|
|
Instance setup done! Welcome to Plane instance portal. Start your journey with by creating your first
|
2024-11-26 23:57:41 +05:30
|
|
|
workspace.
|
2024-05-08 23:01:20 +05:30
|
|
|
</div>
|
|
|
|
|
<div className="flex items-center gap-4 pt-2">
|
2024-11-26 23:57:41 +05:30
|
|
|
<Link href="/workspace/create" className={getButtonStyling("primary", "sm")}>
|
2024-05-08 23:01:20 +05:30
|
|
|
Create workspace
|
2024-11-26 23:57:41 +05:30
|
|
|
</Link>
|
2024-05-08 23:01:20 +05:30
|
|
|
<Button variant="neutral-primary" size="sm" onClick={toggleNewUserPopup}>
|
|
|
|
|
Close
|
|
|
|
|
</Button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="shrink-0 flex items-center justify-center">
|
|
|
|
|
<Image
|
|
|
|
|
src={resolveGeneralTheme(resolvedTheme) === "dark" ? TakeoffIconDark : TakeoffIconLight}
|
|
|
|
|
height={80}
|
|
|
|
|
width={80}
|
|
|
|
|
alt="Plane icon"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
});
|