feat: use eye icon for effects bar folding like automation bar

- Replace ChevronDown/ChevronRight with Eye/EyeOff icons
- Position eye icon absolutely on the right side
- Match AutomationHeader styling with bg-muted/50 and border
- Eye icon shows when expanded, EyeOff when collapsed
- Consistent UX between automation and effects bars

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-19 13:16:02 +01:00
parent 14a9c6e163
commit 64864cfd34

View File

@@ -1,7 +1,7 @@
'use client'; 'use client';
import * as React from 'react'; import * as React from 'react';
import { Plus, Upload, ChevronDown, ChevronRight, X } from 'lucide-react'; import { Plus, Upload, ChevronDown, ChevronRight, X, Eye, EyeOff } from 'lucide-react';
import { Button } from '@/components/ui/Button'; import { Button } from '@/components/ui/Button';
import { Track } from './Track'; import { Track } from './Track';
import { TrackExtensions } from './TrackExtensions'; import { TrackExtensions } from './TrackExtensions';
@@ -438,21 +438,28 @@ export function TrackList({
{!track.collapsed && ( {!track.collapsed && (
<div className="flex-shrink-0 bg-card/90 backdrop-blur-sm border-b border-border"> <div className="flex-shrink-0 bg-card/90 backdrop-blur-sm border-b border-border">
{/* Effects Header - Collapsible */} {/* Effects Header - Collapsible */}
<div <div className="relative flex items-center gap-2 px-3 py-1.5 bg-muted/50 border-b border-border/30">
className="flex items-center gap-2 px-3 py-1.5 cursor-pointer hover:bg-accent/30 transition-colors"
onClick={() => {
onUpdateTrack(track.id, { effectsExpanded: !track.effectsExpanded });
}}
>
{track.effectsExpanded ? (
<ChevronDown className="h-3 w-3 text-muted-foreground" />
) : (
<ChevronRight className="h-3 w-3 text-muted-foreground" />
)}
<span className="text-xs font-medium">Effects</span> <span className="text-xs font-medium">Effects</span>
<span className="text-xs text-muted-foreground"> <span className="text-xs text-muted-foreground">
({track.effectChain.effects.length}) ({track.effectChain.effects.length})
</span> </span>
{/* Show/hide toggle - Positioned absolutely on the right */}
<Button
variant="ghost"
size="icon-sm"
onClick={() => {
onUpdateTrack(track.id, { effectsExpanded: !track.effectsExpanded });
}}
title={track.effectsExpanded ? 'Hide effects' : 'Show effects'}
className="absolute right-2 h-5 w-5 flex-shrink-0"
>
{track.effectsExpanded ? (
<Eye className="h-3 w-3" />
) : (
<EyeOff className="h-3 w-3 text-muted-foreground" />
)}
</Button>
</div> </div>
{/* Effects Content - Collapsible, no inner container */} {/* Effects Content - Collapsible, no inner container */}