[DE mobile] Fix Bug 51670
This commit is contained in:
parent
90964f12d6
commit
9b31aee15b
|
@ -1,24 +1,24 @@
|
||||||
import {action, observable, makeObservable} from 'mobx';
|
import {action, observable, makeObservable} from 'mobx';
|
||||||
|
|
||||||
export class storeReview {
|
export class storeReview {
|
||||||
constructor() {
|
constructor() {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
displayMode: observable,
|
displayMode: observable,
|
||||||
dataChanges: observable,
|
dataChanges: observable,
|
||||||
changeDisplayMode: action,
|
changeDisplayMode: action,
|
||||||
changeArrReview: action
|
changeArrReview: action
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
displayMode = 'markup';
|
displayMode = 'markup';
|
||||||
|
|
||||||
changeDisplayMode (mode) {
|
changeDisplayMode (mode) {
|
||||||
this.displayMode = mode;
|
this.displayMode = mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
dataChanges = [];
|
dataChanges = [];
|
||||||
|
|
||||||
changeArrReview (data) {
|
changeArrReview (data) {
|
||||||
this.dataChanges = data && data.length > 0 ? data : [];
|
this.dataChanges = data && data.length > 0 ? data : [];
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -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> }
|
||||||
<div className='comment-menu'
|
{displayMode === 'markup' &&
|
||||||
onClick={() => {setComment(comment); openActionComment(true);}}
|
<div className='comment-menu'
|
||||||
><Icon icon='icon-menu-comment'/></div>
|
onClick={() => {setComment(comment); openActionComment(true);}}>
|
||||||
|
<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>}
|
||||||
<div className='comment-menu'
|
{displayMode === 'markup' &&
|
||||||
onClick={() => {openActionComment(true);}}
|
<div className='comment-menu'
|
||||||
><Icon icon='icon-menu-comment'/></div>
|
onClick={() => {openActionComment(true);}}>
|
||||||
|
<Icon icon='icon-menu-comment'/>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -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";
|
||||||
|
|
||||||
|
|
|
@ -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(),
|
||||||
|
|
|
@ -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(),
|
||||||
|
|
Loading…
Reference in a new issue