[DE PE SSE mobile] Fix Bug 53998, Fix Bug 55470

This commit is contained in:
SergeyEzhin 2022-02-17 19:39:22 +04:00
parent 52b9578299
commit d150d4af7f
6 changed files with 15 additions and 14 deletions

View file

@ -4,6 +4,9 @@ import { f7 } from 'framework7-react';
import { useTranslation } from 'react-i18next';
const ErrorController = inject('storeAppOptions')(({storeAppOptions, LoadingDocument}) => {
const { t } = useTranslation();
const _t = t("Error", { returnObjects: true });
useEffect(() => {
const on_engine_created = k => { k.asc_registerCallback('asc_onError', onError); };
@ -20,9 +23,6 @@ const ErrorController = inject('storeAppOptions')(({storeAppOptions, LoadingDocu
});
const onError = (id, level, errData) => {
const {t} = useTranslation();
const _t = t("Error", { returnObjects: true });
if (id === Asc.c_oAscError.ID.LoadingScriptError) {
f7.notification.create({
title: _t.criticalErrorTitle,

View file

@ -1,6 +1,6 @@
import React, { Component } from 'react';
import { f7 } from 'framework7-react';
import { f7, Link } from 'framework7-react';
import { Page, View, Navbar, Subnavbar, Icon } from 'framework7-react';
import { observer, inject } from "mobx-react";
@ -101,7 +101,7 @@ class MainPage extends Component {
<Page name="home" className={`editor${ showLogo ? ' page-with-logo' : ''}`}>
{/* Top Navbar */}
<Navbar id='editor-navbar' className={`main-navbar${showLogo ? ' navbar-with-logo' : ''}`}>
{showLogo && appOptions.canBranding !== undefined && <div className="main-logo"><Icon icon="icon-logo"></Icon></div>}
{showLogo && appOptions.canBranding !== undefined && <Link className="main-logo external" href="https://www.onlyoffice.com" target="_blank"><Icon icon="icon-logo"></Icon></Link>}
<Subnavbar>
<Toolbar openOptions={this.handleClickToOpenOptions} closeOptions={this.handleOptionsViewClosed}/>
<Search useSuspense={false}/>

View file

@ -4,6 +4,9 @@ import { f7 } from 'framework7-react';
import { useTranslation } from 'react-i18next';
const ErrorController = inject('storeAppOptions')(({storeAppOptions, LoadingDocument}) => {
const { t } = useTranslation();
const _t = t("Error", { returnObjects: true });
useEffect(() => {
const on_engine_created = k => { k.asc_registerCallback('asc_onError', onError); };
@ -20,9 +23,6 @@ const ErrorController = inject('storeAppOptions')(({storeAppOptions, LoadingDocu
});
const onError = (id, level, errData) => {
const {t} = useTranslation();
const _t = t("Error", { returnObjects: true });
if (id === Asc.c_oAscError.ID.LoadingScriptError) {
f7.notification.create({
title: _t.criticalErrorTitle,

View file

@ -1,5 +1,5 @@
import React, { Component, Fragment } from 'react';
import { f7, Page, View, Navbar, Subnavbar, Icon } from 'framework7-react';
import { f7, Page, View, Navbar, Subnavbar, Icon, Link} from 'framework7-react';
import { observer, inject } from "mobx-react";
import { Device } from '../../../../common/mobile/utils/device';
@ -110,7 +110,7 @@ class MainPage extends Component {
<Page name="home" className={`editor${ showLogo ? ' page-with-logo' : ''}`}>
{/* Top Navbar */}
<Navbar id='editor-navbar' className={`main-navbar${showLogo ? ' navbar-with-logo' : ''}`}>
{showLogo && appOptions.canBranding !== undefined && <div className="main-logo"><Icon icon="icon-logo"></Icon></div>}
{showLogo && appOptions.canBranding !== undefined && <Link className="main-logo external" href="https://www.onlyoffice.com" target="_blank"><Icon icon="icon-logo"></Icon></Link>}
<Subnavbar>
<Toolbar openOptions={this.handleClickToOpenOptions} closeOptions={this.handleOptionsViewClosed}/>
<Search useSuspense={false}/>

View file

@ -4,6 +4,9 @@ import { f7 } from 'framework7-react';
import { useTranslation } from 'react-i18next';
const ErrorController = inject('storeAppOptions')(({storeAppOptions, LoadingDocument}) => {
const { t } = useTranslation();
const _t = t("Error", { returnObjects: true });
useEffect(() => {
const on_engine_created = k => { k.asc_registerCallback('asc_onError', onError); };
@ -20,8 +23,6 @@ const ErrorController = inject('storeAppOptions')(({storeAppOptions, LoadingDocu
});
const onError = (id, level, errData) => {
const {t} = useTranslation();
const _t = t("Error", { returnObjects: true });
const api = Common.EditorApi.get();
if (id === Asc.c_oAscError.ID.LoadingScriptError) {

View file

@ -11,7 +11,7 @@ import FilterOptionsController from '../controller/FilterOptions.jsx'
import AddOptions from "../view/add/Add";
import EditOptions from "../view/edit/Edit";
import { Search, SearchSettings } from '../controller/Search';
import { f7 } from 'framework7-react';
import { f7, Link } from 'framework7-react';
import {FunctionGroups} from "../controller/add/AddFunction";
import ContextMenu from '../controller/ContextMenu';
@ -107,7 +107,7 @@ class MainPage extends Component {
<Page name="home" className={`editor${ showLogo ? ' page-with-logo' : ''}`}>
{/* Top Navbar */}
<Navbar id='editor-navbar' className={`main-navbar${showLogo ? ' navbar-with-logo' : ''}`}>
{showLogo && appOptions.canBranding !== undefined && <div className="main-logo"><Icon icon="icon-logo"></Icon></div>}
{showLogo && appOptions.canBranding !== undefined && <Link className="main-logo external" href="https://www.onlyoffice.com" target="_blank"><Icon icon="icon-logo"></Icon></Link>}
<Subnavbar>
<Toolbar openOptions={this.handleClickToOpenOptions} closeOptions={this.handleOptionsViewClosed}/>
<Search useSuspense={false}/>