[DE mobile] Fix Bug 51670

This commit is contained in:
SergeyEzhin 2021-08-03 18:14:45 +03:00
parent 90964f12d6
commit 9b31aee15b
5 changed files with 47 additions and 35 deletions

View file

@ -628,10 +628,11 @@ const pickLink = (message) => {
} }
// View comments // View comments
const ViewComments = ({storeComments, storeAppOptions, onCommentMenuClick, onResolveComment, showComment}) => { const ViewComments = ({storeComments, storeAppOptions, onCommentMenuClick, onResolveComment, showComment, 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;
const displayMode = storeReview.displayMode;
const viewMode = !storeAppOptions.canComments; const viewMode = !storeAppOptions.canComments;
const comments = storeComments.groupCollectionFilter || storeComments.collectionComments; const comments = storeComments.groupCollectionFilter || storeComments.collectionComments;
@ -672,10 +673,13 @@ const ViewComments = ({storeComments, storeAppOptions, onCommentMenuClick, onRes
</div> </div>
{!viewMode && {!viewMode &&
<div className='right'> <div className='right'>
{comment.editable && <div className='comment-resolve' onClick={() => {onResolveComment(comment);}}><Icon icon={comment.resolved ? 'icon-resolve-comment check' : 'icon-resolve-comment'} /></div> } {(comment.editable && displayMode === 'markup') && <div className='comment-resolve' onClick={() => {onResolveComment(comment);}}><Icon icon={comment.resolved ? 'icon-resolve-comment check' : 'icon-resolve-comment'} /></div> }
{displayMode === 'markup' &&
<div className='comment-menu' <div className='comment-menu'
onClick={() => {setComment(comment); openActionComment(true);}} onClick={() => {setComment(comment); openActionComment(true);}}>
><Icon icon='icon-menu-comment'/></div> <Icon icon='icon-menu-comment'/>
</div>
}
</div> </div>
} }
</div> </div>
@ -734,13 +738,14 @@ const ViewComments = ({storeComments, storeAppOptions, onCommentMenuClick, onRes
) )
}; };
const _ViewComments = inject('storeComments', 'storeAppOptions')(observer(ViewComments)); const _ViewComments = inject('storeComments', 'storeAppOptions', "storeReview")(observer(ViewComments));
const CommentList = inject("storeComments", "storeAppOptions")(observer(({storeComments, storeAppOptions, onCommentMenuClick, onResolveComment}) => { 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;
const displayMode = storeReview.displayMode;
const viewMode = !storeAppOptions.canComments; const viewMode = !storeAppOptions.canComments;
const comments = storeComments.showComments; const comments = storeComments.showComments;
@ -801,10 +806,13 @@ const CommentList = inject("storeComments", "storeAppOptions")(observer(({storeC
</div> </div>
{!viewMode && {!viewMode &&
<div className='right'> <div className='right'>
{comment.editable && <div className='comment-resolve' onClick={() => {onResolveComment(comment);}}><Icon icon={comment.resolved ? 'icon-resolve-comment check' : 'icon-resolve-comment'}/></div>} {(comment.editable && displayMode === 'markup') && <div className='comment-resolve' onClick={() => {onResolveComment(comment);}}><Icon icon={comment.resolved ? 'icon-resolve-comment check' : 'icon-resolve-comment'}/></div>}
{displayMode === 'markup' &&
<div className='comment-menu' <div className='comment-menu'
onClick={() => {openActionComment(true);}} onClick={() => {openActionComment(true);}}>
><Icon icon='icon-menu-comment'/></div> <Icon icon='icon-menu-comment'/>
</div>
}
</div> </div>
} }
</div> </div>

View file

@ -13,7 +13,7 @@ import {storeLinkSettings} from './linkSettings';
import {storeApplicationSettings} from './applicationSettings'; import {storeApplicationSettings} from './applicationSettings';
import {storeAppOptions} from "./appOptions"; import {storeAppOptions} from "./appOptions";
import {storePalette} from "./palette"; import {storePalette} from "./palette";
import {storeReview} from "./review"; import {storeReview} from '../../../../common/mobile/lib/store/review';
import {storeComments} from "../../../../common/mobile/lib/store/comments"; import {storeComments} from "../../../../common/mobile/lib/store/comments";
import {storeToolbarSettings} from "./toolbar"; import {storeToolbarSettings} from "./toolbar";

View file

@ -16,6 +16,7 @@ import { storeLinkSettings } from "./linkSettings";
// import {storeParagraphSettings} from "./paragraphSettings"; // import {storeParagraphSettings} from "./paragraphSettings";
// import {storeShapeSettings} from "./shapeSettings"; // import {storeShapeSettings} from "./shapeSettings";
// import {storeImageSettings} from "./imageSettings"; // import {storeImageSettings} from "./imageSettings";
import {storeReview} from '../../../../common/mobile/lib/store/review';
import {storeComments} from "../../../../common/mobile/lib/store/comments"; import {storeComments} from "../../../../common/mobile/lib/store/comments";
import {storeToolbarSettings} from "./toolbar"; import {storeToolbarSettings} from "./toolbar";
@ -34,6 +35,7 @@ export const stores = {
storeTableSettings: new storeTableSettings(), storeTableSettings: new storeTableSettings(),
storeChartSettings: new storeChartSettings(), storeChartSettings: new storeChartSettings(),
storeLinkSettings: new storeLinkSettings(), storeLinkSettings: new storeLinkSettings(),
storeReview: new storeReview(),
// storeTextSettings: new storeTextSettings(), // storeTextSettings: new storeTextSettings(),
// storeParagraphSettings: new storeParagraphSettings(), // storeParagraphSettings: new storeParagraphSettings(),
// storeShapeSettings: new storeShapeSettings(), // storeShapeSettings: new storeShapeSettings(),

View file

@ -15,6 +15,7 @@ import {storeAppOptions} from "./appOptions";
// import {storeTableSettings} from "./tableSettings"; // import {storeTableSettings} from "./tableSettings";
import {storeChartSettings} from "./chartSettings"; import {storeChartSettings} from "./chartSettings";
import {storeSpreadsheetSettings} from "./spreadsheetSettings"; import {storeSpreadsheetSettings} from "./spreadsheetSettings";
import {storeReview} from '../../../../common/mobile/lib/store/review';
import {storeComments} from "../../../../common/mobile/lib/store/comments"; import {storeComments} from "../../../../common/mobile/lib/store/comments";
import {storeToolbarSettings} from "./toolbar"; import {storeToolbarSettings} from "./toolbar";
@ -33,6 +34,7 @@ export const stores = {
storeChartSettings: new storeChartSettings(), storeChartSettings: new storeChartSettings(),
storePalette: new storePalette(), storePalette: new storePalette(),
storeCellSettings: new storeCellSettings(), storeCellSettings: new storeCellSettings(),
storeReview: new storeReview(),
// storeImageSettings: new storeImageSettings(), // storeImageSettings: new storeImageSettings(),
// storeTableSettings: new storeTableSettings() // storeTableSettings: new storeTableSettings()
storeComments: new storeComments(), storeComments: new storeComments(),