Merge pull request #1573 from ONLYOFFICE/feature/fix-bug-react
Feature/fix bug react
This commit is contained in:
commit
12b634323b
|
@ -639,6 +639,7 @@ const ViewComments = inject("storeComments", "storeAppOptions", "storeReview")(o
|
||||||
|
|
||||||
const viewMode = !storeAppOptions.canComments;
|
const viewMode = !storeAppOptions.canComments;
|
||||||
const comments = storeComments.groupCollectionFilter || storeComments.collectionComments;
|
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 sortComments = comments.length > 0 ? [...comments].sort((a, b) => a.time > b.time ? -1 : 1) : null;
|
||||||
|
|
||||||
const [clickComment, setComment] = useState();
|
const [clickComment, setComment] = useState();
|
||||||
|
@ -674,7 +675,7 @@ const ViewComments = inject("storeComments", "storeAppOptions", "storeReview")(o
|
||||||
<div className='comment-date'>{comment.date}</div>
|
<div className='comment-date'>{comment.date}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{!viewMode &&
|
{isEdit && !viewMode &&
|
||||||
<div className='right'>
|
<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> }
|
{(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) &&
|
{(displayMode === 'markup' && !wsProps?.Objects) &&
|
||||||
|
@ -707,7 +708,7 @@ const ViewComments = inject("storeComments", "storeAppOptions", "storeReview")(o
|
||||||
<div className='reply-date'>{reply.date}</div>
|
<div className='reply-date'>{reply.date}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{!viewMode && reply.editable &&
|
{isEdit && !viewMode && reply.editable &&
|
||||||
<div className='right'>
|
<div className='right'>
|
||||||
<div className='reply-menu'
|
<div className='reply-menu'
|
||||||
onClick={() => {setComment(comment); setReply(reply); openActionReply(true);}}
|
onClick={() => {setComment(comment); setReply(reply); openActionReply(true);}}
|
||||||
|
@ -748,6 +749,7 @@ const CommentList = inject("storeComments", "storeAppOptions", "storeReview")(ob
|
||||||
const displayMode = storeReview.displayMode;
|
const displayMode = storeReview.displayMode;
|
||||||
|
|
||||||
const viewMode = !storeAppOptions.canComments;
|
const viewMode = !storeAppOptions.canComments;
|
||||||
|
const isEdit = storeAppOptions.isEdit;
|
||||||
const comments = storeComments.showComments;
|
const comments = storeComments.showComments;
|
||||||
|
|
||||||
const [currentIndex, setCurrentIndex] = useState(0);
|
const [currentIndex, setCurrentIndex] = useState(0);
|
||||||
|
@ -784,7 +786,7 @@ const CommentList = inject("storeComments", "storeAppOptions", "storeReview")(ob
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<Toolbar position='bottom'>
|
<Toolbar position='bottom'>
|
||||||
{!viewMode &&
|
{isEdit && !viewMode &&
|
||||||
<Link className={`btn-add-reply${wsProps?.Objects ? ' disabled' : ''}`} href='#' onClick={() => {onCommentMenuClick('addReply', comment);}}>{_t.textAddReply}</Link>
|
<Link className={`btn-add-reply${wsProps?.Objects ? ' disabled' : ''}`} href='#' onClick={() => {onCommentMenuClick('addReply', comment);}}>{_t.textAddReply}</Link>
|
||||||
}
|
}
|
||||||
<div className='comment-navigation row'>
|
<div className='comment-navigation row'>
|
||||||
|
@ -804,7 +806,7 @@ const CommentList = inject("storeComments", "storeAppOptions", "storeReview")(ob
|
||||||
<div className='comment-date'>{comment.date}</div>
|
<div className='comment-date'>{comment.date}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{!viewMode &&
|
{isEdit && !viewMode &&
|
||||||
<div className='right'>
|
<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>}
|
{(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) &&
|
{(displayMode === 'markup' && !wsProps?.Objects) &&
|
||||||
|
@ -837,7 +839,7 @@ const CommentList = inject("storeComments", "storeAppOptions", "storeReview")(ob
|
||||||
<div className='reply-date'>{reply.date}</div>
|
<div className='reply-date'>{reply.date}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{!viewMode && reply.editable &&
|
{isEdit && !viewMode && reply.editable &&
|
||||||
<div className='right'>
|
<div className='right'>
|
||||||
<div className='reply-menu'
|
<div className='reply-menu'
|
||||||
onClick={() => {setReply(reply); openActionReply(true);}}
|
onClick={() => {setReply(reply); openActionReply(true);}}
|
||||||
|
|
|
@ -119,6 +119,9 @@
|
||||||
.navbar-bg {
|
.navbar-bg {
|
||||||
//-webkit-backdrop-filter: none;
|
//-webkit-backdrop-filter: none;
|
||||||
backdrop-filter: none;
|
backdrop-filter: none;
|
||||||
|
&::after {
|
||||||
|
background: @background-menu-divider;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.list:first-child {
|
.list:first-child {
|
||||||
|
|
|
@ -164,4 +164,13 @@
|
||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.sheet-filter, .popover-filter {
|
||||||
|
ul li:first-child .list-button{
|
||||||
|
color: @text-normal;
|
||||||
|
&::after {
|
||||||
|
background: @background-menu-divider;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -55,7 +55,7 @@ const FilterOptions = (props) => {
|
||||||
</List>
|
</List>
|
||||||
|
|
||||||
<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>
|
<ListButton color="red" onClick={() => props.onDeleteFilter()} id="btn-delete-filter">{_t.textDeleteFilter}</ListButton>
|
||||||
</List>
|
</List>
|
||||||
<List>
|
<List>
|
||||||
|
@ -72,10 +72,10 @@ const FilterOptions = (props) => {
|
||||||
const FilterView = (props) => {
|
const FilterView = (props) => {
|
||||||
return (
|
return (
|
||||||
!Device.phone ?
|
!Device.phone ?
|
||||||
<Popover id="picker-popover" className="popover__titled">
|
<Popover id="picker-popover" className="popover__titled popover-filter">
|
||||||
<FilterOptions style={{height: '410px'}} {...props}></FilterOptions>
|
<FilterOptions style={{height: '410px'}} {...props}></FilterOptions>
|
||||||
</Popover> :
|
</Popover> :
|
||||||
<Sheet className="picker__sheet" push>
|
<Sheet className="picker__sheet sheet-filter" push>
|
||||||
<FilterOptions {...props}></FilterOptions>
|
<FilterOptions {...props}></FilterOptions>
|
||||||
</Sheet>
|
</Sheet>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue