Merge pull request #1573 from ONLYOFFICE/feature/fix-bug-react

Feature/fix bug react
This commit is contained in:
maxkadushkin 2022-02-17 10:25:02 +03:00 committed by GitHub
commit 12b634323b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 8 deletions

View file

@ -639,6 +639,7 @@ const ViewComments = inject("storeComments", "storeAppOptions", "storeReview")(o
const viewMode = !storeAppOptions.canComments;
const comments = storeComments.groupCollectionFilter || storeComments.collectionComments;
const isEdit = storeAppOptions.isEdit;
const sortComments = comments.length > 0 ? [...comments].sort((a, b) => a.time > b.time ? -1 : 1) : null;
const [clickComment, setComment] = useState();
@ -674,7 +675,7 @@ const ViewComments = inject("storeComments", "storeAppOptions", "storeReview")(o
<div className='comment-date'>{comment.date}</div>
</div>
</div>
{!viewMode &&
{isEdit && !viewMode &&
<div className='right'>
{(comment.editable && displayMode === 'markup' && !wsProps?.Objects) && <div className='comment-resolve' onClick={() => {onResolveComment(comment);}}><Icon icon={comment.resolved ? 'icon-resolve-comment check' : 'icon-resolve-comment'} /></div> }
{(displayMode === 'markup' && !wsProps?.Objects) &&
@ -707,7 +708,7 @@ const ViewComments = inject("storeComments", "storeAppOptions", "storeReview")(o
<div className='reply-date'>{reply.date}</div>
</div>
</div>
{!viewMode && reply.editable &&
{isEdit && !viewMode && reply.editable &&
<div className='right'>
<div className='reply-menu'
onClick={() => {setComment(comment); setReply(reply); openActionReply(true);}}
@ -748,6 +749,7 @@ const CommentList = inject("storeComments", "storeAppOptions", "storeReview")(ob
const displayMode = storeReview.displayMode;
const viewMode = !storeAppOptions.canComments;
const isEdit = storeAppOptions.isEdit;
const comments = storeComments.showComments;
const [currentIndex, setCurrentIndex] = useState(0);
@ -784,7 +786,7 @@ const CommentList = inject("storeComments", "storeAppOptions", "storeReview")(ob
return (
<Fragment>
<Toolbar position='bottom'>
{!viewMode &&
{isEdit && !viewMode &&
<Link className={`btn-add-reply${wsProps?.Objects ? ' disabled' : ''}`} href='#' onClick={() => {onCommentMenuClick('addReply', comment);}}>{_t.textAddReply}</Link>
}
<div className='comment-navigation row'>
@ -804,7 +806,7 @@ const CommentList = inject("storeComments", "storeAppOptions", "storeReview")(ob
<div className='comment-date'>{comment.date}</div>
</div>
</div>
{!viewMode &&
{isEdit && !viewMode &&
<div className='right'>
{(comment.editable && displayMode === 'markup' && !wsProps?.Objects) && <div className='comment-resolve' onClick={() => {onResolveComment(comment);}}><Icon icon={comment.resolved ? 'icon-resolve-comment check' : 'icon-resolve-comment'}/></div>}
{(displayMode === 'markup' && !wsProps?.Objects) &&
@ -837,7 +839,7 @@ const CommentList = inject("storeComments", "storeAppOptions", "storeReview")(ob
<div className='reply-date'>{reply.date}</div>
</div>
</div>
{!viewMode && reply.editable &&
{isEdit && !viewMode && reply.editable &&
<div className='right'>
<div className='reply-menu'
onClick={() => {setReply(reply); openActionReply(true);}}

View file

@ -119,6 +119,9 @@
.navbar-bg {
//-webkit-backdrop-filter: none;
backdrop-filter: none;
&::after {
background: @background-menu-divider;
}
}
.list:first-child {

View file

@ -164,4 +164,13 @@
border-color: transparent;
}
}
}
.sheet-filter, .popover-filter {
ul li:first-child .list-button{
color: @text-normal;
&::after {
background: @background-menu-divider;
}
}
}

View file

@ -55,7 +55,7 @@ const FilterOptions = (props) => {
</List>
<List >
<ListButton color="black" className={props.isValid || is_all_checked ? 'disabled' : ''} onClick={HandleClearFilter}>{_t.textClearFilter}</ListButton>
<ListButton className={props.isValid || is_all_checked ? 'disabled' : ''} onClick={HandleClearFilter}>{_t.textClearFilter}</ListButton>
<ListButton color="red" onClick={() => props.onDeleteFilter()} id="btn-delete-filter">{_t.textDeleteFilter}</ListButton>
</List>
<List>
@ -72,10 +72,10 @@ const FilterOptions = (props) => {
const FilterView = (props) => {
return (
!Device.phone ?
<Popover id="picker-popover" className="popover__titled">
<Popover id="picker-popover" className="popover__titled popover-filter">
<FilterOptions style={{height: '410px'}} {...props}></FilterOptions>
</Popover> :
<Sheet className="picker__sheet" push>
<Sheet className="picker__sheet sheet-filter" push>
<FilterOptions {...props}></FilterOptions>
</Sheet>
)