diff --git a/client/src/components/AudioRoutingMatrix.css b/client/src/components/AudioRoutingMatrix.css index 73b8c88..c10f702 100644 --- a/client/src/components/AudioRoutingMatrix.css +++ b/client/src/components/AudioRoutingMatrix.css @@ -19,6 +19,24 @@ font-weight: 600; } +.ws-status { + font-size: 0.8rem; + font-weight: 600; + padding: 4px 10px; + border-radius: 12px; + white-space: nowrap; +} + +.ws-status.connected { + color: #44ff44; + background: rgba(68, 255, 68, 0.1); +} + +.ws-status.disconnected { + color: #888; + background: rgba(136, 136, 136, 0.1); +} + .routing-section { margin-bottom: var(--spacing-xl); } @@ -82,6 +100,29 @@ word-break: break-word; } +.label-content { + display: flex; + flex-direction: column; + gap: 4px; + width: 100%; +} + +.label-text { + flex: 1; +} + +.header-content { + display: flex; + flex-direction: column; + gap: 4px; + width: 100%; + align-items: center; +} + +.header-text { + text-align: center; +} + .matrix-cell { background: var(--color-bg); padding: var(--spacing-sm); diff --git a/client/src/components/AudioRoutingMatrix.jsx b/client/src/components/AudioRoutingMatrix.jsx index eba927f..0c70749 100644 --- a/client/src/components/AudioRoutingMatrix.jsx +++ b/client/src/components/AudioRoutingMatrix.jsx @@ -1,9 +1,12 @@ import React, { useState, useEffect } from 'react'; import './AudioRoutingMatrix.css'; +import VUMeter from './VUMeter.jsx'; +import { useAudioLevels } from '../hooks/useAudioLevels.js'; const API_URL = import.meta.env.VITE_API_URL || 'http://localhost:3000'; function AudioRoutingMatrix({ groups, channelNames }) { + const { levels, connected: wsConnected } = useAudioLevels(); const [routing, setRouting] = useState({ inputToGroup: {}, groupToOutput: {}, gains: {} }); const [loading, setLoading] = useState(true); const [showOnlyNamedChannels, setShowOnlyNamedChannels] = useState(false); @@ -165,7 +168,15 @@ function AudioRoutingMatrix({ groups, channelNames }) { return (
-

Matrice de routing audio

+
+

Matrice de routing audio

+ + {wsConnected ? '● Live' : '○ Offline'} + +