mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 15:09:14 +00:00
delete details choice and fix wiki comment panel
This commit is contained in:
@@ -67,6 +67,7 @@ const propTypes = {
|
||||
onItemsCopy: PropTypes.func.isRequired,
|
||||
onItemsDelete: PropTypes.func.isRequired,
|
||||
onFileTagChanged: PropTypes.func,
|
||||
showDirentDetail: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
class DirColumnView extends React.Component {
|
||||
@@ -224,6 +225,7 @@ class DirColumnView extends React.Component {
|
||||
onItemsCopy={this.props.onItemsCopy}
|
||||
onItemsDelete={this.props.onItemsDelete}
|
||||
onFileTagChanged={this.props.onFileTagChanged}
|
||||
showDirentDetail={this.props.showDirentDetail}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
@@ -146,9 +146,6 @@ class DirentGridView extends React.Component{
|
||||
case 'History':
|
||||
this.onHistory(currentObject);
|
||||
break;
|
||||
case 'Details':
|
||||
this.onDetails(currentObject);
|
||||
break;
|
||||
case 'New Folder':
|
||||
this.onCreateFolderToggle(currentObject);
|
||||
break;
|
||||
@@ -177,11 +174,6 @@ class DirentGridView extends React.Component{
|
||||
});
|
||||
}
|
||||
|
||||
onDetails = (dirent) => {
|
||||
this.props.onGridItemClick(dirent);
|
||||
this.props.showDirentDetail();
|
||||
}
|
||||
|
||||
onItemDownload = (currentObject, e) => {
|
||||
e.nativeEvent.stopImmediatePropagation();
|
||||
let dirent = currentObject;
|
||||
@@ -243,7 +235,7 @@ class DirentGridView extends React.Component{
|
||||
}
|
||||
|
||||
onComnentItem = () => {
|
||||
|
||||
this.props.showDirentDetail('comments');
|
||||
}
|
||||
|
||||
onHistory = (currentObject) => {
|
||||
@@ -369,6 +361,7 @@ class DirentGridView extends React.Component{
|
||||
let id = 'grid-item-contextmenu';
|
||||
let menuList = this.getDirentItemMenuList(dirent, true);
|
||||
this.handleContextClick(event, id, menuList, dirent);
|
||||
this.props.onGridItemClick && this.props.onGridItemClick(dirent);
|
||||
}
|
||||
|
||||
handleContextClick = (event, id, menuList, currentObject = null) => {
|
||||
@@ -420,18 +413,18 @@ class DirentGridView extends React.Component{
|
||||
}
|
||||
}
|
||||
|
||||
let { RENAME, MOVE, COPY, PERMISSION, DETAILS, OPEN_VIA_CLIENT, LOCK, UNLOCK, COMMENT, HISTORY, ACCESS_LOG } = TextTranslation;
|
||||
let { RENAME, MOVE, COPY, PERMISSION, OPEN_VIA_CLIENT, LOCK, UNLOCK, COMMENT, HISTORY, ACCESS_LOG } = TextTranslation;
|
||||
if (type === 'dir' && permission === 'rw') {
|
||||
if (can_set_folder_perm) {
|
||||
menuList = [...contextmenuList, RENAME, MOVE, COPY, 'Divider', PERMISSION, DETAILS, 'Divider', OPEN_VIA_CLIENT];
|
||||
menuList = [...contextmenuList, RENAME, MOVE, COPY, 'Divider', PERMISSION, 'Divider', OPEN_VIA_CLIENT];
|
||||
} else {
|
||||
menuList = [...contextmenuList, RENAME, MOVE, COPY, 'Divider', DETAILS, 'Divider', OPEN_VIA_CLIENT];
|
||||
menuList = [...contextmenuList, RENAME, MOVE, COPY, 'Divider', OPEN_VIA_CLIENT];
|
||||
}
|
||||
return menuList;
|
||||
}
|
||||
|
||||
if (type === 'dir' && permission === 'r') {
|
||||
menuList = currentRepoInfo.encrypted ? [...contextmenuList, COPY, DETAILS] : [DETAILS];
|
||||
menuList = currentRepoInfo.encrypted ? [...contextmenuList, COPY] : [];
|
||||
return menuList;
|
||||
}
|
||||
|
||||
@@ -459,7 +452,6 @@ class DirentGridView extends React.Component{
|
||||
if (fileAuditEnabled) {
|
||||
menuList.push(ACCESS_LOG);
|
||||
}
|
||||
menuList.push(DETAILS);
|
||||
menuList.push('Divider');
|
||||
menuList.push(OPEN_VIA_CLIENT);
|
||||
return menuList;
|
||||
@@ -474,7 +466,6 @@ class DirentGridView extends React.Component{
|
||||
menuList.push(COMMENT);
|
||||
}
|
||||
menuList.push(HISTORY);
|
||||
menuList.push(DETAILS);
|
||||
return menuList;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user