editing styles icon

This commit is contained in:
ShimaginAndrey 2021-07-08 17:21:29 +03:00
parent 1958189140
commit 278b3dd3cf
3 changed files with 16 additions and 13 deletions

View file

@ -139,9 +139,9 @@ class CommentsController extends Component {
changeComment.quote = data.asc_getQuoteText();
changeComment.time = date.getTime();
changeComment.date = dateToLocaleTimeString(date);
changeComment.editable = (this.appOptions.canEditComments || (data.asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canEditComment(data.asc_getUserName());
changeComment.removable = (this.appOptions.canDeleteComments || (data.asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canDeleteComment(data.asc_getUserName());
changeComment.hide = !AscCommon.UserInfoParser.canViewComment(data.asc_getUserName());
changeComment.editable = (this.appOptions.canEditComments || (data.asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canEditComment(name);
changeComment.removable = (this.appOptions.canDeleteComments || (data.asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canDeleteComment(name);
changeComment.hide = !AscCommon.UserInfoParser.canViewComment(name);
let dateReply = null;
const replies = [];
@ -165,8 +165,8 @@ class CommentsController extends Component {
reply: data.asc_getReply(i).asc_getText(),
time: dateReply.getTime(),
userInitials: this.usersStore.getInitials(parsedName),
editable: (this.appOptions.canEditComments || (data.asc_getReply(i).asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canEditComment(data.asc_getReply(i).asc_getUserName()),
removable: (this.appOptions.canDeleteComments || (data.asc_getReply(i).asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canDeleteComment(data.asc_getReply(i).asc_getUserName())
editable: (this.appOptions.canEditComments || (data.asc_getReply(i).asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canEditComment(userName),
removable: (this.appOptions.canDeleteComments || (data.asc_getReply(i).asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canDeleteComment(userName)
});
}
changeComment.replies = replies;
@ -198,9 +198,9 @@ class CommentsController extends Component {
replies : [],
groupName : (groupName && groupName.length>1) ? groupName[1] : null,
userInitials : this.usersStore.getInitials(parsedName),
editable : (this.appOptions.canEditComments || (data.asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canEditComment(data.asc_getUserName()),
removable : (this.appOptions.canDeleteComments || (data.asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canDeleteComment(data.asc_getUserName()),
hide : !AscCommon.UserInfoParser.canViewComment(data.asc_getUserName()),
editable : (this.appOptions.canEditComments || (data.asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canEditComment(userName),
removable : (this.appOptions.canDeleteComments || (data.asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canDeleteComment(userName),
hide : !AscCommon.UserInfoParser.canViewComment(userName),
};
if (comment) {
const replies = this.readSDKReplies(data);
@ -232,8 +232,8 @@ class CommentsController extends Component {
reply : data.asc_getReply(i).asc_getText(),
time : date.getTime(),
userInitials : this.usersStore.getInitials(parsedName),
editable : (this.appOptions.canEditComments || (data.asc_getReply(i).asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canEditComment(data.asc_getReply(i).asc_getUserName()),
removable : (this.appOptions.canDeleteComments || (data.asc_getReply(i).asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canDeleteComment(data.asc_getReply(i).asc_getUserName())
editable : (this.appOptions.canEditComments || (data.asc_getReply(i).asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canEditComment(userName),
removable : (this.appOptions.canDeleteComments || (data.asc_getReply(i).asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canDeleteComment(userName)
});
}
}

View file

@ -670,7 +670,7 @@ const ViewComments = ({storeComments, storeAppOptions, onCommentMenuClick, onRes
</div>
{!viewMode &&
<div className='right'>
<div className='comment-resolve' onClick={() => {onResolveComment(comment);}}>{comment.editable && <Icon icon={comment.resolved ? 'icon-resolve-comment check' : 'icon-resolve-comment'} />}</div>
{comment.editable && <div className='comment-resolve' onClick={() => {onResolveComment(comment);}}><Icon icon={comment.resolved ? 'icon-resolve-comment check' : 'icon-resolve-comment'} /></div> }
<div className='comment-menu'
onClick={() => {setComment(comment); openActionComment(true);}}
><Icon icon='icon-menu-comment'/></div>
@ -799,7 +799,7 @@ const CommentList = inject("storeComments", "storeAppOptions")(observer(({storeC
</div>
{!viewMode &&
<div className='right'>
<div className='comment-resolve' onClick={() => {onResolveComment(comment);}}>{comment.editable && <Icon icon={comment.resolved ? 'icon-resolve-comment check' : 'icon-resolve-comment'}/>}</div>
{comment.editable && <div className='comment-resolve' onClick={() => {onResolveComment(comment);}}><Icon icon={comment.resolved ? 'icon-resolve-comment check' : 'icon-resolve-comment'}/></div>}
<div className='comment-menu'
onClick={() => {openActionComment(true);}}
><Icon icon='icon-menu-comment'/></div>

View file

@ -56,8 +56,11 @@
padding-right: 16px;
.right {
display: flex;
justify-content: space-between;
justify-content: flex-end;
width: 70px;
.comment-resolve {
margin-right: 10px;
}
}
}
.reply-header {