diff --git a/frontend/src/components/cur-repo-path/index.js b/frontend/src/components/cur-repo-path/index.js
deleted file mode 100644
index 2c7f023d93..0000000000
--- a/frontend/src/components/cur-repo-path/index.js
+++ /dev/null
@@ -1,26 +0,0 @@
-import React, { Fragment } from 'react';
-import PropTypes from 'prop-types';
-import RepoPath from './repo-path';
-import RepoTool from './repo-tool';
-
-const propTypes = {
- libraryType: PropTypes.string.isRequired,
- currentGroup: PropTypes.object,
-};
-
-class CurGroupPath extends React.Component {
-
- render() {
- let { libraryType, currentGroup } = this.props;
- return (
-
-
-
-
- );
- }
-}
-
-CurGroupPath.propTypes = propTypes;
-
-export default CurGroupPath;
diff --git a/frontend/src/components/cur-repo-path/repo-path.js b/frontend/src/components/cur-repo-path/repo-path.js
deleted file mode 100644
index f19deceefd..0000000000
--- a/frontend/src/components/cur-repo-path/repo-path.js
+++ /dev/null
@@ -1,37 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import {gettext, siteRoot} from '../../utils/constants';
-
-const propTypes = {
- currentGroup: PropTypes.object, // for group
- libraryType: PropTypes.string.isRequired, //for my-library, shared width me, shared whith all, groups
-};
-
-class RepoPath extends React.Component {
-
- render() {
- let { libraryType, currentGroup } = this.props;
- if (libraryType === 'group' && currentGroup) {
- return (
-
-
{gettext("Groups")}
-
/
-
{currentGroup.name}
- {currentGroup.parent_group_id !== 0 && (
-
- )}
-
- );
- }
-
- return (
-
- {libraryType}
-
- );
- }
-}
-
-RepoPath.propTypes = propTypes;
-
-export default RepoPath;
diff --git a/frontend/src/components/cur-repo-path/repo-tool.js b/frontend/src/components/cur-repo-path/repo-tool.js
deleted file mode 100644
index 0e3205946f..0000000000
--- a/frontend/src/components/cur-repo-path/repo-tool.js
+++ /dev/null
@@ -1,31 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import { gettext, username } from '../../utils/constants';
-
-const propTypes = {
- currentGroup: PropTypes.object, // for group
- libraryType: PropTypes.string.isRequired, //for my-library, shared width me, shared whith all, groups
-};
-
-class RepoTool extends React.Component {
-
- render() {
- if (this.props.libraryType === 'group' && this.props.currentGroup) {
- let currentGroup = this.props.currentGroup;
- let isShowSettingIcon = !(currentGroup.parent_group_id !== 0 && currentGroup.admins.indexOf(username) === -1);
- return (
-
- {isShowSettingIcon && (
-
- )}
-
-
- );
- }
- return '';
- }
-}
-
-RepoTool.propTypes = propTypes;
-
-export default RepoTool;
diff --git a/frontend/src/components/share-repo-list-view/share-repo-list-view.js b/frontend/src/components/share-repo-list-view/share-repo-list-view.js
index d0da0b4167..d30767b453 100644
--- a/frontend/src/components/share-repo-list-view/share-repo-list-view.js
+++ b/frontend/src/components/share-repo-list-view/share-repo-list-view.js
@@ -77,11 +77,9 @@ class ShareRepoListView extends React.Component {
{gettext("Library Type")} |
-
- {gettext("Sort:")} {/* TODO: sort */}
- {gettext("name")}
- {gettext("last update")}
-
+ {gettext("Sort:")} {/* TODO: sort */}
+ {gettext("name")}
+ {gettext("last update")}
|
{gettext("Actions")} |
diff --git a/frontend/src/pages/groups/group-view.js b/frontend/src/pages/groups/group-view.js
index c2bf04ed05..45a5e59cd3 100644
--- a/frontend/src/pages/groups/group-view.js
+++ b/frontend/src/pages/groups/group-view.js
@@ -1,13 +1,12 @@
import React,{ Fragment } from 'react';
import PropTypes from 'prop-types';
-import { gettext, username, loginUrl } from '../../utils/constants';
+import { gettext, siteRoot, username, loginUrl } from '../../utils/constants';
import { seafileAPI } from '../../utils/seafile-api';
import Loading from '../../components/loading';
import ModalPortal from '../../components/modal-portal';
import Group from '../../models/group';
import RepoInfo from '../../models/repoInfo';
import CommonToolbar from '../../components/toolbar/common-toolbar';
-import CurRepoPath from '../../components/cur-repo-path/';
import CreateRepoDialog from '../../components/dialog/create-repo-dialog';
import CreateDepartmentRepoDialog from '../../components/dialog/create-department-repo-dialog';
import ShareRepoListView from '../../components/share-repo-list-view/share-repo-list-view';
@@ -181,7 +180,8 @@ class GroupView extends React.Component {
}
render() {
- let { errMessage, emptyTip } = this.state;
+ let { errMessage, emptyTip, currentGroup } = this.state;
+ let isShowSettingIcon = !(currentGroup && currentGroup.parent_group_id !== 0 && currentGroup.admins.indexOf(username) === -1);
return (
@@ -199,7 +199,24 @@ class GroupView extends React.Component {
-
+ {currentGroup && (
+
+
+
{gettext("Groups")}
+
/
+
{currentGroup.name}
+ {currentGroup.parent_group_id !== 0 && (
+
+ )}
+
+
+ {isShowSettingIcon && (
+
+ )}
+
+
+
+ )}
{this.state.isLoading && }