Implement team name text overlays with refactored group structure

- Add createTextSource function with automatic OBS text input detection
- Implement createStreamGroup to create groups within team scenes instead of separate scenes
- Add team name text overlays positioned at top-left of each stream
- Refactor stream switching to use stream group names for cleaner organization
- Update setActive API to write stream group names to files
- Fix getActive API to return correct screen position data
- Improve team UUID assignment when adding streams
- Remove manage streams section from home page for cleaner UI
- Add vertical spacing to streams list to match teams page
- Support dynamic text input kinds (text_ft2_source_v2, text_gdiplus, etc.)

This creates a much cleaner OBS structure with 10 team scenes containing grouped
stream sources rather than 200+ individual stream scenes, while adding team
name text overlays for better stream identification.

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Decobus 2025-07-20 16:59:50 -04:00
parent ece75cf2df
commit 78f4d325d8
11 changed files with 325 additions and 49 deletions

View file

@ -98,10 +98,15 @@ export default function Home() {
const handleSetActive = useCallback(async (screen: ScreenType, id: number | null) => {
const selectedStream = streams.find((stream) => stream.id === id);
// Generate stream group name for optimistic updates
const streamGroupName = selectedStream
? `${selectedStream.name.toLowerCase().replace(/\s+/g, '_')}_stream`
: null;
// Update local state immediately for optimistic updates
setActiveSources((prev) => ({
...prev,
[screen]: selectedStream?.obs_source_name || null,
[screen]: streamGroupName,
}));
// Debounced backend update
@ -205,29 +210,6 @@ export default function Home() {
</div>
</div>
{/* Manage Streams Section */}
{streams.length > 0 && (
<div className="glass p-6 mt-6">
<h2 className="card-title">Manage Streams</h2>
<div className="grid gap-4">
{streams.map((stream) => (
<div key={stream.id} className="glass p-4 flex items-center justify-between">
<div>
<h3 className="font-semibold text-white">{stream.name}</h3>
<p className="text-sm text-white/60">{stream.obs_source_name}</p>
</div>
<Link
href={`/edit/${stream.id}`}
className="btn-secondary btn-sm"
>
<span className="icon"></span>
Edit
</Link>
</div>
))}
</div>
</div>
)}
{/* Toast Notifications */}
<ToastContainer toasts={toasts} onRemove={removeToast} />