|
@@ -7,8 +7,6 @@ import TooltipButton from '../../../shared/components/tooltip-button'
|
|
|
import { FileTreeMainContext } from '../contexts/file-tree-main'
|
|
import { FileTreeMainContext } from '../contexts/file-tree-main'
|
|
|
import { useFileTreeActionable } from '../contexts/file-tree-actionable'
|
|
import { useFileTreeActionable } from '../contexts/file-tree-actionable'
|
|
|
|
|
|
|
|
-import FileTreeBadge from './file-tree-badge'
|
|
|
|
|
-
|
|
|
|
|
function FileTreeToolbar() {
|
|
function FileTreeToolbar() {
|
|
|
const { hasWritePermissions } = useContext(FileTreeMainContext)
|
|
const { hasWritePermissions } = useContext(FileTreeMainContext)
|
|
|
|
|
|
|
@@ -74,11 +72,7 @@ function FileTreeToolbarRight() {
|
|
|
} = useFileTreeActionable()
|
|
} = useFileTreeActionable()
|
|
|
|
|
|
|
|
if (!canRename && !canDelete) {
|
|
if (!canRename && !canDelete) {
|
|
|
- return (
|
|
|
|
|
- <div className="toolbar-right">
|
|
|
|
|
- <FileTreeBadge />
|
|
|
|
|
- </div>
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ return null
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
@@ -101,7 +95,6 @@ function FileTreeToolbarRight() {
|
|
|
<Icon type="trash-o" modifier="fw" accessibilityLabel={t('delete')} />
|
|
<Icon type="trash-o" modifier="fw" accessibilityLabel={t('delete')} />
|
|
|
</TooltipButton>
|
|
</TooltipButton>
|
|
|
) : null}
|
|
) : null}
|
|
|
- <FileTreeBadge />
|
|
|
|
|
</div>
|
|
</div>
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|