feat: enhance Google Drive connector functionality and UI

- Added support for selecting both folders and files in the Google Drive connector configuration.
- Updated the UI to reflect the selection of files alongside folders, improving user clarity.
- Introduced a quick indexing feature for connectors, allowing users to start indexing without date selection.
- Adjusted periodic sync settings to be disabled for Google Drive connectors, ensuring proper functionality.
- Improved styling and accessibility across various components in the connector popup.
This commit is contained in:
Anish Sarkar 2026-01-01 21:22:34 +05:30
parent 543daa0434
commit b909032e32
7 changed files with 160 additions and 68 deletions

View file

@ -265,17 +265,9 @@ export function GoogleDriveFolderTree({
toggleFileSelection(item.id, item.name);
}
}}
className="shrink-0 z-20 group-hover:border-white group-hover:border"
className="shrink-0 h-3.5 w-3.5 sm:h-4 sm:w-4 border-slate-400/20 dark:border-white/20"
onClick={(e) => e.stopPropagation()}
/>
{isFolder && (
<Checkbox
checked={isSelected}
onCheckedChange={() => toggleFolderSelection(item.id, item.name)}
className="shrink-0 h-3.5 w-3.5 sm:h-4 sm:w-4"
onClick={(e) => e.stopPropagation()}
/>
)}
<div className="shrink-0">
{isFolder ? (
@ -319,15 +311,15 @@ export function GoogleDriveFolderTree({
};
return (
<div className="border rounded-md w-full overflow-hidden">
<div className="border border-slate-400/20 dark:border-white/20 rounded-md w-full overflow-hidden">
<ScrollArea className="h-[300px] sm:h-[450px] w-full">
<div className="p-1 sm:p-2 pr-2 sm:pr-4 w-full overflow-x-hidden">
<div className="mb-1 sm:mb-2 pb-1 sm:pb-2 border-b">
<div className="mb-1 sm:mb-2 pb-1 sm:pb-2 border-b border-slate-400/20 dark:border-white/20">
<div className="flex items-center gap-1 sm:gap-2 h-auto py-1 sm:py-2 px-1 sm:px-2 rounded-md hover:bg-accent cursor-pointer">
<Checkbox
checked={isFolderSelected("root")}
onCheckedChange={() => toggleFolderSelection("root", "My Drive")}
className="shrink-0 h-3.5 w-3.5 sm:h-4 sm:w-4"
className="shrink-0 h-3.5 w-3.5 sm:h-4 sm:w-4 border-slate-400/20 dark:border-white/20"
/>
<HardDrive className="h-3 w-3 sm:h-4 sm:w-4 text-primary shrink-0" />
<button