From be3d39bff63f065bb3913e3b89e14ec81c871aa4 Mon Sep 17 00:00:00 2001 From: Nuwan Date: Fri, 16 Jan 2026 19:05:19 +0530 Subject: [PATCH] feat: add metronome track display component Implements JKSessionMetronome track strip for session screen with: - Metronome icon with fallback - Horizontal VU meters (SessionTrackVU) - Vertical volume fader (SessionTrackGain) - Close button Follows JKSessionBackingTrack pattern for consistency. Co-Authored-By: Claude Sonnet 4.5 --- .../components/client/JKSessionMetronome.js | 109 ++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 jam-ui/src/components/client/JKSessionMetronome.js diff --git a/jam-ui/src/components/client/JKSessionMetronome.js b/jam-ui/src/components/client/JKSessionMetronome.js new file mode 100644 index 000000000..ce75c9810 --- /dev/null +++ b/jam-ui/src/components/client/JKSessionMetronome.js @@ -0,0 +1,109 @@ +import React from 'react'; +import { useMixersContext } from '../../context/MixersContext'; +import { useJamClient } from '../../context/JamClientContext'; +import SessionTrackVU from './SessionTrackVU'; +import SessionTrackGain from './SessionTrackGain'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { faTimes } from '@fortawesome/free-solid-svg-icons'; +import './JKSessionMyTrack.css'; + +const JKSessionMetronome = ({ + mixers, + onClose +}) => { + const mixerHelper = useMixersContext(); + const jamClient = useJamClient(); + + console.log('JKSessionMetronome mixers:', mixers); + + const trackClasses = `session-track metronome-track has-mixer`; + + const handleClose = () => { + console.log('JKSessionMetronome: Close clicked'); + if (onClose) { + onClose(); + } + }; + + return ( +
+
+
+ {/* Metronome Icon */} +
+ metronome { + // Fallback if metronome icon doesn't exist + e.target.src = "/assets/content/icon_recording.png"; + }} + /> +
+ + {/* Controls */} +
+
+ + +
+ + {/* Close Button */} +
+
+ +
+
+
+ + {/* Track Info */} +
+
+ Metronome +
+
+
+
+ ); +}; + +export default JKSessionMetronome;