From b5bbb3c6b4b7e3279f53828c85b9d3ce886a7095 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Mon, 21 Jun 2021 15:03:09 +0300 Subject: [PATCH 1/2] [PE mobile] Fix Bug 50845 --- .../mobile/src/view/edit/EditSlide.jsx | 27 +++++-------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/apps/presentationeditor/mobile/src/view/edit/EditSlide.jsx b/apps/presentationeditor/mobile/src/view/edit/EditSlide.jsx index 2db9732872..cb1ed06ab8 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditSlide.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditSlide.jsx @@ -45,8 +45,6 @@ const PageTheme = props => { const storeSlideSettings = props.storeSlideSettings; const arrayThemes = storeSlideSettings.arrayThemes; const slideThemeIndex = storeSlideSettings.slideThemeIndex; - const defaultThemes = arrayThemes[0]; - const docThemes = arrayThemes[1]; return ( @@ -59,32 +57,21 @@ const PageTheme = props => { } - {arrayThemes.length ? ( + {arrayThemes.length && ( - {defaultThemes.map((elem, index) => { + {arrayThemes.map(theme => { return ( - { - storeSlideSettings.changeSlideThemeIndex(elem.Index); - props.onThemeClick(elem.Index); - }}> - - ); - })} - {docThemes.map((elem, index) => { - return ( - { - storeSlideSettings.changeSlideThemeIndex(elem.Index); - props.onThemeClick(elem.Index); + storeSlideSettings.changeSlideThemeIndex(theme.themeId); + props.onThemeClick(theme.themeId); }}> ); })} - ) : null} + )} ); }; From 698d85360aa8e71da80c0f8d998184fc353b75ed Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Mon, 21 Jun 2021 16:05:01 +0300 Subject: [PATCH 2/2] [PE mobile] Fix Bug 50847 --- apps/common/mobile/resources/less/common.less | 3 ++ .../mobile/src/view/edit/EditSlide.jsx | 37 +++++++++++-------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/apps/common/mobile/resources/less/common.less b/apps/common/mobile/resources/less/common.less index efea54205a..1371c75b23 100644 --- a/apps/common/mobile/resources/less/common.less +++ b/apps/common/mobile/resources/less/common.less @@ -196,6 +196,9 @@ display: flex; flex-wrap: wrap; justify-content: space-around; + &::before, &::after { + display: none; + } } li { position: relative; diff --git a/apps/presentationeditor/mobile/src/view/edit/EditSlide.jsx b/apps/presentationeditor/mobile/src/view/edit/EditSlide.jsx index cb1ed06ab8..60acd7b498 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditSlide.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditSlide.jsx @@ -4,6 +4,7 @@ import {f7, Page, Navbar, List, ListItem, Row, BlockTitle, Link, Toggle, Icon, V import { ThemeColorPalette, CustomColorPicker } from '../../../../../common/mobile/lib/component/ThemeColorPalette.jsx'; import { useTranslation } from 'react-i18next'; import {Device} from '../../../../../common/mobile/utils/device'; +import { element } from 'prop-types'; const EditSlide = props => { const { t } = useTranslation(); @@ -82,7 +83,7 @@ const PageLayout = props => { const storeFocusObjects = props.storeFocusObjects; const storeSlideSettings = props.storeSlideSettings; storeSlideSettings.changeSlideLayoutIndex(storeFocusObjects.slideObject.get_LayoutIndex()); - const arrayLayouts = storeSlideSettings.arrayLayouts; + const arrayLayouts = storeSlideSettings.slideLayouts; const slideLayoutIndex = storeSlideSettings.slideLayoutIndex; return ( @@ -96,21 +97,25 @@ const PageLayout = props => { } - {arrayLayouts.length ? ( - - {arrayLayouts.map((elem, index) => { - return ( - { - storeSlideSettings.changeSlideLayoutIndex(index); - props.onLayoutClick(index); - }}> - - - ) - })} - - ) : null} + {arrayLayouts.length && + arrayLayouts.map((layouts, index) => { + return ( + + {layouts.map(layout => { + return ( + { + storeSlideSettings.changeSlideLayoutIndex(layout.type); + props.onLayoutClick(layout.type); + }}> + + + ) + })} + + ); + }) + } ); };