Skip to content

Commit a1abe7e

Browse files
committed
tweaks
1 parent 990aa8c commit a1abe7e

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

apps/postgres-new/components/chat.tsx

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,24 @@ export default function Chat() {
256256
<CopyableField
257257
value={`postgres://postgres@${liveShare.databaseId}.${process.env.NEXT_PUBLIC_BROWSER_PROXY_DOMAIN}/postgres?sslmode=require`}
258258
/>
259-
<p className="text-sm text-muted-foreground">
260-
{liveShare.clientIp ? `Connected from ${liveShare.clientIp}` : 'Not connected'}
261-
</p>
259+
260+
{liveShare.clientIp ? (
261+
<p className="text-sm text-muted-foreground flex items-center gap-2">
262+
<span className="relative flex h-3 w-3">
263+
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"></span>
264+
<span className="relative inline-flex rounded-full h-3 w-3 bg-primary"></span>
265+
</span>
266+
<span>
267+
Connected from{' '}
268+
<span className="text-card-foreground">{liveShare.clientIp}</span>
269+
</span>
270+
</p>
271+
) : (
272+
<p className="text-sm text-muted-foreground flex items-center gap-2">
273+
<span className="relative inline-flex rounded-full h-3 w-3 bg-muted-foreground"></span>
274+
<span>Not connected</span>
275+
</p>
276+
)}
262277
<Button
263278
className="w-full gap-2"
264279
variant="outline"

0 commit comments

Comments
 (0)