From ee83aefabccd5ed90ec7fbd61201d533a7e130b9 Mon Sep 17 00:00:00 2001 From: yzned Date: Sat, 19 Jul 2025 21:33:53 +0300 Subject: [PATCH] create sig in flow LO --- src/components/interaction-panel/chat.tsx | 145 ++++++++++++++-- src/components/{common => }/main-menu.tsx | 2 +- src/components/ui/button.tsx | 2 +- src/components/ui/input.tsx | 62 +++++++ src/icons/arrow.svg | 3 + src/icons/clock.svg | 3 + src/icons/logo-with-text.svg | 10 ++ src/icons/logo.svg | 3 + src/icons/paperclip.svg | 3 + src/lib/constants.ts | 1 + src/routeTree.gen.ts | 126 +++++++++++++- src/routes/__root.tsx | 7 +- src/routes/auth.tsx | 22 +++ src/routes/auth/code.tsx | 171 +++++++++++++++++++ src/routes/auth/mail.tsx | 54 ++++++ src/routes/auth/username.tsx | 66 ++++++++ src/routes/index.tsx | 18 +- src/routes/mail-code/$mail-code.tsx | 193 ++++++++++++++++++++++ src/store/account.ts | 10 ++ src/styles.css | 8 + 20 files changed, 880 insertions(+), 29 deletions(-) rename src/components/{common => }/main-menu.tsx (92%) create mode 100644 src/components/ui/input.tsx create mode 100644 src/icons/arrow.svg create mode 100644 src/icons/clock.svg create mode 100644 src/icons/logo-with-text.svg create mode 100644 src/icons/logo.svg create mode 100644 src/icons/paperclip.svg create mode 100644 src/routes/auth.tsx create mode 100644 src/routes/auth/code.tsx create mode 100644 src/routes/auth/mail.tsx create mode 100644 src/routes/auth/username.tsx create mode 100644 src/routes/mail-code/$mail-code.tsx diff --git a/src/components/interaction-panel/chat.tsx b/src/components/interaction-panel/chat.tsx index 727010e..b386a04 100644 --- a/src/components/interaction-panel/chat.tsx +++ b/src/components/interaction-panel/chat.tsx @@ -1,24 +1,133 @@ -import { useAccountStore } from "@/contexts/AccountContext"; -import { Button } from "../ui/button"; import { observer } from "mobx-react-lite"; +import { useRef, useState } from "react"; +import Arrow from "@/icons/arrow.svg?react"; +import Paperclip from "@/icons/paperclip.svg?react"; +import Clock from "@/icons/clock.svg?react"; +import { cn } from "@/lib/utils"; -export const Chat = observer(() => { - const { isSandboxOpen, setIsSandboxOpen, isMainMenuOpen, setIsMainMenuOpen } = - useAccountStore(); - +const Chat = observer(() => { return ( -
- +
+
); }); + +const WelcomePanel = () => { + return ( +
+
+ + Hi! +
I will help you create a crypto project on Cytonic +
+ + +

Estimated build time: 3 minutes

+
+
+ +
+

+ Choose one of the most common prompts +
below or use your own to begin +

+
+ {[ + { emoji: "🐶", text: "Build a memecoin launchpad" }, + { emoji: "🏦", text: "Build a new stablecoin protocol" }, + { emoji: "🌐", text: "Create a RWA marketplace on Cytonic" }, + { emoji: "📊", text: "Ship a token dashboard" }, + ].map(({ emoji, text }) => ( + + ))} +
+ + +
+
+ ); +}; + +const ChatInput = () => { + const [message, setMessage] = useState(""); + const [showShadow, setShowShadow] = useState(false); + const textareaRef = useRef(null); + + const handleInput = (e: React.ChangeEvent) => { + const el = e.target; + setMessage(el.value); + + el.style.height = "auto"; + el.style.height = `${Math.min(el.scrollHeight, 200)}px`; + + setShowShadow(el.scrollTop + el.clientHeight < el.scrollHeight); + }; + + const handleScroll = () => { + const el = textareaRef.current; + if (!el) return; + setShowShadow(el.scrollTop + el.clientHeight < el.scrollHeight); + }; + + return ( +
+
+