Skip to content

Commit

Permalink
feat: disable sync icon for local folders
Browse files Browse the repository at this point in the history
  • Loading branch information
gpuente committed Jun 27, 2024
1 parent 5632718 commit 9996fa3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/components/folder-item/folder-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export interface FolderItemProps {
onFolderSelected: (itemId: string) => void;
isAllowedToCreateDocuments: boolean;
folderItemOptions: ConnectDropdownMenuItem[];
isRemoteDrive?: boolean;
onFolderOptionsClick?: (
optionId: string,
fileNode: TreeItem,
Expand All @@ -27,6 +28,7 @@ export const FolderItem: React.FC<FolderItemProps> = props => {
decodedDriveID,
onFolderSelected,
folderItemOptions,
isRemoteDrive = false,
onFolderOptionsClick = () => {},
isAllowedToCreateDocuments,
} = props;
Expand All @@ -44,7 +46,7 @@ export const FolderItem: React.FC<FolderItemProps> = props => {
return (
<ConnectFolderItem
className="w-64"
displaySyncIcon
displaySyncIcon={isRemoteDrive}
title={folder.label}
itemOptions={folderItemOptions}
onCancelInput={cancelInputHandler}
Expand Down
3 changes: 3 additions & 0 deletions src/components/folder-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ interface IProps {
onFolderSelected: (itemId: string) => void;
onFileSelected: (drive: string, id: string) => void;
onFileDeleted: (drive: string, id: string) => void;
isRemoteDrive?: boolean;
}

export const FolderView: React.FC<IProps> = ({
Expand All @@ -27,6 +28,7 @@ export const FolderView: React.FC<IProps> = ({
onFileDeleted,
onFileSelected,
onFolderSelected,
isRemoteDrive = false,
}) => {
const { t } = useTranslation();
const { folders, files } = useFolderContent(path);
Expand Down Expand Up @@ -59,6 +61,7 @@ export const FolderView: React.FC<IProps> = ({
<FolderItem
key={folder.id}
folder={folder}
isRemoteDrive={isRemoteDrive}
decodedDriveID={decodedDriveID}
onFolderSelected={onFolderSelected}
folderItemOptions={folderItemOptions}
Expand Down
1 change: 1 addition & 0 deletions src/pages/content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ const Content = () => {
path={selectedPath || ''}
folderItem={selectedFolder}
decodedDriveID={decodedDriveID}
isRemoteDrive={isRemoteDrive}
onFolderSelected={
onFolderSelectedHandler
}
Expand Down

0 comments on commit 9996fa3

Please sign in to comment.