feat: enhance session management with sharing capabilities, real-time event synchronization, and UI updates for session display

This commit is contained in:
Julien Froidefond
2025-11-27 13:34:03 +01:00
parent 9ce2b62bc6
commit 10ff15392f
15 changed files with 1127 additions and 84 deletions

View File

@@ -0,0 +1,36 @@
'use client';
interface LiveIndicatorProps {
isConnected: boolean;
error?: string | null;
}
export function LiveIndicator({ isConnected, error }: LiveIndicatorProps) {
if (error) {
return (
<div className="flex items-center gap-2 rounded-full bg-destructive/10 px-3 py-1.5 text-sm text-destructive">
<span className="h-2 w-2 rounded-full bg-destructive" />
<span>Hors ligne</span>
</div>
);
}
return (
<div
className={`flex items-center gap-2 rounded-full px-3 py-1.5 text-sm transition-colors ${
isConnected
? 'bg-success/10 text-success'
: 'bg-yellow/10 text-yellow'
}`}
>
<span
className={`h-2 w-2 rounded-full ${
isConnected ? 'bg-success animate-pulse' : 'bg-yellow'
}`}
/>
<span>{isConnected ? 'Live' : 'Connexion...'}</span>
</div>
);
}