mirror of
https://github.com/haiwen/seahub.git
synced 2025-07-11 06:03:28 +00:00
[add] draft modalPortal (#3009)
This commit is contained in:
parent
e2ad2fd023
commit
4b45da628d
@ -23,6 +23,7 @@ import { Nav, NavItem, NavLink, TabContent, TabPane } from 'reactstrap';
|
|||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import HistoryList from './pages/review/history-list';
|
import HistoryList from './pages/review/history-list';
|
||||||
import { Value, Document, Block } from 'slate';
|
import { Value, Document, Block } from 'slate';
|
||||||
|
import ModalPortal from './components/modal-portal';
|
||||||
|
|
||||||
import './assets/css/fa-solid.css';
|
import './assets/css/fa-solid.css';
|
||||||
import './assets/css/fa-regular.css';
|
import './assets/css/fa-regular.css';
|
||||||
@ -58,6 +59,7 @@ class DraftReview extends React.Component {
|
|||||||
isShowCommentDialog: false,
|
isShowCommentDialog: false,
|
||||||
activeItem: null,
|
activeItem: null,
|
||||||
originRepoName: '',
|
originRepoName: '',
|
||||||
|
showDraftReviewDialog: false,
|
||||||
};
|
};
|
||||||
this.quote = '';
|
this.quote = '';
|
||||||
this.newIndex = null;
|
this.newIndex = null;
|
||||||
@ -313,7 +315,8 @@ class DraftReview extends React.Component {
|
|||||||
this.listReviewers();
|
this.listReviewers();
|
||||||
}
|
}
|
||||||
this.setState({
|
this.setState({
|
||||||
showReviewerDialog: !this.state.showReviewerDialog
|
showReviewerDialog: !this.state.showReviewerDialog,
|
||||||
|
showDraftReviewDialog: !this.state.showDraftReviewDialog,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -920,15 +923,22 @@ class DraftReview extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{ this.state.showReviewerDialog &&
|
{this.state.showDraftReviewDialog &&
|
||||||
|
<React.Fragment>
|
||||||
|
{this.state.showReviewerDialog &&
|
||||||
|
<ModalPortal>
|
||||||
<AddReviewerDialog
|
<AddReviewerDialog
|
||||||
showReviewerDialog={this.state.showReviewerDialog}
|
showReviewerDialog={this.state.showReviewerDialog}
|
||||||
toggleAddReviewerDialog={this.toggleAddReviewerDialog}
|
toggleAddReviewerDialog={this.toggleAddReviewerDialog}
|
||||||
reviewID={reviewID}
|
reviewID={reviewID}
|
||||||
reviewers={this.state.reviewers}
|
reviewers={this.state.reviewers}
|
||||||
/>
|
/>
|
||||||
|
</ModalPortal>
|
||||||
|
}
|
||||||
|
</React.Fragment>
|
||||||
}
|
}
|
||||||
{this.state.isShowCommentDialog &&
|
{this.state.isShowCommentDialog &&
|
||||||
|
<ModalPortal>
|
||||||
<ReviewCommentDialog
|
<ReviewCommentDialog
|
||||||
toggleCommentDialog={this.toggleCommentDialog}
|
toggleCommentDialog={this.toggleCommentDialog}
|
||||||
onCommentAdded={this.onCommentAdded}
|
onCommentAdded={this.onCommentAdded}
|
||||||
@ -936,6 +946,7 @@ class DraftReview extends React.Component {
|
|||||||
newIndex={this.newIndex}
|
newIndex={this.newIndex}
|
||||||
oldIndex={this.oldIndex}
|
oldIndex={this.oldIndex}
|
||||||
/>
|
/>
|
||||||
|
</ModalPortal>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user