1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-03 07:55:36 +00:00
This commit is contained in:
zxj96
2019-04-17 10:48:44 +08:00
committed by Daniel Pan
parent b83197e2b0
commit 8d5b16505f
11 changed files with 115 additions and 6 deletions

View File

@@ -44,6 +44,7 @@ const propTypes = {
onItemsMove: PropTypes.func.isRequired,
onItemsCopy: PropTypes.func.isRequired,
onItemsDelete: PropTypes.func.isRequired,
onFileTagChanged: PropTypes.func,
};
class DirentListView extends React.Component {
@@ -221,6 +222,7 @@ class DirentListView extends React.Component {
this.setState({isCopyDialogShow: !this.state.isCopyDialogShow});
}
onItemsDownload = () => {
let { path, repoID, selectedDirentList } = this.props;
if (selectedDirentList.length) {
@@ -454,7 +456,7 @@ class DirentListView extends React.Component {
contextmenuList = this.props.showShareBtn ? [SHARE, DOWNLOAD, DELETE, 'Divider'] : [DOWNLOAD, DELETE, 'Divider'];
}
let { RENAME, MOVE, COPY, PERMISSION, OPEN_VIA_CLIENT, LOCK, UNLOCK, COMMENT, HISTORY, ACCESS_LOG } = TextTranslation;
let { RENAME, MOVE, COPY, PERMISSION, OPEN_VIA_CLIENT, LOCK, UNLOCK, COMMENT, HISTORY, ACCESS_LOG, TAGS } = TextTranslation;
if (type === 'dir' && permission === 'rw') {
if (can_set_folder_perm) {
menuList = [...contextmenuList, RENAME, MOVE, COPY, 'Divider', PERMISSION, 'Divider', OPEN_VIA_CLIENT];
@@ -476,6 +478,7 @@ class DirentListView extends React.Component {
menuList.push(MOVE);
}
menuList.push(COPY);
menuList.push(TAGS);
if (isPro) {
if (dirent.is_locked) {
if (dirent.locked_by_me || (dirent.lock_owner === 'OnlineOffice' && permission === 'rw')) {
@@ -573,6 +576,7 @@ class DirentListView extends React.Component {
onItemContextMenu={this.onItemContextMenu}
selectedDirentList={this.props.selectedDirentList}
activeDirent={this.state.activeDirent}
onFileTagChanged={this.props.onFileTagChanged}
/>
);
})}