diff --git a/apps/common/mobile/resources/less/icons.less b/apps/common/mobile/resources/less/icons.less index b55a32e480..256c8169c2 100644 --- a/apps/common/mobile/resources/less/icons.less +++ b/apps/common/mobile/resources/less/icons.less @@ -89,4 +89,28 @@ i.icon { height: 24px; .encoded-svg-mask('') } + + &.icon-info { + width: 24px; + height: 24px; + .encoded-svg-mask('', @brandColor); + } + + &.icon-help { + width: 24px; + height: 24px; + .encoded-svg-mask(''); + } + + &.icon-about { + width: 24px; + height: 24px; + .encoded-svg-mask('') + } + + &.icon-search { + width: 24px; + height: 24px; + .encoded-svg-mask(''); + } } diff --git a/apps/common/mobile/resources/less/material/icons.less b/apps/common/mobile/resources/less/material/icons.less index 9ad5d918a4..876fd11eba 100644 --- a/apps/common/mobile/resources/less/material/icons.less +++ b/apps/common/mobile/resources/less/material/icons.less @@ -67,6 +67,11 @@ height: 24px; .encoded-svg-mask(''); } + &.icon-search { + width: 24px; + height: 24px; + .encoded-svg-mask('', @toolbar-icons); + } } } } diff --git a/apps/documenteditor/mobile/src/controller/settings/Download.jsx b/apps/documenteditor/mobile/src/controller/settings/Download.jsx index 5e8321aa6b..1d64493fd5 100644 --- a/apps/documenteditor/mobile/src/controller/settings/Download.jsx +++ b/apps/documenteditor/mobile/src/controller/settings/Download.jsx @@ -24,60 +24,59 @@ class DownloadController extends Component { const storeDocumentInfo = this.props.storeDocumentInfo; const dataDoc = storeDocumentInfo.dataDoc; const fileType = dataDoc.fileType; + const options = new Asc.asc_CDownloadOptions(format); const { t } = this.props; const _t = t("Settings", { returnObjects: true }); if(/^pdf|xps|oxps|djvu$/.test(fileType)) { - if(format) { - this.closeModal(); + this.closeModal(); - if (format == Asc.c_oAscFileType.TXT || format == Asc.c_oAscFileType.RTF) { - f7.dialog.create({ - title: _t.notcriticalErrorTitle, - text: (format === Asc.c_oAscFileType.TXT) ? _t.textDownloadTxt : _t.textDownloadRtf, - buttons: [ - { - text: _t.textCancel - }, - { - text: _t.textOk, - onClick: () => { - if (format == Asc.c_oAscFileType.TXT) { - const advOptions = api.asc_getAdvancedOptions(); - Common.Notifications.trigger('openEncoding', Asc.c_oAscAdvancedOptionsID.TXT, advOptions, 2, new Asc.asc_CDownloadOptions(format)); - } else { - setTimeout(() => { - api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format)); - }, 400); - } - } - } - ], - }).open(); - } else { - f7.dialog.create({ - title: _t.notcriticalErrorTitle, - text: t('Main.warnDownloadAsPdf').replaceAll('{0}', fileType.toUpperCase()), - buttons: [ - { - text: _t.textCancel - }, - { - text: _t.textOk, - onClick: () => { - const options = new Asc.asc_CDownloadOptions(format); - options.asc_setTextParams(new AscCommon.asc_CTextParams(Asc.c_oAscTextAssociation.PlainLine)); + if(format === Asc.c_oAscFileType.PDF || format === Asc.c_oAscFileType.PDFA || format === Asc.c_oAscFileType.JPG || format === Asc.c_oAscFileType.PNG) { + options.asc_setCompatible(!!Common.Utils.InternalSettings.get("de-settings-compatible")); + api.asc_DownloadAs(options); + } else if (format === Asc.c_oAscFileType.TXT || format === Asc.c_oAscFileType.RTF) { + options.asc_setTextParams(new AscCommon.asc_CTextParams(Asc.c_oAscTextAssociation.PlainLine)); + + f7.dialog.create({ + title: _t.notcriticalErrorTitle, + text: (format === Asc.c_oAscFileType.TXT) ? _t.textDownloadTxt : _t.textDownloadRtf, + buttons: [ + { + text: _t.textCancel + }, + { + text: _t.textOk, + onClick: () => { + if (format === Asc.c_oAscFileType.TXT) { + const advOptions = api.asc_getAdvancedOptions(); + Common.Notifications.trigger('openEncoding', Asc.c_oAscAdvancedOptionsID.TXT, advOptions, 2, options); + } else { api.asc_DownloadAs(options); } } - ], - }).open(); - } + } + ], + }).open(); + } else { + f7.dialog.create({ + title: _t.notcriticalErrorTitle, + text: t('Main.warnDownloadAsPdf').replaceAll('{0}', fileType.toUpperCase()), + buttons: [ + { + text: _t.textCancel + }, + { + text: _t.textOk, + onClick: () => { + options.asc_setTextParams(new AscCommon.asc_CTextParams(Asc.c_oAscTextAssociation.PlainLine)); + api.asc_DownloadAs(options); + } + } + ], + }).open(); } } else { - setTimeout(() => { - api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format)); - }, 400); + api.asc_DownloadAs(options); } } diff --git a/apps/documenteditor/mobile/src/less/icons-ios.less b/apps/documenteditor/mobile/src/less/icons-ios.less index 81641a237a..f83e99f3e4 100644 --- a/apps/documenteditor/mobile/src/less/icons-ios.less +++ b/apps/documenteditor/mobile/src/less/icons-ios.less @@ -36,11 +36,6 @@ height: 22px; .encoded-svg-mask(''); } - &.icon-search { - width: 22px; - height: 22px; - .encoded-svg-mask(''); - } &.icon-reader { width: 22px; height: 22px; @@ -66,21 +61,6 @@ height: 22px; .encoded-svg-mask(''); } - &.icon-info { - width: 22px; - height: 22px; - .encoded-svg-mask(''); - } - &.icon-help { - width: 22px; - height: 22px; - .encoded-svg-mask(''); - } - &.icon-about { - width: 22px; - height: 22px; - .encoded-svg-mask(''); - } &.icon-navigation { width: 22px; height: 22px; diff --git a/apps/documenteditor/mobile/src/less/icons-material.less b/apps/documenteditor/mobile/src/less/icons-material.less index 9d3adb4741..0ff581567b 100644 --- a/apps/documenteditor/mobile/src/less/icons-material.less +++ b/apps/documenteditor/mobile/src/less/icons-material.less @@ -62,11 +62,6 @@ height: 24px; .encoded-svg-mask('', @toolbar-tab-normal); } - &.icon-search { - width: 24px; - height: 24px; - .encoded-svg-mask(''); - } // Reader mode &.icon-mobile-view { @@ -113,11 +108,6 @@ height: 22px; .encoded-svg-mask(''); } - &.icon-search { - width: 22px; - height: 22px; - .encoded-svg-mask(''); - } &.icon-reader { width: 22px; height: 22px; @@ -143,21 +133,6 @@ height: 22px; .encoded-svg-mask(''); } - &.icon-info { - width: 22px; - height: 22px; - .encoded-svg-mask(''); - } - &.icon-help { - width: 22px; - height: 22px; - .encoded-svg-mask(''); - } - &.icon-about { - width: 22px; - height: 22px; - .encoded-svg-mask(''); - } &.icon-table-contents { width: 24px; height: 24px; diff --git a/apps/documenteditor/mobile/src/page/main.jsx b/apps/documenteditor/mobile/src/page/main.jsx index 3fefddf8f4..96646f5be2 100644 --- a/apps/documenteditor/mobile/src/page/main.jsx +++ b/apps/documenteditor/mobile/src/page/main.jsx @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import { CSSTransition } from 'react-transition-group'; -import { f7, Link, Fab, Icon, FabButtons, FabButton, Page, View, Navbar, Subnavbar } from 'framework7-react'; +import { f7, Icon, FabButtons, FabButton, Page, View, Navbar, Subnavbar } from 'framework7-react'; import { observer, inject } from "mobx-react"; import { withTranslation } from 'react-i18next'; import EditOptions from '../view/edit/Edit'; @@ -206,7 +206,19 @@ class MainPage extends Component { {/* { Device.phone ? null : } */} - + {isFabShow && + +
this.turnOffViewerMode()}> + +
+
+ } this.handleOptionsViewClosed('snackbar')} @@ -242,19 +254,6 @@ class MainPage extends Component { !this.state.navigationVisible ? null : } - {isFabShow && - - this.turnOffViewerMode()}> - - - - } {appOptions.isDocReady && } ) diff --git a/apps/presentationeditor/mobile/src/less/icons-ios.less b/apps/presentationeditor/mobile/src/less/icons-ios.less index 9f9e775a51..04532d397c 100644 --- a/apps/presentationeditor/mobile/src/less/icons-ios.less +++ b/apps/presentationeditor/mobile/src/less/icons-ios.less @@ -1,12 +1,6 @@ // Icons .device-ios { i.icon { - &.icon-search { - width: 22px; - height: 22px; - .encoded-svg-mask(''); - } - &.icon-burger { width: 22px; height: 22px; @@ -61,12 +55,6 @@ .encoded-svg-mask(''); } - &.icon-info { - width: 22px; - height: 22px; - .encoded-svg-mask(''); - } - &.icon-plus { width: 22px; height: 22px; @@ -79,18 +67,6 @@ .encoded-svg-mask(''); } - &.icon-about { - width: 22px; - height: 22px; - .encoded-svg-mask(''); - } - - &.icon-help { - width: 22px; - height: 22px; - .encoded-svg-mask(''); - } - &.icon-feedback { width: 22px; height: 22px; diff --git a/apps/presentationeditor/mobile/src/less/icons-material.less b/apps/presentationeditor/mobile/src/less/icons-material.less index 71b95268bd..c2396a834e 100644 --- a/apps/presentationeditor/mobile/src/less/icons-material.less +++ b/apps/presentationeditor/mobile/src/less/icons-material.less @@ -13,12 +13,6 @@ .encoded-svg-mask(''); } - &.icon-search { - width: 22px; - height: 22px; - .encoded-svg-mask(''); - } - &.icon-edit { width: 22px; height: 22px; @@ -61,24 +55,6 @@ .encoded-svg-mask(''); } - &.icon-info { - width: 22px; - height: 22px; - .encoded-svg-mask(''); - } - - &.icon-about { - width: 22px; - height: 22px; - .encoded-svg-mask(''); - } - - &.icon-help { - width: 22px; - height: 22px; - .encoded-svg-mask(''); - } - &.icon-feedback { width: 22px; height: 22px; @@ -473,12 +449,6 @@ .encoded-svg-mask('', @toolbar-icons); } - &.icon-search { - width: 22px; - height: 22px; - .encoded-svg-mask('', @toolbar-icons); - } - &.icon-burger { width: 22px; height: 22px; diff --git a/apps/spreadsheeteditor/mobile/src/controller/Statusbar.jsx b/apps/spreadsheeteditor/mobile/src/controller/Statusbar.jsx index ab9a63b76e..99f57ebdc2 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/Statusbar.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/Statusbar.jsx @@ -6,21 +6,21 @@ import { f7 } from 'framework7-react'; import { useTranslation } from 'react-i18next'; import { Device } from '../../../../common/mobile/utils/device'; -const StatusbarController = inject('sheets', 'storeFocusObjects', 'users')(observer(props => { - const {sheets, storeFocusObjects, users} = props; +const StatusbarController = inject('storeWorksheets', 'storeFocusObjects', 'users')(observer(props => { + const {storeWorksheets, storeFocusObjects, users} = props; useEffect(() => { Common.Notifications.on('engineCreated', api => { api.asc_registerCallback('asc_onWorkbookLocked', (locked) => { - sheets.setWorkbookLocked(locked); + storeWorksheets.setWorkbookLocked(locked); storeFocusObjects.setIsLocked(api.asc_getCellInfo()); }); api.asc_registerCallback('asc_onWorksheetLocked', (index, locked) => { - sheets.setWorksheetLocked(index, locked); + storeWorksheets.setWorksheetLocked(index, locked); storeFocusObjects.setIsLocked(api.asc_getCellInfo()); }); api.asc_registerCallback('asc_onChangeProtectWorkbook', () => { - sheets.setProtectedWorkbook(api.asc_isProtectedWorkbook()); + storeWorksheets.setProtectedWorkbook(api.asc_isProtectedWorkbook()); }); api.asc_registerCallback('asc_onEditCell', onApiEditCell); api.asc_registerCallback('asc_onSheetsChanged', onApiSheetsChanged); @@ -35,7 +35,7 @@ const StatusbarController = inject('sheets', 'storeFocusObjects', 'users')(obser const onApiEditCell = state => { let isDisable = state !== Asc.c_oAscCellEditorState.editEnd; - sheets.setDisabledEditSheet(isDisable); + storeWorksheets.setDisabledEditSheet(isDisable); } const onApiDisconnect = () => { @@ -62,13 +62,13 @@ const StatusbarController = inject('sheets', 'storeFocusObjects', 'users')(obser items.push(tab); } - sheets.resetSheets(items); + storeWorksheets.resetSheets(items); setTimeout(() => updateTabsColors()); }; const onApiActiveSheetChanged = (index) => { - if (index < sheets.sheets.length) { - sheets.setActiveWorksheet(index); + if (index < storeWorksheets.sheets.length) { + storeWorksheets.setActiveWorksheet(index); Common.Notifications.trigger('sheet:active', index); } }; @@ -80,7 +80,7 @@ const StatusbarController = inject('sheets', 'storeFocusObjects', 'users')(obser const loadTabColor = sheetindex => { const api = Common.EditorApi.get(); - let tab = sheets.sheets.find(sheet => sheet.index === sheetindex); + let tab = storeWorksheets.sheets.find(sheet => sheet.index === sheetindex); if (tab) { setTabLineColor(tab, api.asc_getWorksheetTabColor(sheetindex)); @@ -116,7 +116,7 @@ const StatusbarController = inject('sheets', 'storeFocusObjects', 'users')(obser const updateTabsColors = () => { const api = Common.EditorApi.get(); - sheets.sheets.forEach(model => { + storeWorksheets.sheets.forEach(model => { setTabLineColor(model, api.asc_getWorksheetTabColor(model.index)); }); }; @@ -124,14 +124,14 @@ const StatusbarController = inject('sheets', 'storeFocusObjects', 'users')(obser return null; })); -const Statusbar = inject('sheets', 'storeAppOptions', 'users')(observer(props => { - const {sheets, storeAppOptions, users} = props; +const Statusbar = inject('storeWorksheets', 'storeAppOptions', 'users')(observer(props => { + const {storeWorksheets, storeAppOptions, users} = props; const {t} = useTranslation(); const _t = t('Statusbar', {returnObjects: true}); const isEdit = storeAppOptions.isEdit; const isDisconnected = users.isDisconnected; - const isProtectedWorkbook = sheets.isProtectedWorkbook; - const isDisabledEditSheet = sheets.isDisabledEditSheet; + const isProtectedWorkbook = storeWorksheets.isProtectedWorkbook; + const isDisabledEditSheet = storeWorksheets.isDisabledEditSheet; const targetRef = useRef(); useEffect(() => { @@ -147,11 +147,11 @@ const Statusbar = inject('sheets', 'storeAppOptions', 'users')(observer(props => }, []); const onTabClicked = i => { - const model = sheets.at(i); + const model = storeWorksheets.at(i); const api = Common.EditorApi.get(); api.asc_showWorksheet(model.index); - sheets.setActiveWorksheet(i); + storeWorksheets.setActiveWorksheet(i); Common.Notifications.trigger('sheet:active', model.index); }; @@ -181,7 +181,7 @@ const Statusbar = inject('sheets', 'storeAppOptions', 'users')(observer(props => const onTabClick = (i, target) => { const api = Common.EditorApi.get(); - const model = sheets.at(i); + const model = storeWorksheets.at(i); targetRef.current = target; let opened = $$('.document-menu.modal-in').length; @@ -205,9 +205,9 @@ const Statusbar = inject('sheets', 'storeAppOptions', 'users')(observer(props => const deleteWorksheet = () => { const api = Common.EditorApi.get(); - const visibleSheets = sheets.visibleWorksheets(); + const visibleSheets = storeWorksheets.visibleWorksheets(); - if (sheets.sheets.length == 1 || visibleSheets.length == 1) { + if (storeWorksheets.sheets.length == 1 || visibleSheets.length == 1) { f7.dialog.alert(_t.textErrorLastSheet, _t.notcriticalErrorTitle); } else { f7.dialog.create({ @@ -305,7 +305,7 @@ const Statusbar = inject('sheets', 'storeAppOptions', 'users')(observer(props => const hideWorksheet = (hide, index) => { const api = Common.EditorApi.get(); - const visibleSheets = sheets.visibleWorksheets(); + const visibleSheets = storeWorksheets.visibleWorksheets(); if(hide) { visibleSheets.length == 1 ? @@ -319,7 +319,7 @@ const Statusbar = inject('sheets', 'storeAppOptions', 'users')(observer(props => const onTabMenu = (event) => { const api = Common.EditorApi.get(); - let index = sheets.sheets.find(sheet => sheet.active).index; + let index = storeWorksheets.sheets.find(sheet => sheet.active).index; f7.popover.close('.document-menu.modal-in', false); @@ -385,7 +385,7 @@ const Statusbar = inject('sheets', 'storeAppOptions', 'users')(observer(props => if (arrIndex) { if(color === 'transparent') { api.asc_setWorksheetTabColor(null, arrIndex); - sheets.sheets.forEach(tab => { + storeWorksheets.sheets.forEach(tab => { if(tab.active) $$(`.sheet-tabs .tab a.tab-color-${tab.index}`).css('box-shadow', ''); }) } else { @@ -395,7 +395,7 @@ const Statusbar = inject('sheets', 'storeAppOptions', 'users')(observer(props => } } } - sheets.sheets[active_index].color = api.asc_getWorksheetTabColor(active_index); + storeWorksheets.sheets[active_index].color = api.asc_getWorksheetTabColor(active_index); } } diff --git a/apps/spreadsheeteditor/mobile/src/less/icons-ios.less b/apps/spreadsheeteditor/mobile/src/less/icons-ios.less index 90d2105428..eaada58582 100644 --- a/apps/spreadsheeteditor/mobile/src/less/icons-ios.less +++ b/apps/spreadsheeteditor/mobile/src/less/icons-ios.less @@ -2,11 +2,6 @@ .device-ios { i.icon { - &.icon-search { - width: 24px; - height: 24px; - .encoded-svg-mask(''); - } &.icon-edit-settings { width: 22px; height: 22px; @@ -37,11 +32,6 @@ height: 22px; .encoded-svg-mask(''); } - &.icon-info { - width: 22px; - height: 22px; - .encoded-svg-mask(''); - } &.icon-plus { width: 22px; height: 22px; @@ -57,16 +47,7 @@ height: 24px; .encoded-svg-mask(''); } - &.icon-about { - width: 22px; - height: 22px; - .encoded-svg-mask(''); - } - &.icon-help { - width: 22px; - height: 22px; - .encoded-svg-mask(''); - } + &.icon-feedback { width: 22px; height: 22px; diff --git a/apps/spreadsheeteditor/mobile/src/less/icons-material.less b/apps/spreadsheeteditor/mobile/src/less/icons-material.less index d69f5fd41a..6104d54d50 100644 --- a/apps/spreadsheeteditor/mobile/src/less/icons-material.less +++ b/apps/spreadsheeteditor/mobile/src/less/icons-material.less @@ -12,11 +12,6 @@ height: 17px; .encoded-svg-mask(''); } - &.icon-search { - width: 22px; - height: 22px; - .encoded-svg-mask(''); - } &.icon-edit { width: 22px; height: 22px; @@ -42,21 +37,6 @@ height: 22px; .encoded-svg-mask(''); } - &.icon-info { - width: 22px; - height: 22px; - .encoded-svg-mask(''); - } - &.icon-about { - width: 22px; - height: 22px; - .encoded-svg-mask(''); - } - &.icon-help { - width: 22px; - height: 22px; - .encoded-svg-mask(''); - } &.icon-feedback { width: 22px; height: 22px; @@ -364,11 +344,6 @@ height: 22px; .encoded-svg-mask('', @toolbar-icons); } - &.icon-search { - width: 22px; - height: 22px; - .encoded-svg-mask('', @toolbar-icons); - } &.icon-burger { width: 22px; height: 22px; diff --git a/apps/spreadsheeteditor/mobile/src/store/mainStore.js b/apps/spreadsheeteditor/mobile/src/store/mainStore.js index 33fe3da4ab..f0000a2f2d 100644 --- a/apps/spreadsheeteditor/mobile/src/store/mainStore.js +++ b/apps/spreadsheeteditor/mobile/src/store/mainStore.js @@ -24,7 +24,6 @@ export const stores = { storeSpreadsheetSettings: new storeSpreadsheetSettings(), storeApplicationSettings: new storeApplicationSettings(), users: new storeUsers(), - sheets: new storeWorksheets(), storeFunctions: new storeFunctions(), storeTextSettings: new storeTextSettings(), storeSpreadsheetInfo: new storeSpreadsheetInfo(), diff --git a/apps/spreadsheeteditor/mobile/src/view/Statusbar.jsx b/apps/spreadsheeteditor/mobile/src/view/Statusbar.jsx index 6f310dc078..a26d316ed3 100644 --- a/apps/spreadsheeteditor/mobile/src/view/Statusbar.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/Statusbar.jsx @@ -81,7 +81,7 @@ const PageAllList = observer((props) => { ) }); -const PageCustomTabColor = inject("storePalette")(observer (props => { +const PageCustomTabColor = inject("storePalette")(observer (props => { const { t } = useTranslation(); const _t = t('View.Edit', {returnObjects: true}); @@ -106,7 +106,7 @@ const PageCustomTabColor = inject("storePalette")(observer (props => { ) })); -const PageTabColor = inject("storePalette")(observer(props => { +const PageTabColor = inject("storePalette")(observer(props => { const { t } = useTranslation(); const {sheets, allSheets = sheets.sheets} = props; const storePalette = props.storePalette; @@ -180,19 +180,19 @@ const PopoverAllList = (props) => { ) }; -const StatusbarView = inject('storeAppOptions', 'sheets', 'users')(observer(props => { +const StatusbarView = inject('storeAppOptions', 'storeWorksheets', 'users')(observer(props => { const { t } = useTranslation(); const _t = t('Statusbar', {returnObjects: true}); const isAndroid = Device.android; const isPhone = Device.isPhone; - const {sheets, storeAppOptions, users} = props; - const allSheets = sheets.sheets; - const hiddenSheets = sheets.hiddenWorksheets(); - const isWorkbookLocked = sheets.isWorkbookLocked; - const isProtectedWorkbook = sheets.isProtectedWorkbook; + const {storeWorksheets, storeAppOptions, users} = props; + const allSheets = storeWorksheets.sheets; + const hiddenSheets = storeWorksheets.hiddenWorksheets(); + const isWorkbookLocked = storeWorksheets.isWorkbookLocked; + const isProtectedWorkbook = storeWorksheets.isProtectedWorkbook; const isEdit = storeAppOptions.isEdit; const isDisconnected = users.isDisconnected; - const isDisabledEditSheet = sheets.isDisabledEditSheet; + const isDisabledEditSheet = storeWorksheets.isDisabledEditSheet; return ( @@ -264,18 +264,18 @@ const StatusbarView = inject('storeAppOptions', 'sheets', 'users')(observer(prop ) : null} { - + } {isPhone ?
- +
: - + } { isPhone ? @@ -286,13 +286,13 @@ const StatusbarView = inject('storeAppOptions', 'sheets', 'users')(observer(prop $$('.statusbar').css('top', '0%'); }}> - + : - + }