-
-
-
Connected as {userEmail}
-
-
- setIsGoogleDriveConnected(false);
- setGoogleDriveFiles([]);
- setSelectedFiles([]);
- setUserEmail('');
- setAuthError('');
+
+ {ingestor.type && getIngestorSchema(ingestor.type as IngestorType)?.heading}
+
- const apiHost = import.meta.env.VITE_API_HOST;
- fetch(`${apiHost}/api/connectors/disconnect`, {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- Authorization: `Bearer ${token}`,
- },
- body: JSON.stringify({
- provider: ingestor.type,
- session_token: getSessionToken(ingestor.type),
- }),
- }).catch((err) =>
- console.error(
- 'Error disconnecting from Google Drive:',
- err,
- ),
- );
- }}
- className="text-xs text-white underline hover:text-gray-200"
- >
- Disconnect
-
-
-
- {/* Breadcrumb navigation */}
-
- {folderPath.map((path, index) => (
-
- {index > 0 && (
- /
- )}
-
-
- ))}
-
-
-
-
- Select Files from Google Drive
-
- {googleDriveFiles.length > 0 && (
-
- )}
-
- {selectedFiles.length > 0 && (
-
- {selectedFiles.length} file
- {selectedFiles.length !== 1 ? 's' : ''} selected
-
- )}
-
-
-
- {isLoadingFiles && googleDriveFiles.length === 0 ? (
-
- ) : googleDriveFiles.length === 0 ? (
-
- No files found in your Google Drive
-
- ) : (
- <>
-
- {googleDriveFiles.map((file) => (
-
-
-
-
- handleFileSelect(file.id)
- }
- className="h-4 w-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500"
- />
-
- {file.type ===
- 'application/vnd.google-apps.folder' ||
- file.isFolder ? (
-
- handleFolderClick(file.id, file.name)
- }
- >
-

-
- ) : (
-
-

-
- )}
-
-
{
- if (
- file.type ===
- 'application/vnd.google-apps.folder' ||
- file.isFolder
- ) {
- handleFolderClick(
- file.id,
- file.name,
- );
- }
- }}
- >
- {file.name}
-
-
- {file.size &&
- `${formatBytes(file.size)} • `}
- Modified {formatDate(file.modifiedTime)}
-
-
-
-
- ))}
-
-
-
- {isLoadingFiles && (
-
-
- Loading more files...
-
- )}
- {!hasMoreFiles && !isLoadingFiles && (
-
- All files loaded
-
- )}
-
- >
- )}
-
-
-
-