From 09512d4c4f49c72f477504dbff86c17f743ba8c8 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Thu, 9 Jun 2022 15:37:57 +0400 Subject: [PATCH] [DE PE SSE mobile] Changed order edit tabs --- .../mobile/src/view/edit/Edit.jsx | 59 ++++++++----------- .../mobile/src/view/edit/Edit.jsx | 37 +++++------- .../mobile/src/view/edit/Edit.jsx | 41 ++++++------- 3 files changed, 62 insertions(+), 75 deletions(-) diff --git a/apps/documenteditor/mobile/src/view/edit/Edit.jsx b/apps/documenteditor/mobile/src/view/edit/Edit.jsx index c568acec3..52fcb6310 100644 --- a/apps/documenteditor/mobile/src/view/edit/Edit.jsx +++ b/apps/documenteditor/mobile/src/view/edit/Edit.jsx @@ -284,18 +284,25 @@ const EditTabs = props => { component: }); } else { - if (settings.indexOf('text') > -1) { + if (settings.indexOf('image') > -1) { editors.push({ - caption: _t.textText, - id: 'edit-text', - component: + caption: _t.textImage, + id: 'edit-image', + component: }) } - if (settings.indexOf('paragraph') > -1) { + if (settings.indexOf('shape') > -1) { editors.push({ - caption: _t.textParagraph, - id: 'edit-paragraph', - component: + caption: _t.textShape, + id: 'edit-shape', + component: + }) + } + if (settings.indexOf('chart') > -1) { + editors.push({ + caption: _t.textChart, + id: 'edit-chart', + component: }) } if (settings.indexOf('table') > -1) { @@ -312,27 +319,6 @@ const EditTabs = props => { component: }) } - if (settings.indexOf('shape') > -1) { - editors.push({ - caption: _t.textShape, - id: 'edit-shape', - component: - }) - } - if (settings.indexOf('image') > -1) { - editors.push({ - caption: _t.textImage, - id: 'edit-image', - component: - }) - } - if (settings.indexOf('chart') > -1) { - editors.push({ - caption: _t.textChart, - id: 'edit-chart', - component: - }) - } if(inToc) { editors.push({ caption: _t.textTableOfCont, @@ -340,11 +326,18 @@ const EditTabs = props => { component: }) } - if (settings.indexOf('hyperlink') > -1) { + if (settings.indexOf('paragraph') > -1) { editors.push({ - caption: _t.textHyperlink, - id: 'edit-link', - component: + caption: _t.textParagraph, + id: 'edit-paragraph', + component: + }) + } + if (settings.indexOf('text') > -1) { + editors.push({ + caption: _t.textText, + id: 'edit-text', + component: }) } } diff --git a/apps/presentationeditor/mobile/src/view/edit/Edit.jsx b/apps/presentationeditor/mobile/src/view/edit/Edit.jsx index b29d68abd..503c9aac0 100644 --- a/apps/presentationeditor/mobile/src/view/edit/Edit.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/Edit.jsx @@ -289,18 +289,11 @@ const EditTabs = props => { component: }); } else { - if (settings.indexOf('slide') > -1) { + if (settings.indexOf('image') > -1) { editors.push({ - caption: _t.textSlide, - id: 'edit-slide', - component: - }) - } - if (settings.indexOf('text') > -1) { - editors.push({ - caption: _t.textText, - id: 'edit-text', - component: + caption: _t.textImage, + id: 'edit-image', + component: }) } if (settings.indexOf('shape') > -1) { @@ -310,13 +303,6 @@ const EditTabs = props => { component: }) } - if (settings.indexOf('image') > -1) { - editors.push({ - caption: _t.textImage, - id: 'edit-image', - component: - }) - } if (settings.indexOf('table') > -1) { editors.push({ caption: _t.textTable, @@ -331,11 +317,18 @@ const EditTabs = props => { component: }) } - if (settings.indexOf('hyperlink') > -1) { + if (settings.indexOf('text') > -1) { editors.push({ - caption: _t.textHyperlink, - id: 'edit-link', - component: + caption: _t.textText, + id: 'edit-text', + component: + }) + } + if (settings.indexOf('slide') > -1) { + editors.push({ + caption: _t.textSlide, + id: 'edit-slide', + component: }) } } diff --git a/apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx b/apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx index 89d408d9d..da3d04362 100644 --- a/apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/edit/Edit.jsx @@ -363,11 +363,11 @@ const EditTabs = props => { component: }); } else { - if (settings.indexOf('cell') > -1) { + if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('image') > -1) { editors.push({ - caption: _t.textCell, - id: 'edit-text', - component: + caption: _t.textImage, + id: 'edit-image', + component: }) } if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('shape') > -1) { @@ -377,11 +377,11 @@ const EditTabs = props => { component: }) } - if (!(wsProps.Objects && store.isLockedText) && settings.indexOf('text') > -1) { + if (settings.indexOf('cell') > -1) { editors.push({ - caption: _t.textText, + caption: _t.textCell, id: 'edit-text', - component: + component: }) } if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('chart') > -1) { @@ -391,22 +391,23 @@ const EditTabs = props => { component: }) } - if (!(wsProps.Objects && store.isLockedShape) && settings.indexOf('image') > -1) { + if (!(wsProps.Objects && store.isLockedText) && settings.indexOf('text') > -1) { editors.push({ - caption: _t.textImage, - id: 'edit-image', - component: + caption: _t.textText, + id: 'edit-text', + component: }) } - if(!wsProps.Objects) { - if (settings.indexOf('hyperlink') > -1 || (props.hyperinfo && props.isAddShapeHyperlink)) { - editors.push({ - caption: _t.textHyperlink, - id: 'edit-link', - component: - }) - } - } + + // if(!wsProps.Objects) { + // if (settings.indexOf('hyperlink') > -1 || (props.hyperinfo && props.isAddShapeHyperlink)) { + // editors.push({ + // caption: _t.textHyperlink, + // id: 'edit-link', + // component: + // }) + // } + // } } if(!editors.length) {