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/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/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 diff --git a/apps/common/mobile/resources/less/common.less b/apps/common/mobile/resources/less/common.less index 000f4db5d1..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; } @@ -1068,6 +1072,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/common/mobile/resources/less/ios/icons.less b/apps/common/mobile/resources/less/ios/icons.less index de738420d2..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; } } } @@ -14,8 +15,9 @@ } &.icon-logo { width: 100px; - height: 14px; + 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 c513fc5b56..74e02fd9b8 100644 --- a/apps/common/mobile/resources/less/material/icons.less +++ b/apps/common/mobile/resources/less/material/icons.less @@ -7,8 +7,9 @@ } &.icon-logo { width: 100px; - height: 14px; + height: 20px; background: ~"url(@{common-image-path}/header/logo-android.svg) no-repeat center"; + background-size: contain; } &.icon-prev { width: 20px; @@ -37,6 +38,15 @@ .encoded-svg-mask('', @text-secondary); } } + .dropdown-list { + i.icon { + &.icon-radio { + width: 24px; + height: 24px; + .encoded-svg-mask('', @brandColor); + } + } + } .navbar { i.icon { &.icon-collaboration { 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/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; } diff --git a/apps/documenteditor/mobile/src/view/DropdownList.jsx b/apps/documenteditor/mobile/src/view/DropdownList.jsx index 712c34bbc0..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; @@ -106,15 +99,15 @@ const PageDropdownList = props => { {props.isComboBox ? <> - - + + {t('Edit.textChooseAnItem')} : null} {listItems.length && listItems.map((item, index) => ( - props.onChangeItemList(item.value)}> + props.onChangeItemList(item.value)}> ))} @@ -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'); } 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