Skip to content

Commit 2ae7124

Browse files
committed
background
1 parent 6f5cdae commit 2ae7124

File tree

1 file changed

+22
-20
lines changed

1 file changed

+22
-20
lines changed

apps/postgres-new/components/chat.tsx

+22-20
Original file line numberDiff line numberDiff line change
@@ -235,33 +235,35 @@ export default function Chat() {
235235
<Skeleton className="self-end h-10 w-1/2 rounded-3xl" />
236236
<Skeleton className="self-start h-20 w-3/4 rounded-3xl" />
237237
</div>
238-
) : shareDatabase.isSharing ? (
239-
<div className="h-full w-full max-w-4xl flex flex-col gap-10 p-10">
240-
<div className="flex items-center justify-center h-full flex-col gap-y-5">
241-
<CopyableField label="Database URL" value={shareDatabase.databaseUrl!} />
242-
<Button
243-
className="w-full"
244-
variant="outline"
245-
onClick={() => {
246-
shareDatabase.stop()
247-
}}
248-
>
249-
<span className="relative flex h-3 w-3 mr-2">
250-
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"></span>
251-
<span className="relative inline-flex rounded-full h-3 w-3 bg-primary"></span>
252-
</span>{' '}
253-
Stop sharing
254-
</Button>
255-
</div>
256-
</div>
257238
) : isConversationStarted ? (
258239
<div
259240
className={cn(
260241
'h-full flex flex-col items-center overflow-y-auto',
261-
!isMessageAnimationComplete ? 'overflow-x-hidden' : undefined
242+
!isMessageAnimationComplete ? 'overflow-x-hidden' : undefined,
243+
shareDatabase.isSharing ? 'overflow-y-hidden' : undefined
262244
)}
263245
ref={scrollRef}
264246
>
247+
{shareDatabase.isSharing && (
248+
<div className="h-full w-full max-w-4xl flex flex-col gap-10 p-10 absolute backdrop-blur-sm bg-card/90">
249+
<div className="flex items-center justify-center h-full flex-col gap-y-5">
250+
<CopyableField label="Database URL" value={shareDatabase.databaseUrl!} />
251+
<Button
252+
className="w-full"
253+
variant="outline"
254+
onClick={() => {
255+
shareDatabase.stop()
256+
}}
257+
>
258+
<span className="relative flex h-3 w-3 mr-2">
259+
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"></span>
260+
<span className="relative inline-flex rounded-full h-3 w-3 bg-primary"></span>
261+
</span>{' '}
262+
Stop sharing
263+
</Button>
264+
</div>
265+
</div>
266+
)}
265267
<m.div
266268
key={databaseId}
267269
className="flex flex-col gap-4 w-full max-w-4xl p-10"

0 commit comments

Comments
 (0)