mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-05 00:43:53 +00:00
delete details choice in menu (#3239)
This commit is contained in:
@@ -31,7 +31,6 @@ const propTypes = {
|
|||||||
onItemMove: PropTypes.func.isRequired,
|
onItemMove: PropTypes.func.isRequired,
|
||||||
onItemCopy: PropTypes.func.isRequired,
|
onItemCopy: PropTypes.func.isRequired,
|
||||||
onDirentClick: PropTypes.func.isRequired,
|
onDirentClick: PropTypes.func.isRequired,
|
||||||
onItemDetails: PropTypes.func.isRequired,
|
|
||||||
updateDirent: PropTypes.func.isRequired,
|
updateDirent: PropTypes.func.isRequired,
|
||||||
isAllItemSelected: PropTypes.bool.isRequired,
|
isAllItemSelected: PropTypes.bool.isRequired,
|
||||||
onAllItemSelected: PropTypes.func.isRequired,
|
onAllItemSelected: PropTypes.func.isRequired,
|
||||||
@@ -156,7 +155,6 @@ class DirListView extends React.Component {
|
|||||||
onItemMove={this.props.onItemMove}
|
onItemMove={this.props.onItemMove}
|
||||||
onItemCopy={this.props.onItemCopy}
|
onItemCopy={this.props.onItemCopy}
|
||||||
onDirentClick={this.props.onDirentClick}
|
onDirentClick={this.props.onDirentClick}
|
||||||
onItemDetails={this.props.onItemDetails}
|
|
||||||
isDirentListLoading={this.props.isDirentListLoading}
|
isDirentListLoading={this.props.isDirentListLoading}
|
||||||
updateDirent={this.props.updateDirent}
|
updateDirent={this.props.updateDirent}
|
||||||
isAllItemSelected={this.props.isAllItemSelected}
|
isAllItemSelected={this.props.isAllItemSelected}
|
||||||
|
@@ -31,7 +31,6 @@ const propTypes = {
|
|||||||
onItemRename: PropTypes.func.isRequired,
|
onItemRename: PropTypes.func.isRequired,
|
||||||
onItemMove: PropTypes.func.isRequired,
|
onItemMove: PropTypes.func.isRequired,
|
||||||
onItemCopy: PropTypes.func.isRequired,
|
onItemCopy: PropTypes.func.isRequired,
|
||||||
onItemDetails: PropTypes.func.isRequired,
|
|
||||||
onDirentClick: PropTypes.func.isRequired,
|
onDirentClick: PropTypes.func.isRequired,
|
||||||
updateDirent: PropTypes.func.isRequired,
|
updateDirent: PropTypes.func.isRequired,
|
||||||
showImagePopup: PropTypes.func.isRequired,
|
showImagePopup: PropTypes.func.isRequired,
|
||||||
@@ -242,9 +241,6 @@ class DirentListItem extends React.Component {
|
|||||||
case 'Permission':
|
case 'Permission':
|
||||||
this.onPermissionItem();
|
this.onPermissionItem();
|
||||||
break;
|
break;
|
||||||
case 'Details':
|
|
||||||
this.onDetailsItem();
|
|
||||||
break;
|
|
||||||
case 'Unlock':
|
case 'Unlock':
|
||||||
this.onUnlockItem();
|
this.onUnlockItem();
|
||||||
break;
|
break;
|
||||||
@@ -298,10 +294,6 @@ class DirentListItem extends React.Component {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onDetailsItem = () => {
|
|
||||||
this.props.onItemDetails(this.props.dirent);
|
|
||||||
}
|
|
||||||
|
|
||||||
onLockItem = () => {
|
onLockItem = () => {
|
||||||
let repoID = this.props.repoID;
|
let repoID = this.props.repoID;
|
||||||
let filePath = this.getDirentPath(this.props.dirent);
|
let filePath = this.getDirentPath(this.props.dirent);
|
||||||
|
@@ -30,7 +30,6 @@ const propTypes = {
|
|||||||
onItemMove: PropTypes.func.isRequired,
|
onItemMove: PropTypes.func.isRequired,
|
||||||
onItemCopy: PropTypes.func.isRequired,
|
onItemCopy: PropTypes.func.isRequired,
|
||||||
onDirentClick: PropTypes.func.isRequired,
|
onDirentClick: PropTypes.func.isRequired,
|
||||||
onItemDetails: PropTypes.func.isRequired,
|
|
||||||
updateDirent: PropTypes.func.isRequired,
|
updateDirent: PropTypes.func.isRequired,
|
||||||
switchAnotherMenuToShow: PropTypes.func,
|
switchAnotherMenuToShow: PropTypes.func,
|
||||||
appMenuType: PropTypes.oneOf(['list_view_contextmenu', 'item_contextmenu', 'tree_contextmenu', 'item_op_menu']),
|
appMenuType: PropTypes.oneOf(['list_view_contextmenu', 'item_contextmenu', 'tree_contextmenu', 'item_op_menu']),
|
||||||
@@ -98,10 +97,6 @@ class DirentListView extends React.Component {
|
|||||||
this.onFreezedItem();
|
this.onFreezedItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
onItemDetails = (dirent) => {
|
|
||||||
this.props.onItemDetails(dirent);
|
|
||||||
}
|
|
||||||
|
|
||||||
onCreateFileToggle = () => {
|
onCreateFileToggle = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
isCreateFileDialogShow: !this.state.isCreateFileDialogShow,
|
isCreateFileDialogShow: !this.state.isCreateFileDialogShow,
|
||||||
@@ -296,7 +291,6 @@ class DirentListView extends React.Component {
|
|||||||
onFreezedItem={this.onFreezedItem}
|
onFreezedItem={this.onFreezedItem}
|
||||||
onUnfreezedItem={this.onUnfreezedItem}
|
onUnfreezedItem={this.onUnfreezedItem}
|
||||||
onDirentClick={this.props.onDirentClick}
|
onDirentClick={this.props.onDirentClick}
|
||||||
onItemDetails={this.onItemDetails}
|
|
||||||
showImagePopup={this.showImagePopup}
|
showImagePopup={this.showImagePopup}
|
||||||
switchAnotherMenuToShow={this.props.switchAnotherMenuToShow}
|
switchAnotherMenuToShow={this.props.switchAnotherMenuToShow}
|
||||||
appMenuType={this.props.appMenuType}
|
appMenuType={this.props.appMenuType}
|
||||||
|
@@ -42,15 +42,15 @@ class DirentMenu extends React.Component {
|
|||||||
if (type === 'dir' && permission === 'rw') {
|
if (type === 'dir' && permission === 'rw') {
|
||||||
let menuList = [];
|
let menuList = [];
|
||||||
if (can_set_folder_perm) {
|
if (can_set_folder_perm) {
|
||||||
menuList = ['Rename', 'Move', 'Copy', 'Divider', 'Permission', 'Details', 'Divider', 'Open via Client'];
|
menuList = ['Rename', 'Move', 'Copy', 'Divider', 'Permission', 'Divider', 'Open via Client'];
|
||||||
} else {
|
} else {
|
||||||
menuList = ['Rename', 'Move', 'Copy', 'Divider', 'Details', 'Divider', 'Open via Client'];
|
menuList = ['Rename', 'Move', 'Copy', 'Divider', 'Open via Client'];
|
||||||
}
|
}
|
||||||
return menuList;
|
return menuList;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type === 'dir' && permission === 'r') {
|
if (type === 'dir' && permission === 'r') {
|
||||||
let menuList = currentRepoInfo.encrypted ? ['Copy', 'Details'] : ['Details'];
|
let menuList = currentRepoInfo.encrypted ? ['Copy'] : [];
|
||||||
return menuList;
|
return menuList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,7 +78,6 @@ class DirentMenu extends React.Component {
|
|||||||
if (fileAuditEnabled) {
|
if (fileAuditEnabled) {
|
||||||
menuList.push('Access Log');
|
menuList.push('Access Log');
|
||||||
}
|
}
|
||||||
menuList.push('Details');
|
|
||||||
menuList.push('Divider');
|
menuList.push('Divider');
|
||||||
menuList.push('Open via Client');
|
menuList.push('Open via Client');
|
||||||
return menuList;
|
return menuList;
|
||||||
@@ -93,7 +92,6 @@ class DirentMenu extends React.Component {
|
|||||||
menuList.push('Comment');
|
menuList.push('Comment');
|
||||||
}
|
}
|
||||||
menuList.push('History');
|
menuList.push('History');
|
||||||
menuList.push('Details');
|
|
||||||
return menuList;
|
return menuList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -113,9 +111,6 @@ class DirentMenu extends React.Component {
|
|||||||
case 'Permission':
|
case 'Permission':
|
||||||
translateResult = gettext('Permission');
|
translateResult = gettext('Permission');
|
||||||
break;
|
break;
|
||||||
case 'Details':
|
|
||||||
translateResult = gettext('Details');
|
|
||||||
break;
|
|
||||||
case 'Unlock':
|
case 'Unlock':
|
||||||
translateResult = gettext('Unlock');
|
translateResult = gettext('Unlock');
|
||||||
break;
|
break;
|
||||||
|
@@ -59,15 +59,15 @@ class DirentRightMenu extends React.Component {
|
|||||||
let subscriptList = showShare ? ['Share', 'Download', 'Delete', 'Divider'] : ['Download', 'Delete', 'Divider'];
|
let subscriptList = showShare ? ['Share', 'Download', 'Delete', 'Divider'] : ['Download', 'Delete', 'Divider'];
|
||||||
let menuList = [];
|
let menuList = [];
|
||||||
if (can_set_folder_perm) {
|
if (can_set_folder_perm) {
|
||||||
menuList = [...subscriptList, 'Rename', 'Move', 'Copy', 'Divider', 'Permission', 'Details', 'Divider', 'Open via Client'];
|
menuList = [...subscriptList, 'Rename', 'Move', 'Copy', 'Divider', 'Permission', 'Divider', 'Open via Client'];
|
||||||
} else {
|
} else {
|
||||||
menuList = [...subscriptList, 'Rename', 'Move', 'Copy', 'Divider', 'Details', 'Divider', 'Open via Client'];
|
menuList = [...subscriptList, 'Rename', 'Move', 'Copy', 'Divider', 'Open via Client'];
|
||||||
}
|
}
|
||||||
return menuList;
|
return menuList;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type === 'dir' && permission === 'r') {
|
if (type === 'dir' && permission === 'r') {
|
||||||
let menuList = showShare ? ['Share', 'Download','Delete', 'Divider', 'Copy', 'Details'] : ['Download', 'Delete', 'Divider', 'Details'];
|
let menuList = showShare ? ['Share', 'Download','Delete', 'Divider', 'Copy'] : ['Download', 'Delete'];
|
||||||
return menuList;
|
return menuList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -96,7 +96,6 @@ class DirentRightMenu extends React.Component {
|
|||||||
if (fileAuditEnabled) {
|
if (fileAuditEnabled) {
|
||||||
menuList.push('Access Log');
|
menuList.push('Access Log');
|
||||||
}
|
}
|
||||||
menuList.push('Details');
|
|
||||||
menuList.push('Divider');
|
menuList.push('Divider');
|
||||||
menuList.push('Open via Client');
|
menuList.push('Open via Client');
|
||||||
return menuList;
|
return menuList;
|
||||||
@@ -111,7 +110,6 @@ class DirentRightMenu extends React.Component {
|
|||||||
menuList.push('Comment');
|
menuList.push('Comment');
|
||||||
}
|
}
|
||||||
menuList.push('History');
|
menuList.push('History');
|
||||||
menuList.push('Details');
|
|
||||||
return menuList;
|
return menuList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -165,9 +163,6 @@ class DirentRightMenu extends React.Component {
|
|||||||
case 'Delete':
|
case 'Delete':
|
||||||
translateResult = gettext('Delete');
|
translateResult = gettext('Delete');
|
||||||
break;
|
break;
|
||||||
case 'Details':
|
|
||||||
translateResult = gettext('Details');
|
|
||||||
break;
|
|
||||||
case 'Unlock':
|
case 'Unlock':
|
||||||
translateResult = gettext('Unlock');
|
translateResult = gettext('Unlock');
|
||||||
break;
|
break;
|
||||||
|
@@ -31,7 +31,7 @@ class DirentMenu extends React.Component {
|
|||||||
if (dirent.type === 'dir') {
|
if (dirent.type === 'dir') {
|
||||||
menuList = ['Share'];
|
menuList = ['Share'];
|
||||||
} else if (dirent.type === 'file') {
|
} else if (dirent.type === 'file') {
|
||||||
menuList = ['Share', 'Tags', 'Related Files', 'Divider', 'History', 'Details', 'Divider', 'Open via Client'];
|
menuList = ['Share', 'Tags', 'Related Files', 'Divider', 'History', 'Divider', 'Open via Client'];
|
||||||
if (!Utils.isMarkdownFile(dirent.name)) {
|
if (!Utils.isMarkdownFile(dirent.name)) {
|
||||||
menuList.splice(2, 1);
|
menuList.splice(2, 1);
|
||||||
}
|
}
|
||||||
@@ -62,9 +62,6 @@ class DirentMenu extends React.Component {
|
|||||||
case 'Tags':
|
case 'Tags':
|
||||||
translateResult = gettext('Tags');
|
translateResult = gettext('Tags');
|
||||||
break;
|
break;
|
||||||
case 'Details':
|
|
||||||
translateResult = gettext('Details');
|
|
||||||
break;
|
|
||||||
case 'Lock':
|
case 'Lock':
|
||||||
translateResult = gettext('Lock');
|
translateResult = gettext('Lock');
|
||||||
break;
|
break;
|
||||||
|
@@ -155,7 +155,6 @@ class MyLibraries extends Component {
|
|||||||
onRenameRepo={this.onRenameRepo}
|
onRenameRepo={this.onRenameRepo}
|
||||||
onDeleteRepo={this.onDeleteRepo}
|
onDeleteRepo={this.onDeleteRepo}
|
||||||
onTransferRepo={this.onTransferRepo}
|
onTransferRepo={this.onTransferRepo}
|
||||||
onRepoDetails={this.onRepoDetails}
|
|
||||||
onRepoClick={this.onRepoClick}
|
onRepoClick={this.onRepoClick}
|
||||||
sortRepoList={this.sortRepoList}
|
sortRepoList={this.sortRepoList}
|
||||||
/>
|
/>
|
||||||
|
@@ -25,7 +25,6 @@ const propTypes = {
|
|||||||
onRenameRepo: PropTypes.func.isRequired,
|
onRenameRepo: PropTypes.func.isRequired,
|
||||||
onDeleteRepo: PropTypes.func.isRequired,
|
onDeleteRepo: PropTypes.func.isRequired,
|
||||||
onTransferRepo: PropTypes.func.isRequired,
|
onTransferRepo: PropTypes.func.isRequired,
|
||||||
onRepoDetails: PropTypes.func.isRequired,
|
|
||||||
onRepoClick: PropTypes.func.isRequired,
|
onRepoClick: PropTypes.func.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -90,9 +89,6 @@ class MylibRepoListItem extends React.Component {
|
|||||||
case 'Folder Permission':
|
case 'Folder Permission':
|
||||||
// todo
|
// todo
|
||||||
break;
|
break;
|
||||||
case 'Details':
|
|
||||||
this.onRepoDetails();
|
|
||||||
break;
|
|
||||||
case 'Label current state':
|
case 'Label current state':
|
||||||
this.onLabel();
|
this.onLabel();
|
||||||
break;
|
break;
|
||||||
@@ -146,10 +142,6 @@ class MylibRepoListItem extends React.Component {
|
|||||||
this.setState({isResetPasswordDialogShow: !this.state.isResetPasswordDialogShow});
|
this.setState({isResetPasswordDialogShow: !this.state.isResetPasswordDialogShow});
|
||||||
}
|
}
|
||||||
|
|
||||||
onRepoDetails = () => {
|
|
||||||
this.props.onRepoDetails(this.props.repo);
|
|
||||||
}
|
|
||||||
|
|
||||||
onLabel = () => {
|
onLabel = () => {
|
||||||
// todo
|
// todo
|
||||||
}
|
}
|
||||||
|
@@ -12,7 +12,6 @@ const propTypes = {
|
|||||||
onRenameRepo: PropTypes.func.isRequired,
|
onRenameRepo: PropTypes.func.isRequired,
|
||||||
onDeleteRepo: PropTypes.func.isRequired,
|
onDeleteRepo: PropTypes.func.isRequired,
|
||||||
onTransferRepo: PropTypes.func.isRequired,
|
onTransferRepo: PropTypes.func.isRequired,
|
||||||
onRepoDetails: PropTypes.func.isRequired,
|
|
||||||
onRepoClick: PropTypes.func.isRequired,
|
onRepoClick: PropTypes.func.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -61,7 +60,6 @@ class MylibRepoListView extends React.Component {
|
|||||||
onRenameRepo={this.props.onRenameRepo}
|
onRenameRepo={this.props.onRenameRepo}
|
||||||
onDeleteRepo={this.props.onDeleteRepo}
|
onDeleteRepo={this.props.onDeleteRepo}
|
||||||
onTransferRepo={this.props.onTransferRepo}
|
onTransferRepo={this.props.onTransferRepo}
|
||||||
onRepoDetails={this.props.onRepoDetails}
|
|
||||||
onRepoClick={this.props.onRepoClick}
|
onRepoClick={this.props.onRepoClick}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
@@ -61,7 +61,6 @@ class MylibRepoMenu extends React.Component {
|
|||||||
if (folderPermEnabled) {
|
if (folderPermEnabled) {
|
||||||
operations.push('Folder Permission');
|
operations.push('Folder Permission');
|
||||||
}
|
}
|
||||||
operations.push('Details');
|
|
||||||
if (this.props.isPC && enableRepoSnapshotLabel) {
|
if (this.props.isPC && enableRepoSnapshotLabel) {
|
||||||
operations.push('Label current state');
|
operations.push('Label current state');
|
||||||
}
|
}
|
||||||
@@ -95,9 +94,6 @@ class MylibRepoMenu extends React.Component {
|
|||||||
case 'Folder Permission':
|
case 'Folder Permission':
|
||||||
translateResult = gettext('Folder Permission');
|
translateResult = gettext('Folder Permission');
|
||||||
break;
|
break;
|
||||||
case 'Details':
|
|
||||||
translateResult = gettext('Details');
|
|
||||||
break;
|
|
||||||
case 'Label current state':
|
case 'Label current state':
|
||||||
translateResult = gettext('Label current state');
|
translateResult = gettext('Label current state');
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user