diff --git a/apps/mail/components/create/ai-chat.tsx b/apps/mail/components/create/ai-chat.tsx index d1576ad87..a1eb9caeb 100644 --- a/apps/mail/components/create/ai-chat.tsx +++ b/apps/mail/components/create/ai-chat.tsx @@ -139,7 +139,7 @@ export function AIChat() { const [searchValue] = useSearchValue(); const { messages, input, setInput, error, handleSubmit, status, stop } = useChat({ - api: `${process.env.NEXT_PUBLIC_BACKEND_URL}/chat`, + api: `${process.env.NEXT_PUBLIC_BACKEND_URL}/api/chat`, fetch: (url, options) => fetch(url, { ...options, method: 'POST', credentials: 'include' }), maxSteps: 5, body: { diff --git a/apps/mail/components/create/email-composer.tsx b/apps/mail/components/create/email-composer.tsx index 5526449ee..b9f14eb81 100644 --- a/apps/mail/components/create/email-composer.tsx +++ b/apps/mail/components/create/email-composer.tsx @@ -869,7 +869,7 @@ export function EmailComposer({ )} -
+
Generate
@@ -879,7 +879,7 @@ export function EmailComposer({ + + + {isStarred ? t('common.threadDisplay.unstar') : t('common.threadDisplay.star')} + + + + + + + + {t('common.threadDisplay.archive')} + + + {!isFolderBin ? ( - {isStarred ? t('common.threadDisplay.unstar') : t('common.threadDisplay.star')} + {t('common.actions.Bin')} - - - - - - {t('common.threadDisplay.archive')} - - - {!isFolderBin ? ( - - - - - - {t('common.actions.Bin')} - - - ) : null} - - )} + ) : null} +
diff --git a/apps/mail/components/onboarding.tsx b/apps/mail/components/onboarding.tsx index c02787ac9..ee8ad7354 100644 --- a/apps/mail/components/onboarding.tsx +++ b/apps/mail/components/onboarding.tsx @@ -1,56 +1,63 @@ 'use client'; -import { useState, useEffect } from 'react'; import { Dialog, DialogContent, DialogTitle } from '@/components/ui/dialog'; import { Button } from '@/components/ui/button'; +import { useState, useEffect } from 'react'; import confetti from 'canvas-confetti'; +import Image from 'next/image'; const steps = [ { title: 'Welcome to Zero Email!', description: 'Your new intelligent email experience starts here.', - video: '/onboarding/get-started.png' + video: '/onboarding/get-started.png', }, { title: 'Chat with your inbox', description: 'Zero allows you to chat with your inbox and do tasks on your behalf.', - video: '/onboarding/step2.gif' + video: '/onboarding/step2.gif', }, { title: 'AI Compose & Reply', description: 'Our AI assistant allows you to write emails with a single click.', - video: '/onboarding/step1.gif' + video: '/onboarding/step1.gif', }, { title: 'Label your emails', description: 'Zero helps you label your emails and helps you focus on what matters.', - video: '/onboarding/step3.gif' + video: '/onboarding/step3.gif', }, { title: 'Coming Soon', description: ( <> - We're excited to bring these powerful features to all users very soon! - + + We're excited to bring these powerful features to all users very soon!
Voice AI
Actions
Calendar Integration
-
And much more!
+
And much more!
), - video: null + video: null, }, { title: 'Ready to start?', description: 'Click below to begin your intelligent email experience!', - video: '/onboarding/ready.png' + video: '/onboarding/ready.png', }, ]; -export function OnboardingDialog({ open, onOpenChange }: { open: boolean; onOpenChange: (open: boolean) => void }) { +export function OnboardingDialog({ + open, + onOpenChange, +}: { + open: boolean; + onOpenChange: (open: boolean) => void; +}) { const [currentStep, setCurrentStep] = useState(0); useEffect(() => { @@ -58,7 +65,7 @@ export function OnboardingDialog({ open, onOpenChange }: { open: boolean; onOpen confetti({ particleCount: 100, spread: 70, - origin: { y: 0.6 } + origin: { y: 0.6 }, }); } }, [currentStep]); @@ -85,8 +92,11 @@ export function OnboardingDialog({ open, onOpenChange }: { open: boolean; onOpen return ( - -
+ +
{steps.map((_, index) => ( @@ -100,28 +110,27 @@ export function OnboardingDialog({ open, onOpenChange }: { open: boolean; onOpen
-

- {steps[currentStep]?.title} -

-

+

{steps[currentStep]?.title}

+

{steps[currentStep]?.description}

- + {/* Video/GIF Section */} -
+
{steps[currentStep]?.video && ( -
- + {steps[currentStep].title}
)}
-
+
-
diff --git a/apps/server/src/main.ts b/apps/server/src/main.ts index ca6777ec5..93aba56c6 100644 --- a/apps/server/src/main.ts +++ b/apps/server/src/main.ts @@ -27,6 +27,8 @@ const api = new Hono<{ Variables: HonoVariables; Bindings: Env }>() c.set('session', session); await next(); }) + .post('/chat', async (c) => chatHandler(c)) + .get('/mailto-handler', async (c) => mailtoHandler(c)) .on(['GET', 'POST'], '/auth/*', (c) => c.var.auth.handler(c.req.raw)) .use( trpcServer({ @@ -39,8 +41,6 @@ const api = new Hono<{ Variables: HonoVariables; Bindings: Env }>() }, }), ) - .post('/chat', async (c) => chatHandler(c)) - .get('/mailto-handler', async (c) => mailtoHandler(c)) .onError(async (err, c) => { if (err instanceof Response) return err; console.error('Error in Hono handler:', err);