Merge branch 'feature/mobile-apps-on-reactjs-about' into feature/mobile-apps-on-reactjs

This commit is contained in:
JuliaSvinareva 2021-03-29 13:38:22 +03:00
commit f9f53e6dfc
12 changed files with 107 additions and 162 deletions

View file

@ -3,12 +3,12 @@ import { observer, inject } from "mobx-react";
import { Page, Navbar, Link } from "framework7-react";
import { useTranslation } from "react-i18next";
const PageSpreadsheetAbout = props => {
const PageAbout = 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 _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;
@ -17,27 +17,32 @@ const PageSpreadsheetAbout = props => {
const infoCustomer = customer ? customer.info : null;
const logoCustomer = customer ? customer.logo : null;
// console.log(storeAppOptions);
// console.log(isCanBranding);
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">
<Navbar title={_t.textAbout} backLink={_t.textBack} />
{licInfo && typeof licInfo == 'object' && typeof(customer) == 'object' ?
{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} />
<img src={logoCustomer} alt="" />
</div>
) : null}
</div>
<div className="content-block">
<h3>SPREADSHEET EDITOR</h3>
<h3>{_t.textVersion} 6.1.1</h3>
<h3>{nameEditor}</h3>
<h3>{_t.textVersion} {__PRODUCT_VERSION__}</h3>
</div>
<div className="content-block">
{nameCustomer && nameCustomer.length ? (
@ -45,20 +50,16 @@ const PageSpreadsheetAbout = props => {
) : null}
{addressCustomer && addressCustomer.length ? (
<p>
<label>{_t.textAddress}</label>
<label>{_t.textAddress}:</label>
<Link id="settings-about-address" className="external">{addressCustomer}</Link>
</p>
) : null}
{mailCustomer && mailCustomer.length ? (
<p>
<label>{_t.textEmail}</label>
<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"
@ -78,21 +79,45 @@ const PageSpreadsheetAbout = props => {
<p>
<label>{_t.textPoweredBy}</label>
</p>
<h3 className="vendor">Ascensio System SIA</h3>
<h3 className="vendor">{__PUBLISHER_NAME__}</h3>
<p>
<Link className="external" target="_blank" href="www.onlyoffice.com">www.onlyoffice.com</Link>
<Link className="external" target="_blank" href={publisherUrl}>{publisherPrintUrl}</Link>
</p>
</div>
</Fragment> :
</Fragment>
) : (
<Fragment>
<div className="content-block">
<i className="logo"></i>
<div className="logo"></div>
</div>
</Fragment>}
<div className="content-block">
<h3>{nameEditor}</h3>
<h3>{_t.textVersion} {__PRODUCT_VERSION__}</h3>
</div>
<div className="content-block">
<h3 id="settings-about-name" className="vendor">{__PUBLISHER_NAME__}</h3>
<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>
</div>
</Fragment>
)}
</Page>
);
};
const SpreadsheetAbout = inject("storeAppOptions")(observer(PageSpreadsheetAbout));
const About = inject("storeAppOptions")(observer(PageAbout));
export default SpreadsheetAbout;
export default About;

View file

@ -391,6 +391,10 @@
}
}
.content-block {
color: @blockTitleColor;
}
.dataview, #add-table, #add-shape, #add-slide, #add-chart {
&.page-content, .page-content {
background-color: @white;

View file

@ -84,6 +84,15 @@
}
}
.about {
.content-block {
margin: 0 auto 15px;
a {
color: @black;
}
}
}
.content-block {
margin: 32px 0;
padding: 0 16px;

View file

@ -386,5 +386,14 @@
"textStartAt": "Start At",
"textLocation": "Location",
"textFormat": "Format"
},
"About": {
"textAbout": "About",
"textVersion": "Version",
"textEmail": "Email",
"textAddress": "Address",
"textTel": "Tel",
"textPoweredBy": "Powered By",
"textBack": "Back"
}
}

View file

@ -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
</ListItem>
}
{_canAbout &&
<ListItem title={_t.textAbout} link="#">
<ListItem title={_t.textAbout} link="#" onClick={onoptionclick.bind(this, "/about/")}>
<Icon slot="media" icon="icon-about"></Icon>
</ListItem>
}

View file

@ -303,5 +303,14 @@
"textEditComment": "Edit Comment",
"textEditReply": "Edit Reply"
}
},
"About": {
"textAbout": "About",
"textVersion": "Version",
"textEmail": "Email",
"textAddress": "Address",
"textTel": "Tel",
"textPoweredBy": "Powered By",
"textBack": "Back"
}
}

View file

@ -15,6 +15,7 @@ import {
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

@ -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/',

View file

@ -361,5 +361,14 @@
"textEditComment": "Edit Comment",
"textEditReply": "Edit Reply"
}
},
"About": {
"textAbout": "About",
"textVersion": "Version",
"textEmail": "Email",
"textAddress": "Address",
"textTel": "Tel",
"textPoweredBy": "Powered By",
"textBack": "Back"
}
}

View file

@ -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 => {
<ListItem title={_t.textHelp} link="#" onClick={showHelp}>
<Icon slot="media" icon="icon-help"></Icon>
</ListItem>
<ListItem title={_t.textAbout} link="#" onClick={onoptionclick.bind(this, "/spreadsheet-about/")}>
<ListItem title={_t.textAbout} link="#" onClick={onoptionclick.bind(this, "/about/")}>
<Icon slot="media" icon="icon-about"></Icon>
</ListItem>
</List>