[mobile] Corrected About

This commit is contained in:
SergeyEzhin 2021-03-26 17:48:18 +03:00
parent 573d1c49c5
commit 1876de1e87
9 changed files with 13 additions and 232 deletions

View file

@ -19,6 +19,14 @@ const PageAbout = props => {
const publisherUrl = __PUBLISHER_URL__,
publisherPrintUrl = publisherUrl.replace(/https?:\/{2}|\/$/,"");
const editors = {
de: 'DOCUMENT EDITOR',
pe: 'PRESENTATION EDITOR',
sse: 'SPREADSHEET EDITOR'
};
const nameEditor = editors[editorType];
return (
<Page className="about">
@ -33,7 +41,7 @@ const PageAbout = props => {
) : null}
</div>
<div className="content-block">
<h3>{_t.textNameEditor}</h3>
<h3>{nameEditor}</h3>
<h3>{_t.textVersion} {__PRODUCT_VERSION__}</h3>
</div>
<div className="content-block">
@ -83,7 +91,7 @@ const PageAbout = props => {
<div className="logo"></div>
</div>
<div className="content-block">
<h3>{_t.textNameEditor}</h3>
<h3>{nameEditor}</h3>
<h3>{_t.textVersion} {__PRODUCT_VERSION__}</h3>
</div>
<div className="content-block">

View file

@ -386,7 +386,6 @@
"textFormat": "Format"
},
"About": {
"textNameEditor": "DOCUMENT EDITOR",
"textAbout": "About",
"textVersion": "Version",
"textEmail": "Email",

View file

@ -270,7 +270,6 @@
}
},
"About": {
"textNameEditor": "PRESENTATION EDITOR",
"textAbout": "About",
"textVersion": "Version",
"textEmail": "Email",

View file

@ -9,6 +9,7 @@ import CollaborationController from '../../../../common/mobile/lib/controller/co
class MainController extends Component {
constructor(props) {
super(props)
window.editorType = 'pe';
}
initSdk() {

View file

@ -1,17 +0,0 @@
import React, { Component } from "react";
import PresentationAbout from "../../view/settings/PresentationAbout";
class PresentationAboutController extends Component {
constructor(props) {
super(props);
}
render() {
return (
<PresentationAbout />
);
}
}
export default PresentationAboutController;

View file

@ -1,111 +0,0 @@
import React, { Fragment } from 'react';
import { observer, inject } from "mobx-react";
import { Page, Navbar, Link } from "framework7-react";
import { useTranslation } from "react-i18next";
const PagePresentationAbout = props => {
const { t } = useTranslation();
const _t = t("View.Settings", { 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 (
<Page className="about">
<Navbar title={_t.textAbout} backLink={_t.textBack} />
<div className="content-block">
{licInfo && typeof licInfo == 'object' && typeof(customer)=='object' ? null : (
<i className="logo"></i>
)}
{logoCustomer && logoCustomer.length ? (
<div id="settings-about-logo" className="settings-about-logo">
<img src={logoCustomer} />
</div>
) : null}
</div>
<div className="content-block">
<h3>PRESENTATION EDITOR</h3>
<h3>{_t.textVersion} {__PRODUCT_VERSION__}</h3>
</div>
<div className="content-block">
<p>
<label>{_t.textAddress}</label>
<a id="settings-about-address" className="external">{__PUBLISHER_ADDRESS__}</a>
</p>
<p>
<label>{_t.textEmail}</label>
<a id="settings-about-email" className="external" href={`mailto:${__SUPPORT_EMAIL__}`}>{__SUPPORT_EMAIL__}</a>
</p>
<p>
<label>{_t.textTel}</label>
<a id="settings-about-tel" className="external" href={`tel:${__PUBLISHER_PHONE__}`}>{__PUBLISHER_PHONE__}</a>
</p>
<p>
<a id="settings-about-url" className="external" target="_blank" href={publisherUrl}>{publisherPrintUrl}</a>
</p>
{/*<p><label id="settings-about-info" style="display: none;"></label></p>*/}
</div>
<div className="content-block">
{nameCustomer && nameCustomer.length ? (
<h3 id="settings-about-name" className="vendor">{nameCustomer}</h3>
) : null}
{addressCustomer && addressCustomer.length ? (
<p>
<label>{_t.textAddress}</label>
<Link id="settings-about-address" className="external">{addressCustomer}</Link>
</p>
) : null}
{mailCustomer && mailCustomer.length ? (
<p>
<label>{_t.textEmail}</label>
<Link id="settings-about-email" className="external" target="_blank" href={"mailto:"+mailCustomer}>{mailCustomer}</Link>
</p>
) : null}
{licInfo && typeof licInfo == 'object' && typeof(customer)=='object' ? null : (
<p>
<label>{_t.textTel}</label>
<Link id="settings-about-tel" className="external" target="_blank" href="tel:+37163399867">+371 633-99867</Link>
</p>
)}
{urlCustomer && urlCustomer.length ? (
<p>
<Link id="settings-about-url" className="external" target="_blank"
href={!/^https?:\/{2}/i.test(urlCustomer) ? "http:\/\/" : '' + urlCustomer}>
{urlCustomer}
</Link>
</p>
) : null}
{infoCustomer && infoCustomer.length ? (
<p>
<label id="settings-about-info">{infoCustomer}</label>
</p>
) : null}
</div>
{licInfo && typeof licInfo == 'object' && typeof(customer)=='object' ? (
<div className="content-block" id="settings-about-licensor">
<div className="content-block-inner"></div>
<p>
<label>{_t.textPoweredBy}</label>
</p>
<h3 className="vendor">Ascensio System SIA</h3>
<p>
<Link className="external" target="_blank" href="www.onlyoffice.com">www.onlyoffice.com</Link>
</p>
</div>
) : null}
</Page>
);
};
const PresentationAbout = inject("storeAppOptions")(observer(PagePresentationAbout));
export default PresentationAbout;

View file

@ -325,7 +325,6 @@
}
},
"About": {
"textNameEditor": "SPREADSHEET EDITOR",
"textAbout": "About",
"textVersion": "Version",
"textEmail": "Email",

View file

@ -9,7 +9,8 @@ import { onAdvancedOptions } from './settings/Download.jsx';
@inject("storeAppOptions", "storeFocusObjects", "storeCellSettings", "storeTextSettings", "storeChartSettings", "storeSpreadsheetSettings", "storeSpreadsheetInfo")
class MainController extends Component {
constructor(props) {
super(props)
super(props);
window.editorType = 'sse';
}
initSdk() {

View file

@ -1,98 +0,0 @@
import React, { Fragment } from 'react';
import { observer, inject } from "mobx-react";
import { Page, Navbar, Link } from "framework7-react";
import { useTranslation } from "react-i18next";
const PageSpreadsheetAbout = props => {
const { t } = useTranslation();
const _t = t("View.Settings", { returnObjects: true });
const storeAppOptions = props.storeAppOptions;
const isCanBranding = storeAppOptions.canBranding;
const licInfo = isCanBranding ? storeAppOptions.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;
// console.log(storeAppOptions);
// console.log(isCanBranding);
return (
<Page className="about">
<Navbar title={_t.textAbout} backLink={_t.textBack} />
{licInfo && typeof licInfo == 'object' && typeof(customer) == 'object' ?
<Fragment>
<div className="content-block">
{/* {licInfo && typeof licInfo == 'object' && typeof(customer) == 'object' ? null : (
<i className="logo"></i>
)} */}
{logoCustomer && logoCustomer.length ? (
<div id="settings-about-logo" className="settings-about-logo">
<img src={logoCustomer} />
</div>
) : null}
</div>
<div className="content-block">
<h3>SPREADSHEET EDITOR</h3>
<h3>{_t.textVersion} 6.1.1</h3>
</div>
<div className="content-block">
{nameCustomer && nameCustomer.length ? (
<h3 id="settings-about-name" className="vendor">{nameCustomer}</h3>
) : null}
{addressCustomer && addressCustomer.length ? (
<p>
<label>{_t.textAddress}</label>
<Link id="settings-about-address" className="external">{addressCustomer}</Link>
</p>
) : null}
{mailCustomer && mailCustomer.length ? (
<p>
<label>{_t.textEmail}</label>
<Link id="settings-about-email" className="external" target="_blank" href={"mailto:"+mailCustomer}>{mailCustomer}</Link>
</p>
) : null}
<p>
<label>{_t.textTel}</label>
<Link id="settings-about-tel" className="external" target="_blank" href="tel:+37163399867">+371 633-99867</Link>
</p>
{urlCustomer && urlCustomer.length ? (
<p>
<Link id="settings-about-url" className="external" target="_blank"
href={!/^https?:\/{2}/i.test(urlCustomer) ? "http:\/\/" : '' + urlCustomer}>
{urlCustomer}
</Link>
</p>
) : null}
{infoCustomer && infoCustomer.length ? (
<p>
<label id="settings-about-info">{infoCustomer}</label>
</p>
) : null}
</div>
<div className="content-block" id="settings-about-licensor">
<div className="content-block-inner"></div>
<p>
<label>{_t.textPoweredBy}</label>
</p>
<h3 className="vendor">Ascensio System SIA</h3>
<p>
<Link className="external" target="_blank" href="www.onlyoffice.com">www.onlyoffice.com</Link>
</p>
</div>
</Fragment> :
<Fragment>
<div className="content-block">
<i className="logo"></i>
</div>
</Fragment>}
</Page>
);
};
const SpreadsheetAbout = inject("storeAppOptions")(observer(PageSpreadsheetAbout));
export default SpreadsheetAbout;