Skip to content

Commit

Permalink
Merge pull request #51 from openintegrations/improvements
Browse files Browse the repository at this point in the history
Can only add connector once improvements
  • Loading branch information
pellicceama authored Nov 11, 2024
2 parents 4d6078c + cda8d54 commit 6c82025
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ interface AddConnectionTabContentProps {
connectorConfigFilters: ConnectorConfigFilters
refetch: () => void
onSuccessCallback?: () => void
connectorNames?: string[]
}

export function AddConnectionTabContent({
connectorConfigFilters,
connectorNames = [],
refetch,
onSuccessCallback,
}: AddConnectionTabContentProps) {
Expand All @@ -21,6 +23,7 @@ export function AddConnectionTabContent({
</div>
<ConnectIntegrations
connectorConfigFilters={connectorConfigFilters}
connectorNames={connectorNames}
onEvent={(event) => {
if (event.type === 'close') {
refetch()
Expand Down
3 changes: 2 additions & 1 deletion packages/engine-frontend/components/ConnectionPortal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export function ConnectionPortal({className}: ConnectionPortalProps) {
) : (
<AddConnectionTabContent
connectorConfigFilters={{}}
connectorNames={connections.map((c) => c.connectorName)}
refetch={listConnectionsRes.refetch}
onSuccessCallback={() => {
navigateToTab('connections')
Expand All @@ -124,7 +125,7 @@ export function ConnectionPortal({className}: ConnectionPortalProps) {
return (
<div
className={cn(
'flex size-full flex-col gap-4 overflow-x-hidden p-4 lg:p-8',
'flex size-full flex-col gap-4 overflow-x-hidden p-4 lg:p-8 lg:pt-0',
className,
)}>
<Tabs
Expand Down
1 change: 0 additions & 1 deletion packages/engine-frontend/hocs/WithConnectorConnect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ export const WithConnectorConnect = ({
<Button
disabled={connect.isLoading}
onClick={() => formRef.current?.submit()}
className="bg-[#8192FF] hover:bg-[#6774CC]"
type="submit">
{connect.isLoading && (
<Loader2 className="mr-2 h-4 w-4 animate-spin" />
Expand Down
2 changes: 2 additions & 0 deletions packages/ui/shadcn/Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const TabsList = React.forwardRef<
className={cn(
'rounded-md bg-button-foreground p-1 text-muted-foreground',
'flex h-10 flex-row',
'sticky top-0 z-10',
className,
)}
{...props}
Expand Down Expand Up @@ -47,6 +48,7 @@ const TabsContent = React.forwardRef<
ref={ref}
className={cn(
'mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',
'overflow-auto',
className,
)}
{...props}
Expand Down

0 comments on commit 6c82025

Please sign in to comment.