|
@@ -7,6 +7,8 @@ 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)
|
|
|
|
|
|
|
@@ -71,7 +73,13 @@ function FileTreeToolbarRight() {
|
|
|
startDeleting
|
|
startDeleting
|
|
|
} = useFileTreeActionable()
|
|
} = useFileTreeActionable()
|
|
|
|
|
|
|
|
- if (!canRename && !canDelete) return null
|
|
|
|
|
|
|
+ if (!canRename && !canDelete) {
|
|
|
|
|
+ return (
|
|
|
|
|
+ <div className="toolbar-right">
|
|
|
|
|
+ <FileTreeBadge />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ )
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
<div className="toolbar-right">
|
|
<div className="toolbar-right">
|
|
@@ -93,6 +101,7 @@ 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>
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|