Feat : OBS presets
Some checks failed
release / build (push) Successful in 26s
release / verify-windows (push) Failing after 1m0s

This commit is contained in:
jeanotx32
2026-08-11 22:24:45 +02:00
parent 3b614c5d05
commit 03b1963150
11 changed files with 710 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
import { useState } from 'react';
import type { AgentAction, AgentView, WatchState } from '@stream-control/shared';
import { findRecordingPreset } from '@stream-control/shared';
import { formatBytes, formatPercent, formatRelative, formatTimecode } from '../format';
interface Props {
@@ -27,6 +28,7 @@ export function AgentCard({ agent, selected, onToggleSelect, onCommand, onOpenSe
const obsReady = agent.online && status.obsConnected;
const watch = status.watch;
const presetLabel = findRecordingPreset(agent.recording.presetId)?.label ?? null;
const pausedLabel = watch?.autoPaused ? 'Pause · show privé' : 'En pause';
const state = !agent.online
@@ -59,6 +61,11 @@ export function AgentCard({ agent, selected, onToggleSelect, onCommand, onOpenSe
{status.buildId ? ` · build ${status.buildId}` : ''}
</span>
</div>
{agent.recording.enabled && presetLabel && (
<span className="badge" title="Preset d'enregistrement piloté depuis le dashboard">
{presetLabel}
</span>
)}
<span className={`badge ${state.tone}`}>{state.label}</span>
<button className="icon" onClick={() => onOpenSettings(agent)} title="Configuration">