From d150d4af7f22a62ad7ff76e69c78fcf9993d3de8 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Thu, 17 Feb 2022 19:39:22 +0400 Subject: [PATCH] [DE PE SSE mobile] Fix Bug 53998, Fix Bug 55470 --- apps/documenteditor/mobile/src/controller/Error.jsx | 6 +++--- apps/documenteditor/mobile/src/page/main.jsx | 4 ++-- apps/presentationeditor/mobile/src/controller/Error.jsx | 6 +++--- apps/presentationeditor/mobile/src/page/main.jsx | 4 ++-- apps/spreadsheeteditor/mobile/src/controller/Error.jsx | 5 +++-- apps/spreadsheeteditor/mobile/src/page/main.jsx | 4 ++-- 6 files changed, 15 insertions(+), 14 deletions(-) diff --git a/apps/documenteditor/mobile/src/controller/Error.jsx b/apps/documenteditor/mobile/src/controller/Error.jsx index 16eca5427..4373e04d0 100644 --- a/apps/documenteditor/mobile/src/controller/Error.jsx +++ b/apps/documenteditor/mobile/src/controller/Error.jsx @@ -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, diff --git a/apps/documenteditor/mobile/src/page/main.jsx b/apps/documenteditor/mobile/src/page/main.jsx index 0a992a524..d1355598d 100644 --- a/apps/documenteditor/mobile/src/page/main.jsx +++ b/apps/documenteditor/mobile/src/page/main.jsx @@ -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 { {/* Top Navbar */} - {showLogo && appOptions.canBranding !== undefined &&
} + {showLogo && appOptions.canBranding !== undefined && } diff --git a/apps/presentationeditor/mobile/src/controller/Error.jsx b/apps/presentationeditor/mobile/src/controller/Error.jsx index 839dd126b..85b605270 100644 --- a/apps/presentationeditor/mobile/src/controller/Error.jsx +++ b/apps/presentationeditor/mobile/src/controller/Error.jsx @@ -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, diff --git a/apps/presentationeditor/mobile/src/page/main.jsx b/apps/presentationeditor/mobile/src/page/main.jsx index 4031267f9..a75e7c868 100644 --- a/apps/presentationeditor/mobile/src/page/main.jsx +++ b/apps/presentationeditor/mobile/src/page/main.jsx @@ -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 { {/* Top Navbar */} - {showLogo && appOptions.canBranding !== undefined &&
} + {showLogo && appOptions.canBranding !== undefined && } diff --git a/apps/spreadsheeteditor/mobile/src/controller/Error.jsx b/apps/spreadsheeteditor/mobile/src/controller/Error.jsx index 94f05d1c3..1b991fc32 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/Error.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/Error.jsx @@ -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) { diff --git a/apps/spreadsheeteditor/mobile/src/page/main.jsx b/apps/spreadsheeteditor/mobile/src/page/main.jsx index 9b0c3a91a..d5e702e73 100644 --- a/apps/spreadsheeteditor/mobile/src/page/main.jsx +++ b/apps/spreadsheeteditor/mobile/src/page/main.jsx @@ -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 { {/* Top Navbar */} - {showLogo && appOptions.canBranding !== undefined &&
} + {showLogo && appOptions.canBranding !== undefined && }