|
2 | 2 |
|
3 | 3 | import { lazy, Suspense, useCallback, useEffect, useMemo, useState } from 'react' |
4 | 4 | import { cn, Expandable, ExpandableContent, SecretReveal, Tooltip, toast } from '@sim/emcn' |
5 | | -import { ArrowRight, Check, ChevronDown, SquareArrowUpRight, TerminalWindow } from '@sim/emcn/icons' |
| 5 | +import { |
| 6 | + ArrowRight, |
| 7 | + Check, |
| 8 | + ChevronDown, |
| 9 | + Lock, |
| 10 | + SquareArrowUpRight, |
| 11 | + TerminalWindow, |
| 12 | +} from '@sim/emcn/icons' |
6 | 13 | import { isRecordLike } from '@sim/utils/object' |
7 | 14 | import { useParams } from 'next/navigation' |
8 | 15 | import { useSession } from '@/lib/auth/auth-client' |
@@ -1986,24 +1993,6 @@ function getCredentialProviderDisplayName(provider: string): string { |
1986 | 1993 | ) |
1987 | 1994 | } |
1988 | 1995 |
|
1989 | | -const LockIcon = (props: { className?: string }) => ( |
1990 | | - <svg |
1991 | | - className={props.className} |
1992 | | - viewBox='0 0 16 16' |
1993 | | - fill='none' |
1994 | | - xmlns='http://www.w3.org/2000/svg' |
1995 | | - > |
1996 | | - <rect x='2' y='5' width='12' height='8' rx='1.5' stroke='currentColor' strokeWidth='1.3' /> |
1997 | | - <path |
1998 | | - d='M5 5V3.5a3 3 0 1 1 6 0V5' |
1999 | | - stroke='currentColor' |
2000 | | - strokeWidth='1.3' |
2001 | | - strokeLinecap='round' |
2002 | | - /> |
2003 | | - <circle cx='8' cy='9.5' r='1.25' fill='currentColor' /> |
2004 | | - </svg> |
2005 | | -) |
2006 | | - |
2007 | 1996 | /** |
2008 | 1997 | * Inline "paste a secret" widget rendered for |
2009 | 1998 | * `<credential>{"type":"secret_input","name":"OPENAI_API_KEY"}</credential>`. |
@@ -2484,7 +2473,7 @@ function CredentialLinkDisplay({ |
2484 | 2473 | // The connect link value comes from the streamed model output, so only |
2485 | 2474 | // render it as a clickable link when it resolves to a real http(s) URL. |
2486 | 2475 | if (!data.value || !isSafeHttpUrl(data.value)) return null |
2487 | | - const Icon = getCredentialIcon(data.provider) ?? LockIcon |
| 2476 | + const Icon = getCredentialIcon(data.provider) ?? Lock |
2488 | 2477 | const label = reconnectCredentialId |
2489 | 2478 | ? `Reconnect ${reconnectCredential?.displayName ?? integrationName}` |
2490 | 2479 | : hasExistingCredential |
@@ -2550,7 +2539,7 @@ function PersonalCredentialLinkDisplay({ |
2550 | 2539 | onConnected, |
2551 | 2540 | }) |
2552 | 2541 | if (!provider || (provider.toLowerCase() === 'gitlab' && !canEdit)) return null |
2553 | | - const Icon = getCredentialIcon(provider) ?? LockIcon |
| 2542 | + const Icon = getCredentialIcon(provider) ?? Lock |
2554 | 2543 | const connected = connection.status === 'connected' |
2555 | 2544 | const label = connected |
2556 | 2545 | ? `Connected ${name}` |
|
0 commit comments