|
| 1 | +//@ts-nocheck |
| 2 | +import{ArrowUpRight,ChevronRight,ChevronLeft}from"lucide-react"; |
| 3 | +import{editorState}from"../lib/backend"; |
| 4 | +import{useAtom}from"jotai"; |
| 5 | +importclsxfrom"clsx"; |
| 6 | + |
| 7 | +exportdefaultfunctionWelcome(){ |
| 8 | +const[currentEditorState,setCurrentEditorState]=useAtom(editorState); |
| 9 | + |
| 10 | +return( |
| 11 | +<div |
| 12 | +className={clsx( |
| 13 | +"absolute top-0 left-0 z-20 w-screen h-screen bg-[#1e1e1ebb] flex justify-center items-center transition-all ease-in-out duration-500", |
| 14 | +{ |
| 15 | +"hidden pointer-events-none opacity-0": |
| 16 | +currentEditorState!="welcome", |
| 17 | +} |
| 18 | +)} |
| 19 | +> |
| 20 | +{/* Settings Window */} |
| 21 | +<div |
| 22 | +className={clsx( |
| 23 | +"flex flex-col justify-center items-center py-8 px-5 gap-5 w-100 h-fit bg-primary-bg border border-border-bg rounded-4xl shadow-[0px_0px_100px_0px_#00000080] transition-all ease-in-out duration-500", |
| 24 | +{ |
| 25 | +"hidden pointer-events-none opacity-0 scale-0": |
| 26 | +currentEditorState!="welcome", |
| 27 | +} |
| 28 | +)} |
| 29 | +> |
| 30 | +<Intro/> |
| 31 | + |
| 32 | +<divclassName="flex gap-5"> |
| 33 | +<buttonclassName="flex text-sm gap-2 font-github font-semibold items-center rounded-xl text-black bg-gray-200 px-5 py-2 hover:scale-110 transition-all cursor-pointer active:scale-100 ease-in-out"> |
| 34 | +<ChevronLeftcolor="#000000"size={15}/> |
| 35 | +</button> |
| 36 | +<buttonclassName="flex text-sm gap-2 font-github font-semibold items-center rounded-xl text-black bg-gray-200 px-5 py-2 hover:scale-110 transition-all cursor-pointer active:scale-100 ease-in-out"> |
| 37 | +<ChevronRightcolor="#000000"size={15}/> |
| 38 | +</button> |
| 39 | +</div> |
| 40 | +</div> |
| 41 | +</div> |
| 42 | +); |
| 43 | +} |
| 44 | + |
| 45 | +// Pages for the Welcom Popup |
| 46 | +functionIntro(){ |
| 47 | +constprofileImg="https://avatars.githubusercontent.com/karthik-saiharsh"; |
| 48 | +return( |
| 49 | +<divclassName="w-full flex flex-col justify-center items-center select-none"> |
| 50 | +<img |
| 51 | +src={profileImg} |
| 52 | +alt="Karthik Saiharsh" |
| 53 | +className="rounded-full w-60 h-60 border-2 border-blue-500" |
| 54 | +/> |
| 55 | +<pclassName="font-github text-white font-semibold text-center my-5"> |
| 56 | + Karthik Saiharsh |
| 57 | +</p> |
| 58 | +<pclassName="font-github text-white font-normal text-center w-[90%]"> |
| 59 | + Hey! I'm Karthik, the creator of FSM Engine. Glad you took time to check |
| 60 | + it out. |
| 61 | +</p> |
| 62 | +<buttonclassName="flex text-sm gap-2 font-github font-semibold mt-5 items-center rounded-xl text-white bg-blue-500 px-5 py-2 hover:scale-110 transition-all cursor-pointer active:scale-100 ease-in-out"> |
| 63 | + View Github Repo |
| 64 | +<ArrowUpRightcolor="#ffffff"size={24}/> |
| 65 | +</button> |
| 66 | +</div> |
| 67 | +); |
| 68 | +} |