1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-14 06:11:16 +00:00

Repo optimized (#2664)

This commit is contained in:
杨顺强
2018-12-18 17:21:01 +08:00
committed by Daniel Pan
parent 3b43d2d534
commit ed5439a4e3
15 changed files with 83 additions and 78 deletions

View File

@@ -31,7 +31,7 @@ const propTypes = {
onItemCopy: PropTypes.func.isRequired,
onItemDetails: PropTypes.func.isRequired,
updateDirent: PropTypes.func.isRequired,
currentRepo: PropTypes.object,
currentRepoInfo: PropTypes.object,
isRepoOwner: PropTypes.bool,
};
@@ -455,7 +455,7 @@ class DirentListItem extends React.Component {
dirent={this.props.dirent}
menuPosition={this.state.menuPosition}
onMenuItemClick={this.onMenuItemClick}
currentRepo={this.props.currentRepo}
currentRepoInfo={this.props.currentRepoInfo}
isRepoOwner={this.props.isRepoOwner}
/>
}

View File

@@ -8,7 +8,7 @@ const propTypes = {
path: PropTypes.string.isRequired,
repoID: PropTypes.string.isRequired,
isRepoOwner: PropTypes.bool,
currentRepo: PropTypes.object,
currentRepoInfo: PropTypes.object,
isAllItemSelected: PropTypes.bool.isRequired,
isDirentListLoading: PropTypes.bool.isRequired,
direntList: PropTypes.array.isRequired,
@@ -80,7 +80,7 @@ class DirentListView extends React.Component {
dirent={dirent}
path={this.props.path}
repoID={this.props.repoID}
currentRepo={this.props.currentRepo}
currentRepoInfo={this.props.currentRepoInfo}
isRepoOwner={this.props.isRepoOwner}
onItemClick={this.props.onItemClick}
onItemRenameToggle={this.onItemRenameToggle}

View File

@@ -7,7 +7,7 @@ const propTypes = {
dirent: PropTypes.object.isRequired,
menuPosition: PropTypes.object.isRequired,
onMenuItemClick: PropTypes.func.isRequired,
currentRepo: PropTypes.object.isRequired,
currentRepoInfo: PropTypes.object.isRequired,
isRepoOwner: PropTypes.bool.isRequired,
};
@@ -21,8 +21,8 @@ class DirentMenu extends React.Component {
}
componentDidMount() {
let repo = this.props.currentRepo;
let menuList = this.calculateMenuList(repo);
let repoInfo = this.props.currentRepoInfo;
let menuList = this.calculateMenuList(repoInfo);
this.setState({
menuList: menuList,
menuHeight: menuList.length * 30,