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

Active item improve (#3258)

* optimized code

* add active interaction

* repair interactive bug
This commit is contained in:
杨顺强
2019-04-12 20:21:54 +08:00
committed by Daniel Pan
parent 77fae49d6a
commit 611e2aefb1
12 changed files with 206 additions and 294 deletions

View File

@@ -28,7 +28,6 @@ const propTypes = {
onFilesTagChanged: PropTypes.func.isRequired,
unSelectDirent: PropTypes.func.isRequired,
updateDirent: PropTypes.func.isRequired,
showDirentDetail: PropTypes.func.isRequired,
};
class MutipleDirOperationToolbar extends React.Component {
@@ -96,9 +95,6 @@ class MutipleDirOperationToolbar extends React.Component {
case 'Tags':
this.listFileTags(dirent);
break;
case 'Details':
this.props.showDirentDetail();
break;
case 'Lock':
this.lockFile(dirent);
break;
@@ -246,11 +242,10 @@ class MutipleDirOperationToolbar extends React.Component {
<Button className="secondary group-op-item action-icon sf2-icon-copy" title={gettext('Copy')} onClick={this.onCopyToggle}></Button>
<Button className="secondary group-op-item action-icon sf2-icon-delete" title={gettext('Delete')} onClick={this.onItemsDelete}></Button>
<Button className="secondary group-op-item action-icon sf2-icon-download" title={gettext('Download')} onClick={this.onItemsDownload}></Button>
{this.props.selectedDirentList.length > 0 &&
{this.props.selectedDirentList.length === 1 &&
<DirentsMenu
dirents={this.props.selectedDirentList}
dirent={this.props.selectedDirentList[0]}
currentRepoInfo={this.props.currentRepoInfo}
isRepoOwner={this.props.isRepoOwner}
onMenuItemClick={this.onMenuItemClick}
/>
}