Skip to content

Commit

Permalink
Merge pull request #395 from powerhouse-inc/disable-sync-icon-folder-…
Browse files Browse the repository at this point in the history
…local

feat: disable sync icon for local folders
  • Loading branch information
gpuente authored Jun 27, 2024
2 parents 5632718 + 9996fa3 commit b8d939d
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 b8d939d

Please sign in to comment.