From d1a412d6a09d6536524f19ec9c47e38cb4daac0b Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Mon, 30 Nov 2020 20:16:42 +0300 Subject: [PATCH] [DE mobile] Make block Download --- apps/documenteditor/mobile/locale/en.json | 3 +- .../src/controller/settings/Download.jsx | 16 +++++ .../mobile/src/css/icons-ios.less | 58 +++++++++++++++++++ .../mobile/src/view/settings/Download.jsx | 49 ++++++++++++++++ .../mobile/src/view/settings/Settings.jsx | 7 ++- 5 files changed, 131 insertions(+), 2 deletions(-) create mode 100644 apps/documenteditor/mobile/src/controller/settings/Download.jsx create mode 100644 apps/documenteditor/mobile/src/view/settings/Download.jsx diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json index 055a7ebe9..43f6290c3 100644 --- a/apps/documenteditor/mobile/locale/en.json +++ b/apps/documenteditor/mobile/locale/en.json @@ -46,7 +46,8 @@ "textShowNotification": "Show Notification", "textDisableAllMacrosWithNotification": "Disable all macros with notification", "textEnableAll": "Enable All", - "textEnableAllMacrosWithoutNotification": "Enable all macros without notification" + "textEnableAllMacrosWithoutNotification": "Enable all macros without notification", + "textDownloadAs": "Download As" }, "Collaboration": { "textEditUser": "Users who are editing the file:" diff --git a/apps/documenteditor/mobile/src/controller/settings/Download.jsx b/apps/documenteditor/mobile/src/controller/settings/Download.jsx new file mode 100644 index 000000000..d5c8fa064 --- /dev/null +++ b/apps/documenteditor/mobile/src/controller/settings/Download.jsx @@ -0,0 +1,16 @@ +import React, { Component } from "react"; +import Download from "../../view/settings/Download"; + +class DownloadController extends Component { + constructor(props) { + super(props); + } + render() { + return ( + + ); + } +} + + +export default DownloadController; \ No newline at end of file diff --git a/apps/documenteditor/mobile/src/css/icons-ios.less b/apps/documenteditor/mobile/src/css/icons-ios.less index 1defd0a90..362af679a 100644 --- a/apps/documenteditor/mobile/src/css/icons-ios.less +++ b/apps/documenteditor/mobile/src/css/icons-ios.less @@ -71,6 +71,64 @@ height: 22px; .encoded-svg-background(''); } + + // Download + + &.icon-format-docx { + width: 30px; + height: 30px; + .encoded-svg-background('') + } + + &.icon-format-pdf { + width: 30px; + height: 30px; + .encoded-svg-background('') + } + + &.icon-format-pdfa { + width: 30px; + height: 30px; + .encoded-svg-background('') + } + + &.icon-format-txt { + width: 24px; + height: 24px; + .encoded-svg-background('') + } + + &.icon-format-rtf { + width: 24px; + height: 24px; + .encoded-svg-background('') + } + + &.icon-format-odt { + width: 30px; + height: 30px; + .encoded-svg-background('') + } + + &.icon-format-html { + width: 30px; + height: 30px; + .encoded-svg-background('') + } + + &.icon-format-dotx { + width: 30px; + height: 30px; + .encoded-svg-background('') + } + + &.icon-format-ott { + width: 30px; + height: 30px; + .encoded-svg-background('') + } + + //Edit &.icon-text-additional { width: 22px; diff --git a/apps/documenteditor/mobile/src/view/settings/Download.jsx b/apps/documenteditor/mobile/src/view/settings/Download.jsx new file mode 100644 index 000000000..5bc0af468 --- /dev/null +++ b/apps/documenteditor/mobile/src/view/settings/Download.jsx @@ -0,0 +1,49 @@ +import React from 'react'; +import { observer } from "mobx-react"; +import { Page, Navbar, List, ListItem, BlockTitle, Icon } from "framework7-react"; +import { useTranslation } from "react-i18next"; + +const PageDownload = props => { + const { t } = useTranslation(); + const _t = t("Settings", { returnObjects: true }); + + return ( + + + {_t.textDownloadAs} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ) +} + +const Download = observer(PageDownload); + +export default Download; \ No newline at end of file diff --git a/apps/documenteditor/mobile/src/view/settings/Settings.jsx b/apps/documenteditor/mobile/src/view/settings/Settings.jsx index 1ece64a98..827d3f5ce 100644 --- a/apps/documenteditor/mobile/src/view/settings/Settings.jsx +++ b/apps/documenteditor/mobile/src/view/settings/Settings.jsx @@ -6,6 +6,7 @@ import {Device} from '../../../../../common/mobile/utils/device'; import DocumentSettingsController from "../../controller/settings/DocumentSettings"; import DocumentInfoController from "../../controller/settings/DocumentInfo"; +import DownloadController from "../../controller/settings/Download"; import ApplicationSettingsController from "../../controller/settings/ApplicationSettings"; import { DocumentFormats, DocumentMargins } from "./DocumentSettings"; import { MacrosSettings } from "./ApplicationSettings"; @@ -38,6 +39,10 @@ const routes = [ { path: '/macros-settings/', component: MacrosSettings + }, + { + path: '/download/', + component: DownloadController } ]; @@ -73,7 +78,7 @@ const SettingsList = withTranslation()(props => { - +