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[]) => {
|
||||
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.
|
||||
};
|
||||
|
||||
|
|
@ -376,19 +376,19 @@ export default function UploadProviderPage() {
|
|||
loading={isIngesting}
|
||||
disabled={!hasSelectedFiles || isIngesting}
|
||||
>
|
||||
{!hasSelectedFiles ? (
|
||||
<>Ingest files</>
|
||||
) : (
|
||||
{hasSelectedFiles ? (
|
||||
<>
|
||||
Ingest {selectedFiles.length} file
|
||||
Ingest {selectedFiles.length} item
|
||||
{selectedFiles.length > 1 ? "s" : ""}
|
||||
</>
|
||||
) : (
|
||||
<>Ingest selected items</>
|
||||
)}
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
{!hasSelectedFiles ? (
|
||||
<TooltipContent side="left">
|
||||
Select at least one file before ingesting
|
||||
Select at least one item before ingesting
|
||||
</TooltipContent>
|
||||
) : null}
|
||||
</Tooltip>
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ export function CloudConnectorsDialog({
|
|||
<DialogHeader>
|
||||
<DialogTitle>Cloud File Connectors</DialogTitle>
|
||||
<DialogDescription>
|
||||
Select files from your connected cloud storage providers
|
||||
Select files or folders from your connected cloud storage providers
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
|
|
@ -232,7 +232,7 @@ export function CloudConnectorsDialog({
|
|||
!connector.hasAccessToken
|
||||
? connector.accessTokenError ||
|
||||
"Access token required - try reconnecting your account"
|
||||
: `Select files from ${connector.name}`
|
||||
: `Select files or folders from ${connector.name}`
|
||||
}
|
||||
onClick={e => {
|
||||
e.preventDefault();
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ export const FileList = ({
|
|||
return (
|
||||
<div className="space-y-2 relative">
|
||||
<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
|
||||
ignoreTitleCase={true}
|
||||
onClick={onClearAll}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ export const PickerHeader = ({
|
|||
return (
|
||||
<div className="text-sm text-muted-foreground p-4 bg-muted/20 rounded-md">
|
||||
Please connect to {getProviderName(provider)} first to select specific
|
||||
files.
|
||||
files or folders.
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
@ -48,7 +48,7 @@ export const PickerHeader = ({
|
|||
<Card>
|
||||
<CardContent className="flex flex-col items-center text-center py-8">
|
||||
<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>
|
||||
<Button
|
||||
onClick={onAddFiles}
|
||||
|
|
@ -56,7 +56,7 @@ export const PickerHeader = ({
|
|||
className="bg-foreground text-background hover:bg-foreground/90 font-semibold"
|
||||
>
|
||||
<Plus className="h-4 w-4" />
|
||||
{isPickerOpen ? "Opening picker..." : "Add files"}
|
||||
{isPickerOpen ? "Opening picker..." : "Add files or folders"}
|
||||
</Button>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue