From 41f9eae61dea6f98672bce30329303c7f31ec9e2 Mon Sep 17 00:00:00 2001 From: shiva raj badu Date: Thu, 16 Apr 2026 19:00:24 +0545 Subject: [PATCH] refactor: Update Onboarding UI --- .../(dashboard)/settings/TextProvider.tsx | 2 +- .../servers/nextjs/components/CodexConfig.tsx | 68 ++-- .../OnBoarding/OnBoardingHeader.tsx | 2 +- .../OnBoarding/OnBoardingSlidebar.tsx | 2 +- .../components/OnBoarding/PresentonMode.tsx | 91 +++-- .../servers/nextjs/utils/providerConstants.ts | 25 +- electron/servers/nextjs/utils/storeHelpers.ts | 4 +- .../(dashboard)/settings/ImageProvider.tsx | 6 +- .../(dashboard)/settings/SettingCodex.tsx | 1 + .../(dashboard)/settings/SettingPage.tsx | 112 ++++++- .../(dashboard)/settings/SettingSideBar.tsx | 54 ++- .../(dashboard)/settings/TextProvider.tsx | 265 ++++++++------- .../(dashboard)/settings/loading.tsx | 159 +++++---- .../upload/components/AdvanceSettings.tsx | 10 +- servers/nextjs/components/CodexConfig.tsx | 68 ++-- servers/nextjs/components/Home.tsx | 197 +---------- .../components/OnBoarding/FinalStep.tsx | 221 ++++++------ .../components/OnBoarding/ModeSelectStep.tsx | 45 +-- .../OnBoarding/OnBoardingHeader.tsx | 26 +- .../OnBoarding/OnBoardingSlidebar.tsx | 10 +- .../components/OnBoarding/PresentonMode.tsx | 108 +++--- servers/nextjs/components/ui/sonner.tsx | 314 +++++++++++------- .../public/providers/image-provider.png | Bin 30564 -> 0 bytes servers/nextjs/utils/providerConstants.ts | 50 +-- servers/nextjs/utils/storeHelpers.ts | 2 +- 25 files changed, 997 insertions(+), 845 deletions(-) delete mode 100644 servers/nextjs/public/providers/image-provider.png diff --git a/electron/servers/nextjs/app/(presentation-generator)/(dashboard)/settings/TextProvider.tsx b/electron/servers/nextjs/app/(presentation-generator)/(dashboard)/settings/TextProvider.tsx index 2d1626cf..5e55c835 100644 --- a/electron/servers/nextjs/app/(presentation-generator)/(dashboard)/settings/TextProvider.tsx +++ b/electron/servers/nextjs/app/(presentation-generator)/(dashboard)/settings/TextProvider.tsx @@ -307,7 +307,7 @@ const TextProvider = ({ No provider found. - {Object.values(LLM_PROVIDERS).map( + {Object.values([{ value: 'codex', label: 'ChatGPT', description: 'ChatGPT Plus/Pro via OAuth', icon: '/providers/openai.png' }, ...Object.values(LLM_PROVIDERS)]).map( (provider, index) => ( +
- +
-

Checking status

-

+

Checking status

+

Verifying your ChatGPT connection…

@@ -246,14 +249,14 @@ export default function CodexConfig({ if (authStatus === "polling") { return (
-
+
-
- +
+
-

Waiting for sign-in

-

+

Waiting for sign-in

+

Complete sign-in in the browser tab we opened.

@@ -261,21 +264,21 @@ export default function CodexConfig({
-
-

+

+

Paste redirect URL or code if you were not redirected automatically

setManualCode(e.target.value)} /> @@ -283,7 +286,7 @@ export default function CodexConfig({ type="button" onClick={handleManualExchange} disabled={isExchanging || !manualCode.trim()} - className="shrink-0 px-4 py-2.5 bg-[#333333] hover:bg-[#444444] disabled:opacity-40 disabled:hover:bg-[#333333] rounded-[8px] text-sm font-medium text-white transition-colors flex items-center justify-center min-w-[88px]" + className="shrink-0 px-4 py-2.5 bg-[#EDEEEF] hover:bg-[#E4E5E6] disabled:opacity-40 disabled:hover:bg-[#EDEEEF] rounded-[8px] text-sm font-medium text-[#191919] transition-colors flex items-center justify-center min-w-[88px]" > {isExchanging ? ( @@ -298,28 +301,27 @@ export default function CodexConfig({ } if (authStatus === "authenticated") { - const planLabel = isPro === true ? "Pro" : isPro === false ? "Free" : "Unknown"; return (
- +
-

+

{username || email || (accountId ? `Account ${accountId}` : "ChatGPT Account")}

{email && username && ( -

{email}

+

{email}

)} {!email && accountId && ( -

ID: {accountId}

+

ID: {accountId}

)} -

Signed in to ChatGPT

+

Signed in to ChatGPT

@@ -330,9 +332,9 @@ export default function CodexConfig({ className="flex items-center justify-center px-3.5 py-2.5 bg-[#EDEEEF] rounded-[58px] minid:opacity-40 transition-colors" > {isRefreshing ? ( - + ) : ( - + )}
@@ -358,19 +360,19 @@ export default function CodexConfig({ return ( ); } diff --git a/electron/servers/nextjs/components/OnBoarding/OnBoardingHeader.tsx b/electron/servers/nextjs/components/OnBoarding/OnBoardingHeader.tsx index 0ec7e5a4..92fd7af5 100644 --- a/electron/servers/nextjs/components/OnBoarding/OnBoardingHeader.tsx +++ b/electron/servers/nextjs/components/OnBoarding/OnBoardingHeader.tsx @@ -3,7 +3,7 @@ import React from 'react' const OnBoardingHeader = ({ currentStep, setStep }: { currentStep: number, setStep: (step: number) => void }) => { return ( -
+
{ diff --git a/electron/servers/nextjs/components/OnBoarding/OnBoardingSlidebar.tsx b/electron/servers/nextjs/components/OnBoarding/OnBoardingSlidebar.tsx index 3fb72b1a..9e2f3615 100644 --- a/electron/servers/nextjs/components/OnBoarding/OnBoardingSlidebar.tsx +++ b/electron/servers/nextjs/components/OnBoarding/OnBoardingSlidebar.tsx @@ -3,7 +3,7 @@ import React from 'react' const OnBoardingSlidebar = ({ step }: { step: number }) => { return (
- Presenton logo + Presenton logo {step !== 3 && diff --git a/electron/servers/nextjs/components/OnBoarding/PresentonMode.tsx b/electron/servers/nextjs/components/OnBoarding/PresentonMode.tsx index d741820f..91c8a862 100644 --- a/electron/servers/nextjs/components/OnBoarding/PresentonMode.tsx +++ b/electron/servers/nextjs/components/OnBoarding/PresentonMode.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useMemo, useState } from 'react' import { Popover, PopoverContent, PopoverTrigger } from '../ui/popover'; import { Button } from '../ui/button'; -import { Check, CheckCircle, ChevronLeft, ChevronUp, Download, Eye, EyeOff, Loader2 } from 'lucide-react'; +import { ArrowUpRight, Check, CheckCircle, ChevronLeft, ChevronUp, Download, Eye, EyeOff, Info, Loader2 } from 'lucide-react'; import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from '../ui/command'; import { DALLE_3_QUALITY_OPTIONS, GPT_IMAGE_1_5_QUALITY_OPTIONS, IMAGE_PROVIDERS, LLM_PROVIDERS } from '@/utils/providerConstants'; import { cn } from '@/lib/utils'; @@ -231,7 +231,7 @@ const PresentonMode = ({ currentStep, setStep }: { currentStep: number, setStep: DALL·E 3 Image Quality
- setLlmConfig((prev) => ({ ...prev, DALL_E_3_QUALITY: value }))}> @@ -258,7 +258,7 @@ const PresentonMode = ({ currentStep, setStep }: { currentStep: number, setStep:
- {llmConfig.LLM !== 'ollama' && llmConfig.LLM !== 'codex' && (!modelsChecked || (modelsChecked && availableModels.length === 0)) && ( + {llmConfig.LLM !== 'ollama' && llmConfig.LLM !== 'codex' && llmConfig.LLM !== 'chatgpt' && (!modelsChecked || (modelsChecked && availableModels.length === 0)) && ( )} @@ -641,7 +656,7 @@ const PresentonMode = ({ currentStep, setStep }: { currentStep: number, setStep:
-

+ {/* Model Selection - only show if models are available */} {llmConfig.LLM !== 'codex' && modelsChecked && availableModels.length > 0 && ( @@ -729,7 +744,7 @@ const PresentonMode = ({ currentStep, setStep }: { currentStep: number, setStep:
{/* Image Provider */} -
+
{!llmConfig.DISABLE_IMAGE_GENERATION && ( -
+
{/* Image Provider Selection */}