feat: enhance track controls and improve master fader layout

- Integrated all R/S/A/E buttons into TrackControls component
- Removed duplicate button sections from Track component
- Updated CircularKnob pan visualization to show no arc at center position
- Arc now extends from center to value for directional indication
- Moved MasterControls to dedicated right sidebar
- Removed master controls from PlaybackControls footer
- Optimized TrackControls spacing (gap-1.5, smaller buttons)
- Cleaner separation between transport and master control sections

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-19 00:22:52 +01:00
parent 441920ee70
commit 8ec3505581
5 changed files with 178 additions and 150 deletions

View File

@@ -3,7 +3,6 @@
import * as React from 'react';
import { Play, Pause, Square, SkipBack, Circle, AlignVerticalJustifyStart, AlignVerticalJustifyEnd, Layers } from 'lucide-react';
import { Button } from '@/components/ui/Button';
import { MasterControls } from '@/components/controls/MasterControls';
import { cn } from '@/lib/utils/cn';
export interface PlaybackControlsProps {
@@ -12,14 +11,11 @@ export interface PlaybackControlsProps {
currentTime: number;
duration: number;
volume: number;
pan?: number;
onPlay: () => void;
onPause: () => void;
onStop: () => void;
onSeek: (time: number, autoPlay?: boolean) => void;
onVolumeChange: (volume: number) => void;
onPanChange?: (pan: number) => void;
onMuteToggle?: () => void;
disabled?: boolean;
className?: string;
currentTimeFormatted?: string;
@@ -35,10 +31,6 @@ export interface PlaybackControlsProps {
onPunchOutTimeChange?: (time: number) => void;
overdubEnabled?: boolean;
onOverdubEnabledChange?: (enabled: boolean) => void;
masterPeakLevel?: number;
masterRmsLevel?: number;
masterIsClipping?: boolean;
onResetClip?: () => void;
}
export function PlaybackControls({
@@ -47,14 +39,11 @@ export function PlaybackControls({
currentTime,
duration,
volume,
pan = 0,
onPlay,
onPause,
onStop,
onSeek,
onVolumeChange,
onPanChange,
onMuteToggle,
disabled = false,
className,
currentTimeFormatted,
@@ -70,10 +59,6 @@ export function PlaybackControls({
onPunchOutTimeChange,
overdubEnabled = false,
onOverdubEnabledChange,
masterPeakLevel = 0,
masterRmsLevel = 0,
masterIsClipping = false,
onResetClip,
}: PlaybackControlsProps) {
const handlePlayPause = () => {
if (isPlaying) {
@@ -265,22 +250,6 @@ export function PlaybackControls({
</>
)}
</div>
{/* Master Controls */}
{onPanChange && onMuteToggle && (
<MasterControls
volume={volume}
pan={pan}
peakLevel={masterPeakLevel}
rmsLevel={masterRmsLevel}
isClipping={masterIsClipping}
isMuted={volume === 0}
onVolumeChange={onVolumeChange}
onPanChange={onPanChange}
onMuteToggle={onMuteToggle}
onResetClip={onResetClip}
/>
)}
</div>
</div>
);