@@ -15,7 +15,7 @@ import { AiTextArea, Button, Loader, Typography } from "@components/atoms";
1515import { ImportProjectModal , NewProjectModal } from "@components/organisms" ;
1616import { ChatbotIframe } from "@components/organisms/chatbotIframe/chatbotIframe" ;
1717
18- const pillsPerPage = 4 ;
18+ const pillsPerPage = 5 ;
1919
2020export const AiLandingPage = ( ) => {
2121 const { t : tAi } = useTranslation ( "dashboard" , { keyPrefix : "ai" } ) ;
@@ -126,169 +126,169 @@ export const AiLandingPage = () => {
126126 const showQuickstart = ! projectsList . some ( ( project ) => project . name . toLowerCase ( ) === "quickstart" ) ;
127127
128128 return (
129- < div className = "relative flex min-h-screen flex-col overflow-y-scroll bg-[#1B1C1A] text-white" >
130- < header className = "relative z-10 border-b border-gray-900/50 p-4 md:px-6" >
131- < div className = "mx-auto flex w-full flex-col items-start justify-between gap-4 sm:flex-row sm:items-center" >
132- < div className = "flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center sm:gap-3 md:gap-4" >
133- { showQuickstart ? (
129+ < div className = "my-1.5 flex size-full overflow-hidden rounded-none md:rounded-2xl" >
130+ < div className = "flex flex-1 flex-col bg-[#1B1C1A] text-white" >
131+ < header className = "relative z-10 border-b border-gray-900/50 p-4 md:px-6" >
132+ < div className = "mx-auto flex w-full flex-col items-start justify-between gap-4 sm:flex-row sm:items-center" >
133+ < div className = "flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center sm:gap-3 md:gap-4" >
134+ { showQuickstart ? (
135+ < Button
136+ className = "flex w-full items-center rounded-full border border-green-400/30 bg-transparent px-4 py-2 text-base text-[#bcf870] hover:border-green-400/50 hover:bg-green-400/10 sm:w-auto md:px-6 md:text-sm"
137+ onClick = { ( ) => handleStartTutorial ( TourId . quickstart ) }
138+ >
139+ { isStarting ? (
140+ < div className = "flex h-6 w-[5.95rem] items-center justify-center" >
141+ < Loader size = "sm" />
142+ </ div >
143+ ) : (
144+ < Typography className = "font-normal" > Start Tutorial</ Typography >
145+ ) }
146+ </ Button >
147+ ) : null }
134148 < Button
135- className = "w-full rounded-full border border-green-400/30 bg-transparent px-4 py-2 text-base text-[#bcf870] hover:border-green-400/50 hover:bg-green-400/10 sm:w-auto md:px-6 md:text-sm "
136- onClick = { ( ) => handleStartTutorial ( TourId . quickstart ) }
149+ className = "w-full rounded-full border border-green-400/50 bg-transparent px-4 py-2 text-base text-[#bcf870] hover:border-green-400/70 hover:bg-green-400/10 sm:w-auto md:px-6 md:text-base "
150+ onClick = { handleStartFromTemplate }
137151 >
138- { isStarting ? (
139- < Loader isCenter size = "sm" />
140- ) : (
141- < Typography className = "font-normal" > Start Tutorial</ Typography >
142- ) }
152+ < Typography className = "font-normal" > Start from Template</ Typography >
143153 </ Button >
144- ) : null }
145- < Button
146- className = "w-full rounded-full border border-green-400/50 bg-transparent px-4 py-2 text-base text-[#bcf870] hover:border-green-400/70 hover:bg-green-400/10 sm:w-auto md:px-6 md:text-base"
147- onClick = { handleStartFromTemplate }
148- >
149- < Typography className = "font-normal" > Start from Template</ Typography >
150- </ Button >
154+ < Button
155+ ariaLabel = "New Project From Scratch"
156+ className = "w-full rounded-full border border-green-400/50 bg-transparent px-4 py-2 text-base text-[#bcf870] hover:border-green-400/70 hover:bg-green-400/10 sm:w-auto md:px-6 md:text-base"
157+ onClick = { handleNewProject }
158+ title = "New Project From Scratch"
159+ >
160+ < Typography className = "font-normal" > New Project</ Typography >
161+ </ Button >
162+ </ div >
151163 < Button
152- ariaLabel = "New Project From Scratch"
153- className = "w-full rounded-full border border-green-400/50 bg-transparent px-4 py-2 text-base text-[#bcf870] hover:border-green-400/70 hover:bg-green-400/10 sm:w-auto md:px-6 md:text-base"
154- onClick = { handleNewProject }
155- title = "New Project From Scratch"
164+ className = "ml-2 w-full rounded-full bg-transparent text-base text-[#bcf870] hover:underline sm:w-auto"
165+ onClick = { handleLearnMore }
156166 >
157- < Typography className = "font-normal" > New Project </ Typography >
167+ { tAi ( "learnMore" ) }
158168 </ Button >
159169 </ div >
160- < Button
161- className = "ml-2 w-full rounded-full bg-transparent text-base text-[#bcf870] hover:underline sm:w-auto"
162- onClick = { handleLearnMore }
163- >
164- { tAi ( "learnMore" ) }
165- </ Button >
166- </ div >
167- </ header >
170+ </ header >
168171
169- < main className = "relative mt-[5%] flex flex-1 flex-col items-center p-4 md:px-6" >
170- < div className = "relative z-10 flex w-full max-w-6xl flex-col items-center gap-8 md:gap-12" >
171- < div className = "mt-8 text-center" >
172- < Typography
173- className = "mb-8 text-2xl font-black leading-tight sm:text-3xl md:mb-12 md:text-4xl lg:text-5xl"
174- element = "h1"
175- >
176- < span className = "text-white" > Build AI Agents & Automations in Minutes </ span >
177- </ Typography >
178- < Typography className = "mb-8 text-xl text-[#fdfffa] sm:text-2xl md:text-3xl" element = "h2" >
179- Create workflows and connect applications by chatting with AI
180- </ Typography >
181- </ div >
172+ < main className = "relative mt-[5%] flex flex-1 flex-col items-center p-4 md:px-6" >
173+ < div className = "relative z-10 flex w-full max-w-6xl flex-col items-center gap-8 md:gap-12" >
174+ < div className = "mt-8 text-center" >
175+ < Typography
176+ className = "mb-8 text-2xl font-black leading-tight sm:text-3xl md:mb-12 md:text-4xl lg:text-5xl"
177+ element = "h1"
178+ >
179+ < span className = "text-white" > Build AI Agents & Automations in Minutes </ span >
180+ </ Typography >
181+ < Typography className = "mb-8 text-xl text-[#fdfffa] sm:text-2xl md:text-3xl" element = "h2" >
182+ Create workflows and connect applications by chatting with AI
183+ </ Typography >
184+ </ div >
182185
183- < div className = "w-11/12 md:w-3/5" >
184- < form className = "mb-4 md:mb-6" onSubmit = { handleSubmit ( onSubmit ) } >
185- < AiTextArea
186- className = "text-white placeholder:pl-2 placeholder:text-white"
187- errors = { errors }
188- prompt = { prompt }
189- { ...register ( "message" , {
190- required : tAi ( "aiPage.requiredMessage" ) ,
191- onChange : ( e ) => {
192- if ( errors . message && e . target . value . trim ( ) ) {
193- clearErrors ( "message" ) ;
194- }
195- } ,
196- } ) }
197- />
198- </ form >
199- </ div >
200- < div className = "flex w-full flex-col items-center gap-4" >
201- < div className = "flex w-full max-w-6xl flex-wrap items-center justify-center gap-2 md:gap-3" >
202- { visiblePills . map ( ( suggestion , index ) => (
203- < button
204- className = { cn (
205- "cursor-pointer rounded-full border border-gray-600/50 bg-gray-1200 px-3 py-1.5" ,
206- "w-full text-sm text-gray-400 transition-all duration-300 sm:w-[calc(50%-0.375rem)] sm:px-4 sm:py-3 sm:text-sm md:w-[calc(25%-1.5rem)] md:text-sm" ,
207- "hover:border-green-400/50 hover:bg-gray-1100 hover:text-gray-100" ,
208- {
209- "animate-[fadeIn_0.5s_ease-in-out]" : index < pillsPerPage ,
186+ < div className = "w-11/12 md:w-3/5" >
187+ < form className = "mb-4 md:mb-6" onSubmit = { handleSubmit ( onSubmit ) } >
188+ < AiTextArea
189+ className = "text-white placeholder:pl-2 placeholder:text-white"
190+ errors = { errors }
191+ prompt = { prompt }
192+ { ...register ( "message" , {
193+ required : tAi ( "aiPage.requiredMessage" ) ,
194+ onChange : ( e ) => {
195+ if ( errors . message && e . target . value . trim ( ) ) {
196+ clearErrors ( "message" ) ;
197+ }
198+ } ,
199+ } ) }
200+ />
201+ </ form >
202+ </ div >
203+ < div className = "flex w-full flex-col items-center gap-4" >
204+ < div className = "flex w-full max-w-6xl flex-wrap items-center justify-center gap-2 md:gap-3" >
205+ { visiblePills . map ( ( suggestion , index ) => (
206+ < button
207+ className = { cn (
208+ "cursor-pointer rounded-full border border-gray-600/50 bg-gray-1200 p-1.5" ,
209+ "w-full text-sm text-gray-400 transition-all duration-300 sm:w-[calc(50%-0.375rem)] sm:text-sm md:w-[calc(18%-0.5rem)] md:text-sm" ,
210+ "hover:border-green-400/50 hover:bg-gray-1100 hover:text-gray-100"
211+ ) }
212+ key = { index }
213+ onClick = { ( ) => onSuggestionClick ( suggestion . text ) }
214+ style = {
215+ index < pillsPerPage
216+ ? {
217+ animationDelay : `${ index * 50 } ms` ,
218+ }
219+ : undefined
210220 }
211- ) }
212- key = { index }
213- onClick = { ( ) => onSuggestionClick ( suggestion . text ) }
214- style = {
215- index < pillsPerPage
216- ? {
217- animationDelay : ` ${ index * 50 } ms` ,
218- }
219- : undefined
220- }
221- type = "button"
221+ type = "button"
222+ >
223+ < span className = "line-clamp-1" > { suggestion . title } </ span >
224+ </ button >
225+ ) ) }
226+ </ div >
227+
228+ { hasMorePills ? (
229+ < Button
230+ className = "group mt-2 bg-transparent text-sm text-gray-400 transition-all duration-300 hover:text-green-400"
231+ onClick = { handleLoadMore }
222232 >
223- < span className = "line-clamp-1" > { suggestion . title } </ span >
224- </ button >
225- ) ) }
233+ < Typography className = "flex items-center gap-2 font-medium" >
234+ More
235+ < svg
236+ className = "size-4"
237+ fill = "none"
238+ stroke = "currentColor"
239+ viewBox = "0 0 24 24"
240+ xmlns = "http://www.w3.org/2000/svg"
241+ >
242+ < path
243+ d = "M19 9l-7 7-7-7"
244+ strokeLinecap = "round"
245+ strokeLinejoin = "round"
246+ strokeWidth = { 2 }
247+ />
248+ </ svg >
249+ </ Typography >
250+ </ Button >
251+ ) : null }
226252 </ div >
227-
228- { hasMorePills ? (
253+ </ div >
254+ </ main >
255+ < NewProjectModal />
256+ < ImportProjectModal />
257+ { isModalOpen ? (
258+ < div className = "fixed inset-0 z-[99] flex items-center justify-center bg-black/60 p-2 sm:p-4" >
259+ < div className = "relative h-[95vh] w-full bg-black sm:h-[90vh] sm:w-[90vw] md:h-[85vh] md:w-[85vw]" >
229260 < Button
230- className = "group mt-2 bg-transparent px-6 py-2 text-sm text-gray-400 transition-all duration-300 hover:text-green-400"
231- onClick = { handleLoadMore }
261+ aria-label = { tAi ( "modal.closeLabel" ) }
262+ className = "absolute right-3 top-3 z-10 bg-transparent p-1.5 hover:bg-gray-200 sm:right-6 sm:top-6"
263+ onClick = { handleCloseModal }
232264 >
233- < Typography className = "flex items-center gap-2 font-medium" >
234- See all
235- < svg
236- className = "size-4 transition-transform duration-300 group-hover:translate-y-1"
237- fill = "none"
238- stroke = "currentColor"
239- viewBox = "0 0 24 24"
240- xmlns = "http://www.w3.org/2000/svg"
241- >
242- < path
243- d = "M19 9l-7 7-7-7"
244- strokeLinecap = "round"
245- strokeLinejoin = "round"
246- strokeWidth = { 2 }
247- />
248- </ svg >
249- </ Typography >
265+ < svg
266+ className = "size-4 text-gray-600 sm:size-5"
267+ fill = "none"
268+ stroke = "currentColor"
269+ viewBox = "0 0 24 24"
270+ xmlns = "http://www.w3.org/2000/svg"
271+ >
272+ < path
273+ d = "M6 18L18 6M6 6l12 12"
274+ strokeLinecap = "round"
275+ strokeLinejoin = "round"
276+ strokeWidth = { 2 }
277+ />
278+ </ svg >
250279 </ Button >
251- ) : null }
252- </ div >
253- </ div >
254- </ main >
255- < NewProjectModal />
256- < ImportProjectModal />
257- { isModalOpen ? (
258- < div className = "fixed inset-0 z-[99] flex items-center justify-center bg-black/60 p-2 sm:p-4" >
259- < div className = "relative h-[95vh] w-full bg-black sm:h-[90vh] sm:w-[90vw] md:h-[85vh] md:w-[85vw]" >
260- < Button
261- aria-label = { tAi ( "modal.closeLabel" ) }
262- className = "absolute right-3 top-3 z-10 bg-transparent p-1.5 hover:bg-gray-200 sm:right-6 sm:top-6"
263- onClick = { handleCloseModal }
264- >
265- < svg
266- className = "size-4 text-gray-600 sm:size-5"
267- fill = "none"
268- stroke = "currentColor"
269- viewBox = "0 0 24 24"
270- xmlns = "http://www.w3.org/2000/svg"
271- >
272- < path
273- d = "M6 18L18 6M6 6l12 12"
274- strokeLinecap = "round"
275- strokeLinejoin = "round"
276- strokeWidth = { 2 }
277- />
278- </ svg >
279- </ Button >
280- < ChatbotIframe
281- className = "size-full"
282- hideCloseButton
283- onConnect = { handleIframeConnect }
284- padded
285- title = { tAi ( "modal.assistantTitle" ) }
286- />
280+ < ChatbotIframe
281+ className = "size-full"
282+ hideCloseButton
283+ onConnect = { handleIframeConnect }
284+ padded
285+ title = { tAi ( "modal.assistantTitle" ) }
286+ />
287+ </ div >
287288 </ div >
288- </ div >
289- ) : null }
289+ ) : null }
290290
291- < style > { `
291+ < style > { `
292292 @keyframes fadeIn {
293293 from {
294294 opacity: 0;
@@ -300,6 +300,7 @@ export const AiLandingPage = () => {
300300 }
301301 }
302302 ` } </ style >
303+ </ div >
303304 </ div >
304305 ) ;
305306} ;
0 commit comments