From 28a9a6d52fce142b0d6571f9c34eed6e0fe45822 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Fri, 5 Apr 2024 17:49:44 +0300 Subject: [PATCH 1/2] [common] For Bug 67250 --- apps/common/mobile/resources/less/common.less | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/common/mobile/resources/less/common.less b/apps/common/mobile/resources/less/common.less index dbe4fc06a1..000f4db5d1 100644 --- a/apps/common/mobile/resources/less/common.less +++ b/apps/common/mobile/resources/less/common.less @@ -57,9 +57,9 @@ align-items: center; .custom-logo-image { - max-width: 100%; - height: 14px; - overflow: hidden; + max-height: 14px; + height: auto; + width: auto; } } From 3f1430420f0dec66e4a71651798ab76705ae5088 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Tue, 9 Apr 2024 18:42:59 +0300 Subject: [PATCH 2/2] [DE mobile] Fix Bug 65783 --- .../mobile/resources/less/colors-table.less | 2 +- .../mobile/src/controller/Main.jsx | 9 ++++++-- apps/documenteditor/mobile/src/page/main.jsx | 23 +++++++++++-------- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/apps/common/mobile/resources/less/colors-table.less b/apps/common/mobile/resources/less/colors-table.less index 8228c10322..521699bf12 100644 --- a/apps/common/mobile/resources/less/colors-table.less +++ b/apps/common/mobile/resources/less/colors-table.less @@ -3,7 +3,7 @@ --brand-word: #446995; --brand-cell: #40865C; --brand-slide: #BE664F; - --brand-form: #BE664F; + --brand-form: #AA5252; --brand-primary: #3880BE; --brand-secondary: #ED7309; --brand-text-on-brand: #FFF; diff --git a/apps/documenteditor/mobile/src/controller/Main.jsx b/apps/documenteditor/mobile/src/controller/Main.jsx index 2f62f32683..854807b471 100644 --- a/apps/documenteditor/mobile/src/controller/Main.jsx +++ b/apps/documenteditor/mobile/src/controller/Main.jsx @@ -220,7 +220,9 @@ class MainController extends Component { } let type = data.doc ? /^(?:(pdf))$/.exec(data.doc.fileType) : false; + if (type && typeof type[1] === 'string') { + this.changeEditorBrandColorForPdf(); (this.permissions.fillForms===undefined) && (this.permissions.fillForms = (this.permissions.edit!==false)); this.permissions.edit = this.permissions.review = this.permissions.comment = false; } @@ -236,8 +238,6 @@ class MainController extends Component { // Document Info const storeDocumentInfo = this.props.storeDocumentInfo; - // this.document - storeDocumentInfo.setDataDoc(this.document); storeDocumentInfo.setDocInfo(docInfo); @@ -484,6 +484,11 @@ class MainController extends Component { } } + changeEditorBrandColorForPdf() { + const bodyElement = document.body; + bodyElement.style.setProperty('--brand-word', 'var(--brand-form)'); + } + applyMode (appOptions) { this.api.asc_enableKeyEvents(appOptions.isEdit); this.api.asc_setViewMode(!appOptions.isEdit && !appOptions.isRestrictedEdit); diff --git a/apps/documenteditor/mobile/src/page/main.jsx b/apps/documenteditor/mobile/src/page/main.jsx index a9f85d356a..3083f6f407 100644 --- a/apps/documenteditor/mobile/src/page/main.jsx +++ b/apps/documenteditor/mobile/src/page/main.jsx @@ -41,7 +41,8 @@ const MainPage = inject('storeDocumentInfo', 'users', 'storeAppOptions', 'storeV const storeVersionHistory = props.storeVersionHistory; const isVersionHistoryMode = storeVersionHistory.isVersionHistoryMode; const storeDocumentInfo = props.storeDocumentInfo; - const docExt = storeDocumentInfo.dataDoc ? storeDocumentInfo.dataDoc.fileType : ''; + const dataDoc = storeDocumentInfo.dataDoc; + const docExt = dataDoc?.fileType || ''; const isAvailableExt = docExt && docExt !== 'djvu' && docExt !== 'pdf' && docExt !== 'xps'; const storeToolbarSettings = props.storeToolbarSettings; const isDisconnected = props.users.isDisconnected; @@ -228,7 +229,7 @@ const MainPage = inject('storeDocumentInfo', 'users', 'storeAppOptions', 'storeV }; return ( - + } - - - - + {dataDoc && + + + + + } {isShowPlaceholder ?