diff --git a/frontend/src/components/cur-dir-path/index.js b/frontend/src/components/cur-dir-path/index.js index 22df8e4b54..ac8653f2e5 100644 --- a/frontend/src/components/cur-dir-path/index.js +++ b/frontend/src/components/cur-dir-path/index.js @@ -1,9 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { Utils } from '../../utils/utils'; import SortOptionsDialog from '../../components/dialog/sort-options'; import DirPath from './dir-path'; -import DirTool from './dir-tool'; const propTypes = { currentRepoInfo: PropTypes.object.isRequired, @@ -15,17 +13,12 @@ const propTypes = { onTabNavClick: PropTypes.func, pathPrefix: PropTypes.array, isViewFile: PropTypes.bool, - updateUsedRepoTags: PropTypes.func.isRequired, fileTags: PropTypes.array.isRequired, - onDeleteRepoTag: PropTypes.func.isRequired, toggleTreePanel: PropTypes.func.isRequired, direntList: PropTypes.array, sortBy: PropTypes.string, sortOrder: PropTypes.string, sortItems: PropTypes.func, - currentMode: PropTypes.string.isRequired, - switchViewMode: PropTypes.func.isRequired, - isCustomPermission: PropTypes.bool, repoEncrypted: PropTypes.bool.isRequired, isGroupOwnedRepo: PropTypes.bool.isRequired, enableDirPrivateShare: PropTypes.bool.isRequired, @@ -38,7 +31,6 @@ const propTypes = { filePermission: PropTypes.string, repoTags: PropTypes.array.isRequired, onFileTagChanged: PropTypes.func.isRequired, - viewId: PropTypes.string, onItemMove: PropTypes.func.isRequired, }; @@ -58,7 +50,6 @@ class CurDirPath extends React.Component { }; render() { - const isDesktop = Utils.isDesktop(); return (
- {isDesktop && - } - {!isDesktop && this.props.direntList.length > 0 && + {!this.props.isDesktop && this.props.direntList.length > 0 && } {this.state.isSortOptionsDialogOpen && @@ -186,67 +185,86 @@ class LibContentContainer extends React.Component { {gettext('This library has been set to read-only by admin and cannot be updated.')}
} -
- - +
+
+ + +
+ {isDesktop && +
+ +
+ }