chore: clean up code formatting and remove unnecessary whitespace across multiple files for improved readability

This commit is contained in:
Julien Froidefond
2025-12-05 11:05:14 +01:00
parent b3157fffbd
commit 71d850c985
65 changed files with 347 additions and 505 deletions

View File

@@ -18,19 +18,13 @@ export function LiveIndicator({ isConnected, error }: LiveIndicatorProps) {
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'
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'
}`}
className={`h-2 w-2 rounded-full ${isConnected ? 'bg-success animate-pulse' : 'bg-yellow'}`}
/>
<span>{isConnected ? 'Live' : 'Connexion...'}</span>
</div>
);
}

View File

@@ -64,7 +64,7 @@ export function SessionLiveWrapper({
<div className="mb-4 flex items-center justify-between rounded-lg border border-border bg-card p-3">
<div className="flex items-center gap-4">
<LiveIndicator isConnected={isConnected} error={error} />
{lastEventUser && (
<div className="flex items-center gap-2 text-sm text-muted animate-pulse">
<span></span>
@@ -101,11 +101,7 @@ export function SessionLiveWrapper({
</div>
)}
<Button
variant="outline"
size="sm"
onClick={() => setShareModalOpen(true)}
>
<Button variant="outline" size="sm" onClick={() => setShareModalOpen(true)}>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"
@@ -120,9 +116,7 @@ export function SessionLiveWrapper({
</div>
{/* Content */}
<div className={!canEdit ? 'pointer-events-none opacity-90' : ''}>
{children}
</div>
<div className={!canEdit ? 'pointer-events-none opacity-90' : ''}>{children}</div>
{/* Share Modal */}
<ShareModal
@@ -136,5 +130,3 @@ export function SessionLiveWrapper({
</>
);
}

View File

@@ -105,14 +105,10 @@ export function ShareModal({
{/* Current shares */}
<div className="space-y-2">
<p className="text-sm font-medium text-foreground">
Collaborateurs ({shares.length})
</p>
<p className="text-sm font-medium text-foreground">Collaborateurs ({shares.length})</p>
{shares.length === 0 ? (
<p className="text-sm text-muted">
Aucun collaborateur pour le moment
</p>
<p className="text-sm text-muted">Aucun collaborateur pour le moment</p>
) : (
<ul className="space-y-2">
{shares.map((share) => (
@@ -126,12 +122,10 @@ export function ShareModal({
<p className="text-sm font-medium text-foreground">
{share.user.name || share.user.email}
</p>
{share.user.name && (
<p className="text-xs text-muted">{share.user.email}</p>
)}
{share.user.name && <p className="text-xs text-muted">{share.user.email}</p>}
</div>
</div>
<div className="flex items-center gap-2">
<Badge variant={share.role === 'EDITOR' ? 'primary' : 'default'}>
{share.role === 'EDITOR' ? 'Éditeur' : 'Lecteur'}
@@ -176,5 +170,3 @@ export function ShareModal({
</Modal>
);
}

View File

@@ -1,4 +1,3 @@
export { LiveIndicator } from './LiveIndicator';
export { ShareModal } from './ShareModal';
export { SessionLiveWrapper } from './SessionLiveWrapper';