copy [folders vs files] uploading one file -> one item
This commit is contained in:
parent
653825527a
commit
681c9437ce
4 changed files with 12 additions and 12 deletions
|
|
@ -165,7 +165,7 @@ export default function UploadProviderPage() {
|
||||||
|
|
||||||
const handleFileSelected = (files: CloudFile[]) => {
|
const handleFileSelected = (files: CloudFile[]) => {
|
||||||
setSelectedFiles(files);
|
setSelectedFiles(files);
|
||||||
console.log(`Selected ${files.length} files from ${provider}:`, files);
|
console.log(`Selected ${files.length} item(s) from ${provider}:`, files);
|
||||||
// You can add additional handling here like triggering sync, etc.
|
// You can add additional handling here like triggering sync, etc.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -376,19 +376,19 @@ export default function UploadProviderPage() {
|
||||||
loading={isIngesting}
|
loading={isIngesting}
|
||||||
disabled={!hasSelectedFiles || isIngesting}
|
disabled={!hasSelectedFiles || isIngesting}
|
||||||
>
|
>
|
||||||
{!hasSelectedFiles ? (
|
{hasSelectedFiles ? (
|
||||||
<>Ingest files</>
|
|
||||||
) : (
|
|
||||||
<>
|
<>
|
||||||
Ingest {selectedFiles.length} file
|
Ingest {selectedFiles.length} item
|
||||||
{selectedFiles.length > 1 ? "s" : ""}
|
{selectedFiles.length > 1 ? "s" : ""}
|
||||||
</>
|
</>
|
||||||
|
) : (
|
||||||
|
<>Ingest selected items</>
|
||||||
)}
|
)}
|
||||||
</Button>
|
</Button>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
{!hasSelectedFiles ? (
|
{!hasSelectedFiles ? (
|
||||||
<TooltipContent side="left">
|
<TooltipContent side="left">
|
||||||
Select at least one file before ingesting
|
Select at least one item before ingesting
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
) : null}
|
) : null}
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
|
||||||
|
|
@ -201,7 +201,7 @@ export function CloudConnectorsDialog({
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle>Cloud File Connectors</DialogTitle>
|
<DialogTitle>Cloud File Connectors</DialogTitle>
|
||||||
<DialogDescription>
|
<DialogDescription>
|
||||||
Select files from your connected cloud storage providers
|
Select files or folders from your connected cloud storage providers
|
||||||
</DialogDescription>
|
</DialogDescription>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
|
|
||||||
|
|
@ -232,7 +232,7 @@ export function CloudConnectorsDialog({
|
||||||
!connector.hasAccessToken
|
!connector.hasAccessToken
|
||||||
? connector.accessTokenError ||
|
? connector.accessTokenError ||
|
||||||
"Access token required - try reconnecting your account"
|
"Access token required - try reconnecting your account"
|
||||||
: `Select files from ${connector.name}`
|
: `Select files or folders from ${connector.name}`
|
||||||
}
|
}
|
||||||
onClick={e => {
|
onClick={e => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ export const FileList = ({
|
||||||
return (
|
return (
|
||||||
<div className="space-y-2 relative">
|
<div className="space-y-2 relative">
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<p className="text-sm font-medium">Added files ({files.length})</p>
|
<p className="text-sm font-medium">Selected items ({files.length})</p>
|
||||||
<Button
|
<Button
|
||||||
ignoreTitleCase={true}
|
ignoreTitleCase={true}
|
||||||
onClick={onClearAll}
|
onClick={onClearAll}
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ export const PickerHeader = ({
|
||||||
return (
|
return (
|
||||||
<div className="text-sm text-muted-foreground p-4 bg-muted/20 rounded-md">
|
<div className="text-sm text-muted-foreground p-4 bg-muted/20 rounded-md">
|
||||||
Please connect to {getProviderName(provider)} first to select specific
|
Please connect to {getProviderName(provider)} first to select specific
|
||||||
files.
|
files or folders.
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -48,7 +48,7 @@ export const PickerHeader = ({
|
||||||
<Card>
|
<Card>
|
||||||
<CardContent className="flex flex-col items-center text-center py-8">
|
<CardContent className="flex flex-col items-center text-center py-8">
|
||||||
<p className="text-sm text-primary mb-4">
|
<p className="text-sm text-primary mb-4">
|
||||||
Select files from {getProviderName(provider)} to ingest.
|
Select files or folders from {getProviderName(provider)} to ingest.
|
||||||
</p>
|
</p>
|
||||||
<Button
|
<Button
|
||||||
onClick={onAddFiles}
|
onClick={onAddFiles}
|
||||||
|
|
@ -56,7 +56,7 @@ export const PickerHeader = ({
|
||||||
className="bg-foreground text-background hover:bg-foreground/90 font-semibold"
|
className="bg-foreground text-background hover:bg-foreground/90 font-semibold"
|
||||||
>
|
>
|
||||||
<Plus className="h-4 w-4" />
|
<Plus className="h-4 w-4" />
|
||||||
{isPickerOpen ? "Opening picker..." : "Add files"}
|
{isPickerOpen ? "Opening picker..." : "Add files or folders"}
|
||||||
</Button>
|
</Button>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue