fix: screenshare rendering, voice panel layout, SW cache bust with git SHA
- VideoGrid: add screen share track display with proper sizing - participantToVoice: detect ScreenShare + ScreenShareAudio tracks - VoicePanel: flex layout, no scroll, tiles dynamically fill space - VoiceChannel: show screen/camera icons in participant list - vite.config: inject git SHA into SW CACHE_VERSION on build
This commit is contained in:
@@ -14,71 +14,48 @@ export function VoicePanel() {
|
||||
if (!currentRoom) return null;
|
||||
|
||||
return (
|
||||
<div className="bg-gb-bg-s border border-gb-bg-t rounded-sm font-mono text-sm mb-2">
|
||||
{/* Box-drawn header */}
|
||||
<div className="px-3 py-1.5 border-b border-gb-bg-t flex items-center gap-2">
|
||||
<span className="text-gb-fg-f">
|
||||
┌─┤
|
||||
<span className="text-gb-orange font-bold">VOICE</span>
|
||||
├─{'─'.repeat(Math.max(0, 20 - (currentRoomName?.length ?? 0)))}┐
|
||||
<div className="h-full flex flex-col bg-gb-bg-s font-mono text-sm">
|
||||
{/* Header */}
|
||||
<div className="px-3 py-1.5 border-b border-gb-bg-t flex items-center gap-2 shrink-0">
|
||||
<span className="text-gb-fg-f text-xs">
|
||||
┌─┤<span className="text-gb-orange font-bold">VOICE</span>├─┐
|
||||
</span>
|
||||
<span className="text-gb-fg-s truncate flex-1">
|
||||
<span className="text-gb-fg-s truncate flex-1 text-xs">
|
||||
{currentRoomName || currentRoom}
|
||||
</span>
|
||||
<span
|
||||
className={`text-xxs ${
|
||||
isConnected ? 'text-gb-green' : 'text-gb-fg-f'
|
||||
}`}
|
||||
>
|
||||
<span className={`text-xxs ${isConnected ? 'text-gb-green' : 'text-gb-fg-f'}`}>
|
||||
{isConnected ? '● LIVE' : '◐ connecting...'}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{/* Error display */}
|
||||
{error && (
|
||||
<div className="px-3 py-1 text-gb-red text-xxs border-b border-gb-bg-t">
|
||||
<div className="px-3 py-1 text-gb-red text-xxs border-b border-gb-bg-t shrink-0">
|
||||
! {error}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Incoming whispers */}
|
||||
{whispers.length > 0 && (
|
||||
<div className="px-3 py-1.5 border-b border-gb-bg-t">
|
||||
<div className="text-xxs text-gb-fg-f mb-1">
|
||||
── whispers ──
|
||||
</div>
|
||||
<div className="px-3 py-1.5 border-b border-gb-bg-t shrink-0">
|
||||
<div className="text-xxs text-gb-fg-f mb-1">── whispers ──</div>
|
||||
{whispers.map((w) => (
|
||||
<div
|
||||
key={w.timestamp}
|
||||
className="flex items-center gap-2 py-0.5 text-xs text-gb-orange"
|
||||
>
|
||||
<div key={w.timestamp} className="flex items-center gap-2 py-0.5 text-xs text-gb-orange">
|
||||
<span>🔊</span>
|
||||
<span className="font-bold">{w.fromUsername}</span>
|
||||
<span className="text-gb-fg-s truncate">{w.message || 'whispered'}</span>
|
||||
<button
|
||||
className="ml-auto text-xxs text-gb-fg-f hover:text-gb-fg-s"
|
||||
onClick={() => dismissWhisper(w.timestamp)}
|
||||
>
|
||||
[x]
|
||||
</button>
|
||||
<button className="ml-auto text-xxs text-gb-fg-f hover:text-gb-fg-s" onClick={() => dismissWhisper(w.timestamp)}>[x]</button>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Video grid */}
|
||||
{/* Video area — fills remaining space, never scrolls */}
|
||||
<VideoGrid />
|
||||
<AudioRenderers />
|
||||
|
||||
{/* Controls */}
|
||||
<div className="px-3 py-1.5">
|
||||
<div className="px-3 py-1.5 border-t border-gb-bg-t shrink-0">
|
||||
<VoiceControls />
|
||||
</div>
|
||||
|
||||
{/* Box-drawn footer */}
|
||||
<div className="px-3 pb-1 text-xxs text-gb-fg-f">
|
||||
└{'─'.repeat(40)}┘
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user