From 383620fbc7adc98e3f2a5ef63ecbc802cc70135e Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Mon, 17 May 2021 16:14:41 +0300 Subject: [PATCH] [DE mobile] Fix templates --- .../lib/view/collaboration/Comments.jsx | 10 +- .../mobile/src/view/edit/EditChart.jsx | 59 ++++++++++-- .../mobile/src/view/edit/EditImage.jsx | 42 ++++++++- .../mobile/src/view/edit/EditParagraph.jsx | 32 ++++++- .../mobile/src/view/edit/EditShape.jsx | 79 ++++++++++++++-- .../mobile/src/view/edit/EditTable.jsx | 69 ++++++++++++-- .../mobile/src/view/edit/EditText.jsx | 94 ++++++++++++++++--- 7 files changed, 342 insertions(+), 43 deletions(-) diff --git a/apps/common/mobile/lib/view/collaboration/Comments.jsx b/apps/common/mobile/lib/view/collaboration/Comments.jsx index 7b0af776b..08f2666da 100644 --- a/apps/common/mobile/lib/view/collaboration/Comments.jsx +++ b/apps/common/mobile/lib/view/collaboration/Comments.jsx @@ -589,7 +589,15 @@ const ViewComments = ({storeComments, storeAppOptions, onCommentMenuClick, onRes return ( - + + {Device.phone && + + + + + + } + {!sortComments ?
{_t.textNoComments}
: diff --git a/apps/documenteditor/mobile/src/view/edit/EditChart.jsx b/apps/documenteditor/mobile/src/view/edit/EditChart.jsx index b8c98ea74..4a013cf20 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditChart.jsx +++ b/apps/documenteditor/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, NavRight, BlockTitle, Toggle, Range, Link, Tabs, Tab} from 'framework7-react'; import {f7} from 'framework7-react'; import { useTranslation } from 'react-i18next'; import {Device} from '../../../../../common/mobile/utils/device'; @@ -21,7 +21,15 @@ const PageCustomFillColor = props => { }; return( - + + {Device.phone && + + + + + + } + ) @@ -76,7 +84,15 @@ const PageCustomBorderColor = props => { }; return( - + + {Device.phone && + + + + + + } + ) @@ -104,7 +120,15 @@ const PageBorderColor = props => { }; return( - + + {Device.phone && + + + + + + } + { {_t.textFill} {_t.textBorder} + {Device.phone && + + + + + + } @@ -260,7 +291,15 @@ const PageWrap = props => { } return ( - + + {Device.phone && + + + + + + } + {props.onWrapType('inline')}}> {!isAndroid && } @@ -355,7 +394,15 @@ const PageReorder = props => { } return ( - + + {Device.phone && + + + + + + } + {props.onReorder('all-up')}} link='#' className='no-indicator'> diff --git a/apps/documenteditor/mobile/src/view/edit/EditImage.jsx b/apps/documenteditor/mobile/src/view/edit/EditImage.jsx index 646abe6f6..26795d0e3 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditImage.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditImage.jsx @@ -1,6 +1,6 @@ import React, {Fragment, useState} from 'react'; import {observer, inject} from "mobx-react"; -import {List, ListItem, ListInput, ListButton, Icon, Row, Col, Button, Page, Navbar, Segmented, BlockTitle, Toggle, Range} from 'framework7-react'; +import {List, ListItem, ListInput, ListButton, Icon, Row, Page, Navbar, NavRight, BlockTitle, Toggle, Range, Link} from 'framework7-react'; import { useTranslation } from 'react-i18next'; import {f7} from 'framework7-react'; import {Device} from '../../../../../common/mobile/utils/device'; @@ -27,7 +27,15 @@ const PageWrap = props => { } return ( - + + {Device.phone && + + + + + + } + {props.onWrapType('inline')}}> {!isAndroid && } @@ -129,7 +137,15 @@ const PageLinkSettings = props => { }; return ( - + + {Device.phone && + + + + + + } + {_t.textAddress} { } return ( - + + {Device.phone && + + + + + + } + {props.onReplaceByFile()}}> @@ -182,7 +206,15 @@ const PageReorder = props => { } return ( - + + {Device.phone && + + + + + + } + {props.onReorder('all-up')}} className='no-indicator'> diff --git a/apps/documenteditor/mobile/src/view/edit/EditParagraph.jsx b/apps/documenteditor/mobile/src/view/edit/EditParagraph.jsx index 050fc162d..0f1118b02 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditParagraph.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditParagraph.jsx @@ -1,6 +1,6 @@ import React, {Fragment, useState} from 'react'; import {observer, inject} from "mobx-react"; -import {f7, List, ListItem, Icon, Button, Page, Navbar, Segmented, BlockTitle, Toggle} from 'framework7-react'; +import {f7, List, ListItem, Icon, Button, Page, Navbar, NavRight, Segmented, BlockTitle, Toggle, 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'; @@ -38,7 +38,15 @@ const PageAdvancedSettings = props => { } return( - + + {Device.phone && + + + + + + } + {t('Edit.textDistanceFromText')} @@ -122,7 +130,15 @@ const PageCustomBackColor = props => { }; return( - + + {Device.phone && + + + + + + } + ) @@ -150,7 +166,15 @@ const PageBackgroundColor = props => { }; return( - + + {Device.phone && + + + + + + } + { }; return( - + + {Device.phone && + + + + + + } + ) @@ -76,7 +84,15 @@ const PageCustomBorderColor = props => { }; return( - + + {Device.phone && + + + + + + } + ) @@ -104,7 +120,15 @@ const PageBorderColor = props => { }; return( - + + {Device.phone && + + + + + + } + { {_t.textBorder} {_t.textEffects} + {Device.phone && + + + + + + } @@ -237,7 +268,15 @@ const PageStyleNoFill = props => { return ( - + + {Device.phone && + + + + + + } +
{_t.textSize}
@@ -286,7 +325,15 @@ const PageWrap = props => { } return ( - + + {Device.phone && + + + + + + } + {props.onWrapType('inline')}}> {!isAndroid && } @@ -386,7 +433,15 @@ const PageReplace = props => { return ( - + + {Device.phone && + + + + + + } + {shapes.map((row, indexRow) => { return (
    @@ -418,7 +473,15 @@ const PageReorder = props => { return ( - + + {Device.phone && + + + + + + } + {props.onReorder('all-up')}} className='no-indicator'> diff --git a/apps/documenteditor/mobile/src/view/edit/EditTable.jsx b/apps/documenteditor/mobile/src/view/edit/EditTable.jsx index 93d79deef..e1eb03bd4 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditTable.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditTable.jsx @@ -1,6 +1,6 @@ import React, {Fragment, useState} from 'react'; import {observer, inject} from "mobx-react"; -import {Page, Navbar, List, ListItem, ListButton, Row, BlockTitle, Range, Toggle, Icon, Link, Tabs, Tab} from 'framework7-react'; +import {Page, Navbar, NavRight, List, ListItem, ListButton, Row, BlockTitle, Range, Toggle, Icon, Link, Tabs, Tab} from 'framework7-react'; import { f7 } from 'framework7-react'; import { useTranslation } from 'react-i18next'; import {Device} from '../../../../../common/mobile/utils/device'; @@ -29,7 +29,15 @@ const PageTableOptions = props => { return ( - + + {Device.phone && + + + + + + } + {props.onOptionRepeat(!isRepeat)}}/> @@ -88,7 +96,15 @@ const PageWrap = props => { return ( - + + {Device.phone && + + + + + + } + {props.onWrapType(c_tableWrap.TABLE_WRAP_NONE)}}> {!isAndroid && } @@ -211,7 +227,15 @@ const PageStyleOptions = props => { } return ( - + + {Device.phone && + + + + + + } + {props.onCheckTemplateChange(tableLook, 0, !isFirstRow)}}/> @@ -256,7 +280,15 @@ const PageCustomFillColor = props => { }; return( - + + {Device.phone && + + + + + + } + ) @@ -307,7 +339,15 @@ const PageCustomBorderColor = props => { }; return( - + + {Device.phone && + + + + + + } + ) @@ -334,7 +374,15 @@ const PageBorderColor = props => { }; return( - + + {Device.phone && + + + + + + } + @@ -448,6 +496,13 @@ const PageStyle = props => { {_t.textFill} {_t.textBorder} + {Device.phone && + + + + + + } diff --git a/apps/documenteditor/mobile/src/view/edit/EditText.jsx b/apps/documenteditor/mobile/src/view/edit/EditText.jsx index a52f10051..e14cf43ed 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditText.jsx +++ b/apps/documenteditor/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, NavRight, Segmented, BlockTitle, Link} from 'framework7-react'; import { useTranslation } from 'react-i18next'; import {Device} from '../../../../../common/mobile/utils/device'; @@ -29,11 +29,17 @@ const PageFonts = props => { }); }; - console.log(curFontName); - return ( - + + {Device.phone && + + + + + + } + {!isAndroid &&
    {displaySize}
    } @@ -94,7 +100,15 @@ const PageAdditionalFormatting = props => { } return( - + + {Device.phone && + + + + + + } + {props.onAdditionalStrikethrough('strikeout', !isStrikeout)}}/> {props.onAdditionalStrikethrough('dbStrikeout', !isDStrikeout)}}/> @@ -144,7 +158,15 @@ const PageBullets = props => { return( - + + {Device.phone && + + + + + + } + {bulletArrays.map((bullets, index) => (
      {bullets.map((bullet) => ( @@ -189,7 +211,15 @@ const PageNumbers = props => { const typeNumbers = storeTextSettings.typeNumbers; return( - + + {Device.phone && + + + + + + } + {numberArrays.map((numbers, index) => (
        {numbers.map((number) => ( @@ -220,7 +250,15 @@ const PageLineSpacing = props => { const lineSpacing = storeTextSettings.lineSpacing; return( - + + {Device.phone && + + + + + + } + {props.onLineSpacing(1.0)}}> {props.onLineSpacing(1.15)}}> @@ -249,7 +287,15 @@ const PageCustomFontColor = props => { }; return( - + + {Device.phone && + + + + + + } + ) @@ -274,7 +320,15 @@ const PageFontColor = props => { }; return( - + + {Device.phone && + + + + + + } + { props.onTextColorAuto(); @@ -308,7 +362,15 @@ const PageCustomBackColor = props => { }; return( - + + {Device.phone && + + + + + + } + ) @@ -333,7 +395,15 @@ const PageBackgroundColor = props => { }; return( - + + {Device.phone && + + + + + + } +