1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-11 20:01:10 +00:00

add participants in file comment and detail panel (#3880)

This commit is contained in:
Michael An
2019-07-20 09:51:19 +08:00
committed by Daniel Pan
parent 2ab3b45bf6
commit 2598cd433e
5 changed files with 39 additions and 4 deletions

View File

@@ -7,6 +7,7 @@ import { gettext } from '../../utils/constants';
import { seafileAPI } from '../../utils/seafile-api';
import { Utils } from '../../utils/utils';
import toaster from '../toast';
import ParticipantsList from '../file-view/participants-list';
import '../../css/comments-list.css';
const { username } = window.app.pageOptions;
@@ -14,6 +15,8 @@ const { username } = window.app.pageOptions;
const DetailCommentListPropTypes = {
repoID: PropTypes.string.isRequired,
filePath: PropTypes.string.isRequired,
onParticipantsChange: PropTypes.func.isRequired,
fileParticipantList: PropTypes.array.isRequired,
};
class DetailCommentList extends React.Component {
@@ -93,6 +96,7 @@ class DetailCommentList extends React.Component {
}
render() {
const { repoID, filePath, fileParticipantList } = this.props;
return (
<div className="seafile-comment detail-comments h-100 w-100">
<ul className="seafile-comment-list">
@@ -114,6 +118,15 @@ class DetailCommentList extends React.Component {
<li className="comment-vacant">{gettext('No comment yet.')}</li>}
</ul>
<div className="seafile-comment-footer">
{fileParticipantList &&
<ParticipantsList
onParticipantsChange={this.props.onParticipantsChange}
participants={fileParticipantList}
repoID={repoID}
filePath={filePath}
showIconTip={true}
/>
}
<textarea
className="add-comment-input" ref="commentTextarea" placeholder={gettext('Add a comment.')}
clos="100" rows="3" warp="virtual"