From c43062883b0b353313a86a9305632994b4f6b736 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Sat, 29 May 2021 20:40:36 +0300 Subject: [PATCH] [PE mobile] Correct navbars --- .../mobile/src/view/edit/EditChart.jsx | 62 +++++++++++++-- .../mobile/src/view/edit/EditImage.jsx | 42 ++++++++-- .../mobile/src/view/edit/EditLink.jsx | 32 +++++++- .../mobile/src/view/edit/EditSlide.jsx | 78 +++++++++++++------ .../mobile/src/view/edit/EditTable.jsx | 69 ++++++++++++++-- .../mobile/src/view/edit/EditText.jsx | 72 +++++++++++++++-- 6 files changed, 298 insertions(+), 57 deletions(-) diff --git a/apps/presentationeditor/mobile/src/view/edit/EditChart.jsx b/apps/presentationeditor/mobile/src/view/edit/EditChart.jsx index 7371610c2..9ffbb2c43 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditChart.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditChart.jsx @@ -1,6 +1,6 @@ import React, {Fragment, useState} from 'react'; import {observer, inject} from "mobx-react"; -import {List, ListItem, ListButton, Icon, Row, Page, Navbar, BlockTitle, Toggle, Range, Link, Tabs, Tab} from 'framework7-react'; +import {List, ListItem, ListButton, Icon, Row, Page, Navbar, BlockTitle, Toggle, Range, Link, Tabs, Tab, NavRight} from 'framework7-react'; import { useTranslation } from 'react-i18next'; import {Device} from '../../../../../common/mobile/utils/device'; import {CustomColorPicker, ThemeColorPalette} from "../../../../../common/mobile/lib/component/ThemeColorPalette.jsx"; @@ -24,7 +24,15 @@ const PageCustomFillColor = props => { return ( - + + {Device.phone && + + + + + + } + ) @@ -84,7 +92,15 @@ const PageCustomBorderColor = props => { return ( - + + {Device.phone && + + + + + + } + ) @@ -114,7 +130,15 @@ const PageBorderColor = props => { return ( - + + {Device.phone && + + + + + + } + { const styles = storeChartSettings.styles; const shapeObject = props.storeFocusObjects.shapeObject; const chartStyles = storeChartSettings.chartStyles; - // console.log(chartStyles, curType); - // console.log(Asc.c_oAscChartTypeSettings.comboBarLine, Asc.c_oAscChartTypeSettings.comboBarLineSecondary, Asc.c_oAscChartTypeSettings.comboAreaBar, Asc.c_oAscChartTypeSettings.comboCustom); let borderSize, borderType, borderColor; @@ -173,6 +195,13 @@ const PageStyle = props => { {_t.textFill} {_t.textBorder} + {Device.phone && + + + + + + } @@ -262,7 +291,15 @@ const PageReorder = props => { return ( - + + {Device.phone && + + + + + + } + {props.onReorder('all-up')}} link='#' className='no-indicator'> @@ -293,7 +330,15 @@ const PageAlign = props => { return ( - + + {Device.phone && + + + + + + } + {props.onAlign('align-left')}} className='no-indicator'> @@ -329,6 +374,7 @@ const PageAlign = props => { const EditChart = props => { const { t } = useTranslation(); const _t = t('View.Edit', {returnObjects: true}); + return ( diff --git a/apps/presentationeditor/mobile/src/view/edit/EditImage.jsx b/apps/presentationeditor/mobile/src/view/edit/EditImage.jsx index e5ca3d134..f8d207902 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditImage.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditImage.jsx @@ -1,6 +1,6 @@ import React, {Fragment, useState} from 'react'; import {observer, inject} from "mobx-react"; -import {f7, Page, Navbar, List, ListItem, Row, BlockTitle, Link, Toggle, Icon, View, NavRight, ListItemCell, Range, Button, Segmented, Tab, Tabs, ListInput, ListButton} from 'framework7-react'; +import {f7, Page, Navbar, List, ListItem, Row, BlockTitle, Link, Toggle, Icon, View, ListItemCell, Range, Button, Segmented, Tab, Tabs, ListInput, ListButton, NavRight} from 'framework7-react'; import { ThemeColorPalette, CustomColorPicker } from '../../../../../common/mobile/lib/component/ThemeColorPalette.jsx'; import { useTranslation } from 'react-i18next'; import {Device} from '../../../../../common/mobile/utils/device'; @@ -43,7 +43,15 @@ const PageReorder = props => { return ( - + + {Device.phone && + + + + + + } + {props.onReorder('all-up')}} className='no-indicator'> @@ -74,7 +82,15 @@ const PageAlign = props => { return ( - + + {Device.phone && + + + + + + } + {props.onAlign('align-left')}} className='no-indicator'> @@ -119,7 +135,15 @@ const PageReplace = props => { return ( - + + {Device.phone && + + + + + + } + {props.onReplaceByFile()}}> @@ -152,7 +176,15 @@ const PageLinkSettings = props => { }; return ( - + + {Device.phone && + + + + + + } + {_t.textAddress} { return ( - + + {Device.phone && + + + + + + } + {setTypeLink(1); props.changeType(1);}}> {setTypeLink(0); props.changeType(0);}}> @@ -62,7 +70,15 @@ const PageLinkTo = props => { return ( - + + {Device.phone && + + + + + + } + {changeTypeTo(0)}}> {changeTypeTo(1)}}> @@ -134,7 +150,15 @@ const PageLink = props => { return ( - + + {Device.phone && + + + + + + } + { const defaultThemes = arrayThemes[0]; const docThemes = arrayThemes[1]; - console.log(arrayThemes); - - // console.log(slideThemeIndex); - // console.log(arrayThemes); - return ( - - - + {Device.phone && + + + + + + } {arrayThemes.length ? ( @@ -99,15 +98,16 @@ const PageLayout = props => { const arrayLayouts = storeSlideSettings.arrayLayouts; const slideLayoutIndex = storeSlideSettings.slideLayoutIndex; - // console.log(slideLayoutIndex); - // console.log(arrayLayouts); - return ( - - - + {Device.phone && + + + + + + } {arrayLayouts.length ? ( @@ -234,9 +234,13 @@ const PageTransition = props => { return ( - - - + {Device.phone && + + + + + + } { return ( - + + {Device.phone && + + + + + + } + {_arrEffect.length ? ( {_arrEffect.map((elem, index) => { @@ -354,9 +366,13 @@ const PageType= props => { return ( - - - + {Device.phone && + + + + + + } {_arrCurrentEffectTypes.length ? ( @@ -406,9 +422,13 @@ const PageFillColor = props => { return ( - - - + {Device.phone && + + + + + + } @@ -439,7 +459,15 @@ const PageCustomFillColor = props => { return ( - + + {Device.phone && + + + + + + } + ) diff --git a/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx b/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx index bd0544906..86b34e06f 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx @@ -1,6 +1,6 @@ import React, {Fragment, useState} from 'react'; import {observer, inject} from "mobx-react"; -import {f7, Page, Navbar, List, ListItem, ListButton, Row, BlockTitle, Range, Toggle, Icon, Link, Tabs, Tab} from 'framework7-react'; +import {f7, Page, Navbar, List, ListItem, ListButton, Row, BlockTitle, Range, Toggle, Icon, Link, Tabs, Tab, NavRight} from 'framework7-react'; import { useTranslation } from 'react-i18next'; import {Device} from '../../../../../common/mobile/utils/device'; import {CustomColorPicker, ThemeColorPalette} from "../../../../../common/mobile/lib/component/ThemeColorPalette.jsx"; @@ -68,7 +68,15 @@ const PageStyleOptions = props => { return ( - + + {Device.phone && + + + + + + } + {props.onCheckTemplateChange(tableLook, 0, !isFirstRow)}}/> @@ -113,7 +121,15 @@ const PageCustomFillColor = props => { return( - + + {Device.phone && + + + + + + } + ) @@ -169,7 +185,15 @@ const PageCustomBorderColor = props => { return ( - + + {Device.phone && + + + + + + } + ) @@ -198,7 +222,15 @@ const PageBorderColor = props => { return ( - + + {Device.phone && + + + + + + } + @@ -305,6 +337,13 @@ const PageStyle = props => { {_t.textFill} {_t.textBorder} + {Device.phone && + + + + + + } @@ -342,7 +381,15 @@ const PageReorder = props => { return ( - + + {Device.phone && + + + + + + } + {props.onReorder('all-up')}} className='no-indicator'> @@ -373,7 +420,15 @@ const PageAlign = props => { return ( - + + {Device.phone && + + + + + + } + {props.onAlign('align-left')}} className='no-indicator'> diff --git a/apps/presentationeditor/mobile/src/view/edit/EditText.jsx b/apps/presentationeditor/mobile/src/view/edit/EditText.jsx index a9c780e18..d7bd881f5 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditText.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditText.jsx @@ -1,6 +1,6 @@ import React, {Fragment, useState} from 'react'; import {observer, inject} from "mobx-react"; -import {f7, List, ListItem, Icon, Row, Button, Page, Navbar, Segmented, BlockTitle} from 'framework7-react'; +import {f7, List, ListItem, Icon, Row, Button, Page, Navbar, Segmented, BlockTitle, NavRight, Link} from 'framework7-react'; import { useTranslation } from 'react-i18next'; import {Device} from '../../../../../common/mobile/utils/device'; import { ThemeColorPalette, CustomColorPicker } from '../../../../../common/mobile/lib/component/ThemeColorPalette.jsx'; @@ -201,7 +201,15 @@ const PageFonts = props => { return ( - + + {Device.phone && + + + + + + } + {!isAndroid &&
{displaySize}
} @@ -267,7 +275,15 @@ const PageFontColor = props => { return ( - + + {Device.phone && + + + + + + } + { }; return( - + + {Device.phone && + + + + + + } + ) @@ -334,7 +358,15 @@ const PageAdditionalFormatting = props => { return ( - + + {Device.phone && + + + + + + } + {props.onAdditionalStrikethrough('strikethrough', !isStrikeout)}}/> {props.onAdditionalStrikethrough('dbStrikethrough', !isDStrikeout)}}/> @@ -391,7 +423,15 @@ const PageBullets = props => { return ( - + + {Device.phone && + + + + + + } + {bulletArrays.map((bullets, index) => (
    {bullets.map((bullet) => ( @@ -439,7 +479,15 @@ const PageNumbers = props => { return ( - + + {Device.phone && + + + + + + } + {numberArrays.map((numbers, index) => (
      {numbers.map((number) => ( @@ -472,7 +520,15 @@ const PageLineSpacing = props => { return ( - + + {Device.phone && + + + + + + } + {props.onLineSpacing(1.0)}}> {props.onLineSpacing(1.15)}}>