feat(ui): complete redesign of tools pages, prominent buttons below photo upload, and futuristic processing animations
This commit is contained in:
@@ -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"
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* POST-EDIT ACTION BAR: DIRECTLY BELOW THE RESULT SLIDER */}
|
||||
<div className="pt-6 border-t border-rule space-y-4">
|
||||
<div className="flex flex-col sm:flex-row items-center justify-between gap-4">
|
||||
<div className="flex items-center gap-2.5 w-full sm:w-auto order-2 sm:order-1">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setStatus('idle')}
|
||||
className="flex-1 sm:flex-none inline-flex items-center justify-center gap-2 px-6 py-3.5 rounded-2xl bg-paper-2 hover:bg-paper text-ink font-body text-xs sm:text-sm font-semibold border border-rule transition-colors cursor-pointer shadow-2xs"
|
||||
>
|
||||
<RefreshCw className="w-4 h-4 text-accent" />
|
||||
<span>Re-edit / Adjust</span>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
onClick={handleResetStudio}
|
||||
className="flex-1 sm:flex-none inline-flex items-center justify-center gap-2 px-6 py-3.5 rounded-2xl bg-paper-2 hover:bg-paper text-ink font-body text-xs sm:text-sm font-semibold border border-rule transition-colors cursor-pointer shadow-2xs"
|
||||
>
|
||||
<UploadCloud className="w-4 h-4 text-muted" />
|
||||
<span>Try Another Photo</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<a
|
||||
href={resultUrl}
|
||||
download={`${tool.slug}-result.png`}
|
||||
className="w-full sm:w-auto inline-flex items-center justify-center gap-3 px-8 sm:px-12 py-4 rounded-2xl sm:rounded-full bg-ink hover:bg-slate-900 text-paper-hi font-display font-bold text-sm sm:text-base shadow-xl hover:scale-[1.02] active:scale-98 transition-all cursor-pointer order-1 sm:order-2"
|
||||
>
|
||||
<Download className="w-5 h-5 text-accent" />
|
||||
<span>Download Result (HD PNG)</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
/* PRE-EDIT WORKSPACE (Interactive Editing by Page Type) */
|
||||
<div>
|
||||
<div className="space-y-6">
|
||||
{/* 1. MASKING STUDIO (Auto-mask + Custom Mask Brush) */}
|
||||
{pageType === 'masking' && primaryPreview && (
|
||||
<div className="space-y-6">
|
||||
<div className="space-y-4">
|
||||
<div className="flex items-center justify-between pb-2 border-b border-rule">
|
||||
<span className="text-xs font-semibold text-ink font-body">
|
||||
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 && (
|
||||
<div className="space-y-6">
|
||||
<div className="space-y-4">
|
||||
<div className="aspect-[4/3] sm:aspect-[16/10] max-h-[520px] w-full rounded-2xl overflow-hidden bg-paper-2 border border-rule relative">
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img
|
||||
@@ -438,13 +477,16 @@ export function DynamicToolWorkspace({
|
||||
alt="Uploaded preview"
|
||||
className="w-full h-full object-contain"
|
||||
/>
|
||||
{status === 'processing' && (
|
||||
<ProcessingOverlay toolName={toolName} />
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* 3. IMAGE-ONLY STUDIO */}
|
||||
{pageType === 'image-only' && primaryPreview && (
|
||||
<div className="space-y-6">
|
||||
<div className="space-y-4">
|
||||
<div className="aspect-[4/3] sm:aspect-[16/10] max-h-[520px] w-full rounded-2xl overflow-hidden bg-paper-2 border border-rule relative">
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img
|
||||
@@ -452,6 +494,9 @@ export function DynamicToolWorkspace({
|
||||
alt="Uploaded preview"
|
||||
className="w-full h-full object-contain"
|
||||
/>
|
||||
{status === 'processing' && (
|
||||
<ProcessingOverlay toolName={toolName} />
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
@@ -462,16 +507,23 @@ export function DynamicToolWorkspace({
|
||||
<label className="block text-xs font-semibold text-ink font-body">
|
||||
Prompt Description
|
||||
</label>
|
||||
<textarea
|
||||
rows={4}
|
||||
value={promptText}
|
||||
onChange={(e) => setPromptText(e.target.value)}
|
||||
placeholder={
|
||||
resolveLocalised(tool.textToImageConfig?.placeholder, locale) ||
|
||||
'Describe what you want to create in vivid detail (e.g. A futuristic cybernetic portrait with neon rim lighting in 4K resolution)...'
|
||||
}
|
||||
className="w-full p-4 rounded-2xl border border-rule bg-paper text-ink text-sm font-body placeholder:text-muted focus:outline-none focus:border-accent focus:ring-2 focus:ring-accent/20"
|
||||
/>
|
||||
<div className="relative">
|
||||
<textarea
|
||||
rows={4}
|
||||
value={promptText}
|
||||
onChange={(e) => setPromptText(e.target.value)}
|
||||
placeholder={
|
||||
resolveLocalised(tool.textToImageConfig?.placeholder, locale) ||
|
||||
'Describe what you want to create in vivid detail (e.g. A futuristic cybernetic portrait with neon rim lighting in 4K resolution)...'
|
||||
}
|
||||
className="w-full p-4 rounded-2xl border border-rule bg-paper text-ink text-sm font-body placeholder:text-muted focus:outline-none focus:border-accent focus:ring-2 focus:ring-accent/20"
|
||||
/>
|
||||
{status === 'processing' && (
|
||||
<div className="absolute inset-0 rounded-2xl overflow-hidden">
|
||||
<ProcessingOverlay toolName={toolName} />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Aspect Ratios Selector */}
|
||||
<div className="space-y-2">
|
||||
@@ -498,66 +550,146 @@ export function DynamicToolWorkspace({
|
||||
|
||||
{/* 5. TWO-IMAGES STUDIO */}
|
||||
{pageType === 'two-images' && (
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
{/* Primary Image Slot */}
|
||||
<div className="space-y-2">
|
||||
<span className="text-xs font-semibold text-ink font-body">
|
||||
{resolveLocalised(tool.twoImagesConfig?.firstImageLabel, locale) || 'Primary Photo'}
|
||||
</span>
|
||||
<div className="aspect-[4/3] rounded-2xl overflow-hidden bg-paper-2 border border-rule relative">
|
||||
{primaryPreview ? (
|
||||
// eslint-disable-next-line @next/next/no-img-element
|
||||
<img src={primaryPreview} alt="Primary" className="w-full h-full object-contain" />
|
||||
) : (
|
||||
<div className="w-full h-full flex flex-col items-center justify-center p-4 text-muted text-xs">
|
||||
<UploadCloud className="w-6 h-6 mb-2 text-accent" />
|
||||
<span>Upload primary photo</span>
|
||||
</div>
|
||||
)}
|
||||
<div className="relative">
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
{/* Primary Image Slot */}
|
||||
<div className="space-y-2">
|
||||
<span className="text-xs font-semibold text-ink font-body">
|
||||
{resolveLocalised(tool.twoImagesConfig?.firstImageLabel, locale) || 'Primary Photo'}
|
||||
</span>
|
||||
<div className="aspect-[4/3] rounded-2xl overflow-hidden bg-paper-2 border border-rule relative">
|
||||
{primaryPreview ? (
|
||||
// eslint-disable-next-line @next/next/no-img-element
|
||||
<img src={primaryPreview} alt="Primary" className="w-full h-full object-contain" />
|
||||
) : (
|
||||
<div className="w-full h-full flex flex-col items-center justify-center p-4 text-muted text-xs">
|
||||
<UploadCloud className="w-6 h-6 mb-2 text-accent" />
|
||||
<span>Upload primary photo</span>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Secondary Image Slot */}
|
||||
<div className="space-y-2">
|
||||
<span className="text-xs font-semibold text-ink font-body">
|
||||
{resolveLocalised(tool.twoImagesConfig?.secondImageLabel, locale) || 'Reference / Style Photo'}
|
||||
</span>
|
||||
<div className="aspect-[4/3] rounded-2xl overflow-hidden bg-paper-2 border border-rule relative">
|
||||
{secondaryPreview ? (
|
||||
// eslint-disable-next-line @next/next/no-img-element
|
||||
<img src={secondaryPreview} alt="Secondary" className="w-full h-full object-contain" />
|
||||
) : (
|
||||
<label className="w-full h-full flex flex-col items-center justify-center p-4 text-muted text-xs cursor-pointer hover:bg-paper transition-colors">
|
||||
<UploadCloud className="w-6 h-6 mb-2 text-accent" />
|
||||
<span>Click to upload reference photo</span>
|
||||
<input
|
||||
ref={secondaryFileInputRef}
|
||||
type="file"
|
||||
accept="image/*"
|
||||
className="hidden"
|
||||
onChange={(e) => {
|
||||
if (e.target.files?.[0]) handleSecondaryFileSelect(e.target.files[0]);
|
||||
}}
|
||||
/>
|
||||
</label>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Secondary Image Slot */}
|
||||
<div className="space-y-2">
|
||||
<span className="text-xs font-semibold text-ink font-body">
|
||||
{resolveLocalised(tool.twoImagesConfig?.secondImageLabel, locale) || 'Reference / Style Photo'}
|
||||
</span>
|
||||
<div className="aspect-[4/3] rounded-2xl overflow-hidden bg-paper-2 border border-rule relative">
|
||||
{secondaryPreview ? (
|
||||
// eslint-disable-next-line @next/next/no-img-element
|
||||
<img src={secondaryPreview} alt="Secondary" className="w-full h-full object-contain" />
|
||||
) : (
|
||||
<label className="w-full h-full flex flex-col items-center justify-center p-4 text-muted text-xs cursor-pointer hover:bg-paper transition-colors">
|
||||
<UploadCloud className="w-6 h-6 mb-2 text-accent" />
|
||||
<span>Click to upload reference photo</span>
|
||||
<input
|
||||
ref={secondaryFileInputRef}
|
||||
type="file"
|
||||
accept="image/*"
|
||||
className="hidden"
|
||||
onChange={(e) => {
|
||||
if (e.target.files?.[0]) handleSecondaryFileSelect(e.target.files[0]);
|
||||
}}
|
||||
/>
|
||||
</label>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
{status === 'processing' && (
|
||||
<ProcessingOverlay toolName={toolName} />
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* In-Studio Style Preset Thumbnails (for image-thumbnail or masking with thumbnails) */}
|
||||
{tool.thumbnails && tool.thumbnails.length > 0 && (
|
||||
<div className="pt-4 border-t border-rule">
|
||||
<ThumbnailsSection
|
||||
thumbnails={tool.thumbnails}
|
||||
selectedId={selectedThumbnail?.id}
|
||||
onSelect={(item) => setSelectedThumbnail(item)}
|
||||
locale={locale}
|
||||
variant="compact-bar"
|
||||
/>
|
||||
{/* In-Studio Style Preset Thumbnails (for image-thumbnail or masking with thumbnails) */}
|
||||
{tool.thumbnails && tool.thumbnails.length > 0 && (
|
||||
<div className="pt-4 border-t border-rule">
|
||||
<ThumbnailsSection
|
||||
thumbnails={tool.thumbnails}
|
||||
selectedId={selectedThumbnail?.id}
|
||||
onSelect={(item) => setSelectedThumbnail(item)}
|
||||
locale={locale}
|
||||
variant="compact-bar"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* ================================================================= */}
|
||||
{/* STUDIO MAIN ACTION BAR: CLEARLY VISIBLE PRIMARY & SECONDARY BUTTONS */}
|
||||
{/* DIRECTLY BELOW THE PHOTO UPLOAD CANVAS (USER MANDATE) */}
|
||||
{/* ================================================================= */}
|
||||
<div className="pt-6 border-t border-rule space-y-4">
|
||||
<div className="flex flex-col sm:flex-row items-center justify-between gap-4">
|
||||
|
||||
{/* Left: Secondary actions (Change Photo, Reset, etc.) */}
|
||||
<div className="flex items-center gap-2.5 w-full sm:w-auto order-2 sm:order-1">
|
||||
{pageType !== 'text-to-image' && (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => fileInputRef.current?.click()}
|
||||
className="flex-1 sm:flex-none inline-flex items-center justify-center gap-2 px-5 py-3.5 rounded-2xl bg-paper-2 hover:bg-paper text-ink font-body text-xs sm:text-sm font-semibold border border-rule transition-colors cursor-pointer shadow-2xs"
|
||||
>
|
||||
<FolderOpen className="w-4 h-4 text-accent" />
|
||||
<span>Change Photo</span>
|
||||
</button>
|
||||
)}
|
||||
|
||||
<button
|
||||
type="button"
|
||||
onClick={handleResetStudio}
|
||||
className="inline-flex items-center justify-center gap-1.5 px-4 py-3.5 rounded-2xl bg-paper-2 hover:bg-red-50 hover:text-red-600 hover:border-red-200 text-ink-2 font-body text-xs sm:text-sm font-medium border border-rule transition-colors cursor-pointer shadow-2xs"
|
||||
>
|
||||
<RotateCcw className="w-3.5 h-3.5" />
|
||||
<span>Reset</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* Right: Massive High-Visibility Main Process Button */}
|
||||
<div className="w-full sm:w-auto order-1 sm:order-2">
|
||||
<button
|
||||
type="button"
|
||||
onClick={handleExecute}
|
||||
disabled={status === 'processing'}
|
||||
className="w-full sm:w-auto inline-flex items-center justify-center gap-3 px-8 sm:px-12 py-4 rounded-2xl sm:rounded-full bg-accent hover:bg-accent-hi text-white font-display font-extrabold text-sm sm:text-base shadow-xl shadow-accent/25 hover:shadow-accent/40 hover:scale-[1.02] active:scale-98 transition-all cursor-pointer disabled:opacity-50 disabled:hover:scale-100"
|
||||
>
|
||||
{status === 'processing' ? (
|
||||
<>
|
||||
<Loader2 className="w-5 h-5 animate-spin" />
|
||||
<span>Processing Neural Model...</span>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<Sparkles className="w-5 h-5 text-amber-300 animate-pulse" />
|
||||
<span>
|
||||
{pageType === 'masking'
|
||||
? 'Inpaint & Remove Objects'
|
||||
: pageType === 'text-to-image'
|
||||
? 'Generate AI Artwork'
|
||||
: pageType === 'two-images'
|
||||
? 'Fuse Facial Identities'
|
||||
: pageType === 'image-thumbnail' && selectedThumbnail
|
||||
? `Apply ${resolveLocalised(selectedThumbnail.label, locale)} Look`
|
||||
: 'Process & Enhance Photo'}
|
||||
</span>
|
||||
<ArrowRight className="w-4 h-4" />
|
||||
</>
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-wrap items-center justify-between text-[11px] text-muted font-body px-1 gap-2">
|
||||
<span className="flex items-center gap-1 text-emerald-600 font-medium">
|
||||
<CheckCircle2 className="w-3 h-3" />
|
||||
<span>Volatile GPU memory execution · Zero server storage</span>
|
||||
</span>
|
||||
<span className="font-mono">{remainingTries} free daily operations remaining</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -670,41 +802,61 @@ export function DynamicToolWorkspace({
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Type 1, 2, 3: Single Drag & Drop Dropzone */}
|
||||
{/* Type 1, 2, 3: Single Drag & Drop Dropzone with Prominent Buttons Below */}
|
||||
{pageType !== 'text-to-image' && pageType !== 'two-images' && (
|
||||
<div
|
||||
onDragOver={(e) => e.preventDefault()}
|
||||
onDrop={(e) => {
|
||||
e.preventDefault();
|
||||
if (e.dataTransfer.files?.[0]) handlePrimaryFileSelect(e.dataTransfer.files[0]);
|
||||
}}
|
||||
onClick={() => fileInputRef.current?.click()}
|
||||
className="border-2 border-dashed border-rule hover:border-accent rounded-3xl p-8 sm:p-10 text-center bg-paper/60 hover:bg-accent/5 transition-all cursor-pointer group"
|
||||
>
|
||||
<input
|
||||
ref={fileInputRef}
|
||||
type="file"
|
||||
accept="image/jpeg,image/png,image/webp"
|
||||
className="hidden"
|
||||
onChange={(e) => {
|
||||
if (e.target.files?.[0]) handlePrimaryFileSelect(e.target.files[0]);
|
||||
<div className="space-y-4">
|
||||
<div
|
||||
onDragOver={(e) => e.preventDefault()}
|
||||
onDrop={(e) => {
|
||||
e.preventDefault();
|
||||
if (e.dataTransfer.files?.[0]) handlePrimaryFileSelect(e.dataTransfer.files[0]);
|
||||
}}
|
||||
/>
|
||||
onClick={() => fileInputRef.current?.click()}
|
||||
className="border-2 border-dashed border-rule hover:border-accent rounded-3xl p-7 sm:p-9 text-center bg-paper/60 hover:bg-accent/5 transition-all cursor-pointer group"
|
||||
>
|
||||
<input
|
||||
ref={fileInputRef}
|
||||
type="file"
|
||||
accept="image/jpeg,image/png,image/webp"
|
||||
className="hidden"
|
||||
onChange={(e) => {
|
||||
if (e.target.files?.[0]) handlePrimaryFileSelect(e.target.files[0]);
|
||||
}}
|
||||
/>
|
||||
|
||||
<div className="w-14 h-14 rounded-2xl bg-paper-hi border border-rule flex items-center justify-center text-accent mx-auto mb-4 group-hover:scale-110 group-hover:border-accent transition-transform shadow-xs">
|
||||
<UploadCloud className="w-7 h-7" />
|
||||
<div className="w-16 h-16 rounded-2xl bg-paper-hi border border-rule flex items-center justify-center text-accent mx-auto mb-3.5 group-hover:scale-110 group-hover:border-accent transition-transform shadow-xs">
|
||||
<UploadCloud className="w-8 h-8" />
|
||||
</div>
|
||||
|
||||
<h4 className="text-base sm:text-lg font-display font-bold text-ink">
|
||||
Drag and drop your image here
|
||||
</h4>
|
||||
<p className="text-xs text-muted font-body mt-1 max-w-xs mx-auto">
|
||||
Supports JPG, PNG, WebP up to 12MB. Zero server retention.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<h4 className="text-sm sm:text-base font-display font-bold text-ink">
|
||||
Upload your image to edit
|
||||
</h4>
|
||||
<p className="text-xs text-muted font-body mt-1 max-w-xs mx-auto">
|
||||
Drag & drop your photo here, or click to browse. Supports JPG, PNG, WebP up to 12MB.
|
||||
</p>
|
||||
{/* PROMINENT ACTION BUTTONS DIRECTLY BELOW PHOTO UPLOAD */}
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-3 pt-1">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => fileInputRef.current?.click()}
|
||||
className="w-full inline-flex items-center justify-center gap-2.5 px-6 py-4 rounded-2xl bg-accent hover:bg-accent-hi text-white font-display font-bold text-sm shadow-md hover:shadow-lg hover:scale-[1.01] active:scale-98 transition-all cursor-pointer group"
|
||||
>
|
||||
<FolderOpen className="w-4 h-4 text-white group-hover:scale-110 transition-transform" />
|
||||
<span>Select Photo to Upload</span>
|
||||
</button>
|
||||
|
||||
<div className="mt-4 inline-flex items-center gap-1.5 px-4 py-2 rounded-full bg-ink text-paper-hi text-xs font-semibold shadow-xs">
|
||||
<span>Select Photo</span>
|
||||
<ArrowRight className="w-3.5 h-3.5" />
|
||||
{samplePresets.length > 0 && (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => handleLoadSample(samplePresets[0].url, samplePresets[0].resultUrl)}
|
||||
className="w-full inline-flex items-center justify-center gap-2.5 px-6 py-4 rounded-2xl bg-paper-hi hover:bg-paper-2 border border-rule hover:border-accent text-ink font-body text-xs sm:text-sm font-semibold shadow-2xs hover:shadow-xs active:scale-98 transition-all cursor-pointer group"
|
||||
>
|
||||
<Sparkles className="w-4 h-4 text-accent group-hover:rotate-12 transition-transform" />
|
||||
<span>Try Demo Portrait</span>
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
@@ -789,19 +941,41 @@ export function DynamicToolWorkspace({
|
||||
onChange={(e) => setPromptText(e.target.value)}
|
||||
placeholder={
|
||||
resolveLocalised(tool.textToImageConfig?.placeholder, locale) ||
|
||||
'Describe what you want to create...'
|
||||
'Describe what you want to create (e.g. A solitary astronaut standing on crystal sands under a violet nebula, cinematic rim lighting, 8k resolution)...'
|
||||
}
|
||||
className="w-full p-4 rounded-2xl border border-rule bg-paper text-ink text-sm font-body placeholder:text-muted focus:outline-none focus:border-accent focus:ring-2 focus:ring-accent/20"
|
||||
/>
|
||||
|
||||
<div className="flex items-center gap-2">
|
||||
{/* Quick Prompt Ideas */}
|
||||
<div className="space-y-1.5">
|
||||
<span className="text-[11px] font-semibold text-muted font-body">Quick prompt inspiration:</span>
|
||||
<div className="flex flex-wrap items-center gap-1.5">
|
||||
{[
|
||||
'Cinematic 35mm portrait with golden hour rim light',
|
||||
'Makoto Shinkai anime cityscape under starry skies',
|
||||
'3D Disney character with luminous amber eyes',
|
||||
'Hyperrealistic wildlife in lush emerald rain forest'
|
||||
].map((samplePrompt) => (
|
||||
<button
|
||||
key={samplePrompt}
|
||||
type="button"
|
||||
onClick={() => setPromptText(samplePrompt)}
|
||||
className="px-2.5 py-1 rounded-xl bg-paper-2 hover:bg-paper text-ink-2 hover:text-ink text-[11px] font-body border border-rule transition-colors cursor-pointer text-left truncate max-w-full"
|
||||
>
|
||||
+ {samplePrompt}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-2 pt-1">
|
||||
<span className="text-xs text-muted font-body">Aspect:</span>
|
||||
{['1:1', '16:9', '9:16', '4:3'].map((ratio) => (
|
||||
<button
|
||||
key={ratio}
|
||||
type="button"
|
||||
onClick={() => setAspectRatio(ratio)}
|
||||
className={`px-2.5 py-1 rounded-lg text-xs font-body font-semibold transition-colors cursor-pointer ${
|
||||
className={`px-3 py-1.5 rounded-xl text-xs font-body font-semibold transition-colors cursor-pointer ${
|
||||
aspectRatio === ratio
|
||||
? 'bg-ink text-paper-hi shadow-xs'
|
||||
: 'bg-paper-2 text-ink-2 hover:bg-paper'
|
||||
@@ -822,10 +996,11 @@ export function DynamicToolWorkspace({
|
||||
}
|
||||
}
|
||||
}}
|
||||
className="w-full py-3 rounded-full bg-ink text-paper-hi text-xs sm:text-sm font-semibold shadow-xs hover:bg-slate-900 transition-colors cursor-pointer flex items-center justify-center gap-2"
|
||||
className="w-full py-4 rounded-2xl bg-accent hover:bg-accent-hi text-white text-sm font-display font-bold shadow-md hover:shadow-lg transition-all cursor-pointer flex items-center justify-center gap-2 group"
|
||||
>
|
||||
<Sparkles className="w-4 h-4 text-accent" />
|
||||
<Sparkles className="w-4 h-4 text-amber-300 group-hover:rotate-12 transition-transform" />
|
||||
<span>Open in AI Generation Studio</span>
|
||||
<ArrowRight className="w-4 h-4 text-white" />
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user