The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
more integration UI. added avatars
Jonathan Summers-Muir034318901745
diff --git a/studio/components/interfaces/Integrations/IntegrationPanels.tsx b/studio/components/interfaces/Integrations/IntegrationPanels.tsxindex 3ac3b3e79d8..93c9d9ce8cf 100644--- a/studio/components/interfaces/Integrations/IntegrationPanels.tsx+++ b/studio/components/interfaces/Integrations/IntegrationPanels.tsx@@ -7,7 +7,7 @@ import Image from 'next/image'import { useRouter } from 'next/router'import React from 'react'import { Project } from 'types'-import { Button, IconArrowRight, IconGitHub, IconSquare } from 'ui'+import { Badge, Button, IconArrowRight, IconGitHub, IconSquare } from 'ui'import { cn } from 'ui/src/utils/cn'const ICON_STROKE_WIDTH = 2@@ -53,6 +53,14 @@ const HandleIcon = ({ type }: { type: HandleIconType }) => {}}+const Avatar = ({ src }: { src: string }) => {+ return (+ <div className="relative border shadow-lg w-8 h-8 rounded-full overflow-hidden">+ <Image src={src} width={30} height={30} layout="fill" alt="avatar" className="relative" />+ </div>+ )+}+const IntegrationInstallation = React.forwardRef<HTMLLIElement, IntegrationInstallationProps>(({ className, title, connection, ...props }, ref) => {const IntegrationIconBlock = () => {@@ -70,17 +78,26 @@ const IntegrationInstallation = React.forwardRef<HTMLLIElement, IntegrationInsta><div className="flex gap-6 items-center"><div className="flex gap-3 items-center">- <span className="relative flex h-3 w-3">+ {/* <span className="relative flex h-3 w-3"><span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-brand-1100 opacity-75"></span><span className="relative inline-flex rounded-full h-3 w-3 bg-brand-900"></span>- </span>- <IntegrationIconBlock />+ </span> */}+ <div className="flex -space-x-1">+ <IntegrationIconBlock />+ <Avatar src={connection.metadata.account.avatar} />+ </div></div><div className="flex flex-col gap-0">- <span className="text-scale-1200 font-medium">- {title} integration connection •{' '}- {connection.metadata?.vercelTeam || connection.metadata?.gitHubConnectionOwner}- </span>+ <div className="flex items-center gap-2">+ <span className="text-scale-1200 font-medium">+ {/* {title} integration connection •{' '} */}+ {connection.metadata?.account.name || connection.metadata?.gitHubConnectionOwner}+ </span>++ <Badge color="scale" className="capitalize">+ {connection.metadata.account.plan}+ </Badge>+ </div><div className="flex gap-3 items-center"><span className="text-scale-900 text-sm">Created {dayjs(connection.created_at).fromNow()}@@ -133,7 +150,6 @@ const IntegrationConnection = React.forwardRef<HTMLLIElement, IntegrationConnectalt={`icon`}/>)}-<span>{connection.metadata.name}</span></div>diff --git a/studio/components/interfaces/Organization/IntegrationSettings/IntegrationSettings.tsx b/studio/components/interfaces/Organization/IntegrationSettings/IntegrationSettings.tsxindex b61ae0f9a83..4e13f013ad0 100644--- a/studio/components/interfaces/Organization/IntegrationSettings/IntegrationSettings.tsx+++ b/studio/components/interfaces/Organization/IntegrationSettings/IntegrationSettings.tsx@@ -16,6 +16,15 @@ const IntegrationSettings = () => {const vercelIntegrations = data?.filter((integration) => integration.integration.id === 1) // vercelconst githubIntegrations = data?.filter((integration) => integration.integration.id === 2) // github+ vercelIntegrations?.map((x) => {+ let data: any = { ...x }+ data['metadata']['account'][+ 'avatar'+ ] = `https://vercel.com/api/www/avatar/${data.metadata.account.avatar}?w=48`++ return data+ })+return (<><Integrationdiff --git a/studio/data/integrations/integrations-query.ts b/studio/data/integrations/integrations-query.tsindex e3fe06db337..1dff671601a 100644--- a/studio/data/integrations/integrations-query.ts+++ b/studio/data/integrations/integrations-query.ts@@ -254,7 +254,7 @@ export async function getIntegrations({ orgSlug }: IntegrationsVariables, signal// },// ]- const response = await get(`${API_URL}/integrations`, {+ const response = await get(`${API_URL}/integrations/${orgSlug}`, {signal,})if (response.error) {diff --git a/studio/next.config.js b/studio/next.config.jsindex 2afe0631611..130a57bf8ea 100644--- a/studio/next.config.js+++ b/studio/next.config.js@@ -176,7 +176,7 @@ const nextConfig = {]},images: {- domains: ['github.com', 'api-frameworks.vercel.sh'],+ domains: ['github.com', 'api-frameworks.vercel.sh', 'vercel.com'],},// Ref: https://nextjs.org/docs/advanced-features/output-file-tracing#caveatsexperimental: {diff --git a/studio/pages/integrations/vercel.tsx b/studio/pages/integrations/vercel.tsxindex 2fe008d9a09..3c7930ca83c 100644--- a/studio/pages/integrations/vercel.tsx+++ b/studio/pages/integrations/vercel.tsx@@ -89,9 +89,9 @@ const VercelIntegration: NextPageWithLayout = () => {foreignProjects={vercelProjects}supabaseProjects={supabaseProjects}onCreateConnections={() => {- // if (next) {- // window.location.href = next- // }+ if (next) {+ window.location.href = next+ }}}/></>