Merge pull request #1266 from ONLYOFFICE/feature/bug-fixes
Feature/bug fixes
This commit is contained in:
commit
2b31602fa2
|
@ -613,9 +613,9 @@ class ViewCommentsController extends Component {
|
||||||
render() {
|
render() {
|
||||||
return(
|
return(
|
||||||
<Fragment>
|
<Fragment>
|
||||||
{this.props.allComments && <ViewComments onCommentMenuClick={this.onCommentMenuClick} onResolveComment={this.onResolveComment}
|
{this.props.allComments && <ViewComments wsProps={this.props?.storeWorksheets?.wsProps} onCommentMenuClick={this.onCommentMenuClick} onResolveComment={this.onResolveComment}
|
||||||
showComment={this.showComment} />}
|
showComment={this.showComment} />}
|
||||||
{this.state.isOpenViewCurComments && <ViewCurrentComments opened={this.state.isOpenViewCurComments}
|
{this.state.isOpenViewCurComments && <ViewCurrentComments wsProps={this.props?.storeWorksheets?.wsProps} opened={this.state.isOpenViewCurComments}
|
||||||
closeCurComments={this.closeViewCurComments}
|
closeCurComments={this.closeViewCurComments}
|
||||||
onCommentMenuClick={this.onCommentMenuClick}
|
onCommentMenuClick={this.onCommentMenuClick}
|
||||||
onResolveComment={this.onResolveComment}
|
onResolveComment={this.onResolveComment}
|
||||||
|
@ -625,14 +625,22 @@ class ViewCommentsController extends Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class ViewCommentsSheetsController extends ViewCommentsController {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const _CommentsController = inject('storeAppOptions', 'storeComments', 'users', "storeApplicationSettings")(observer(CommentsController));
|
const _CommentsController = inject('storeAppOptions', 'storeComments', 'users', "storeApplicationSettings")(observer(CommentsController));
|
||||||
const _AddCommentController = inject('storeAppOptions', 'storeComments', 'users')(observer(AddCommentController));
|
const _AddCommentController = inject('storeAppOptions', 'storeComments', 'users')(observer(AddCommentController));
|
||||||
const _EditCommentController = inject('storeComments', 'users')(observer(EditCommentController));
|
const _EditCommentController = inject('storeComments', 'users')(observer(EditCommentController));
|
||||||
const _ViewCommentsController = inject('storeComments', 'users', "storeApplicationSettings")(observer(withTranslation()(ViewCommentsController)));
|
const _ViewCommentsController = inject('storeComments', 'users', "storeApplicationSettings", "storeReview", "storeAppOptions")(observer(withTranslation()(ViewCommentsController)));
|
||||||
|
const _ViewCommentsSheetsController = inject('storeComments', 'users', "storeApplicationSettings", "storeWorksheets", "storeReview", "storeAppOptions")(observer(withTranslation()(ViewCommentsSheetsController)));
|
||||||
|
|
||||||
export {
|
export {
|
||||||
_CommentsController as CommentsController,
|
_CommentsController as CommentsController,
|
||||||
_AddCommentController as AddCommentController,
|
_AddCommentController as AddCommentController,
|
||||||
_EditCommentController as EditCommentController,
|
_EditCommentController as EditCommentController,
|
||||||
_ViewCommentsController as ViewCommentsController
|
_ViewCommentsController as ViewCommentsController,
|
||||||
|
_ViewCommentsSheetsController as ViewCommentsSheetsController
|
||||||
};
|
};
|
|
@ -8,7 +8,7 @@ import {Device} from "../../../utils/device";
|
||||||
import {ReviewController, ReviewChangeController} from "../../controller/collaboration/Review";
|
import {ReviewController, ReviewChangeController} from "../../controller/collaboration/Review";
|
||||||
import {PageDisplayMode} from "./Review";
|
import {PageDisplayMode} from "./Review";
|
||||||
|
|
||||||
import {ViewCommentsController} from "../../controller/collaboration/Comments";
|
import {ViewCommentsController, ViewCommentsSheetsController} from "../../controller/collaboration/Comments";
|
||||||
|
|
||||||
const PageUsers = inject("users")(observer(props => {
|
const PageUsers = inject("users")(observer(props => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
@ -76,7 +76,7 @@ const routes = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/comments/',
|
path: '/comments/',
|
||||||
component: ViewCommentsController,
|
asyncComponent: () => window.editorType == 'sse' ? ViewCommentsSheetsController : ViewCommentsController,
|
||||||
options: {
|
options: {
|
||||||
props: {
|
props: {
|
||||||
allComments: true
|
allComments: true
|
||||||
|
@ -123,7 +123,6 @@ const PageCollaboration = inject('storeAppOptions', 'users')(observer(props => {
|
||||||
)
|
)
|
||||||
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
class CollaborationView extends Component {
|
class CollaborationView extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
|
@ -628,7 +628,8 @@ const pickLink = (message) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// View comments
|
// View comments
|
||||||
const ViewComments = ({storeComments, storeAppOptions, onCommentMenuClick, onResolveComment, showComment, storeReview}) => {
|
|
||||||
|
const ViewComments = inject("storeComments", "storeAppOptions", "storeReview")(observer(({storeComments, storeAppOptions, onCommentMenuClick, onResolveComment, showComment, storeReview, wsProps}) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const _t = t('Common.Collaboration', {returnObjects: true});
|
const _t = t('Common.Collaboration', {returnObjects: true});
|
||||||
const isAndroid = Device.android;
|
const isAndroid = Device.android;
|
||||||
|
@ -673,8 +674,8 @@ const ViewComments = ({storeComments, storeAppOptions, onCommentMenuClick, onRes
|
||||||
</div>
|
</div>
|
||||||
{!viewMode &&
|
{!viewMode &&
|
||||||
<div className='right'>
|
<div className='right'>
|
||||||
{(comment.editable && displayMode === 'markup') && <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' &&
|
{(displayMode === 'markup' && !wsProps?.Objects) &&
|
||||||
<div className='comment-menu'
|
<div className='comment-menu'
|
||||||
onClick={() => {setComment(comment); openActionComment(true);}}>
|
onClick={() => {setComment(comment); openActionComment(true);}}>
|
||||||
<Icon icon='icon-menu-comment'/>
|
<Icon icon='icon-menu-comment'/>
|
||||||
|
@ -736,12 +737,9 @@ const ViewComments = ({storeComments, storeAppOptions, onCommentMenuClick, onRes
|
||||||
<ReplyActions comment={clickComment} reply={reply} onCommentMenuClick={onCommentMenuClick} opened={replyActionsOpened} openActionReply={openActionReply}/>
|
<ReplyActions comment={clickComment} reply={reply} onCommentMenuClick={onCommentMenuClick} opened={replyActionsOpened} openActionReply={openActionReply}/>
|
||||||
</Page>
|
</Page>
|
||||||
)
|
)
|
||||||
};
|
}));
|
||||||
|
|
||||||
const _ViewComments = inject('storeComments', 'storeAppOptions', "storeReview")(observer(ViewComments));
|
const CommentList = inject("storeComments", "storeAppOptions", "storeReview")(observer(({storeComments, storeAppOptions, onCommentMenuClick, onResolveComment, storeReview, wsProps}) => {
|
||||||
|
|
||||||
|
|
||||||
const CommentList = inject("storeComments", "storeAppOptions", "storeReview")(observer(({storeComments, storeAppOptions, onCommentMenuClick, onResolveComment, storeReview}) => {
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const _t = t('Common.Collaboration', {returnObjects: true});
|
const _t = t('Common.Collaboration', {returnObjects: true});
|
||||||
const isAndroid = Device.android;
|
const isAndroid = Device.android;
|
||||||
|
@ -784,8 +782,8 @@ const CommentList = inject("storeComments", "storeAppOptions", "storeReview")(ob
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<Toolbar position='bottom'>
|
<Toolbar position='bottom'>
|
||||||
{!viewMode &&
|
{!viewMode &&
|
||||||
<Link className='btn-add-reply' 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'>
|
||||||
<Link href='#' onClick={onViewPrevComment}><Icon slot='media' icon='icon-prev'/></Link>
|
<Link href='#' onClick={onViewPrevComment}><Icon slot='media' icon='icon-prev'/></Link>
|
||||||
|
@ -806,8 +804,8 @@ const CommentList = inject("storeComments", "storeAppOptions", "storeReview")(ob
|
||||||
</div>
|
</div>
|
||||||
{!viewMode &&
|
{!viewMode &&
|
||||||
<div className='right'>
|
<div className='right'>
|
||||||
{(comment.editable && displayMode === 'markup') && <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' &&
|
{(displayMode === 'markup' && !wsProps?.Objects) &&
|
||||||
<div className='comment-menu'
|
<div className='comment-menu'
|
||||||
onClick={() => {openActionComment(true);}}>
|
onClick={() => {openActionComment(true);}}>
|
||||||
<Icon icon='icon-menu-comment'/>
|
<Icon icon='icon-menu-comment'/>
|
||||||
|
@ -870,7 +868,7 @@ const CommentList = inject("storeComments", "storeAppOptions", "storeReview")(ob
|
||||||
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const ViewCommentSheet = ({closeCurComments, onCommentMenuClick, onResolveComment}) => {
|
const ViewCommentSheet = ({closeCurComments, onCommentMenuClick, onResolveComment, wsProps}) => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
f7.sheet.open('#view-comment-sheet');
|
f7.sheet.open('#view-comment-sheet');
|
||||||
});
|
});
|
||||||
|
@ -916,18 +914,19 @@ const ViewCommentSheet = ({closeCurComments, onCommentMenuClick, onResolveCommen
|
||||||
<div id='swipe-handler' className='swipe-container' onTouchStart={handleTouchStart} onTouchMove={handleTouchMove} onTouchEnd={handleTouchEnd}>
|
<div id='swipe-handler' className='swipe-container' onTouchStart={handleTouchStart} onTouchMove={handleTouchMove} onTouchEnd={handleTouchEnd}>
|
||||||
<Icon icon='icon-swipe'/>
|
<Icon icon='icon-swipe'/>
|
||||||
</div>
|
</div>
|
||||||
<CommentList onCommentMenuClick={onCommentMenuClick} onResolveComment={onResolveComment}/>
|
<CommentList wsProps={wsProps} onCommentMenuClick={onCommentMenuClick} onResolveComment={onResolveComment}/>
|
||||||
</Sheet>
|
</Sheet>
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
const ViewCommentPopover = ({onCommentMenuClick, onResolveComment}) => {
|
const ViewCommentPopover = ({onCommentMenuClick, onResolveComment, wsProps}) => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
f7.popover.open('#view-comment-popover', '#btn-coauth');
|
f7.popover.open('#view-comment-popover', '#btn-coauth');
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Popover id='view-comment-popover' style={{height: '410px'}} closeByOutsideClick={false}>
|
<Popover id='view-comment-popover' style={{height: '410px'}} closeByOutsideClick={false}>
|
||||||
<CommentList onCommentMenuClick={onCommentMenuClick} onResolveComment={onResolveComment} />
|
<CommentList wsProps={wsProps} onCommentMenuClick={onCommentMenuClick} onResolveComment={onResolveComment} />
|
||||||
</Popover>
|
</Popover>
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
@ -945,6 +944,6 @@ export {
|
||||||
EditComment,
|
EditComment,
|
||||||
AddReply,
|
AddReply,
|
||||||
EditReply,
|
EditReply,
|
||||||
_ViewComments as ViewComments,
|
ViewComments,
|
||||||
ViewCurrentComments
|
ViewCurrentComments
|
||||||
};
|
};
|
||||||
|
|
|
@ -393,7 +393,7 @@ const PageFillColor = props => {
|
||||||
const storePalette = props.storePalette;
|
const storePalette = props.storePalette;
|
||||||
const storeSlideSettings = props.storeSlideSettings;
|
const storeSlideSettings = props.storeSlideSettings;
|
||||||
const customColors = storePalette.customColors;
|
const customColors = storePalette.customColors;
|
||||||
const fillColor = storeSlideSettings.fillColor ? storeSlideSettings.fillColor : storeSlideSettings.getFillColor(slideObject);
|
const fillColor = storeSlideSettings.getFillColor(slideObject);
|
||||||
|
|
||||||
const changeColor = (color, effectId, effectValue) => {
|
const changeColor = (color, effectId, effectValue) => {
|
||||||
if (color !== 'empty') {
|
if (color !== 'empty') {
|
||||||
|
|
|
@ -10,7 +10,7 @@ import {
|
||||||
AddCommentController,
|
AddCommentController,
|
||||||
CommentsController,
|
CommentsController,
|
||||||
EditCommentController,
|
EditCommentController,
|
||||||
ViewCommentsController
|
ViewCommentsSheetsController
|
||||||
} from "../../../../common/mobile/lib/controller/collaboration/Comments";
|
} from "../../../../common/mobile/lib/controller/collaboration/Comments";
|
||||||
import {LocalStorage} from "../../../../common/mobile/utils/LocalStorage";
|
import {LocalStorage} from "../../../../common/mobile/utils/LocalStorage";
|
||||||
import LongActionsController from "./LongActions";
|
import LongActionsController from "./LongActions";
|
||||||
|
@ -887,7 +887,7 @@ class MainController extends Component {
|
||||||
<CommentsController />
|
<CommentsController />
|
||||||
<AddCommentController />
|
<AddCommentController />
|
||||||
<EditCommentController />
|
<EditCommentController />
|
||||||
<ViewCommentsController />
|
<ViewCommentsSheetsController />
|
||||||
<PluginsController />
|
<PluginsController />
|
||||||
<EncodingController />
|
<EncodingController />
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
|
Loading…
Reference in a new issue