diff --git a/apps/common/mobile/resources/less/colors-table.less b/apps/common/mobile/resources/less/colors-table.less index 2b2af8c525..1a80337919 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/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; } } diff --git a/apps/documenteditor/mobile/src/controller/Main.jsx b/apps/documenteditor/mobile/src/controller/Main.jsx index 41cbfb5d8e..0dfefb682d 100644 --- a/apps/documenteditor/mobile/src/controller/Main.jsx +++ b/apps/documenteditor/mobile/src/controller/Main.jsx @@ -221,7 +221,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; } @@ -237,8 +239,6 @@ class MainController extends Component { // Document Info const storeDocumentInfo = this.props.storeDocumentInfo; - // this.document - storeDocumentInfo.setDataDoc(this.document); storeDocumentInfo.setDocInfo(docInfo); @@ -463,6 +463,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 ?