mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-12 13:24:52 +00:00
revise isMutipleOperation to isMultipleOperation (#6471)
This commit is contained in:
@@ -10,7 +10,7 @@ const propTypes = {
|
||||
repoID: PropTypes.string.isRequired,
|
||||
dirent: PropTypes.object,
|
||||
selectedDirentList: PropTypes.array,
|
||||
isMutipleOperation: PropTypes.bool.isRequired,
|
||||
isMultipleOperation: PropTypes.bool.isRequired,
|
||||
onItemCopy: PropTypes.func,
|
||||
onItemsCopy: PropTypes.func,
|
||||
onCancelCopy: PropTypes.func.isRequired,
|
||||
@@ -37,7 +37,7 @@ class CopyDirent extends React.Component {
|
||||
}
|
||||
|
||||
handleSubmit = () => {
|
||||
if (this.props.isMutipleOperation) {
|
||||
if (this.props.isMultipleOperation) {
|
||||
this.copyItems();
|
||||
} else {
|
||||
this.copyItem();
|
||||
@@ -139,17 +139,17 @@ class CopyDirent extends React.Component {
|
||||
|
||||
render() {
|
||||
let title = gettext('Copy {placeholder} to');
|
||||
if (!this.props.isMutipleOperation) {
|
||||
if (!this.props.isMultipleOperation) {
|
||||
title = title.replace('{placeholder}', '<span class="op-target text-truncate mx-1">' + Utils.HTMLescape(this.props.dirent.name) + '</span>');
|
||||
} else {
|
||||
title = gettext('Copy selected item(s) to:');
|
||||
}
|
||||
let mode = 'current_repo_and_other_repos';
|
||||
const { isMutipleOperation } = this.props;
|
||||
const { isMultipleOperation } = this.props;
|
||||
return (
|
||||
<Modal isOpen={true} toggle={this.toggle}>
|
||||
<ModalHeader toggle={this.toggle}>
|
||||
{isMutipleOperation ? title : <div dangerouslySetInnerHTML={{ __html: title }} className="d-flex mw-100"></div>}
|
||||
{isMultipleOperation ? title : <div dangerouslySetInnerHTML={{ __html: title }} className="d-flex mw-100"></div>}
|
||||
</ModalHeader>
|
||||
<ModalBody>
|
||||
<FileChooser
|
||||
|
@@ -10,7 +10,7 @@ const propTypes = {
|
||||
repoID: PropTypes.string.isRequired,
|
||||
dirent: PropTypes.object,
|
||||
selectedDirentList: PropTypes.array,
|
||||
isMutipleOperation: PropTypes.bool.isRequired,
|
||||
isMultipleOperation: PropTypes.bool.isRequired,
|
||||
onItemMove: PropTypes.func,
|
||||
onItemsMove: PropTypes.func,
|
||||
onCancelMove: PropTypes.func.isRequired,
|
||||
@@ -37,7 +37,7 @@ class MoveDirent extends React.Component {
|
||||
}
|
||||
|
||||
handleSubmit = () => {
|
||||
if (this.props.isMutipleOperation) {
|
||||
if (this.props.isMultipleOperation) {
|
||||
this.moveItems();
|
||||
} else {
|
||||
this.moveItem();
|
||||
@@ -153,13 +153,13 @@ class MoveDirent extends React.Component {
|
||||
|
||||
render() {
|
||||
let title = gettext('Move {placeholder} to');
|
||||
if (!this.props.isMutipleOperation) {
|
||||
if (!this.props.isMultipleOperation) {
|
||||
title = title.replace('{placeholder}', '<span class="op-target text-truncate mx-1">' + Utils.HTMLescape(this.props.dirent.name) + '</span>');
|
||||
} else {
|
||||
title = gettext('Move selected item(s) to:');
|
||||
}
|
||||
let mode = 'current_repo_and_other_repos';
|
||||
const { dirent, selectedDirentList, isMutipleOperation } = this.props;
|
||||
const { dirent, selectedDirentList, isMultipleOperation } = this.props;
|
||||
const movedDirent = dirent ? dirent : selectedDirentList[0];
|
||||
const { permission } = movedDirent;
|
||||
const { isCustomPermission } = Utils.getUserPermission(permission);
|
||||
@@ -169,7 +169,7 @@ class MoveDirent extends React.Component {
|
||||
return (
|
||||
<Modal isOpen={true} toggle={this.toggle}>
|
||||
<ModalHeader toggle={this.toggle}>
|
||||
{isMutipleOperation ? title : <div dangerouslySetInnerHTML={{ __html: title }} className="d-flex mw-100"></div>}
|
||||
{isMultipleOperation ? title : <div dangerouslySetInnerHTML={{ __html: title }} className="d-flex mw-100"></div>}
|
||||
</ModalHeader>
|
||||
<ModalBody>
|
||||
<FileChooser
|
||||
|
@@ -56,7 +56,7 @@ class DirColumnNav extends React.Component {
|
||||
imageIndex: 0,
|
||||
isCopyDialogShow: false,
|
||||
isMoveDialogShow: false,
|
||||
isMutipleOperation: false,
|
||||
isMultipleOperation: false,
|
||||
operationList: [],
|
||||
};
|
||||
this.isNodeMenuShow = true;
|
||||
@@ -376,7 +376,7 @@ class DirColumnNav extends React.Component {
|
||||
onItemCopy={this.props.onItemCopy}
|
||||
repoEncrypted={this.props.currentRepoInfo.encrypted}
|
||||
onCancelCopy={this.onCopyToggle}
|
||||
isMutipleOperation={this.state.isMutipleOperation}
|
||||
isMultipleOperation={this.state.isMultipleOperation}
|
||||
/>
|
||||
</ModalPortal>
|
||||
)}
|
||||
@@ -389,7 +389,7 @@ class DirColumnNav extends React.Component {
|
||||
onItemMove={this.props.onItemMove}
|
||||
repoEncrypted={this.props.currentRepoInfo.encrypted}
|
||||
onCancelMove={this.onMoveToggle}
|
||||
isMutipleOperation={this.state.isMutipleOperation}
|
||||
isMultipleOperation={this.state.isMultipleOperation}
|
||||
/>
|
||||
</ModalPortal>
|
||||
)}
|
||||
|
@@ -83,7 +83,7 @@ class DirentGridView extends React.Component {
|
||||
fileType: '',
|
||||
isPermissionDialogOpen: false,
|
||||
|
||||
isMutipleOperation: true,
|
||||
isMultipleOperation: true,
|
||||
isGridItemFreezed: false,
|
||||
activeDirent: null,
|
||||
downloadItems: [],
|
||||
@@ -819,7 +819,7 @@ class DirentGridView extends React.Component {
|
||||
path={this.props.path}
|
||||
repoID={this.props.repoID}
|
||||
repoEncrypted={this.props.currentRepoInfo.encrypted}
|
||||
isMutipleOperation={this.state.isMutipleOperation}
|
||||
isMultipleOperation={this.state.isMultipleOperation}
|
||||
selectedDirentList={selectedDirentList}
|
||||
onItemsMove={this.props.onItemsMove}
|
||||
onCancelMove={this.onMoveToggle}
|
||||
@@ -841,7 +841,7 @@ class DirentGridView extends React.Component {
|
||||
path={this.props.path}
|
||||
repoID={this.props.repoID}
|
||||
repoEncrypted={this.props.currentRepoInfo.encrypted}
|
||||
isMutipleOperation={this.state.isMutipleOperation}
|
||||
isMultipleOperation={this.state.isMultipleOperation}
|
||||
selectedDirentList={selectedDirentList}
|
||||
onItemsCopy={this.props.onItemsCopy}
|
||||
onCancelCopy={this.onCopyToggle}
|
||||
|
@@ -84,7 +84,7 @@ class DirentListItem extends React.Component {
|
||||
isMoveDialogShow: false,
|
||||
isCopyDialogShow: false,
|
||||
isShareDialogShow: false,
|
||||
isMutipleOperation: false,
|
||||
isMultipleOperation: false,
|
||||
canDrag: this.canDrag,
|
||||
isShowTagTooltip: false,
|
||||
isDragTipShow: false,
|
||||
@@ -851,7 +851,7 @@ class DirentListItem extends React.Component {
|
||||
path={this.props.path}
|
||||
repoID={this.props.repoID}
|
||||
dirent={this.props.dirent}
|
||||
isMutipleOperation={this.state.isMutipleOperation}
|
||||
isMultipleOperation={this.state.isMultipleOperation}
|
||||
onItemMove={this.props.onItemMove}
|
||||
onCancelMove={this.onItemMoveToggle}
|
||||
repoEncrypted={this.props.repoEncrypted}
|
||||
@@ -864,7 +864,7 @@ class DirentListItem extends React.Component {
|
||||
path={this.props.path}
|
||||
repoID={this.props.repoID}
|
||||
dirent={this.props.dirent}
|
||||
isMutipleOperation={this.state.isMutipleOperation}
|
||||
isMultipleOperation={this.state.isMultipleOperation}
|
||||
onItemCopy={this.props.onItemCopy}
|
||||
onCancelCopy={this.onItemCopyToggle}
|
||||
repoEncrypted={this.props.repoEncrypted}
|
||||
|
@@ -73,7 +73,7 @@ class DirentListView extends React.Component {
|
||||
isCopyDialogShow: false,
|
||||
isProgressDialogShow: false,
|
||||
downloadItems: [],
|
||||
isMutipleOperation: true,
|
||||
isMultipleOperation: true,
|
||||
activeDirent: null,
|
||||
isListDropTipShow: false,
|
||||
isShowDirentsDraggablePreview: false,
|
||||
@@ -748,7 +748,7 @@ class DirentListView extends React.Component {
|
||||
path={this.props.path}
|
||||
repoID={this.props.repoID}
|
||||
repoEncrypted={this.props.currentRepoInfo.encrypted}
|
||||
isMutipleOperation={this.state.isMutipleOperation}
|
||||
isMultipleOperation={this.state.isMultipleOperation}
|
||||
selectedDirentList={this.props.selectedDirentList}
|
||||
onItemsMove={this.props.onItemsMove}
|
||||
onCancelMove={this.onMoveToggle}
|
||||
@@ -760,7 +760,7 @@ class DirentListView extends React.Component {
|
||||
repoID={this.props.repoID}
|
||||
repoEncrypted={this.props.currentRepoInfo.encrypted}
|
||||
selectedDirentList={this.props.selectedDirentList}
|
||||
isMutipleOperation={this.state.isMutipleOperation}
|
||||
isMultipleOperation={this.state.isMultipleOperation}
|
||||
onItemsCopy={this.props.onItemsCopy}
|
||||
onCancelCopy={this.onCopyToggle}
|
||||
/>
|
||||
|
@@ -48,7 +48,7 @@ class MultipleDirOperationToolbar extends React.Component {
|
||||
isZipDialogOpen: false,
|
||||
isMoveDialogShow: false,
|
||||
isCopyDialogShow: false,
|
||||
isMutipleOperation: true,
|
||||
isMultipleOperation: true,
|
||||
showLibContentViewDialogs: false,
|
||||
showShareDialog: false,
|
||||
showEditFileTagDialog: false,
|
||||
@@ -373,7 +373,7 @@ class MultipleDirOperationToolbar extends React.Component {
|
||||
path={this.props.path}
|
||||
repoID={this.props.repoID}
|
||||
repoEncrypted={this.props.repoEncrypted}
|
||||
isMutipleOperation={this.state.isMutipleOperation}
|
||||
isMultipleOperation={this.state.isMultipleOperation}
|
||||
selectedDirentList={this.props.selectedDirentList}
|
||||
onItemsMove={this.props.onItemsMove}
|
||||
onCancelMove={this.onMoveToggle}
|
||||
@@ -385,7 +385,7 @@ class MultipleDirOperationToolbar extends React.Component {
|
||||
repoID={this.props.repoID}
|
||||
repoEncrypted={this.props.repoEncrypted}
|
||||
selectedDirentList={this.props.selectedDirentList}
|
||||
isMutipleOperation={this.state.isMutipleOperation}
|
||||
isMultipleOperation={this.state.isMultipleOperation}
|
||||
onItemsCopy={this.props.onItemsCopy}
|
||||
onCancelCopy={this.onCopyToggle}
|
||||
/>
|
||||
|
Reference in New Issue
Block a user