From 42ec931e1d09d77a77aebb6140f16db96cdcdb5e Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Sat, 20 Apr 2024 14:33:06 +0300 Subject: [PATCH 1/7] [DE PE SSE mobile] Fix Bug 66088 --- apps/documenteditor/mobile/src/view/add/Add.jsx | 1 - .../mobile/src/view/add/AddingPage.jsx | 10 +++++++++- .../mobile/src/view/add/Add.jsx | 1 - .../mobile/src/view/add/AddingPage.jsx | 13 +++++++++++-- .../spreadsheeteditor/mobile/src/view/add/Add.jsx | 1 - .../mobile/src/view/add/AddingPage.jsx | 15 ++++++++++++--- 6 files changed, 32 insertions(+), 9 deletions(-) diff --git a/apps/documenteditor/mobile/src/view/add/Add.jsx b/apps/documenteditor/mobile/src/view/add/Add.jsx index 5bfdd48011..7284631c2e 100644 --- a/apps/documenteditor/mobile/src/view/add/Add.jsx +++ b/apps/documenteditor/mobile/src/view/add/Add.jsx @@ -15,7 +15,6 @@ const routes = [ { path: '/adding-page/', component: AddingPage, - keepAlive: true }, // Image { diff --git a/apps/documenteditor/mobile/src/view/add/AddingPage.jsx b/apps/documenteditor/mobile/src/view/add/AddingPage.jsx index 09151c44ef..e66c79fe4c 100644 --- a/apps/documenteditor/mobile/src/view/add/AddingPage.jsx +++ b/apps/documenteditor/mobile/src/view/add/AddingPage.jsx @@ -49,9 +49,11 @@ const AddLayoutContent = ({ tabs }) => { ) }; -const AddingPage = inject("storeFocusObjects", "storeTableSettings")(observer(props => { +const AddingPage = inject("storeFocusObjects", "storeTableSettings", "storeApplicationSettings")(observer(props => { const mainContext = useContext(MainContext); const showPanels = mainContext.showPanels; + const storeApplicationSettings = props.storeApplicationSettings; + const directionMode = storeApplicationSettings.directionMode; const storeFocusObjects = props.storeFocusObjects; const storeTableSettings = props.storeTableSettings; const { t } = useTranslation(); @@ -65,6 +67,12 @@ const AddingPage = inject("storeFocusObjects", "storeTableSettings")(observer(pr f7.tab.show('#add-other', false); }, []); + useEffect(() => { + if(directionMode === 'rtl') { + tabs.reverse(); + } + }, [directionMode]) + let needDisable = false, canAddTable = true, canAddImage = true, diff --git a/apps/presentationeditor/mobile/src/view/add/Add.jsx b/apps/presentationeditor/mobile/src/view/add/Add.jsx index 219acdd181..fdf6f193ae 100644 --- a/apps/presentationeditor/mobile/src/view/add/Add.jsx +++ b/apps/presentationeditor/mobile/src/view/add/Add.jsx @@ -15,7 +15,6 @@ const routes = [ { path: '/adding-page/', component: AddingPage, - keepAlive: true }, // Image { diff --git a/apps/presentationeditor/mobile/src/view/add/AddingPage.jsx b/apps/presentationeditor/mobile/src/view/add/AddingPage.jsx index 27215a97db..44ec47d308 100644 --- a/apps/presentationeditor/mobile/src/view/add/AddingPage.jsx +++ b/apps/presentationeditor/mobile/src/view/add/AddingPage.jsx @@ -1,6 +1,7 @@ import React, { useContext, useEffect } from 'react'; import { Page, Navbar, NavRight, NavTitle, Link, Icon, Tabs, Tab, f7 } from 'framework7-react'; import { useTranslation } from 'react-i18next'; +import { observer, inject } from "mobx-react"; import { Device } from '../../../../../common/mobile/utils/device'; import AddSlideController from "../../controller/add/AddSlide"; import AddShapeController from "../../controller/add/AddShape"; @@ -39,10 +40,12 @@ const AddLayoutContent = ({ tabs }) => { ) }; -const AddingPage = () => { +const AddingPage = inject("storeApplicationSettings")(observer(props => { const { t } = useTranslation(); const _t = t('View.Add', {returnObjects: true}); const api = Common.EditorApi.get(); + const storeApplicationSettings = props.storeApplicationSettings; + const directionMode = storeApplicationSettings.directionMode; const countPages = api.getCountPages(); const mainContext = useContext(MainContext); const showPanels = mainContext.showPanels; @@ -51,6 +54,12 @@ const AddingPage = () => { useEffect(() => { f7.tab.show('#add-other', false); }, []); + + useEffect(() => { + if(directionMode === 'rtl') { + tabs.reverse(); + } + }, [directionMode]) if (!showPanels && countPages) { tabs.push({ @@ -105,6 +114,6 @@ const AddingPage = () => { ) -}; +})); export default AddingPage; \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/src/view/add/Add.jsx b/apps/spreadsheeteditor/mobile/src/view/add/Add.jsx index 3d506e7578..dfcc6b8ae5 100644 --- a/apps/spreadsheeteditor/mobile/src/view/add/Add.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/add/Add.jsx @@ -16,7 +16,6 @@ const routes = [ { path: '/adding-page/', component: AddingPage, - keepAlive: true }, // Functions { diff --git a/apps/spreadsheeteditor/mobile/src/view/add/AddingPage.jsx b/apps/spreadsheeteditor/mobile/src/view/add/AddingPage.jsx index f31e2f8811..c83d3ce284 100644 --- a/apps/spreadsheeteditor/mobile/src/view/add/AddingPage.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/add/AddingPage.jsx @@ -1,5 +1,6 @@ -import React, { useContext } from 'react'; +import React, { useContext, useEffect } from 'react'; import { Page, Navbar, NavTitle, NavRight, Link, Icon, Tabs, Tab, f7 } from 'framework7-react'; +import { observer, inject } from "mobx-react"; import { useTranslation } from 'react-i18next'; import { AddChartController } from "../../controller/add/AddChart"; import { AddFunctionController } from "../../controller/add/AddFunction"; @@ -43,15 +44,23 @@ const AddLayoutContent = ({ tabs }) => { ) }; -const AddingPage = () => { +const AddingPage = inject("storeApplicationSettings")(observer(props => { const { t } = useTranslation(); const _t = t('View.Add', {returnObjects: true}); const mainContext = useContext(MainContext); const addingContext = useContext(AddingContext); + const storeApplicationSettings = props.storeApplicationSettings; + const directionMode = storeApplicationSettings.directionMode; // const wsLock = mainContext.wsLock; const wsProps = mainContext.wsProps; const showPanels = addingContext.showPanels; const tabs = []; + + useEffect(() => { + if(directionMode === 'rtl') { + tabs.reverse(); + } + }, [directionMode]) if(!wsProps.Objects) { if(!showPanels) { @@ -125,6 +134,6 @@ const AddingPage = () => { ) -}; +})); export default AddingPage; \ No newline at end of file From 3973951711c35d3fa93defd74625bb6ef1ded12c Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Sat, 20 Apr 2024 16:35:52 +0300 Subject: [PATCH 2/7] [DE mobile] Fix Bug 65883 --- apps/common/mobile/resources/less/common-material.less | 10 ++++++++++ apps/common/mobile/resources/less/material/icons.less | 5 +++++ apps/documenteditor/mobile/src/view/DropdownList.jsx | 6 +++--- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/apps/common/mobile/resources/less/common-material.less b/apps/common/mobile/resources/less/common-material.less index f1386fbc3a..c0dda2bc99 100644 --- a/apps/common/mobile/resources/less/common-material.less +++ b/apps/common/mobile/resources/less/common-material.less @@ -749,4 +749,14 @@ background-color: @brand-secondary; margin-left: 8px; } + + .dropdown-list { + .icon-radio { + display: none; + } + + input[type="radio"]:checked + .icon-radio { + display: inline-block; + } + } } diff --git a/apps/common/mobile/resources/less/material/icons.less b/apps/common/mobile/resources/less/material/icons.less index c513fc5b56..9bfe0a0823 100644 --- a/apps/common/mobile/resources/less/material/icons.less +++ b/apps/common/mobile/resources/less/material/icons.less @@ -36,6 +36,11 @@ height: 24px; .encoded-svg-mask('', @text-secondary); } + &.icon-radio { + width: 24px; + height: 24px; + .encoded-svg-mask('', @brandColor); + } } .navbar { i.icon { diff --git a/apps/documenteditor/mobile/src/view/DropdownList.jsx b/apps/documenteditor/mobile/src/view/DropdownList.jsx index 712c34bbc0..d1126f7aa2 100644 --- a/apps/documenteditor/mobile/src/view/DropdownList.jsx +++ b/apps/documenteditor/mobile/src/view/DropdownList.jsx @@ -106,15 +106,15 @@ const PageDropdownList = props => { {props.isComboBox ? <> - - + + {t('Edit.textChooseAnItem')} : null} {listItems.length && listItems.map((item, index) => ( - props.onChangeItemList(item.value)}> + props.onChangeItemList(item.value)}> ))} From 3fab4e712a2ee4ea1f28265f74dba824bf778e3d Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Mon, 22 Apr 2024 20:07:46 +0300 Subject: [PATCH 3/7] [DE mobile] Correct opening of custom option in dropdown list --- apps/common/mobile/resources/less/common.less | 6 +++++ .../mobile/src/controller/DropdownList.jsx | 2 +- .../mobile/src/view/DropdownList.jsx | 23 ++++++++++--------- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/apps/common/mobile/resources/less/common.less b/apps/common/mobile/resources/less/common.less index 000f4db5d1..735f9d9d17 100644 --- a/apps/common/mobile/resources/less/common.less +++ b/apps/common/mobile/resources/less/common.less @@ -1068,6 +1068,12 @@ input[type="number"]::-webkit-inner-spin-button { height: 100%; } +.dropdown-list-popup { + height: 260px; + bottom: 0; + top: auto; +} + .dropdown-list { &__placeholder { opacity: 0.6; diff --git a/apps/documenteditor/mobile/src/controller/DropdownList.jsx b/apps/documenteditor/mobile/src/controller/DropdownList.jsx index 1fd8e98905..040bcacb4d 100644 --- a/apps/documenteditor/mobile/src/controller/DropdownList.jsx +++ b/apps/documenteditor/mobile/src/controller/DropdownList.jsx @@ -72,7 +72,7 @@ class DropdownListController extends Component { closeModal() { if(Device.isPhone) { - f7.sheet.close('#dropdown-list-sheet', true); + f7.popup.close('#dropdown-list-popup', true); } else { f7.popover.close('#dropdown-list-popover', true); } diff --git a/apps/documenteditor/mobile/src/view/DropdownList.jsx b/apps/documenteditor/mobile/src/view/DropdownList.jsx index d1126f7aa2..1b04171b38 100644 --- a/apps/documenteditor/mobile/src/view/DropdownList.jsx +++ b/apps/documenteditor/mobile/src/view/DropdownList.jsx @@ -1,5 +1,5 @@ import React, { Component, useEffect, useState } from 'react'; -import { f7, Page, Navbar, List, ListItem, Popover, View, Link, Sheet, Icon, NavRight, BlockTitle, NavLeft } from "framework7-react"; +import { f7, Page, Navbar, List, ListItem, Popover, View, Link, Sheet, Icon, NavRight, BlockTitle, NavLeft, Popup } from "framework7-react"; import { Device } from '../../../../common/mobile/utils/device'; import { useTranslation } from 'react-i18next'; @@ -28,13 +28,6 @@ const PageCustomOptionList = props => { ) } -const routes = [ - { - path: '/custom-option/', - component: PageCustomOptionList - } -] - const PageDropdownList = props => { const listItems = props.listItems; const curValue = props.curValue; @@ -122,6 +115,13 @@ const PageDropdownList = props => { ); }; +const routes = [ + { + path: '/custom-option/', + component: PageCustomOptionList + } +] + class DropdownListView extends Component { constructor(props) { super(props); @@ -130,7 +130,7 @@ class DropdownListView extends Component { render() { return ( Device.isPhone ? - this.props.closeModal()}> + this.props.closeModal()}> - + : this.props.closeModal()}> { useEffect(() => { if(Device.isPhone) { - f7.sheet.open('#dropdown-list-sheet', true); + f7.popup.open('#dropdown-list-popup', true); } else { f7.popover.open('#dropdown-list-popover', '#dropdown-list-target'); } From 41ea213afb2d1595defc902fa1efdf6b374c4c69 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Tue, 23 Apr 2024 14:21:04 +0300 Subject: [PATCH 4/7] [common] Correct styles for rtl --- apps/common/mobile/resources/less/common-rtl.less | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/common/mobile/resources/less/common-rtl.less b/apps/common/mobile/resources/less/common-rtl.less index 46893aef55..0edd0e992e 100644 --- a/apps/common/mobile/resources/less/common-rtl.less +++ b/apps/common/mobile/resources/less/common-rtl.less @@ -204,8 +204,9 @@ margin-right: 20px; } - .list li.no-indicator .item-link .item-inner { + .view .list li.no-indicator .item-link .item-inner { padding-right: 0; + padding-left: 15px; } // Dialog with password From 58ca2cae5e1000d3324134e429904bda4fdb6352 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Tue, 23 Apr 2024 15:12:25 +0300 Subject: [PATCH 5/7] [DE mobile] Added changing color theme for oform and docxf formats --- apps/documenteditor/mobile/src/controller/Main.jsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/mobile/src/controller/Main.jsx b/apps/documenteditor/mobile/src/controller/Main.jsx index c96ae2e0ab..d01e06e939 100644 --- a/apps/documenteditor/mobile/src/controller/Main.jsx +++ b/apps/documenteditor/mobile/src/controller/Main.jsx @@ -220,11 +220,19 @@ class MainController extends Component { } } - let type = data.doc ? /^(?:(pdf))$/.exec(data.doc.fileType) : false; + const fileType = data?.doc.fileType; + const isFormType = /^(pdf|docxf|oform)$/.test(fileType); + const isPDF = fileType === 'pdf'; - if (type && typeof type[1] === 'string') { + if(isFormType) { this.changeEditorBrandColorForPdf(); - (this.permissions.fillForms===undefined) && (this.permissions.fillForms = (this.permissions.edit!==false)); + } + + if(isPDF) { + if(this.permissions.fillForms === undefined) { + this.permissions.fillForms = this.permissions.edit !== false; + } + this.permissions.edit = this.permissions.review = this.permissions.comment = false; } From e1952ed022373f36aee1657d403bc37f4086a1d7 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Tue, 23 Apr 2024 15:53:12 +0300 Subject: [PATCH 6/7] [common] Correct logos sizes and dropdown list styles --- apps/common/mobile/resources/less/common.less | 8 ++++++-- apps/common/mobile/resources/less/ios/icons.less | 2 +- .../mobile/resources/less/material/icons.less | 14 +++++++++----- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/apps/common/mobile/resources/less/common.less b/apps/common/mobile/resources/less/common.less index 735f9d9d17..8e93dfbcdd 100644 --- a/apps/common/mobile/resources/less/common.less +++ b/apps/common/mobile/resources/less/common.less @@ -22,14 +22,17 @@ .navbar.main-navbar { height: 0; + &.navbar-with-logo { height: 26px; } + .navbar-inner { display: flex; justify-content: center; - padding-top: 7px; + padding: 0; } + .navbar-bg { &:before, &:after { content: none; @@ -55,9 +58,10 @@ display: flex; justify-content: center; align-items: center; + height: 100%; .custom-logo-image { - max-height: 14px; + max-height: 20px; height: auto; width: auto; } diff --git a/apps/common/mobile/resources/less/ios/icons.less b/apps/common/mobile/resources/less/ios/icons.less index de738420d2..cb26e112f9 100644 --- a/apps/common/mobile/resources/less/ios/icons.less +++ b/apps/common/mobile/resources/less/ios/icons.less @@ -14,7 +14,7 @@ } &.icon-logo { width: 100px; - height: 14px; + height: 20px; background: ~"url(@{common-image-path}/header/logo-ios.svg)" no-repeat center; } &.icon-prev { diff --git a/apps/common/mobile/resources/less/material/icons.less b/apps/common/mobile/resources/less/material/icons.less index 9bfe0a0823..cfda917d90 100644 --- a/apps/common/mobile/resources/less/material/icons.less +++ b/apps/common/mobile/resources/less/material/icons.less @@ -7,7 +7,7 @@ } &.icon-logo { width: 100px; - height: 14px; + height: 20px; background: ~"url(@{common-image-path}/header/logo-android.svg) no-repeat center"; } &.icon-prev { @@ -36,10 +36,14 @@ height: 24px; .encoded-svg-mask('', @text-secondary); } - &.icon-radio { - width: 24px; - height: 24px; - .encoded-svg-mask('', @brandColor); + } + .dropdown-list { + i.icon { + &.icon-radio { + width: 24px; + height: 24px; + .encoded-svg-mask('', @brandColor); + } } } .navbar { From e6f86568231762e265eb6583b71d072c25f41923 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Thu, 25 Apr 2024 10:17:01 +0300 Subject: [PATCH 7/7] [common] Changing logo icon --- .../resources/img/header/logo-android.svg | 28 +++++++++---------- .../mobile/resources/img/header/logo-ios.svg | 19 +++++++++---- .../mobile/resources/less/ios/icons.less | 2 ++ .../mobile/resources/less/material/icons.less | 1 + 4 files changed, 31 insertions(+), 19 deletions(-) diff --git a/apps/common/mobile/resources/img/header/logo-android.svg b/apps/common/mobile/resources/img/header/logo-android.svg index 4db5c3e753..bdc0289415 100644 --- a/apps/common/mobile/resources/img/header/logo-android.svg +++ b/apps/common/mobile/resources/img/header/logo-android.svg @@ -1,15 +1,15 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/apps/common/mobile/resources/img/header/logo-ios.svg b/apps/common/mobile/resources/img/header/logo-ios.svg index 9f32dc5641..20c4d28cba 100644 --- a/apps/common/mobile/resources/img/header/logo-ios.svg +++ b/apps/common/mobile/resources/img/header/logo-ios.svg @@ -1,6 +1,15 @@ - - - - - + + + + + + + + + + + + + + diff --git a/apps/common/mobile/resources/less/ios/icons.less b/apps/common/mobile/resources/less/ios/icons.less index cb26e112f9..cc2e505a3c 100644 --- a/apps/common/mobile/resources/less/ios/icons.less +++ b/apps/common/mobile/resources/less/ios/icons.less @@ -5,6 +5,7 @@ i.icon { &.icon-logo { background: ~"url(@{common-image-path}/header/logo-android.svg)" no-repeat center; + background-size: contain; } } } @@ -16,6 +17,7 @@ width: 100px; height: 20px; background: ~"url(@{common-image-path}/header/logo-ios.svg)" no-repeat center; + background-size: contain; } &.icon-prev { width: 22px; diff --git a/apps/common/mobile/resources/less/material/icons.less b/apps/common/mobile/resources/less/material/icons.less index cfda917d90..74e02fd9b8 100644 --- a/apps/common/mobile/resources/less/material/icons.less +++ b/apps/common/mobile/resources/less/material/icons.less @@ -9,6 +9,7 @@ width: 100px; height: 20px; background: ~"url(@{common-image-path}/header/logo-android.svg) no-repeat center"; + background-size: contain; } &.icon-prev { width: 20px;