From a2e1210a4dcf12543bb13d406240c620e3d17dfb Mon Sep 17 00:00:00 2001 From: Brent O'Neill Date: Mon, 6 Oct 2025 08:50:19 -0600 Subject: [PATCH] wip commit --- frontend/src/app/upload/[provider]/page.tsx | 11 ++++++----- frontend/src/components/cloud-picker/file-item.tsx | 4 ++-- frontend/src/components/cloud-picker/file-list.tsx | 5 +++++ frontend/src/components/cloud-picker/types.ts | 1 + .../components/cloud-picker/unified-cloud-picker.tsx | 2 ++ 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/frontend/src/app/upload/[provider]/page.tsx b/frontend/src/app/upload/[provider]/page.tsx index e3f3f57e..3254bc73 100644 --- a/frontend/src/app/upload/[provider]/page.tsx +++ b/frontend/src/app/upload/[provider]/page.tsx @@ -6,7 +6,6 @@ import { useEffect, useState } from "react"; import { type CloudFile, UnifiedCloudPicker } from "@/components/cloud-picker"; import type { IngestSettings } from "@/components/cloud-picker/types"; import { Button } from "@/components/ui/button"; -import { Toast } from "@/components/ui/toast"; import { useTask } from "@/contexts/task-context"; // CloudFile interface is now imported from the unified cloud picker @@ -345,6 +344,7 @@ export default function UploadProviderPage() { onFileSelected={handleFileSelected} selectedFiles={selectedFiles} isAuthenticated={true} + isIngesting={isIngesting} accessToken={accessToken || undefined} clientId={connector.clientId} onSettingsChange={setIngestSettings} @@ -361,14 +361,15 @@ export default function UploadProviderPage() { Back diff --git a/frontend/src/components/cloud-picker/file-item.tsx b/frontend/src/components/cloud-picker/file-item.tsx index 5370e4cc..f06aa92e 100644 --- a/frontend/src/components/cloud-picker/file-item.tsx +++ b/frontend/src/components/cloud-picker/file-item.tsx @@ -1,7 +1,6 @@ "use client"; -import { Badge } from "@/components/ui/badge"; -import { FileText, Folder, Trash, Trash2 } from "lucide-react"; +import { FileText, Folder, Trash2 } from "lucide-react"; import { CloudFile } from "./types"; import GoogleDriveIcon from "@/app/settings/icons/google-drive-icon"; import SharePointIcon from "@/app/settings/icons/share-point-icon"; @@ -11,6 +10,7 @@ import { Button } from "@/components/ui/button"; interface FileItemProps { provider: string; file: CloudFile; + shouldDisableActions: boolean; onRemove: (fileId: string) => void; } diff --git a/frontend/src/components/cloud-picker/file-list.tsx b/frontend/src/components/cloud-picker/file-list.tsx index b584249a..db7daf64 100644 --- a/frontend/src/components/cloud-picker/file-list.tsx +++ b/frontend/src/components/cloud-picker/file-list.tsx @@ -9,6 +9,7 @@ interface FileListProps { files: CloudFile[]; onClearAll: () => void; onRemoveFile: (fileId: string) => void; + shouldDisableActions: boolean; } export const FileList = ({ @@ -16,11 +17,14 @@ export const FileList = ({ files, onClearAll, onRemoveFile, + shouldDisableActions, }: FileListProps) => { if (files.length === 0) { return null; } + console.log({ shouldDisableActions }); + return (
@@ -42,6 +46,7 @@ export const FileList = ({ file={file} onRemove={onRemoveFile} provider={provider} + shouldDisableActions={shouldDisableActions} /> ))}
diff --git a/frontend/src/components/cloud-picker/types.ts b/frontend/src/components/cloud-picker/types.ts index ca346bf0..20b1eae0 100644 --- a/frontend/src/components/cloud-picker/types.ts +++ b/frontend/src/components/cloud-picker/types.ts @@ -25,6 +25,7 @@ export interface UnifiedCloudPickerProps { baseUrl?: string; // Ingest settings onSettingsChange?: (settings: IngestSettings) => void; + isIngesting: boolean; } export interface GoogleAPI { diff --git a/frontend/src/components/cloud-picker/unified-cloud-picker.tsx b/frontend/src/components/cloud-picker/unified-cloud-picker.tsx index 0a4699af..e92cef13 100644 --- a/frontend/src/components/cloud-picker/unified-cloud-picker.tsx +++ b/frontend/src/components/cloud-picker/unified-cloud-picker.tsx @@ -16,6 +16,7 @@ export const UnifiedCloudPicker = ({ onFileSelected, selectedFiles = [], isAuthenticated, + isIngesting, accessToken, onPickerStateChange, clientId, @@ -183,6 +184,7 @@ export const UnifiedCloudPicker = ({ files={selectedFiles} onClearAll={handleClearAll} onRemoveFile={handleRemoveFile} + shouldDisableActions={isIngesting} />