import React, { Fragment } from 'react'; import { observer, inject } from "mobx-react"; import { Page, Navbar, Link } from "framework7-react"; import { useTranslation } from "react-i18next"; import { Device } from '../../utils/device'; 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 { name: nameCustomer = null, mail: mailCustomer = null, phone: phoneCustomer = null, address: addressCustomer = null, www: urlCustomer = null, info: infoCustomer = null, logo: logoCustomer = null } = customer || {}; const publisherUrl = __PUBLISHER_URL__, publisherPrintUrl = publisherUrl.replace(/https?:\/{2}|\/$/g,""); const publisherName = __PUBLISHER_NAME__.replace(/\\"/g, '"'); const editors = { de: 'DOCUMENT EDITOR', pe: 'PRESENTATION EDITOR', sse: 'SPREADSHEET EDITOR', ve: 'VISIO EDITOR' }; const nameEditor = (_t.textEditor || editors[editorType]).toUpperCase(); return ( {licInfo && typeof licInfo == 'object' && typeof(customer) == 'object' ? (
{logoCustomer && logoCustomer.length ? ( ) : null}

{nameEditor}

{_t.textVersion} {__PRODUCT_VERSION__}

{mailCustomer || phoneCustomer ? (
{mailCustomer && mailCustomer.length ? (

{mailCustomer}

) : null} {phoneCustomer && phoneCustomer.length ? (

{phoneCustomer}

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

{addressCustomer}

) : null} {(nameCustomer?.length || infoCustomer?.length || urlCustomer?.length) && (
{nameCustomer?.length && (

{nameCustomer}

)} {infoCustomer?.length && (

{infoCustomer}

)} {urlCustomer?.length && (

{urlCustomer}

)}
)}

{__PUBLISHER_ADDRESS__}

{publisherName}

{publisherPrintUrl}

) : (

{nameEditor}

{_t.textVersion} {__PRODUCT_VERSION__}

{__PUBLISHER_ADDRESS__}

{publisherName}

{publisherPrintUrl}

)}
); }; const About = inject("storeAppOptions")(observer(PageAbout)); About.appVersion = () => (__PRODUCT_VERSION__).match(/\d+.\d+.\d+/)[0]; // skip build number About.compareVersions = () => /d$/.test(__PRODUCT_VERSION__); About.developVersion = () => /(?:d|debug)$/.test(__PRODUCT_VERSION__); export default About;