Skip to content

Commit

Permalink
show cid (#2199)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tbaut authored Jul 5, 2022
1 parent 5f4f984 commit 861d8ce
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -344,29 +344,25 @@ const FileSystemTableItem = React.forwardRef(
/>}
</>}
</TableCell>
{desktop && (
{desktop && (!isFolder || fileSystemType === "ipfs") && (
<>
{
<TableCell>
{!isFolder && <>
<div
className={classes.copyArea}
onClick={onCopyCID}>
<div className={clsx(classes.copiedFlag, { "active": copied })}>
<span>
<Trans>
Copied!
</Trans>
</span>
</div>
<Typography component="p">
{ cid }
</Typography>
<CopySvg className={clsx(classes.copyIcon, { "active": copied })} />
</div>
</>}
</TableCell>
}
<TableCell>
<div
className={classes.copyArea}
onClick={onCopyCID}>
<div className={clsx(classes.copiedFlag, { "active": copied })}>
<span>
<Trans>
Copied!
</Trans>
</span>
</div>
<Typography component="p">
{ cid }
</Typography>
<CopySvg className={clsx(classes.copyIcon, { "active": copied })} />
</div>
</TableCell>
<TableCell align="left">
{!isFolder && formatBytes(size, 2)}
</TableCell>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1068,9 +1068,7 @@ const FilesList = () => {
/>
</TableHeadCell>
<TableHeadCell>
{/*
Icon
*/}
{/* Icon */}
</TableHeadCell>
<TableHeadCell
sortButtons={true}
Expand Down
6 changes: 3 additions & 3 deletions packages/storage-ui/src/Contexts/FileBrowserContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ interface FileBrowserContext extends IFileBrowserModuleProps {
currentPath: string
loadingCurrentPath: boolean
sourceFiles: FileSystemItem[]
crumbs: Crumb[] | undefined
moduleRootPath: string | undefined
crumbs?: Crumb[]
moduleRootPath?: string
getPath?: (cid: string) => string
isSearch?: boolean
withSurvey?: boolean
fileSystemType: FileSystemType | undefined
fileSystemType?: FileSystemType
}

const FileBrowserContext = React.createContext<FileBrowserContext | undefined>(undefined)
Expand Down

0 comments on commit 861d8ce

Please sign in to comment.