From d035f48319702c853853d3afc3e7548dfb90cdda Mon Sep 17 00:00:00 2001 From: vshnosngh Date: Wed, 11 Nov 2026 10:47:00 +0530 Subject: [PATCH] feat(ui): complete redesign of tools pages, prominent buttons below photo upload, and futuristic processing animations --- src/app/globals.css | 65 +++ src/components/sections/ToolGridSection.tsx | 33 +- src/components/tools/DynamicToolWorkspace.tsx | 381 +++++++++++++----- src/components/tools/MaskCanvasEditor.tsx | 8 + src/components/tools/ProcessingOverlay.tsx | 140 +++++++ src/lib/api/mockEngine.ts | 4 +- 6 files changed, 520 insertions(+), 111 deletions(-) create mode 100644 src/components/tools/ProcessingOverlay.tsx diff --git a/src/app/globals.css b/src/app/globals.css index f91d250..fd740b0 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -525,5 +525,70 @@ button:disabled, scrollbar-width: none; } +/* Futuristic AI Processing Scanner & HUD Keyframes */ +@keyframes laser-sweep { + 0% { + top: -5%; + opacity: 0; + } + 15% { + opacity: 1; + } + 85% { + opacity: 1; + } + 100% { + top: 105%; + opacity: 0; + } +} + +@keyframes laser-glow-pulse { + 0%, 100% { + filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.7)) drop-shadow(0 0 20px rgba(99, 102, 241, 0.5)); + } + 50% { + filter: drop-shadow(0 0 16px rgba(56, 189, 248, 0.95)) drop-shadow(0 0 35px rgba(168, 85, 247, 0.7)); + } +} + +@keyframes hud-shimmer { + 0% { + background-position: -200% 0; + } + 100% { + background-position: 200% 0; + } +} + +.laser-scanner { + position: absolute; + left: 0; + right: 0; + height: 60px; + background: linear-gradient( + 180deg, + transparent 0%, + rgba(56, 189, 248, 0.08) 30%, + rgba(99, 102, 241, 0.35) 75%, + rgba(56, 189, 248, 0.95) 96%, + #ffffff 100% + ); + box-shadow: 0 4px 20px -2px rgba(56, 189, 248, 0.7), 0 0 30px rgba(99, 102, 241, 0.5); + animation: laser-sweep 2.4s cubic-bezier(0.45, 0, 0.55, 1) infinite, laser-glow-pulse 1.8s ease-in-out infinite; + pointer-events: none; + z-index: 20; +} + +.laser-scanner-line { + position: absolute; + bottom: 0; + left: 0; + right: 0; + height: 2px; + background: #ffffff; + box-shadow: 0 0 8px #ffffff, 0 0 16px rgba(56, 189, 248, 1), 0 0 24px rgba(99, 102, 241, 0.9); +} + diff --git a/src/components/sections/ToolGridSection.tsx b/src/components/sections/ToolGridSection.tsx index 187abfc..8ecd532 100644 --- a/src/components/sections/ToolGridSection.tsx +++ b/src/components/sections/ToolGridSection.tsx @@ -394,6 +394,17 @@ function ToolCard({ const toolName = resolveLocalised(tool.name, locale); const toolSummary = resolveLocalised(tool.summary, locale); + const archetypeBadge = + tool.pageType === 'masking' + ? 'Smart Masking' + : tool.pageType === 'image-thumbnail' + ? 'Style Presets' + : tool.pageType === 'text-to-image' + ? 'Text-to-Image' + : tool.pageType === 'two-images' + ? 'Dual Fusion' + : 'Single-Click'; + return (
{/* Image Dominant Preview Frame */} @@ -402,9 +413,16 @@ function ToolCard({ {/* Info Area: Title, Subtitle, and Direct Action Button */}
- {/* Tool Title */} + {/* Badge & Tool Title */} +
+ + {archetypeBadge} + + Free browser trial +
+ -

+

{toolName}

@@ -415,15 +433,18 @@ function ToolCard({

- {/* Action Button Row */} + {/* Action Button Row: Highly Visible Prominent Primary Button */}
- Try tool in browser -
diff --git a/src/components/tools/DynamicToolWorkspace.tsx b/src/components/tools/DynamicToolWorkspace.tsx index 8591a73..8f02d0a 100644 --- a/src/components/tools/DynamicToolWorkspace.tsx +++ b/src/components/tools/DynamicToolWorkspace.tsx @@ -20,7 +20,10 @@ import { Image as ImageIcon, Check, ChevronRight, - Smartphone + Smartphone, + FolderOpen, + Zap, + ShieldCheck } from 'lucide-react'; import { ToolItem, @@ -34,6 +37,7 @@ import { CardBeforeAfterSlider } from '@/components/ui/CardBeforeAfterSlider'; import { MaskCanvasEditor } from './MaskCanvasEditor'; import { ThumbnailsSection } from './ThumbnailsSection'; import { AlternatingFeaturesSection } from './AlternatingFeaturesSection'; +import { ProcessingOverlay } from './ProcessingOverlay'; import { KineticText } from '@/components/magicui/kinetic-text'; import { AnimatedShinyText } from '@/components/magicui/animated-shiny-text'; import { BorderBeam } from '@/components/magicui/border-beam'; @@ -400,13 +404,46 @@ export function DynamicToolWorkspace({ afterLabel="RESULT" />
+ + {/* POST-EDIT ACTION BAR: DIRECTLY BELOW THE RESULT SLIDER */} +
+
+
+ + +
+ + + + Download Result (HD PNG) + +
+
) : ( /* PRE-EDIT WORKSPACE (Interactive Editing by Page Type) */ -
+
{/* 1. MASKING STUDIO (Auto-mask + Custom Mask Brush) */} {pageType === 'masking' && primaryPreview && ( -
+
Inpainting & Object Masking Studio @@ -420,6 +457,8 @@ export function DynamicToolWorkspace({ imageUrl={primaryPreview} config={tool.maskingConfig} locale={locale} + isProcessing={status === 'processing'} + toolName={toolName} onMaskChange={setHasMaskDrawn} onExportReady={(fn) => { getMaskBlobRef.current = fn; @@ -430,7 +469,7 @@ export function DynamicToolWorkspace({ {/* 2. IMAGE + THUMBNAIL STUDIO */} {pageType === 'image-thumbnail' && primaryPreview && ( -
+
{/* eslint-disable-next-line @next/next/no-img-element */} Uploaded preview + {status === 'processing' && ( + + )}
)} {/* 3. IMAGE-ONLY STUDIO */} {pageType === 'image-only' && primaryPreview && ( -
+
{/* eslint-disable-next-line @next/next/no-img-element */} Uploaded preview + {status === 'processing' && ( + + )}
)} @@ -462,16 +507,23 @@ export function DynamicToolWorkspace({ -