[mobile] changed loading status order
This commit is contained in:
parent
c043d0c858
commit
a402d2efdc
|
@ -1,9 +1,10 @@
|
||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
import { f7 } from 'framework7-react';
|
import { f7 } from 'framework7-react';
|
||||||
|
import { inject } from 'mobx-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import IrregularStack from "../../../../common/mobile/utils/IrregularStack";
|
import IrregularStack from "../../../../common/mobile/utils/IrregularStack";
|
||||||
|
|
||||||
const LongActionsController = () => {
|
const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => {
|
||||||
const {t} = useTranslation();
|
const {t} = useTranslation();
|
||||||
const _t = t("LongActions", { returnObjects: true });
|
const _t = t("LongActions", { returnObjects: true });
|
||||||
|
|
||||||
|
@ -74,96 +75,99 @@ const LongActionsController = () => {
|
||||||
|
|
||||||
const setLongActionView = (action) => {
|
const setLongActionView = (action) => {
|
||||||
let title = '';
|
let title = '';
|
||||||
let text = '';
|
// let text = '';
|
||||||
|
|
||||||
switch (action.id) {
|
switch (action.id) {
|
||||||
case Asc.c_oAscAsyncAction['Open']:
|
case Asc.c_oAscAsyncAction['Open']:
|
||||||
title = _t.openTitleText;
|
// title = _t.openTitleText;
|
||||||
text = _t.openTextText;
|
// text = _t.openTextText;
|
||||||
|
title = _t.textLoadingDocument;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['Save']:
|
case Asc.c_oAscAsyncAction['Save']:
|
||||||
title = _t.saveTitleText;
|
title = _t.saveTitleText;
|
||||||
text = _t.saveTextText;
|
// text = _t.saveTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['LoadDocumentFonts']:
|
case Asc.c_oAscAsyncAction['LoadDocumentFonts']:
|
||||||
|
if ( !storeAppOptions.isDocReady ) return;
|
||||||
title = _t.loadFontsTitleText;
|
title = _t.loadFontsTitleText;
|
||||||
text = _t.loadFontsTextText;
|
// text = _t.loadFontsTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['LoadDocumentImages']:
|
case Asc.c_oAscAsyncAction['LoadDocumentImages']:
|
||||||
title = _t.loadImagesTitleText;
|
title = _t.loadImagesTitleText;
|
||||||
text = _t.loadImagesTextText;
|
// text = _t.loadImagesTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['LoadFont']:
|
case Asc.c_oAscAsyncAction['LoadFont']:
|
||||||
title = _t.loadFontTitleText;
|
title = _t.loadFontTitleText;
|
||||||
text = _t.loadFontTextText;
|
// text = _t.loadFontTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['LoadImage']:
|
case Asc.c_oAscAsyncAction['LoadImage']:
|
||||||
title = _t.loadImageTitleText;
|
title = _t.loadImageTitleText;
|
||||||
text = _t.loadImageTextText;
|
// text = _t.loadImageTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['DownloadAs']:
|
case Asc.c_oAscAsyncAction['DownloadAs']:
|
||||||
title = _t.downloadTitleText;
|
title = _t.downloadTitleText;
|
||||||
text = _t.downloadTextText;
|
// text = _t.downloadTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['Print']:
|
case Asc.c_oAscAsyncAction['Print']:
|
||||||
title = _t.printTitleText;
|
title = _t.printTitleText;
|
||||||
text = _t.printTextText;
|
// text = _t.printTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['UploadImage']:
|
case Asc.c_oAscAsyncAction['UploadImage']:
|
||||||
title = _t.uploadImageTitleText;
|
title = _t.uploadImageTitleText;
|
||||||
text = _t.uploadImageTextText;
|
// text = _t.uploadImageTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['ApplyChanges']:
|
case Asc.c_oAscAsyncAction['ApplyChanges']:
|
||||||
title = _t.applyChangesTitleText;
|
title = _t.applyChangesTitleText;
|
||||||
text = _t.applyChangesTextText;
|
// text = _t.applyChangesTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['PrepareToSave']:
|
case Asc.c_oAscAsyncAction['PrepareToSave']:
|
||||||
title = _t.savePreparingText;
|
title = _t.savePreparingText;
|
||||||
text = _t.savePreparingTitle;
|
// text = _t.savePreparingTitle;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['MailMergeLoadFile']:
|
case Asc.c_oAscAsyncAction['MailMergeLoadFile']:
|
||||||
title = _t.mailMergeLoadFileText;
|
title = _t.mailMergeLoadFileText;
|
||||||
text = _t.mailMergeLoadFileTitle;
|
// text = _t.mailMergeLoadFileTitle;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['DownloadMerge']:
|
case Asc.c_oAscAsyncAction['DownloadMerge']:
|
||||||
title = _t.downloadMergeTitle;
|
title = _t.downloadMergeTitle;
|
||||||
text = _t.downloadMergeText;
|
// text = _t.downloadMergeText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['SendMailMerge']:
|
case Asc.c_oAscAsyncAction['SendMailMerge']:
|
||||||
title = _t.sendMergeTitle;
|
title = _t.sendMergeTitle;
|
||||||
text = _t.sendMergeText;
|
// text = _t.sendMergeText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['Waiting']:
|
case Asc.c_oAscAsyncAction['Waiting']:
|
||||||
title = _t.waitText;
|
title = _t.waitText;
|
||||||
text = _t.waitText;
|
// text = _t.waitText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ApplyEditRights:
|
case ApplyEditRights:
|
||||||
title = _t.txtEditingMode;
|
title = _t.txtEditingMode;
|
||||||
text = _t.txtEditingMode;
|
// text = _t.txtEditingMode;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LoadingDocument:
|
case LoadingDocument:
|
||||||
title = _t.loadingDocumentTitleText;
|
title = _t.loadingDocumentTitleText;
|
||||||
text = _t.loadingDocumentTextText;
|
// text = _t.loadingDocumentTextText;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (typeof action.id == 'string'){
|
if (typeof action.id == 'string'){
|
||||||
title = action.id;
|
title = action.id;
|
||||||
text = action.id;
|
// text = action.id;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -194,6 +198,6 @@ const LongActionsController = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
};
|
});
|
||||||
|
|
||||||
export default LongActionsController;
|
export default LongActionsController;
|
|
@ -1,9 +1,10 @@
|
||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
import { f7 } from 'framework7-react';
|
import { f7 } from 'framework7-react';
|
||||||
|
import { inject } from 'mobx-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import IrregularStack from "../../../../common/mobile/utils/IrregularStack";
|
import IrregularStack from "../../../../common/mobile/utils/IrregularStack";
|
||||||
|
|
||||||
const LongActionsController = () => {
|
const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => {
|
||||||
const {t} = useTranslation();
|
const {t} = useTranslation();
|
||||||
const _t = t("LongActions", {returnObjects: true});
|
const _t = t("LongActions", {returnObjects: true});
|
||||||
|
|
||||||
|
@ -74,86 +75,88 @@ const LongActionsController = () => {
|
||||||
|
|
||||||
const setLongActionView = (action) => {
|
const setLongActionView = (action) => {
|
||||||
let title = '';
|
let title = '';
|
||||||
let text = '';
|
// let text = '';
|
||||||
switch (action.id) {
|
switch (action.id) {
|
||||||
case Asc.c_oAscAsyncAction['Open']:
|
case Asc.c_oAscAsyncAction['Open']:
|
||||||
title = _t.openTitleText;
|
title = _t.textLoadingDocument;
|
||||||
text = _t.openTextText;
|
// title = _t.openTitleText;
|
||||||
|
// text = _t.openTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['Save']:
|
case Asc.c_oAscAsyncAction['Save']:
|
||||||
title = _t.saveTitleText;
|
title = _t.saveTitleText;
|
||||||
text = _t.saveTextText;
|
// text = _t.saveTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['LoadDocumentFonts']:
|
case Asc.c_oAscAsyncAction['LoadDocumentFonts']:
|
||||||
|
if ( !storeAppOptions.isDocReady ) return;
|
||||||
title = _t.loadFontsTitleText;
|
title = _t.loadFontsTitleText;
|
||||||
text = _t.loadFontsTextText;
|
// text = _t.loadFontsTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['LoadDocumentImages']:
|
case Asc.c_oAscAsyncAction['LoadDocumentImages']:
|
||||||
title = _t.loadImagesTitleText;
|
title = _t.loadImagesTitleText;
|
||||||
text = _t.loadImagesTextText;
|
// text = _t.loadImagesTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['LoadFont']:
|
case Asc.c_oAscAsyncAction['LoadFont']:
|
||||||
title = _t.loadFontTitleText;
|
title = _t.loadFontTitleText;
|
||||||
text = _t.loadFontTextText;
|
// text = _t.loadFontTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['LoadImage']:
|
case Asc.c_oAscAsyncAction['LoadImage']:
|
||||||
title = _t.loadImageTitleText;
|
title = _t.loadImageTitleText;
|
||||||
text = _t.loadImageTextText;
|
// text = _t.loadImageTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['DownloadAs']:
|
case Asc.c_oAscAsyncAction['DownloadAs']:
|
||||||
title = _t.downloadTitleText;
|
title = _t.downloadTitleText;
|
||||||
text = _t.downloadTextText;
|
// text = _t.downloadTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['Print']:
|
case Asc.c_oAscAsyncAction['Print']:
|
||||||
title = _t.printTitleText;
|
title = _t.printTitleText;
|
||||||
text = _t.printTextText;
|
// text = _t.printTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['UploadImage']:
|
case Asc.c_oAscAsyncAction['UploadImage']:
|
||||||
title = _t.uploadImageTitleText;
|
title = _t.uploadImageTitleText;
|
||||||
text = _t.uploadImageTextText;
|
// text = _t.uploadImageTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['LoadTheme']:
|
case Asc.c_oAscAsyncAction['LoadTheme']:
|
||||||
title = _t.loadThemeTitleText;
|
title = _t.loadThemeTitleText;
|
||||||
text = _t.loadThemeTextText;
|
// text = _t.loadThemeTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['ApplyChanges']:
|
case Asc.c_oAscAsyncAction['ApplyChanges']:
|
||||||
title = _t.applyChangesTitleText;
|
title = _t.applyChangesTitleText;
|
||||||
text = _t.applyChangesTextText;
|
// text = _t.applyChangesTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['PrepareToSave']:
|
case Asc.c_oAscAsyncAction['PrepareToSave']:
|
||||||
title = _t.savePreparingText;
|
title = _t.savePreparingText;
|
||||||
text = _t.savePreparingTitle;
|
// text = _t.savePreparingTitle;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['Waiting']:
|
case Asc.c_oAscAsyncAction['Waiting']:
|
||||||
title = _t.waitText;
|
title = _t.waitText;
|
||||||
text = _t.waitText;
|
// text = _t.waitText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ApplyEditRights:
|
case ApplyEditRights:
|
||||||
title = _t.txtEditingMode;
|
title = _t.txtEditingMode;
|
||||||
text = _t.txtEditingMode;
|
// text = _t.txtEditingMode;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LoadingDocument:
|
case LoadingDocument:
|
||||||
title = _t.loadingDocumentTitleText;
|
title = _t.loadingDocumentTitleText;
|
||||||
text = _t.loadingDocumentTextText;
|
// text = _t.loadingDocumentTextText;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (typeof action.id == 'string'){
|
if (typeof action.id == 'string'){
|
||||||
title = action.id;
|
title = action.id;
|
||||||
text = action.id;
|
// text = action.id;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -183,6 +186,6 @@ const LongActionsController = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
};
|
});
|
||||||
|
|
||||||
export default LongActionsController;
|
export default LongActionsController;
|
|
@ -1,10 +1,11 @@
|
||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
import { f7 } from 'framework7-react';
|
import { f7 } from 'framework7-react';
|
||||||
|
import { inject } from 'mobx-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import IrregularStack from "../../../../common/mobile/utils/IrregularStack";
|
import IrregularStack from "../../../../common/mobile/utils/IrregularStack";
|
||||||
import { Device } from '../../../../common/mobile/utils/device';
|
import { Device } from '../../../../common/mobile/utils/device';
|
||||||
|
|
||||||
const LongActionsController = () => {
|
const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => {
|
||||||
const {t} = useTranslation();
|
const {t} = useTranslation();
|
||||||
const _t = t("LongActions", { returnObjects: true });
|
const _t = t("LongActions", { returnObjects: true });
|
||||||
|
|
||||||
|
@ -77,96 +78,98 @@ const LongActionsController = () => {
|
||||||
|
|
||||||
const setLongActionView = (action) => {
|
const setLongActionView = (action) => {
|
||||||
let title = '';
|
let title = '';
|
||||||
let text = '';
|
// let text = '';
|
||||||
switch (action.id) {
|
switch (action.id) {
|
||||||
case Asc.c_oAscAsyncAction['Open']:
|
case Asc.c_oAscAsyncAction['Open']:
|
||||||
title = _t.openTitleText;
|
title = _t.textLoadingDocument;
|
||||||
text = _t.openTextText;
|
// title = _t.openTitleText;
|
||||||
|
// text = _t.openTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['Save']:
|
case Asc.c_oAscAsyncAction['Save']:
|
||||||
title = _t.saveTitleText;
|
title = _t.saveTitleText;
|
||||||
text = _t.saveTextText;
|
// text = _t.saveTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['LoadDocumentFonts']:
|
case Asc.c_oAscAsyncAction['LoadDocumentFonts']:
|
||||||
|
if ( !storeAppOptions.isDocReady ) return;
|
||||||
title = _t.loadFontsTitleText;
|
title = _t.loadFontsTitleText;
|
||||||
text = _t.loadFontsTextText;
|
// text = _t.loadFontsTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['LoadDocumentImages']:
|
case Asc.c_oAscAsyncAction['LoadDocumentImages']:
|
||||||
title = _t.loadImagesTitleText;
|
title = _t.loadImagesTitleText;
|
||||||
text = _t.loadImagesTextText;
|
// text = _t.loadImagesTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['LoadFont']:
|
case Asc.c_oAscAsyncAction['LoadFont']:
|
||||||
title = _t.loadFontTitleText;
|
title = _t.loadFontTitleText;
|
||||||
text = _t.loadFontTextText;
|
// text = _t.loadFontTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['LoadImage']:
|
case Asc.c_oAscAsyncAction['LoadImage']:
|
||||||
title = _t.loadImageTitleText;
|
title = _t.loadImageTitleText;
|
||||||
text = _t.loadImageTextText;
|
// text = _t.loadImageTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['DownloadAs']:
|
case Asc.c_oAscAsyncAction['DownloadAs']:
|
||||||
title = _t.downloadTitleText;
|
title = _t.downloadTitleText;
|
||||||
text = _t.downloadTextText;
|
// text = _t.downloadTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['Print']:
|
case Asc.c_oAscAsyncAction['Print']:
|
||||||
title = _t.printTitleText;
|
title = _t.printTitleText;
|
||||||
text = _t.printTextText;
|
// text = _t.printTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['UploadImage']:
|
case Asc.c_oAscAsyncAction['UploadImage']:
|
||||||
title = _t.uploadImageTitleText;
|
title = _t.uploadImageTitleText;
|
||||||
text = _t.uploadImageTextText;
|
// text = _t.uploadImageTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['ApplyChanges']:
|
case Asc.c_oAscAsyncAction['ApplyChanges']:
|
||||||
title = _t.applyChangesTitleText;
|
title = _t.applyChangesTitleText;
|
||||||
text = _t.applyChangesTextText;
|
// text = _t.applyChangesTextText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['PrepareToSave']:
|
case Asc.c_oAscAsyncAction['PrepareToSave']:
|
||||||
title = _t.savePreparingText;
|
title = _t.savePreparingText;
|
||||||
text = _t.savePreparingTitle;
|
// text = _t.savePreparingTitle;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['MailMergeLoadFile']:
|
case Asc.c_oAscAsyncAction['MailMergeLoadFile']:
|
||||||
title = _t.mailMergeLoadFileText;
|
title = _t.mailMergeLoadFileText;
|
||||||
text = _t.mailMergeLoadFileTitle;
|
// text = _t.mailMergeLoadFileTitle;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['DownloadMerge']:
|
case Asc.c_oAscAsyncAction['DownloadMerge']:
|
||||||
title = _t.downloadMergeTitle;
|
title = _t.downloadMergeTitle;
|
||||||
text = _t.downloadMergeText;
|
// text = _t.downloadMergeText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['SendMailMerge']:
|
case Asc.c_oAscAsyncAction['SendMailMerge']:
|
||||||
title = _t.sendMergeTitle;
|
title = _t.sendMergeTitle;
|
||||||
text = _t.sendMergeText;
|
// text = _t.sendMergeText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Asc.c_oAscAsyncAction['Waiting']:
|
case Asc.c_oAscAsyncAction['Waiting']:
|
||||||
title = _t.waitText;
|
title = _t.waitText;
|
||||||
text = _t.waitText;
|
// text = _t.waitText;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ApplyEditRights:
|
case ApplyEditRights:
|
||||||
title = _t.txtEditingMode;
|
title = _t.txtEditingMode;
|
||||||
text = _t.txtEditingMode;
|
// text = _t.txtEditingMode;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LoadingDocument:
|
case LoadingDocument:
|
||||||
title = _t.loadingDocumentTitleText;
|
title = _t.loadingDocumentTitleText;
|
||||||
text = _t.loadingDocumentTextText;
|
// text = _t.loadingDocumentTextText;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (typeof action.id == 'string'){
|
if (typeof action.id == 'string'){
|
||||||
title = action.id;
|
title = action.id;
|
||||||
text = action.id;
|
// text = action.id;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -250,6 +253,6 @@ const LongActionsController = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
};
|
});
|
||||||
|
|
||||||
export default LongActionsController;
|
export default LongActionsController;
|
Loading…
Reference in a new issue