1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-05 00:43:53 +00:00

add dividers (#3146)

This commit is contained in:
Michael An
2019-03-20 11:13:32 +08:00
committed by Daniel Pan
parent b9aca2aba9
commit 0209a6ac73
3 changed files with 5 additions and 6 deletions

View File

@@ -30,12 +30,12 @@ class DirentMenu extends React.Component {
menuList = ['Share'];
} else if (dirents[0].type === 'file') {
if (dirents[0].is_locked) {
menuList = ['Share', 'Tags', 'Unlock', 'Details', 'Related Files', 'History', 'Open via Client'];
menuList = ['Share', 'Unlock', 'Tags', 'Related Files', 'Divider', 'History', 'Details', 'Divider', 'Open via Client'];
} else {
menuList = ['Share', 'Tags', 'Lock', 'Details', 'Related Files', 'History', 'Open via Client'];
menuList = ['Share', 'Lock', 'Tags', 'Related Files', 'Divider', 'History', 'Details', 'Divider', 'Open via Client'];
}
if (!(currentRepoInfo.is_admin && currentRepoInfo.permission === 'rw' || isRepoOwner)) {
menuList.splice(2, 1);
menuList.splice(1, 1);
}
}
} else {

View File

@@ -27,7 +27,7 @@ const propTypes = {
isRepoOwner: PropTypes.bool.isRequired,
enableDirPrivateShare: PropTypes.bool.isRequired,
currentRepoInfo: PropTypes.object.isRequired,
onFileTagChanged: PropTypes.func.isRequired,
onFilesTagChanged: PropTypes.func.isRequired,
unSelectDirent: PropTypes.func.isRequired,
updateDirent: PropTypes.func.isRequired,
showDirentDetail: PropTypes.func.isRequired,
@@ -266,7 +266,7 @@ class MutipleDirOperationToolbar extends React.Component {
for (let i = 0; i < length; i++) {
const dirent = this.props.selectedDirentList[i];
const direntPath = this.getDirentPath(dirent);
this.props.onFileTagChanged(dirent, direntPath);
this.props.onFilesTagChanged(dirent, direntPath);
}
}

View File

@@ -98,7 +98,6 @@ class LibContentToolbar extends React.Component {
isRepoOwner={this.props.isRepoOwner}
currentRepoInfo={this.props.currentRepoInfo}
enableDirPrivateShare={this.props.enableDirPrivateShare}
onFileTagChanged={this.props.onFileTagChanged}
updateDirent={this.props.updateDirent}
onDirentSelected={this.props.onDirentSelected}
showDirentDetail={this.props.showDirentDetail}