feat: show meter fill percentage in dashboard status
Made-with: Cursor
This commit is contained in:
6
js/controls.js
vendored
6
js/controls.js
vendored
@@ -68,8 +68,10 @@ export function initControls(manager, wsClient, components) {
|
||||
const s = info?.status;
|
||||
if (!s || typeof s !== 'object') return '—';
|
||||
if (name === 'roomCode') {
|
||||
const rc = /** @type {{ active?: boolean, roomCode?: string }} */ (s);
|
||||
return rc.active ? `Active (${rc.roomCode ?? ''})` : 'Inactive';
|
||||
const rc = /** @type {{ active?: boolean, roomCode?: string, meterFill?: number }} */ (s);
|
||||
if (!rc.active) return 'Inactive';
|
||||
const meter = rc.meterFill != null ? ` | Meter: ${rc.meterFill}%` : '';
|
||||
return `Active (${rc.roomCode ?? ''})${meter}`;
|
||||
}
|
||||
if (name === 'audio') {
|
||||
const a = /** @type {{ active?: boolean, playing?: boolean }} */ (s);
|
||||
|
||||
Reference in New Issue
Block a user