Skip to content

Commit

Permalink
Merge pull request #705 from UpstreetAI/embed-transparent
Browse files Browse the repository at this point in the history
Embed transparency
  • Loading branch information
avaer authored Dec 1, 2024
2 parents f13a746 + 693584f commit 2875471
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
22 changes: 19 additions & 3 deletions apps/chat/app/embed/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
import { cn } from '@/lib/utils'
import { GeistSans } from 'geist/font/sans'
import { GeistMono } from 'geist/font/mono'

interface EmbedLayoutProps {
children: React.ReactNode
}

export default async function EmbedLayout({ children }: EmbedLayoutProps) {
return (
<div className="relative flex h-full w-full">
{children}
</div>
<body
className={cn(
'font-[Aller-Regular] antialiased',
GeistSans.variable,
GeistMono.variable
)}
style={{
backgroundPosition: 'center',
backgroundSize: 'cover',
}}
>
<div className="relative flex h-full w-full">
{children}
</div>
</body>
);
}
2 changes: 1 addition & 1 deletion apps/chat/components/agents/profile/embedModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function EmbedModal({agent, close}: {agent: any, close: () => voi
const generateEmbedCode = () => {
const defaultWidth = 300;
const defaultHeight = 400;
const embedCode = `<iframe src="${window.location.origin}/embed/${agent.id}" width="${defaultWidth}" height="${defaultHeight}" style={{ position: 'fixed', bottom: 0, right: 0, zIndex: 9999, background: 'transparent' }}></iframe>`;
const embedCode = `<iframe src="${window.location.origin}/embed/${agent.id}" width="${defaultWidth}" height="${defaultHeight}" style={{ position: 'fixed', bottom: 0, right: 0, zIndex: 9999, background: 'transparent', border: 0, }}></iframe>`;
setEmbedCode(embedCode);
};

Expand Down

0 comments on commit 2875471

Please sign in to comment.