From 573d1c49c5b6f6755f66ab60283d8ae4d0aa7ee9 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Wed, 17 Mar 2021 18:44:35 +0300 Subject: [PATCH] [mobile] Added About --- apps/common/mobile/lib/view/About.jsx | 115 ++++++++++++++++++ .../mobile/resources/less/common-ios.less | 4 + apps/common/mobile/resources/less/common.less | 9 ++ apps/documenteditor/mobile/locale/en.json | 10 ++ .../mobile/src/view/settings/Settings.jsx | 7 +- apps/presentationeditor/mobile/locale/en.json | 10 ++ .../mobile/src/view/settings/Settings.jsx | 5 +- apps/spreadsheeteditor/mobile/locale/en.json | 10 ++ .../mobile/src/view/settings/Settings.jsx | 9 +- 9 files changed, 172 insertions(+), 7 deletions(-) create mode 100644 apps/common/mobile/lib/view/About.jsx diff --git a/apps/common/mobile/lib/view/About.jsx b/apps/common/mobile/lib/view/About.jsx new file mode 100644 index 000000000..43bdf5bac --- /dev/null +++ b/apps/common/mobile/lib/view/About.jsx @@ -0,0 +1,115 @@ +import React, { Fragment } from 'react'; +import { observer, inject } from "mobx-react"; +import { Page, Navbar, Link } from "framework7-react"; +import { useTranslation } from "react-i18next"; + +const PageAbout = props => { + const { t } = useTranslation(); + const _t = t("About", { returnObjects: true }); + const store = props.storeAppOptions; + const isCanBranding = store.canBranding; + const licInfo = isCanBranding ? store.customization : null; + const customer = licInfo ? licInfo.customer : null; + const nameCustomer = customer ? customer.name : null; + const mailCustomer = customer ? customer.mail : null; + const addressCustomer = customer ? customer.address : null; + const urlCustomer = customer ? customer.www : null; + const infoCustomer = customer ? customer.info : null; + const logoCustomer = customer ? customer.logo : null; + + const publisherUrl = __PUBLISHER_URL__, + publisherPrintUrl = publisherUrl.replace(/https?:\/{2}|\/$/,""); + + return ( + + + {licInfo && typeof licInfo == 'object' && typeof(customer) == 'object' ? ( + +
+ {logoCustomer && logoCustomer.length ? ( + + ) : null} +
+
+

{_t.textNameEditor}

+

{_t.textVersion} {__PRODUCT_VERSION__}

+
+
+ {nameCustomer && nameCustomer.length ? ( +

{nameCustomer}

+ ) : null} + {addressCustomer && addressCustomer.length ? ( +

+ + {addressCustomer} +

+ ) : null} + {mailCustomer && mailCustomer.length ? ( +

+ + {mailCustomer} +

+ ) : null} + {urlCustomer && urlCustomer.length ? ( +

+ + {urlCustomer} + +

+ ) : null} + {infoCustomer && infoCustomer.length ? ( +

+ +

+ ) : null} +
+
+
+

+ +

+

{__PUBLISHER_NAME__}

+

+ {publisherPrintUrl} +

+
+
+ ) : ( + +
+
+
+
+

{_t.textNameEditor}

+

{_t.textVersion} {__PRODUCT_VERSION__}

+
+
+

{__PUBLISHER_NAME__}

+

+ + {__PUBLISHER_ADDRESS__} +

+

+ + {__SUPPORT_EMAIL__} +

+

+ + {__PUBLISHER_PHONE__} +

+

+ {publisherPrintUrl} +

+
+
+ )} +
+ ); +}; + +const About = inject("storeAppOptions")(observer(PageAbout)); + +export default About; \ No newline at end of file diff --git a/apps/common/mobile/resources/less/common-ios.less b/apps/common/mobile/resources/less/common-ios.less index 4f858bb52..58f1413e5 100644 --- a/apps/common/mobile/resources/less/common-ios.less +++ b/apps/common/mobile/resources/less/common-ios.less @@ -385,6 +385,10 @@ } } + .content-block { + color: @blockTitleColor; + } + .dataview, #add-table, #add-shape, #add-slide, #add-chart { &.page-content, .page-content { background-color: @white; diff --git a/apps/common/mobile/resources/less/common.less b/apps/common/mobile/resources/less/common.less index 8d2746af8..71fb03e3c 100644 --- a/apps/common/mobile/resources/less/common.less +++ b/apps/common/mobile/resources/less/common.less @@ -84,6 +84,15 @@ } } +.about { + .content-block { + margin: 0 auto 15px; + a { + color: @black; + } + } +} + .content-block { margin: 32px 0; padding: 0 16px; diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json index e8858a48a..9060891c2 100644 --- a/apps/documenteditor/mobile/locale/en.json +++ b/apps/documenteditor/mobile/locale/en.json @@ -384,5 +384,15 @@ "textStartAt": "Start At", "textLocation": "Location", "textFormat": "Format" + }, + "About": { + "textNameEditor": "DOCUMENT EDITOR", + "textAbout": "About", + "textVersion": "Version", + "textEmail": "Email", + "textAddress": "Address", + "textTel": "Tel", + "textPoweredBy": "Powered By", + "textBack": "Back" } } \ 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 a199d82e3..afe8b68e0 100644 --- a/apps/documenteditor/mobile/src/view/settings/Settings.jsx +++ b/apps/documenteditor/mobile/src/view/settings/Settings.jsx @@ -11,6 +11,7 @@ import { DownloadController } from "../../controller/settings/Download"; import ApplicationSettingsController from "../../controller/settings/ApplicationSettings"; import { DocumentFormats, DocumentMargins, DocumentColorSchemes } from "./DocumentSettings"; import { MacrosSettings } from "./ApplicationSettings"; +import About from '../../../../../common/mobile/lib/view/About'; const routes = [ { @@ -48,6 +49,10 @@ const routes = [ { path: '/color-schemes/', component: DocumentColorSchemes + }, + { + path: '/about/', + component: About } ]; @@ -151,7 +156,7 @@ const SettingsList = inject("storeAppOptions")( observer( withTranslation()( pro } {_canAbout && - + } diff --git a/apps/presentationeditor/mobile/locale/en.json b/apps/presentationeditor/mobile/locale/en.json index 15ec8dca9..7e2797aec 100644 --- a/apps/presentationeditor/mobile/locale/en.json +++ b/apps/presentationeditor/mobile/locale/en.json @@ -268,5 +268,15 @@ "textStandartColors": "Standard Colors", "textCustomColors": "Custom Colors" } + }, + "About": { + "textNameEditor": "PRESENTATION EDITOR", + "textAbout": "About", + "textVersion": "Version", + "textEmail": "Email", + "textAddress": "Address", + "textTel": "Tel", + "textPoweredBy": "Powered By", + "textBack": "Back" } } \ No newline at end of file diff --git a/apps/presentationeditor/mobile/src/view/settings/Settings.jsx b/apps/presentationeditor/mobile/src/view/settings/Settings.jsx index 43deb4bdf..e3c671144 100644 --- a/apps/presentationeditor/mobile/src/view/settings/Settings.jsx +++ b/apps/presentationeditor/mobile/src/view/settings/Settings.jsx @@ -9,7 +9,8 @@ import DownloadController from "../../controller/settings/Download"; import PresentationInfoController from "../../controller/settings/PresentationInfo"; import PresentationSettingsController from "../../controller/settings/PresentationSettings"; import { PresentationColorSchemes } from "./PresentationSettings"; -import PresentationAboutController from '../../controller/settings/PresentationAbout'; +// import PresentationAboutController from '../../controller/settings/PresentationAbout'; +import About from '../../../../../common/mobile/lib/view/About'; const routes = [ { @@ -42,7 +43,7 @@ const routes = [ }, { path: '/about/', - component: PresentationAboutController + component: About } /*{ path: '/presentation-settings/', diff --git a/apps/spreadsheeteditor/mobile/locale/en.json b/apps/spreadsheeteditor/mobile/locale/en.json index 2d9626f50..6805f1ec3 100644 --- a/apps/spreadsheeteditor/mobile/locale/en.json +++ b/apps/spreadsheeteditor/mobile/locale/en.json @@ -323,5 +323,15 @@ "textEditUser": "Users who are editing the file:", "textComments": "Comments" } + }, + "About": { + "textNameEditor": "SPREADSHEET EDITOR", + "textAbout": "About", + "textVersion": "Version", + "textEmail": "Email", + "textAddress": "Address", + "textTel": "Tel", + "textPoweredBy": "Powered By", + "textBack": "Back" } } diff --git a/apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx b/apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx index 938900eff..2d7a1fd5d 100644 --- a/apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/settings/Settings.jsx @@ -9,7 +9,8 @@ import SpreadsheetInfoController from '../../controller/settings/SpreadsheetInfo import {DownloadWithTranslation} from '../../controller/settings/Download.jsx'; import {SpreadsheetColorSchemes, SpreadsheetFormats, SpreadsheetMargins} from './SpreadsheetSettings.jsx'; import {MacrosSettings, RegionalSettings, FormulaLanguage} from './ApplicationSettings.jsx'; -import SpreadsheetAbout from './SpreadsheetAbout.jsx'; +// import SpreadsheetAbout from './SpreadsheetAbout.jsx'; +import About from '../../../../../common/mobile/lib/view/About'; const routes = [ { @@ -57,8 +58,8 @@ const routes = [ component: SpreadsheetInfoController }, { - path: '/spreadsheet-about/', - component: SpreadsheetAbout + path: '/about/', + component: About } ]; @@ -137,7 +138,7 @@ const SettingsList = withTranslation()(props => { - +