diff --git a/app/src/components/Generation/FloatingGenerateBox.tsx b/app/src/components/Generation/FloatingGenerateBox.tsx index e2fe6b9b..005bcdca 100644 --- a/app/src/components/Generation/FloatingGenerateBox.tsx +++ b/app/src/components/Generation/FloatingGenerateBox.tsx @@ -1,6 +1,6 @@ import { useMatchRoute } from '@tanstack/react-router'; import { AnimatePresence, motion } from 'framer-motion'; -import { Loader2, SlidersHorizontal, Sparkles, Wand2 } from 'lucide-react'; +import { Loader2, SlidersHorizontal, Sparkles } from 'lucide-react'; import { useEffect, useRef, useState } from 'react'; import { EffectsChainEditor } from '@/components/Effects/EffectsChainEditor'; import { Button } from '@/components/ui/button'; @@ -39,7 +39,6 @@ export function FloatingGenerateBox({ const { data: profiles } = useProfiles(); const [isExpanded, setIsExpanded] = useState(false); const [isInstructMode, setIsInstructMode] = useState(false); - const [isEffectsMode, setIsEffectsMode] = useState(false); const [effectsChain, setEffectsChain] = useState([]); const containerRef = useRef(null); const textareaRef = useRef(null); @@ -360,7 +359,9 @@ export function FloatingGenerateBox({ 'h-10 w-10 rounded-full transition-all duration-200', isInstructMode ? 'bg-accent text-accent-foreground border border-accent hover:bg-accent/90' - : 'bg-card border border-border hover:bg-background/50', + : effectsChain.length > 0 + ? 'bg-accent/50 text-accent-foreground border border-accent/50 hover:bg-accent/70' + : 'bg-card border border-border hover:bg-background/50', )} aria-label={ isInstructMode ? 'Fine tune instructions, on' : 'Fine tune instructions' @@ -369,47 +370,7 @@ export function FloatingGenerateBox({ - Fine tune instructions - - - - )} - {isExpanded && ( - -
- - - Post-processing effects - {effectsChain.length > 0 && ` (${effectsChain.length} active)`} + Fine tune instructions & effects
@@ -418,9 +379,9 @@ export function FloatingGenerateBox({ - {/* Effects chain editor panel */} + {/* Effects chain editor panel - shown alongside instruct */} - {isExpanded && isEffectsMode && ( + {isExpanded && isInstructMode && ( g.id === effectsTargetId); + if (gen) { + const versionUrl = apiClient.getVersionAudioUrl(newVersion.id); + setAudioWithAutoPlay( + versionUrl, + effectsTargetId, + gen.profile_id, + gen.text.substring(0, 50), + ); + } + } + setEffectsDialogOpen(false); toast({ title: 'Effects applied', description: 'A new version has been created.' }); } catch (error) {