6
6
ContentMessage ,
7
7
ContextItem ,
8
8
DropdownMenu ,
9
+ InformationCircleIcon ,
9
10
Page ,
10
11
Popup ,
11
12
} from "@dust-tt/sparkle" ;
@@ -249,6 +250,8 @@ export default function DataSourcesView({
249
250
> ( { } as Record < ConnectorProvider , boolean | undefined > ) ;
250
251
const [ showUpgradePopupForProvider , setShowUpgradePopupForProvider ] =
251
252
useState < ConnectorProvider | null > ( null ) ;
253
+ const [ showPreviewPopupForProvider , setShowPreviewPopupForProvider ] =
254
+ useState < ConnectorProvider | null > ( null ) ;
252
255
const handleEnableManagedDataSource = async (
253
256
provider : ConnectorProvider ,
254
257
suffix : string | null
@@ -383,11 +386,9 @@ export default function DataSourcesView({
383
386
< Button . List >
384
387
{ ( ( ) => {
385
388
const disabled =
386
- ! ds . isBuilt ||
387
389
isLoadingByProvider [
388
390
ds . connectorProvider as ConnectorProvider
389
- ] ||
390
- ! isAdmin ;
391
+ ] || ! isAdmin ;
391
392
const onClick = async ( ) => {
392
393
let isDataSourceAllowedInPlan : boolean ;
393
394
@@ -425,6 +426,10 @@ export default function DataSourcesView({
425
426
ds . connectorProvider as ConnectorProvider ,
426
427
ds . setupWithSuffix
427
428
) ;
429
+ } else if ( ! ds . isBuilt ) {
430
+ setShowPreviewPopupForProvider (
431
+ ds . connectorProvider
432
+ ) ;
428
433
} else {
429
434
setShowUpgradePopupForProvider (
430
435
ds . connectorProvider as ConnectorProvider
@@ -433,7 +438,7 @@ export default function DataSourcesView({
433
438
return ;
434
439
} ;
435
440
const label = ! ds . isBuilt
436
- ? "Coming soon "
441
+ ? "Preview "
437
442
: ! isLoadingByProvider [
438
443
ds . connectorProvider as ConnectorProvider
439
444
] && ! ds . fetchConnectorError
@@ -445,7 +450,11 @@ export default function DataSourcesView({
445
450
{ ds . connectorProvider !== "google_drive" && (
446
451
< Button
447
452
variant = "primary"
448
- icon = { CloudArrowLeftRightIcon }
453
+ icon = {
454
+ ds . isBuilt
455
+ ? CloudArrowLeftRightIcon
456
+ : InformationCircleIcon
457
+ }
449
458
disabled = { disabled }
450
459
onClick = { onClick }
451
460
label = { label }
@@ -458,7 +467,11 @@ export default function DataSourcesView({
458
467
variant = "primary"
459
468
label = { label }
460
469
disabled = { disabled }
461
- icon = { CloudArrowLeftRightIcon }
470
+ icon = {
471
+ ds . isBuilt
472
+ ? CloudArrowLeftRightIcon
473
+ : InformationCircleIcon
474
+ }
462
475
/>
463
476
</ DropdownMenu . Button >
464
477
< DropdownMenu . Items
@@ -561,6 +574,23 @@ export default function DataSourcesView({
561
574
setShowUpgradePopupForProvider ( null ) ;
562
575
} }
563
576
/>
577
+ < Popup
578
+ show = {
579
+ showPreviewPopupForProvider === ds . connectorProvider
580
+ }
581
+ className = "absolute bottom-8 right-0"
582
+ chipLabel = "Coming Soon!"
583
+ description = "Please email us at team@dust.tt for early access."
584
+ buttonLabel = "Contact us"
585
+ buttonClick = { ( ) => {
586
+ window . open (
587
+ "mailto:team@dust.tt?subject=Intersted in the Intercom connection"
588
+ ) ;
589
+ } }
590
+ onClose = { ( ) => {
591
+ setShowPreviewPopupForProvider ( null ) ;
592
+ } }
593
+ />
564
594
</ div >
565
595
}
566
596
>
0 commit comments