From 11fa9c82694accaf6944aeef9af6298e7fea788c Mon Sep 17 00:00:00 2001 From: nikita_bartoshuk Date: Thu, 12 Mar 2026 23:39:45 +0300 Subject: [PATCH 01/10] added DE save btns --- apps/documenteditor/mobile/locale/en.json | 2 + .../mobile/src/controller/Main.jsx | 4 + .../src/controller/settings/Settings.jsx | 6 + .../mobile/src/store/appOptions.js | 8 + .../mobile/src/view/settings/SettingsPage.jsx | 258 ++++++++++-------- 5 files changed, 161 insertions(+), 117 deletions(-) diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json index 5b487e3736..9ca424c1f7 100644 --- a/apps/documenteditor/mobile/locale/en.json +++ b/apps/documenteditor/mobile/locale/en.json @@ -744,6 +744,8 @@ "textFind": "Find", "textFindAndReplace": "Find and Replace", "textFindAndReplaceAll": "Find and Replace All", + "textSaveDocument": "Save", + "textAutoSaveDocument": "Autosave", "textFormat": "Format", "textHelp": "Help", "textHiddenTableBorders": "Hidden Table Borders", diff --git a/apps/documenteditor/mobile/src/controller/Main.jsx b/apps/documenteditor/mobile/src/controller/Main.jsx index 9a2d6e9a1e..5ae8a6b95d 100644 --- a/apps/documenteditor/mobile/src/controller/Main.jsx +++ b/apps/documenteditor/mobile/src/controller/Main.jsx @@ -382,6 +382,10 @@ class MainController extends Component { this.updateWindowTitle(true); + value = LocalStorage.getBool("de-mobile-autosave"); + appOptions.changeAutosave(LocalStorage.itemExists('de-mobile-autosave') ? value : true); + this.api.asc_setAutoSaveGap(LocalStorage.itemExists('de-mobile-autosave') ? parseInt(LocalStorage.getItem("de-mobile-autosave")) : 1); + value = LocalStorage.getBool("de-mobile-no-characters"); appSettings.changeNoCharacters(value); this.api.put_ShowParaMarks(value); diff --git a/apps/documenteditor/mobile/src/controller/settings/Settings.jsx b/apps/documenteditor/mobile/src/controller/settings/Settings.jsx index 46c9b564d4..2c8a837456 100644 --- a/apps/documenteditor/mobile/src/controller/settings/Settings.jsx +++ b/apps/documenteditor/mobile/src/controller/settings/Settings.jsx @@ -191,6 +191,11 @@ const SettingsController = props => { Common.Notifications.trigger('markfavorite', !isFavorite); }; + const switchAutosave = (value) => { + LocalStorage.setBool("de-mobile-autosave", value); + Common.EditorApi.get().asc_setAutoSaveGap(parseInt(LocalStorage.getItem("de-mobile-autosave"))); + }; + const saveAsPdf = () => { const api = Common.EditorApi.get(); @@ -221,6 +226,7 @@ const SettingsController = props => { closeModal, clearAllFields, toggleFavorite, + switchAutosave, saveAsPdf, submitForm }}> diff --git a/apps/documenteditor/mobile/src/store/appOptions.js b/apps/documenteditor/mobile/src/store/appOptions.js index 39fc562443..1696dff35a 100644 --- a/apps/documenteditor/mobile/src/store/appOptions.js +++ b/apps/documenteditor/mobile/src/store/appOptions.js @@ -46,6 +46,9 @@ export class storeAppOptions { isFavorite: observable, setFavorite: action, + isAutosave: observable, + changeAutosave: action, + customization: observable, }); } @@ -110,6 +113,11 @@ export class storeAppOptions { this.isDocReady = value; } + isAutosave = true; + changeAutosave (value) { + this.isAutosave = value; + } + config = {}; customization; diff --git a/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx b/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx index a246bf64ae..160ca7ac18 100644 --- a/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx +++ b/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx @@ -67,6 +67,7 @@ const SettingsPage = inject("storeAppOptions", "storeReview", "storeDocumentInfo const canUseHistory = appOptions.canUseHistory; const gobackTitle = appOptions.customization?.goback?.text || _t.textOpenLocation; const isShowBack = props.storeToolbarSettings.isShowBack; + const isAutosave = appOptions.isAutosave; let _isEdit = false, _canDownload = false, @@ -104,131 +105,154 @@ const SettingsPage = inject("storeAppOptions", "storeReview", "storeDocumentInfo return ( {navbar} - - {isShowBack && - Common.Notifications.trigger('goback')}> + <> + + {isShowBack && + Common.Notifications.trigger('goback')}> + {Device.ios ? + : + + } + + } + {isEditableForms ? [ + (isFavorite !== undefined && isFavorite !== null ? + + {isFavorite ? + + : + + } + + : ''), + + + + ] : null} + + {Device.ios ? + : + + } + { + appOptions.changeAutosave(!isAutosave); + settingsContext.switchAutosave(!isAutosave); + }} + /> + + Common.Notifications.trigger('goback')}> {Device.ios ? : } - } - {isEditableForms ? [ - (isFavorite !== undefined && isFavorite !== null ? - - {isFavorite ? - - : - + + + {(Device.phone || isEditableForms) && + + + + } + {(_isEdit && canProtect) && + + + + } + {_isEdit && !isHistoryDisabled && canUseHistory && + { + if(Device.phone) { + onOpenOptions('history'); + } + }}> + + + } + {!isEditableForms ? + { + if(Device.phone) { + onOpenOptions('navigation'); + } + }}> + + + : null} + {window.matchMedia("(max-width: 359px)").matches ? + { + onOpenOptions('coauth'); + }} className='no-indicator'> + + + : null} + {Device.sailfish && _isEdit && + settingsContext.onOrthographyCheck()} className='no-indicator' link="#"> + + + } + {(appOptions.isMobileViewAvailable && ((Device.phone && !isViewer) || isEditableForms)) && + + + { + onOpenOptions('snackbar'); + settingsContext.onChangeMobileView(); + }} /> + + } + {(_isEdit && !isViewer) && + + + + } + + + + {_canDownload && + + {isEditableForms ? + : + } - : ''), - - - - ] : null} - {(Device.phone || isEditableForms) && - - - - } - {(_isEdit && canProtect) && - - - - } - {_isEdit && !isHistoryDisabled && canUseHistory && - { - if(Device.phone) { - onOpenOptions('history'); - } - }}> - - - } - {!isEditableForms ? - { - if(Device.phone) { - onOpenOptions('navigation'); - } - }}> - - - : null} - {window.matchMedia("(max-width: 359px)").matches ? - { - onOpenOptions('coauth'); - }} className='no-indicator'> - - - : null} - {Device.sailfish && _isEdit && - settingsContext.onOrthographyCheck()} className='no-indicator' link="#"> - - - } - {(appOptions.isMobileViewAvailable && ((Device.phone && !isViewer) || isEditableForms)) && - - - { - onOpenOptions('snackbar'); - settingsContext.onChangeMobileView(); - }} /> - - } - {(_isEdit && !isViewer) && - - - - } - - - - {_canDownload && - - {isEditableForms ? - : + } + {_canDownloadOrigin && + - } - - } - {_canDownloadOrigin && - - - - } - {_canPrint && - - - - } - {!(!_canDisplayInfo && isBranding) && - - - - } - {_canHelp && - - - - } - {_canAbout && - - - - } - {_canFeedback && - - {Device.ios ? - : - - } - - } - {canCloseEditor && - Common.Notifications.trigger('close')}> - } - + + } + {_canPrint && + + + + } + {!(!_canDisplayInfo && isBranding) && + + + + } + {_canHelp && + + + + } + {_canAbout && + + + + } + {_canFeedback && + + {Device.ios ? + : + + } + + } + {canCloseEditor && + Common.Notifications.trigger('close')}> + } + + + ) })); From cfd5880ddfe7f0b6e4876422919ab80c3dd77472 Mon Sep 17 00:00:00 2001 From: nikita_bartoshuk Date: Thu, 19 Mar 2026 18:03:11 +0300 Subject: [PATCH 02/10] added functionality in DE --- .../collaboration/Collaboration.jsx | 7 +-- .../resources/less/colors-table-dark.less | 1 + .../mobile/resources/less/colors-table.less | 2 + .../mobile/resources/less/common-ios.less | 10 +++++ .../resources/less/common-material.less | 8 ++++ apps/common/mobile/resources/less/common.less | 29 ++++++++++++ apps/documenteditor/mobile/locale/en.json | 3 +- .../mobile/src/controller/LongActions.jsx | 8 +++- .../mobile/src/controller/Main.jsx | 14 +++++- .../mobile/src/controller/Toolbar.jsx | 1 + .../src/controller/settings/Settings.jsx | 6 +++ .../mobile/src/store/appOptions.js | 16 +++++++ .../mobile/src/view/Toolbar.jsx | 2 +- .../mobile/src/view/settings/SettingsPage.jsx | 45 +++++++++++-------- 14 files changed, 124 insertions(+), 28 deletions(-) diff --git a/apps/common/mobile/lib/controller/collaboration/Collaboration.jsx b/apps/common/mobile/lib/controller/collaboration/Collaboration.jsx index f7eee5b16d..a9a444b2d9 100644 --- a/apps/common/mobile/lib/controller/collaboration/Collaboration.jsx +++ b/apps/common/mobile/lib/controller/collaboration/Collaboration.jsx @@ -43,9 +43,9 @@ class CollaborationController extends Component { } } else if (!appOptions.isEdit && appOptions.isRestrictedEdit) { isFastCoauth = true; - api.asc_SetFastCollaborative(isFastCoauth); + api.asc_SetFastCollaborative(LocalStorage.itemExists('de-mobile-autosave') ? LocalStorage.getBool("de-mobile-autosave") : true); window.editorType === 'de' && api.SetCollaborativeMarksShowType(Asc.c_oAscCollaborativeMarksShowType.None); - api.asc_setAutoSaveGap(1); + api.asc_setAutoSaveGap(LocalStorage.itemExists('de-mobile-autosave') ? parseInt(LocalStorage.getItem("de-mobile-autosave")) : 1); } else if (appOptions.canLiveView) { // viewer isFastCoauth = !(appOptions.config.coEditing && appOptions.config.coEditing.mode==='strict'); api.asc_SetFastCollaborative(isFastCoauth); @@ -65,7 +65,8 @@ class CollaborationController extends Component { value = isFastCoauth; // Common.localStorage.getItem("de-settings-autosave"); value = (!isFastCoauth && value !== null) ? parseInt(value) : (appOptions.canCoAuthoring ? 1 : 0); } - api.asc_setAutoSaveGap(value); + api.asc_SetFastCollaborative(value ? (LocalStorage.itemExists('de-mobile-autosave') ? LocalStorage.getBool("de-mobile-autosave") : true) : false); + api.asc_setAutoSaveGap(value ? (LocalStorage.itemExists('de-mobile-autosave') ? parseInt(LocalStorage.getItem("de-mobile-autosave")) : 1) : 0); } /** coauthoring end **/ } diff --git a/apps/common/mobile/resources/less/colors-table-dark.less b/apps/common/mobile/resources/less/colors-table-dark.less index c1e3e859d3..e6a71f4b2f 100644 --- a/apps/common/mobile/resources/less/colors-table-dark.less +++ b/apps/common/mobile/resources/less/colors-table-dark.less @@ -6,6 +6,7 @@ --background-tertiary: #131313; --background-menu-divider: fade(#545458, 50%); --background-button: #333333; + --background-notification-badge: #F4D804; --text-normal: fade(#FFF, 87%); --text-secondary: fade(#FFF, 60%); diff --git a/apps/common/mobile/resources/less/colors-table.less b/apps/common/mobile/resources/less/colors-table.less index da8490f437..6552359df0 100644 --- a/apps/common/mobile/resources/less/colors-table.less +++ b/apps/common/mobile/resources/less/colors-table.less @@ -14,6 +14,7 @@ --background-tertiary: #EFF0F5; --background-menu-divider: fade(#3C3C43, 15%); --background-button: #EFF0F5; + --background-notification-badge: #F4D804; --text-normal: #000000; --text-secondary: fade(#000, 60%); @@ -97,6 +98,7 @@ @background-tertiary: var(--background-tertiary); @background-menu-divider: var(--background-menu-divider); @background-button: var(--background-button); +@background-notification-badge: var(--background-notification-badge); @text-normal: var(--text-normal); @text-secondary: var(--text-secondary); diff --git a/apps/common/mobile/resources/less/common-ios.less b/apps/common/mobile/resources/less/common-ios.less index b6db7dd911..a308fa9a63 100644 --- a/apps/common/mobile/resources/less/common-ios.less +++ b/apps/common/mobile/resources/less/common-ios.less @@ -92,6 +92,16 @@ } } + .title { + .subtitle { + color: inherit; + margin-bottom: 16px; + margin-top: -10px; + font-size: 12px; + color: @text-secondary; + } + } + .subnavbar { .icon-back { color: @brandColor; diff --git a/apps/common/mobile/resources/less/common-material.less b/apps/common/mobile/resources/less/common-material.less index 5bd1b63f51..cb7008c9f5 100644 --- a/apps/common/mobile/resources/less/common-material.less +++ b/apps/common/mobile/resources/less/common-material.less @@ -440,6 +440,14 @@ } } + .title { + .subtitle { + color: inherit; + margin-bottom: 5px; + margin-top: 3px; + } + } + .subnavbar .title { font-size: 14px; font-weight: normal; diff --git a/apps/common/mobile/resources/less/common.less b/apps/common/mobile/resources/less/common.less index 0415edf2bc..286239cdcb 100644 --- a/apps/common/mobile/resources/less/common.less +++ b/apps/common/mobile/resources/less/common.less @@ -83,6 +83,20 @@ .icon-back { color: @toolbar-icons; } + .link { + &.notify { + &::before { + content: ' '; + position: absolute; + width: 10px; + height: 10px; + bottom: 8px; + right: 10px; + background-color: @background-notification-badge; + border-radius: 6px; + } + } + } } .page.page-with-subnavbar { @@ -153,6 +167,21 @@ } } } + + &.notify { + .item-media { + &::before { + content: ' '; + position: absolute; + width: 10px; + height: 10px; + bottom: 8px; + right: 1px; + background-color: @background-notification-badge; + border-radius: 6px; + } + } + } } .item-text { text-overflow: initial; diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json index 9ca424c1f7..d1131fbc90 100644 --- a/apps/documenteditor/mobile/locale/en.json +++ b/apps/documenteditor/mobile/locale/en.json @@ -533,7 +533,8 @@ "txtEditingMode": "Set editing mode...", "uploadImageTextText": "Uploading image...", "uploadImageTitleText": "Uploading Image", - "waitText": "Please, wait..." + "waitText": "Please, wait...", + "changesSaved": "All changes saved" }, "Main": { "criticalErrorTitle": "Error", diff --git a/apps/documenteditor/mobile/src/controller/LongActions.jsx b/apps/documenteditor/mobile/src/controller/LongActions.jsx index 0842b121e1..7a5973c8bc 100644 --- a/apps/documenteditor/mobile/src/controller/LongActions.jsx +++ b/apps/documenteditor/mobile/src/controller/LongActions.jsx @@ -87,12 +87,14 @@ const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => { } if (id===Asc.c_oAscAsyncAction['Submit'] && !submitFail) { Common.Gateway.submitForm(); + } else if ((id==Asc.c_oAscAsyncAction['Save'] || id==Asc.c_oAscAsyncAction['ForceSaveButton'])) { + storeAppOptions.changeSavingDocStatusText(_t.changesSaved) } }; const setLongActionView = (action) => { let title = ''; - // let text = ''; + let text = ''; switch (action.id) { case Asc.c_oAscAsyncAction['Open']: @@ -103,7 +105,7 @@ const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => { case Asc.c_oAscAsyncAction['Save']: title = _t.saveTitleText; - // text = _t.saveTextText; + text = _t.saveTextText; break; case Asc.c_oAscAsyncAction['LoadDocumentFonts']: @@ -205,6 +207,8 @@ const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => { } else { loadMask = f7.dialog.preloader(title); } + } else { + storeAppOptions.changeSavingDocStatusText(text); } }; diff --git a/apps/documenteditor/mobile/src/controller/Main.jsx b/apps/documenteditor/mobile/src/controller/Main.jsx index 5ae8a6b95d..bf00015e71 100644 --- a/apps/documenteditor/mobile/src/controller/Main.jsx +++ b/apps/documenteditor/mobile/src/controller/Main.jsx @@ -384,7 +384,6 @@ class MainController extends Component { value = LocalStorage.getBool("de-mobile-autosave"); appOptions.changeAutosave(LocalStorage.itemExists('de-mobile-autosave') ? value : true); - this.api.asc_setAutoSaveGap(LocalStorage.itemExists('de-mobile-autosave') ? parseInt(LocalStorage.getItem("de-mobile-autosave")) : 1); value = LocalStorage.getBool("de-mobile-no-characters"); appSettings.changeNoCharacters(value); @@ -642,6 +641,7 @@ class MainController extends Component { this.api.asc_registerCallback('asc_onDocumentModifiedChanged', this.onDocumentModifiedChanged.bind(this)); this.api.asc_registerCallback('asc_onDocumentCanSaveChanged', this.onDocumentCanSaveChanged.bind(this)); + this.api.asc_registerCallback('asc_onCollaborativeChanges', this.onCollaborativeChanges.bind(this)); Common.Notifications.trigger('preloader:close'); Common.Notifications.trigger('preloader:endAction', Asc.c_oAscAsyncActionType['BlockInteraction'], this.ApplyEditRights); @@ -665,7 +665,14 @@ class MainController extends Component { } onDocumentCanSaveChanged (isCanSave) { - // + const storeAppOptions = this.props.storeAppOptions; + storeAppOptions.changeIsSaveBadgeShown(isCanSave); + } + + onCollaborativeChanges () { + const storeAppOptions = this.props.storeAppOptions; + if (!storeAppOptions.isSaveBadgeShown) storeAppOptions.changeIsSaveBadgeShown(true); + storeAppOptions.changeSavingDocStatusText(''); } onBeforeUnload () { @@ -1453,6 +1460,9 @@ class MainController extends Component { window.document.title = title; } + if (isModified) + this.props.storeAppOptions.changeSavingDocStatusText(''); + this._isDocReady && (this._state.isDocModified !== isModified) && Common.Gateway.setDocumentModified(isModified); this._state.isDocModified = isModified; } diff --git a/apps/documenteditor/mobile/src/controller/Toolbar.jsx b/apps/documenteditor/mobile/src/controller/Toolbar.jsx index 1ff6548bcd..6808c15f5f 100644 --- a/apps/documenteditor/mobile/src/controller/Toolbar.jsx +++ b/apps/documenteditor/mobile/src/controller/Toolbar.jsx @@ -465,6 +465,7 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeReview', 'sto canSubmitForms={appOptions.canSubmitForms} forceDesktopMode={forceDesktopMode} isHiddenFileName={appOptions.config?.customization?.toolbarHideFileName ?? false} + isSaveBadgeShown={appOptions.isSaveBadgeShown} /> ) })); diff --git a/apps/documenteditor/mobile/src/controller/settings/Settings.jsx b/apps/documenteditor/mobile/src/controller/settings/Settings.jsx index 2c8a837456..d0b181931d 100644 --- a/apps/documenteditor/mobile/src/controller/settings/Settings.jsx +++ b/apps/documenteditor/mobile/src/controller/settings/Settings.jsx @@ -193,9 +193,14 @@ const SettingsController = props => { const switchAutosave = (value) => { LocalStorage.setBool("de-mobile-autosave", value); + Common.EditorApi.get().asc_SetFastCollaborative(LocalStorage.getBool("de-mobile-autosave")); Common.EditorApi.get().asc_setAutoSaveGap(parseInt(LocalStorage.getItem("de-mobile-autosave"))); }; + const tryToSave = () => { + Common.EditorApi.get().asc_Save(); + }; + const saveAsPdf = () => { const api = Common.EditorApi.get(); @@ -227,6 +232,7 @@ const SettingsController = props => { clearAllFields, toggleFavorite, switchAutosave, + tryToSave, saveAsPdf, submitForm }}> diff --git a/apps/documenteditor/mobile/src/store/appOptions.js b/apps/documenteditor/mobile/src/store/appOptions.js index 1696dff35a..244ec56863 100644 --- a/apps/documenteditor/mobile/src/store/appOptions.js +++ b/apps/documenteditor/mobile/src/store/appOptions.js @@ -49,6 +49,12 @@ export class storeAppOptions { isAutosave: observable, changeAutosave: action, + isSaveBadgeShown: observable, + changeIsSaveBadgeShown: action, + + savingDocStatusText: observable, + changeSavingDocStatusText: action, + customization: observable, }); } @@ -118,6 +124,16 @@ export class storeAppOptions { this.isAutosave = value; } + isSaveBadgeShown = false; + changeIsSaveBadgeShown (value) { + this.isSaveBadgeShown = value; + } + + savingDocStatusText = ''; + changeSavingDocStatusText (value) { + this.savingDocStatusText = value; + } + config = {}; customization; diff --git a/apps/documenteditor/mobile/src/view/Toolbar.jsx b/apps/documenteditor/mobile/src/view/Toolbar.jsx index b821a9c031..8be7619889 100644 --- a/apps/documenteditor/mobile/src/view/Toolbar.jsx +++ b/apps/documenteditor/mobile/src/view/Toolbar.jsx @@ -134,7 +134,7 @@ const ToolbarView = props => { : null), - props.openOptions('settings')}> + props.openOptions('settings')}> {Device.ios ? : diff --git a/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx b/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx index 160ca7ac18..132020fafe 100644 --- a/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx +++ b/apps/documenteditor/mobile/src/view/settings/SettingsPage.jsx @@ -46,7 +46,10 @@ const SettingsPage = inject("storeAppOptions", "storeReview", "storeDocumentInfo const isHistoryDisabled = docExt && (docExt === 'xps' || docExt === 'djvu' || docExt === 'pdf'); const navbar = -
{docTitle}
+
+ {docTitle} + {appOptions.savingDocStatusText} +
{Device.phone && {_t.textDone}}
; const isSignatureForm = props.storeToolbarSettings.isSignatureForm; @@ -129,24 +132,28 @@ const SettingsPage = inject("storeAppOptions", "storeReview", "storeDocumentInfo ] : null} - - {Device.ios ? - : - - } - { - appOptions.changeAutosave(!isAutosave); - settingsContext.switchAutosave(!isAutosave); - }} - /> - - Common.Notifications.trigger('goback')}> - {Device.ios ? - : - - } - + {!appOptions.canLiveView && + + {Device.ios ? + : + + } + { + appOptions.changeAutosave(!isAutosave); + settingsContext.switchAutosave(!isAutosave); + }} + /> + + } + {!appOptions.canLiveView && + + {Device.ios ? + : + + } + + } {(Device.phone || isEditableForms) && From b3e25f30b4c86de157a15628e6e0c3a3a703e4e6 Mon Sep 17 00:00:00 2001 From: nikita_bartoshuk Date: Fri, 20 Mar 2026 18:11:02 +0300 Subject: [PATCH 03/10] added functionality to the rest editors --- .../collaboration/Collaboration.jsx | 8 +- apps/presentationeditor/mobile/locale/en.json | 5 +- .../mobile/src/controller/LongActions.jsx | 10 +- .../mobile/src/controller/Main.jsx | 16 +- .../mobile/src/controller/Toolbar.jsx | 1 + .../src/controller/settings/Settings.jsx | 15 +- .../mobile/src/store/appOptions.js | 24 +++ .../mobile/src/view/Toolbar.jsx | 2 +- .../mobile/src/view/settings/SettingsPage.jsx | 188 ++++++++++-------- apps/spreadsheeteditor/mobile/locale/en.json | 5 +- .../mobile/src/controller/LongActions.jsx | 10 +- .../mobile/src/controller/Main.jsx | 16 +- .../mobile/src/controller/Toolbar.jsx | 1 + .../src/controller/settings/Settings.jsx | 15 +- .../mobile/src/store/appOptions.js | 24 +++ .../mobile/src/view/Toolbar.jsx | 2 +- .../mobile/src/view/settings/SettingsPage.jsx | 188 ++++++++++-------- 17 files changed, 356 insertions(+), 174 deletions(-) diff --git a/apps/common/mobile/lib/controller/collaboration/Collaboration.jsx b/apps/common/mobile/lib/controller/collaboration/Collaboration.jsx index a9a444b2d9..0345ef04d8 100644 --- a/apps/common/mobile/lib/controller/collaboration/Collaboration.jsx +++ b/apps/common/mobile/lib/controller/collaboration/Collaboration.jsx @@ -43,9 +43,9 @@ class CollaborationController extends Component { } } else if (!appOptions.isEdit && appOptions.isRestrictedEdit) { isFastCoauth = true; - api.asc_SetFastCollaborative(LocalStorage.itemExists('de-mobile-autosave') ? LocalStorage.getBool("de-mobile-autosave") : true); + api.asc_SetFastCollaborative(LocalStorage.itemExists(`${window.editorType}-mobile-autosave`) ? LocalStorage.getBool(`${window.editorType}-mobile-autosave`) : true); window.editorType === 'de' && api.SetCollaborativeMarksShowType(Asc.c_oAscCollaborativeMarksShowType.None); - api.asc_setAutoSaveGap(LocalStorage.itemExists('de-mobile-autosave') ? parseInt(LocalStorage.getItem("de-mobile-autosave")) : 1); + api.asc_setAutoSaveGap(LocalStorage.itemExists(`${window.editorType}-mobile-autosave`) ? parseInt(LocalStorage.getItem(`${window.editorType}-mobile-autosave`)) : 1); } else if (appOptions.canLiveView) { // viewer isFastCoauth = !(appOptions.config.coEditing && appOptions.config.coEditing.mode==='strict'); api.asc_SetFastCollaborative(isFastCoauth); @@ -65,8 +65,8 @@ class CollaborationController extends Component { value = isFastCoauth; // Common.localStorage.getItem("de-settings-autosave"); value = (!isFastCoauth && value !== null) ? parseInt(value) : (appOptions.canCoAuthoring ? 1 : 0); } - api.asc_SetFastCollaborative(value ? (LocalStorage.itemExists('de-mobile-autosave') ? LocalStorage.getBool("de-mobile-autosave") : true) : false); - api.asc_setAutoSaveGap(value ? (LocalStorage.itemExists('de-mobile-autosave') ? parseInt(LocalStorage.getItem("de-mobile-autosave")) : 1) : 0); + api.asc_SetFastCollaborative(value ? (LocalStorage.itemExists(`${window.editorType}-mobile-autosave`) ? LocalStorage.getBool(`${window.editorType}-mobile-autosave`) : true) : false); + api.asc_setAutoSaveGap(value ? (LocalStorage.itemExists(`${window.editorType}-mobile-autosave`) ? parseInt(LocalStorage.getItem(`${window.editorType}-mobile-autosave`)) : 1) : 0); } /** coauthoring end **/ } diff --git a/apps/presentationeditor/mobile/locale/en.json b/apps/presentationeditor/mobile/locale/en.json index 561114ac87..687b0c4ceb 100644 --- a/apps/presentationeditor/mobile/locale/en.json +++ b/apps/presentationeditor/mobile/locale/en.json @@ -278,7 +278,8 @@ "txtEditingMode": "Set editing mode...", "uploadImageTextText": "Uploading image...", "uploadImageTitleText": "Uploading Image", - "waitText": "Please, wait..." + "waitText": "Please, wait...", + "changesSaved": "All changes saved" }, "Toolbar": { "btnRestartNow": "Restart now", @@ -543,6 +544,8 @@ "textFind": "Find", "textFindAndReplace": "Find and Replace", "textFindAndReplaceAll": "Find and Replace All", + "textSaveDocument": "Save", + "textAutoSaveDocument": "Autosave", "textHelp": "Help", "textHighlight": "Highlight Results", "textInch": "Inch", diff --git a/apps/presentationeditor/mobile/src/controller/LongActions.jsx b/apps/presentationeditor/mobile/src/controller/LongActions.jsx index 346764ff5b..925a9cb901 100644 --- a/apps/presentationeditor/mobile/src/controller/LongActions.jsx +++ b/apps/presentationeditor/mobile/src/controller/LongActions.jsx @@ -79,11 +79,15 @@ const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => { f7.dialog.close(loadMask.el) : f7.dialog.close($$('.dialog-preloader')); } + + if ((id==Asc.c_oAscAsyncAction['Save'] || id==Asc.c_oAscAsyncAction['ForceSaveButton'])) { + storeAppOptions.changeSavingDocStatusText(_t.changesSaved) + } }; const setLongActionView = (action) => { let title = ''; - // let text = ''; + let text = ''; switch (action.id) { case Asc.c_oAscAsyncAction['Open']: title = _t.textLoadingDocument; @@ -93,7 +97,7 @@ const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => { case Asc.c_oAscAsyncAction['Save']: title = _t.saveTitleText; - // text = _t.saveTextText; + text = _t.saveTextText; break; case Asc.c_oAscAsyncAction['LoadDocumentFonts']: @@ -181,6 +185,8 @@ const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => { } else { loadMask = f7.dialog.preloader(title); } + } else { + storeAppOptions.changeSavingDocStatusText(text); } }; diff --git a/apps/presentationeditor/mobile/src/controller/Main.jsx b/apps/presentationeditor/mobile/src/controller/Main.jsx index 17929691ca..3526b9b5e6 100644 --- a/apps/presentationeditor/mobile/src/controller/Main.jsx +++ b/apps/presentationeditor/mobile/src/controller/Main.jsx @@ -326,6 +326,7 @@ class MainController extends Component { this.api.asc_registerCallback('asc_onDocumentModifiedChanged', this.onDocumentModifiedChanged.bind(this)); this.api.asc_registerCallback('asc_onDocumentCanSaveChanged', this.onDocumentCanSaveChanged.bind(this)); + this.api.asc_registerCallback('asc_onCollaborativeChanges', this.onCollaborativeChanges.bind(this)); Common.Notifications.trigger('preloader:close'); Common.Notifications.trigger('preloader:endAction', Asc.c_oAscAsyncActionType['BlockInteraction'], this.ApplyEditRights); @@ -379,7 +380,14 @@ class MainController extends Component { } onDocumentCanSaveChanged (isCanSave) { - // + const storeAppOptions = this.props.storeAppOptions; + storeAppOptions.changeIsSaveBadgeShown(isCanSave); + } + + onCollaborativeChanges () { + const storeAppOptions = this.props.storeAppOptions; + if (!storeAppOptions.isSaveBadgeShown) storeAppOptions.changeIsSaveBadgeShown(true); + storeAppOptions.changeSavingDocStatusText(''); } onBeforeUnload () { @@ -582,6 +590,9 @@ class MainController extends Component { appSettings.changeSpellCheck(value); this.api.asc_setSpellCheck(value); + value = LocalStorage.getBool("pe-mobile-autosave"); + appOptions.changeAutosave(LocalStorage.itemExists('pe-mobile-autosave') ? value : true); + this.updateWindowTitle(true); if (appOptions.isEdit && this.needToUpdateVersion) { @@ -883,6 +894,9 @@ class MainController extends Component { window.document.title = title; } + if (isModified) + this.props.storeAppOptions.changeSavingDocStatusText(''); + this._isDocReady && (this._state.isDocModified !== isModified) && Common.Gateway.setDocumentModified(isModified); this._state.isDocModified = isModified; } diff --git a/apps/presentationeditor/mobile/src/controller/Toolbar.jsx b/apps/presentationeditor/mobile/src/controller/Toolbar.jsx index aab03127f2..cd149160fc 100644 --- a/apps/presentationeditor/mobile/src/controller/Toolbar.jsx +++ b/apps/presentationeditor/mobile/src/controller/Toolbar.jsx @@ -296,6 +296,7 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeFocusObjects' changeTitleHandler={changeTitleHandler} forceDesktopMode={forceDesktopMode} isHiddenFileName={appOptions.config?.customization?.toolbarHideFileName ?? false} + isSaveBadgeShown={appOptions.isSaveBadgeShown} /> ) })); diff --git a/apps/presentationeditor/mobile/src/controller/settings/Settings.jsx b/apps/presentationeditor/mobile/src/controller/settings/Settings.jsx index f9b69b9f23..41325f6902 100644 --- a/apps/presentationeditor/mobile/src/controller/settings/Settings.jsx +++ b/apps/presentationeditor/mobile/src/controller/settings/Settings.jsx @@ -4,6 +4,7 @@ import SettingsView from '../../view/settings/Settings'; import { f7 } from 'framework7-react'; import { observer, inject } from "mobx-react"; import { useTranslation } from 'react-i18next'; +import { LocalStorage } from "../../../../../common/mobile/utils/LocalStorage.mjs"; export const SettingsContext = createContext(); @@ -160,6 +161,16 @@ const SettingsController = props => { } } + const switchAutosave = (value) => { + LocalStorage.setBool("pe-mobile-autosave", value); + Common.EditorApi.get().asc_SetFastCollaborative(LocalStorage.getBool("pe-mobile-autosave")); + Common.EditorApi.get().asc_setAutoSaveGap(parseInt(LocalStorage.getItem("pe-mobile-autosave"))); + }; + + const tryToSave = () => { + Common.EditorApi.get().asc_Save(); + }; + return ( { showFeedback, onDownloadOrigin, closeModal, - changeTitleHandler + changeTitleHandler, + switchAutosave, + tryToSave, }}> diff --git a/apps/presentationeditor/mobile/src/store/appOptions.js b/apps/presentationeditor/mobile/src/store/appOptions.js index e77564c534..a64353fdff 100644 --- a/apps/presentationeditor/mobile/src/store/appOptions.js +++ b/apps/presentationeditor/mobile/src/store/appOptions.js @@ -20,6 +20,15 @@ export class storeAppOptions { isDocReady: observable, changeDocReady: action, + isAutosave: observable, + changeAutosave: action, + + isSaveBadgeShown: observable, + changeIsSaveBadgeShown: action, + + savingDocStatusText: observable, + changeSavingDocStatusText: action, + customization: observable, }); } @@ -46,6 +55,21 @@ export class storeAppOptions { this.isDocReady = value; } + isAutosave = true; + changeAutosave (value) { + this.isAutosave = value; + } + + isSaveBadgeShown = false; + changeIsSaveBadgeShown (value) { + this.isSaveBadgeShown = value; + } + + savingDocStatusText = ''; + changeSavingDocStatusText (value) { + this.savingDocStatusText = value; + } + setConfigOptions (config, _t) { this.config = config; this.customization = config.customization; diff --git a/apps/presentationeditor/mobile/src/view/Toolbar.jsx b/apps/presentationeditor/mobile/src/view/Toolbar.jsx index aa259b3c6e..57e7563f4d 100644 --- a/apps/presentationeditor/mobile/src/view/Toolbar.jsx +++ b/apps/presentationeditor/mobile/src/view/Toolbar.jsx @@ -93,7 +93,7 @@ const ToolbarView = props => { {Device.phone ? null : } {props.displayCollaboration && window.matchMedia("(min-width: 375px)").matches && !isVersionHistoryMode ? props.openOptions('coauth')}> : null} {isVersionHistoryMode ? props.openOptions('history')}> : null} - props.openOptions('settings')}> + props.openOptions('settings')}> {Device.ios ? : diff --git a/apps/presentationeditor/mobile/src/view/settings/SettingsPage.jsx b/apps/presentationeditor/mobile/src/view/settings/SettingsPage.jsx index 0f44d173d3..baee931230 100644 --- a/apps/presentationeditor/mobile/src/view/settings/SettingsPage.jsx +++ b/apps/presentationeditor/mobile/src/view/settings/SettingsPage.jsx @@ -1,5 +1,5 @@ import React, { useContext } from 'react'; -import { Page, Navbar, NavRight, Link, Icon, ListItem, List, f7 } from 'framework7-react'; +import { Page, Navbar, NavRight, Link, Icon, ListItem, List, f7, Toggle } from 'framework7-react'; import { useTranslation } from 'react-i18next'; import { Device } from '../../../../../common/mobile/utils/device'; import { observer, inject } from "mobx-react"; @@ -36,9 +36,13 @@ const SettingsPage = inject('storeAppOptions', 'storeToolbarSettings', 'storePre const closeButtonText = canCloseEditor && appOptions.customization.close.text; const gobackTitle = appOptions.customization?.goback?.text || _t.textOpenLocation; const isShowBack = props.storeToolbarSettings.isShowBack; + const isAutosave = appOptions.isAutosave; const navbar = -
{docTitle}
+
+ {docTitle} + {appOptions.savingDocStatusText} +
{Device.phone && {_t.textDone}}
; @@ -83,84 +87,110 @@ const SettingsPage = inject('storeAppOptions', 'storeToolbarSettings', 'storePre return ( {navbar} - - {isShowBack && - Common.Notifications.trigger('goback')}> - {Device.ios ? - : - - } + <> + + {isShowBack && + Common.Notifications.trigger('goback')}> + {Device.ios ? + : + + } + + } + {!appOptions.canLiveView && + + {Device.ios ? + : + + } + { + appOptions.changeAutosave(!isAutosave); + settingsContext.switchAutosave(!isAutosave); + }} + /> + + } + {!appOptions.canLiveView && + + {Device.ios ? + : + + } + + } + + + {!props.inPopover && + + + + } + {window.matchMedia("(max-width: 374px)").matches ? + onOpenOptions('coauth')} className='no-indicator'> + + + : null} + {_isEdit && + + + + } + + - } - {!props.inPopover && - - - - } - {window.matchMedia("(max-width: 374px)").matches ? - onOpenOptions('coauth')} className='no-indicator'> - - - : null} - {_isEdit && - - - - } - - - - {_isEdit && canUseHistory && - { - if(Device.phone) { - onOpenOptions('history'); - } - }}> - - - } - {_canDownload && - - - - } - {_canDownloadOrigin && - - - - } - {_canPrint && - - - - } - {!(!_canDisplayInfo && isBranding) && - - - - } - {_canHelp && - - - - } - {_canAbout && - - - - } - {_canFeedback && - - {Device.ios ? - : - - } - - } - {canCloseEditor && - Common.Notifications.trigger('close')}> - } - + {_isEdit && canUseHistory && + { + if(Device.phone) { + onOpenOptions('history'); + } + }}> + + + } + {_canDownload && + + + + } + {_canDownloadOrigin && + + + + } + {_canPrint && + + + + } + {!(!_canDisplayInfo && isBranding) && + + + + } + {_canHelp && + + + + } + {_canAbout && + + + + } + {_canFeedback && + + {Device.ios ? + : + + } + + } + {canCloseEditor && + Common.Notifications.trigger('close')}> + } + + ) })); diff --git a/apps/spreadsheeteditor/mobile/locale/en.json b/apps/spreadsheeteditor/mobile/locale/en.json index 3872a13f76..c1034502c7 100644 --- a/apps/spreadsheeteditor/mobile/locale/en.json +++ b/apps/spreadsheeteditor/mobile/locale/en.json @@ -426,7 +426,8 @@ "txtEditingMode": "Set editing mode...", "uploadImageTextText": "Uploading image...", "uploadImageTitleText": "Uploading Image", - "waitText": "Please, wait..." + "waitText": "Please, wait...", + "changesSaved": "All changes saved" }, "Statusbar": { "notcriticalErrorTitle": "Warning", @@ -792,6 +793,8 @@ "textFind": "Find", "textFindAndReplace": "Find and Replace", "textFindAndReplaceAll": "Find and Replace All", + "textSaveDocument": "Save", + "textAutoSaveDocument": "Autosave", "textFormat": "Format", "textFormulaLanguage": "Formula Language", "textFormulas": "Formulas", diff --git a/apps/spreadsheeteditor/mobile/src/controller/LongActions.jsx b/apps/spreadsheeteditor/mobile/src/controller/LongActions.jsx index 9a0b19282a..70230268bf 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/LongActions.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/LongActions.jsx @@ -104,11 +104,15 @@ const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => { f7.dialog.close(loadMask.el) : f7.dialog.close($$('.dialog-preloader')); } + + if ((id==Asc.c_oAscAsyncAction['Save'] || id==Asc.c_oAscAsyncAction['ForceSaveButton'])) { + storeAppOptions.changeSavingDocStatusText(_t.changesSaved) + } }; const setLongActionView = (action) => { let title = ''; - // let text = ''; + let text = ''; switch (action.id) { case Asc.c_oAscAsyncAction['Open']: title = _t.textLoadingDocument; @@ -118,7 +122,7 @@ const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => { case Asc.c_oAscAsyncAction['Save']: title = _t.saveTitleText; - // text = _t.saveTextText; + text = _t.saveTextText; break; case Asc.c_oAscAsyncAction['LoadDocumentFonts']: @@ -213,6 +217,8 @@ const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => { } else { loadMask = showLoadMask(title, action.id === Asc.c_oAscAsyncAction['Open']); } + } else { + storeAppOptions.changeSavingDocStatusText(text); } }; diff --git a/apps/spreadsheeteditor/mobile/src/controller/Main.jsx b/apps/spreadsheeteditor/mobile/src/controller/Main.jsx index 33617ab30e..d686cd9f1d 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/Main.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/Main.jsx @@ -764,6 +764,9 @@ class MainController extends Component { appSettings.changeRefStyle(value); this.api.asc_setR1C1Mode(value); + value = LocalStorage.getBool("sse-mobile-autosave"); + appOptions.changeAutosave(LocalStorage.itemExists('sse-mobile-autosave') ? value : true); + Common.Gateway.documentReady(); f7.emit('resize'); @@ -813,6 +816,7 @@ class MainController extends Component { this.api.asc_registerCallback('asc_onDocumentModifiedChanged', this.onDocumentModifiedChanged.bind(this)); this.api.asc_registerCallback('asc_onDocumentCanSaveChanged', this.onDocumentCanSaveChanged.bind(this)); + this.api.asc_registerCallback('asc_onCollaborativeChanges', this.onCollaborativeChanges.bind(this)); Common.Notifications.trigger('preloader:close'); Common.Notifications.trigger('preloader:endAction', Asc.c_oAscAsyncActionType['BlockInteraction'], this.ApplyEditRights); @@ -1189,6 +1193,9 @@ class MainController extends Component { window.document.title = title; } + if (isModified) + this.props.storeAppOptions.changeSavingDocStatusText(''); + this._isDocReady && (this._state.isDocModified !== isModified) && Common.Gateway.setDocumentModified(isModified); this._state.isDocModified = isModified; } @@ -1204,7 +1211,14 @@ class MainController extends Component { } onDocumentCanSaveChanged (isCanSave) { - // + const storeAppOptions = this.props.storeAppOptions; + storeAppOptions.changeIsSaveBadgeShown(isCanSave); + } + + onCollaborativeChanges () { + const storeAppOptions = this.props.storeAppOptions; + if (!storeAppOptions.isSaveBadgeShown) storeAppOptions.changeIsSaveBadgeShown(true); + storeAppOptions.changeSavingDocStatusText(''); } onPrint () { diff --git a/apps/spreadsheeteditor/mobile/src/controller/Toolbar.jsx b/apps/spreadsheeteditor/mobile/src/controller/Toolbar.jsx index d41c59c8d8..0b5bf9f818 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/Toolbar.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/Toolbar.jsx @@ -317,6 +317,7 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeSpreadsheetIn changeTitleHandler={changeTitleHandler} forceDesktopMode={forceDesktopMode} isHiddenFileName={appOptions.config?.customization?.toolbarHideFileName ?? false} + isSaveBadgeShown={appOptions.isSaveBadgeShown} /> ) })); diff --git a/apps/spreadsheeteditor/mobile/src/controller/settings/Settings.jsx b/apps/spreadsheeteditor/mobile/src/controller/settings/Settings.jsx index dc28c8c03b..08ec3fcf70 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/settings/Settings.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/settings/Settings.jsx @@ -4,6 +4,7 @@ import { Device } from '../../../../../common/mobile/utils/device'; import SettingsView from "../../view/settings/Settings"; import { f7 } from 'framework7-react'; import { useTranslation } from 'react-i18next'; +import { LocalStorage } from "../../../../../common/mobile/utils/LocalStorage.mjs"; export const SettingsContext = createContext(); @@ -177,6 +178,16 @@ const SettingsController = inject('storeAppOptions', 'storeSpreadsheetInfo')(obs } } + const switchAutosave = (value) => { + LocalStorage.setBool("sse-mobile-autosave", value); + Common.EditorApi.get().asc_SetFastCollaborative(LocalStorage.getBool("sse-mobile-autosave")); + Common.EditorApi.get().asc_setAutoSaveGap(parseInt(LocalStorage.getItem("sse-mobile-autosave"))); + }; + + const tryToSave = () => { + Common.EditorApi.get().asc_Save(); + }; + return ( diff --git a/apps/spreadsheeteditor/mobile/src/store/appOptions.js b/apps/spreadsheeteditor/mobile/src/store/appOptions.js index 497d8ff286..6adee182c7 100644 --- a/apps/spreadsheeteditor/mobile/src/store/appOptions.js +++ b/apps/spreadsheeteditor/mobile/src/store/appOptions.js @@ -21,6 +21,15 @@ export class storeAppOptions { isDocReady: observable, changeDocReady: action, + isAutosave: observable, + changeAutosave: action, + + isSaveBadgeShown: observable, + changeIsSaveBadgeShown: action, + + savingDocStatusText: observable, + changeSavingDocStatusText: action, + customization: observable, }); } @@ -52,6 +61,21 @@ export class storeAppOptions { this.isDocReady = value; } + isAutosave = true; + changeAutosave (value) { + this.isAutosave = value; + } + + isSaveBadgeShown = false; + changeIsSaveBadgeShown (value) { + this.isSaveBadgeShown = value; + } + + savingDocStatusText = ''; + changeSavingDocStatusText (value) { + this.savingDocStatusText = value; + } + setConfigOptions (config, _t) { this.config = config; this.customization = config.customization; diff --git a/apps/spreadsheeteditor/mobile/src/view/Toolbar.jsx b/apps/spreadsheeteditor/mobile/src/view/Toolbar.jsx index f1b063ea9e..4e7b6df372 100644 --- a/apps/spreadsheeteditor/mobile/src/view/Toolbar.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/Toolbar.jsx @@ -84,7 +84,7 @@ const ToolbarView = props => { {Device.phone ? null : } {!props.isDrawMode && props.displayCollaboration && window.matchMedia("(min-width: 360px)").matches && !isVersionHistoryMode ? props.openOptions('coauth')}> : null} {isVersionHistoryMode ? props.openOptions('history')}> : null} - props.openOptions('settings')}> {Device.ios ? + props.openOptions('settings')}> {Device.ios ? : } diff --git a/apps/spreadsheeteditor/mobile/src/view/settings/SettingsPage.jsx b/apps/spreadsheeteditor/mobile/src/view/settings/SettingsPage.jsx index 893243219a..a34b3c46f1 100644 --- a/apps/spreadsheeteditor/mobile/src/view/settings/SettingsPage.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/settings/SettingsPage.jsx @@ -1,5 +1,5 @@ import React, { useContext } from 'react'; -import { Page, Navbar, NavRight, Link, Icon, ListItem, List, f7 } from 'framework7-react'; +import { Page, Navbar, NavRight, Link, Icon, ListItem, List, f7, Toggle } from 'framework7-react'; import { useTranslation } from 'react-i18next'; import { Device } from '../../../../../common/mobile/utils/device'; import { observer, inject } from "mobx-react"; @@ -34,9 +34,13 @@ const SettingsPage = inject('storeAppOptions', 'storeSpreadsheetInfo', 'storeToo const closeButtonText = canCloseEditor && appOptions.customization.close.text; const gobackTitle = appOptions.customization?.goback?.text || _t.textOpenLocation; const isShowBack = props.storeToolbarSettings.isShowBack; + const isAutosave = appOptions.isAutosave; const navbar = -
{docTitle}
+
+ {docTitle} + {appOptions.savingDocStatusText} +
{Device.phone && {_t.textDone} } @@ -83,84 +87,110 @@ const SettingsPage = inject('storeAppOptions', 'storeSpreadsheetInfo', 'storeToo return ( {navbar} - - {isShowBack && - Common.Notifications.trigger('goback')}> - {Device.ios ? - : - - } + <> + + {isShowBack && + Common.Notifications.trigger('goback')}> + {Device.ios ? + : + + } + + } + {!appOptions.canLiveView && + + {Device.ios ? + : + + } + { + appOptions.changeAutosave(!isAutosave); + settingsContext.switchAutosave(!isAutosave); + }} + /> + + } + {!appOptions.canLiveView && + + {Device.ios ? + : + + } + + } + + + {!props.inPopover && + + + + } + {window.matchMedia("(max-width: 359px)").matches ? + onOpenOptions('coauth')} className='no-indicator'> + + + : null} + {_isEdit && + + + + } + + - } - {!props.inPopover && - - - - } - {window.matchMedia("(max-width: 359px)").matches ? - onOpenOptions('coauth')} className='no-indicator'> - - - : null} - {_isEdit && - - - - } - - - - {_isEdit && canUseHistory && - { - if(Device.phone) { - onOpenOptions('history'); - } - }}> - - - } - {_canDownload && - - - - } - {_canDownloadOrigin && - - - - } - {_canPrint && - - - - } - {!(!_canDisplayInfo && isBranding) && - - - - } - {_canHelp && - - - - } - {_canAbout && - - - - } - {_canFeedback && - - {Device.ios ? - : - - } - - } - {canCloseEditor && - Common.Notifications.trigger('close')}> - } - + {_isEdit && canUseHistory && + { + if(Device.phone) { + onOpenOptions('history'); + } + }}> + + + } + {_canDownload && + + + + } + {_canDownloadOrigin && + + + + } + {_canPrint && + + + + } + {!(!_canDisplayInfo && isBranding) && + + + + } + {_canHelp && + + + + } + {_canAbout && + + + + } + {_canFeedback && + + {Device.ios ? + : + + } + + } + {canCloseEditor && + Common.Notifications.trigger('close')}> + } + + ) })); From 934a9edac51e323ecdb0c0d91afe3698168d0998 Mon Sep 17 00:00:00 2001 From: nikita_bartoshuk Date: Mon, 23 Mar 2026 22:12:03 +0300 Subject: [PATCH 04/10] refactor --- apps/documenteditor/mobile/src/controller/LongActions.jsx | 4 +--- apps/documenteditor/mobile/src/controller/Main.jsx | 3 +-- .../mobile/src/controller/settings/Settings.jsx | 5 +++-- .../presentationeditor/mobile/src/controller/LongActions.jsx | 3 +-- apps/presentationeditor/mobile/src/controller/Main.jsx | 3 +-- .../mobile/src/controller/settings/Settings.jsx | 5 +++-- apps/spreadsheeteditor/mobile/src/controller/LongActions.jsx | 4 +--- apps/spreadsheeteditor/mobile/src/controller/Main.jsx | 3 +-- .../mobile/src/controller/settings/Settings.jsx | 5 +++-- 9 files changed, 15 insertions(+), 20 deletions(-) diff --git a/apps/documenteditor/mobile/src/controller/LongActions.jsx b/apps/documenteditor/mobile/src/controller/LongActions.jsx index 7a5973c8bc..7cbf5833eb 100644 --- a/apps/documenteditor/mobile/src/controller/LongActions.jsx +++ b/apps/documenteditor/mobile/src/controller/LongActions.jsx @@ -106,6 +106,7 @@ const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => { case Asc.c_oAscAsyncAction['Save']: title = _t.saveTitleText; text = _t.saveTextText; + storeAppOptions.changeSavingDocStatusText(text); break; case Asc.c_oAscAsyncAction['LoadDocumentFonts']: @@ -207,10 +208,7 @@ const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => { } else { loadMask = f7.dialog.preloader(title); } - } else { - storeAppOptions.changeSavingDocStatusText(text); } - }; const onConfirmAction = (id, apiCallback, data) => { diff --git a/apps/documenteditor/mobile/src/controller/Main.jsx b/apps/documenteditor/mobile/src/controller/Main.jsx index bf00015e71..2cedefe29d 100644 --- a/apps/documenteditor/mobile/src/controller/Main.jsx +++ b/apps/documenteditor/mobile/src/controller/Main.jsx @@ -382,8 +382,7 @@ class MainController extends Component { this.updateWindowTitle(true); - value = LocalStorage.getBool("de-mobile-autosave"); - appOptions.changeAutosave(LocalStorage.itemExists('de-mobile-autosave') ? value : true); + appOptions.changeAutosave(LocalStorage.itemExists('de-mobile-autosave') ? LocalStorage.getBool("de-mobile-autosave") : true); value = LocalStorage.getBool("de-mobile-no-characters"); appSettings.changeNoCharacters(value); diff --git a/apps/documenteditor/mobile/src/controller/settings/Settings.jsx b/apps/documenteditor/mobile/src/controller/settings/Settings.jsx index d0b181931d..043a7737e5 100644 --- a/apps/documenteditor/mobile/src/controller/settings/Settings.jsx +++ b/apps/documenteditor/mobile/src/controller/settings/Settings.jsx @@ -192,9 +192,10 @@ const SettingsController = props => { }; const switchAutosave = (value) => { + const api = Common.EditorApi.get(); LocalStorage.setBool("de-mobile-autosave", value); - Common.EditorApi.get().asc_SetFastCollaborative(LocalStorage.getBool("de-mobile-autosave")); - Common.EditorApi.get().asc_setAutoSaveGap(parseInt(LocalStorage.getItem("de-mobile-autosave"))); + api.asc_SetFastCollaborative(value); + api.asc_setAutoSaveGap(value ? 1 : 0); }; const tryToSave = () => { diff --git a/apps/presentationeditor/mobile/src/controller/LongActions.jsx b/apps/presentationeditor/mobile/src/controller/LongActions.jsx index 925a9cb901..227428ec44 100644 --- a/apps/presentationeditor/mobile/src/controller/LongActions.jsx +++ b/apps/presentationeditor/mobile/src/controller/LongActions.jsx @@ -98,6 +98,7 @@ const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => { case Asc.c_oAscAsyncAction['Save']: title = _t.saveTitleText; text = _t.saveTextText; + storeAppOptions.changeSavingDocStatusText(text); break; case Asc.c_oAscAsyncAction['LoadDocumentFonts']: @@ -185,8 +186,6 @@ const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => { } else { loadMask = f7.dialog.preloader(title); } - } else { - storeAppOptions.changeSavingDocStatusText(text); } }; diff --git a/apps/presentationeditor/mobile/src/controller/Main.jsx b/apps/presentationeditor/mobile/src/controller/Main.jsx index 3526b9b5e6..17657ab584 100644 --- a/apps/presentationeditor/mobile/src/controller/Main.jsx +++ b/apps/presentationeditor/mobile/src/controller/Main.jsx @@ -590,8 +590,7 @@ class MainController extends Component { appSettings.changeSpellCheck(value); this.api.asc_setSpellCheck(value); - value = LocalStorage.getBool("pe-mobile-autosave"); - appOptions.changeAutosave(LocalStorage.itemExists('pe-mobile-autosave') ? value : true); + appOptions.changeAutosave(LocalStorage.itemExists('pe-mobile-autosave') ? LocalStorage.getBool("pe-mobile-autosave") : true); this.updateWindowTitle(true); diff --git a/apps/presentationeditor/mobile/src/controller/settings/Settings.jsx b/apps/presentationeditor/mobile/src/controller/settings/Settings.jsx index 41325f6902..9ee7cb479f 100644 --- a/apps/presentationeditor/mobile/src/controller/settings/Settings.jsx +++ b/apps/presentationeditor/mobile/src/controller/settings/Settings.jsx @@ -162,9 +162,10 @@ const SettingsController = props => { } const switchAutosave = (value) => { + const api = Common.EditorApi.get(); LocalStorage.setBool("pe-mobile-autosave", value); - Common.EditorApi.get().asc_SetFastCollaborative(LocalStorage.getBool("pe-mobile-autosave")); - Common.EditorApi.get().asc_setAutoSaveGap(parseInt(LocalStorage.getItem("pe-mobile-autosave"))); + api.asc_SetFastCollaborative(value); + api.asc_setAutoSaveGap(value ? 1 : 0); }; const tryToSave = () => { diff --git a/apps/spreadsheeteditor/mobile/src/controller/LongActions.jsx b/apps/spreadsheeteditor/mobile/src/controller/LongActions.jsx index 70230268bf..f4f4b8b17b 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/LongActions.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/LongActions.jsx @@ -123,6 +123,7 @@ const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => { case Asc.c_oAscAsyncAction['Save']: title = _t.saveTitleText; text = _t.saveTextText; + storeAppOptions.changeSavingDocStatusText(text); break; case Asc.c_oAscAsyncAction['LoadDocumentFonts']: @@ -217,10 +218,7 @@ const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => { } else { loadMask = showLoadMask(title, action.id === Asc.c_oAscAsyncAction['Open']); } - } else { - storeAppOptions.changeSavingDocStatusText(text); } - }; const onConfirmAction = (id, apiCallback, data) => { diff --git a/apps/spreadsheeteditor/mobile/src/controller/Main.jsx b/apps/spreadsheeteditor/mobile/src/controller/Main.jsx index d686cd9f1d..5ab0819635 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/Main.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/Main.jsx @@ -764,8 +764,7 @@ class MainController extends Component { appSettings.changeRefStyle(value); this.api.asc_setR1C1Mode(value); - value = LocalStorage.getBool("sse-mobile-autosave"); - appOptions.changeAutosave(LocalStorage.itemExists('sse-mobile-autosave') ? value : true); + appOptions.changeAutosave(LocalStorage.itemExists('sse-mobile-autosave') ? LocalStorage.getBool("sse-mobile-autosave") : true); Common.Gateway.documentReady(); f7.emit('resize'); diff --git a/apps/spreadsheeteditor/mobile/src/controller/settings/Settings.jsx b/apps/spreadsheeteditor/mobile/src/controller/settings/Settings.jsx index 08ec3fcf70..d5fb8d7748 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/settings/Settings.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/settings/Settings.jsx @@ -179,9 +179,10 @@ const SettingsController = inject('storeAppOptions', 'storeSpreadsheetInfo')(obs } const switchAutosave = (value) => { + const api = Common.EditorApi.get(); LocalStorage.setBool("sse-mobile-autosave", value); - Common.EditorApi.get().asc_SetFastCollaborative(LocalStorage.getBool("sse-mobile-autosave")); - Common.EditorApi.get().asc_setAutoSaveGap(parseInt(LocalStorage.getItem("sse-mobile-autosave"))); + api.asc_SetFastCollaborative(value); + api.asc_setAutoSaveGap(value ? 1 : 0); }; const tryToSave = () => { From 6dde8fd5e68480eadb19e6d07c294761d7e992c5 Mon Sep 17 00:00:00 2001 From: nikita_bartoshuk Date: Tue, 24 Mar 2026 13:40:36 +0300 Subject: [PATCH 05/10] fixed updating doc status in tab --- apps/documenteditor/mobile/src/controller/LongActions.jsx | 2 +- apps/documenteditor/mobile/src/controller/Main.jsx | 1 + apps/presentationeditor/mobile/src/controller/LongActions.jsx | 2 +- apps/presentationeditor/mobile/src/controller/Main.jsx | 2 ++ apps/spreadsheeteditor/mobile/src/controller/LongActions.jsx | 2 +- apps/spreadsheeteditor/mobile/src/controller/Main.jsx | 2 ++ 6 files changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/mobile/src/controller/LongActions.jsx b/apps/documenteditor/mobile/src/controller/LongActions.jsx index 7cbf5833eb..f16aa37fb9 100644 --- a/apps/documenteditor/mobile/src/controller/LongActions.jsx +++ b/apps/documenteditor/mobile/src/controller/LongActions.jsx @@ -74,7 +74,7 @@ const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => { let action = {id: id, type: type}; stackLongActions.pop(action); - //this.updateWindowTitle(true); + Common.Notifications.trigger('update:windowtitle', true); action = stackLongActions.get({type: Asc.c_oAscAsyncActionType.Information}) || stackLongActions.get({type: Asc.c_oAscAsyncActionType.BlockInteraction}); diff --git a/apps/documenteditor/mobile/src/controller/Main.jsx b/apps/documenteditor/mobile/src/controller/Main.jsx index 2cedefe29d..7257fa0e88 100644 --- a/apps/documenteditor/mobile/src/controller/Main.jsx +++ b/apps/documenteditor/mobile/src/controller/Main.jsx @@ -1047,6 +1047,7 @@ class MainController extends Component { }); Common.Notifications.on('markfavorite', this.markFavorite.bind(this)); + Common.Notifications.on('update:windowtitle', force => this.updateWindowTitle(force)); } insertImageFromStorage(data) { diff --git a/apps/presentationeditor/mobile/src/controller/LongActions.jsx b/apps/presentationeditor/mobile/src/controller/LongActions.jsx index 227428ec44..d1b270146d 100644 --- a/apps/presentationeditor/mobile/src/controller/LongActions.jsx +++ b/apps/presentationeditor/mobile/src/controller/LongActions.jsx @@ -68,7 +68,7 @@ const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => { let action = {id: id, type: type}; stackLongActions.pop(action); - //this.updateWindowTitle(true); + Common.Notifications.trigger('update:windowtitle', true); action = stackLongActions.get({type: Asc.c_oAscAsyncActionType.Information}) || stackLongActions.get({type: Asc.c_oAscAsyncActionType.BlockInteraction}); diff --git a/apps/presentationeditor/mobile/src/controller/Main.jsx b/apps/presentationeditor/mobile/src/controller/Main.jsx index 17657ab584..c71fb1f82f 100644 --- a/apps/presentationeditor/mobile/src/controller/Main.jsx +++ b/apps/presentationeditor/mobile/src/controller/Main.jsx @@ -550,6 +550,8 @@ class MainController extends Component { storePresentationInfo.changeTitle(meta.title); } }); + + Common.Notifications.on('update:windowtitle', force => this.updateWindowTitle(force)); } insertImageFromStorage(data) { diff --git a/apps/spreadsheeteditor/mobile/src/controller/LongActions.jsx b/apps/spreadsheeteditor/mobile/src/controller/LongActions.jsx index f4f4b8b17b..3aab3746f0 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/LongActions.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/LongActions.jsx @@ -93,7 +93,7 @@ const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => { let action = {id: id, type: type}; stackLongActions.pop(action); - //this.updateWindowTitle(true); + Common.Notifications.trigger('update:windowtitle', true); action = stackLongActions.get({type: Asc.c_oAscAsyncActionType.Information}) || stackLongActions.get({type: Asc.c_oAscAsyncActionType.BlockInteraction}); diff --git a/apps/spreadsheeteditor/mobile/src/controller/Main.jsx b/apps/spreadsheeteditor/mobile/src/controller/Main.jsx index 5ab0819635..78d19a066f 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/Main.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/Main.jsx @@ -602,6 +602,8 @@ class MainController extends Component { }); this.api.asc_registerCallback('asc_onNeedUpdateExternalReferenceOnOpen', this.onNeedUpdateExternalReference.bind(this)); + + Common.Notifications.on('update:windowtitle', force => this.updateWindowTitle(force)); } insertImageFromStorage (data) { From 03185bd415a942b3aff86ec2fc16bb4b40e2cd7f Mon Sep 17 00:00:00 2001 From: nikita_bartoshuk Date: Tue, 24 Mar 2026 23:27:11 +0300 Subject: [PATCH 06/10] refactored collab controller --- .../lib/controller/collaboration/Collaboration.jsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/common/mobile/lib/controller/collaboration/Collaboration.jsx b/apps/common/mobile/lib/controller/collaboration/Collaboration.jsx index 0345ef04d8..99d86ac5bb 100644 --- a/apps/common/mobile/lib/controller/collaboration/Collaboration.jsx +++ b/apps/common/mobile/lib/controller/collaboration/Collaboration.jsx @@ -43,9 +43,10 @@ class CollaborationController extends Component { } } else if (!appOptions.isEdit && appOptions.isRestrictedEdit) { isFastCoauth = true; - api.asc_SetFastCollaborative(LocalStorage.itemExists(`${window.editorType}-mobile-autosave`) ? LocalStorage.getBool(`${window.editorType}-mobile-autosave`) : true); + const isAutosaveInLs = LocalStorage.itemExists(`${window.editorType}-mobile-autosave`); + api.asc_SetFastCollaborative(isAutosaveInLs ? LocalStorage.getBool(`${window.editorType}-mobile-autosave`) : true); window.editorType === 'de' && api.SetCollaborativeMarksShowType(Asc.c_oAscCollaborativeMarksShowType.None); - api.asc_setAutoSaveGap(LocalStorage.itemExists(`${window.editorType}-mobile-autosave`) ? parseInt(LocalStorage.getItem(`${window.editorType}-mobile-autosave`)) : 1); + api.asc_setAutoSaveGap(isAutosaveInLs ? parseInt(LocalStorage.getItem(`${window.editorType}-mobile-autosave`)) : 1); } else if (appOptions.canLiveView) { // viewer isFastCoauth = !(appOptions.config.coEditing && appOptions.config.coEditing.mode==='strict'); api.asc_SetFastCollaborative(isFastCoauth); @@ -65,8 +66,9 @@ class CollaborationController extends Component { value = isFastCoauth; // Common.localStorage.getItem("de-settings-autosave"); value = (!isFastCoauth && value !== null) ? parseInt(value) : (appOptions.canCoAuthoring ? 1 : 0); } - api.asc_SetFastCollaborative(value ? (LocalStorage.itemExists(`${window.editorType}-mobile-autosave`) ? LocalStorage.getBool(`${window.editorType}-mobile-autosave`) : true) : false); - api.asc_setAutoSaveGap(value ? (LocalStorage.itemExists(`${window.editorType}-mobile-autosave`) ? parseInt(LocalStorage.getItem(`${window.editorType}-mobile-autosave`)) : 1) : 0); + const isAutosaveInLs = LocalStorage.itemExists(`${window.editorType}-mobile-autosave`); + api.asc_SetFastCollaborative(value ? (isAutosaveInLs ? LocalStorage.getBool(`${window.editorType}-mobile-autosave`) : true) : false); + api.asc_setAutoSaveGap(value ? (isAutosaveInLs ? parseInt(LocalStorage.getItem(`${window.editorType}-mobile-autosave`)) : 1) : 0); } /** coauthoring end **/ } From 398cdd78ffa75727f8658b3369c3b03f962166b2 Mon Sep 17 00:00:00 2001 From: nikita_bartoshuk Date: Wed, 25 Mar 2026 13:48:56 +0300 Subject: [PATCH 07/10] longactions refactor --- apps/documenteditor/mobile/src/controller/LongActions.jsx | 6 +++--- .../mobile/src/controller/LongActions.jsx | 6 +++--- .../spreadsheeteditor/mobile/src/controller/LongActions.jsx | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/documenteditor/mobile/src/controller/LongActions.jsx b/apps/documenteditor/mobile/src/controller/LongActions.jsx index f16aa37fb9..0b6713569d 100644 --- a/apps/documenteditor/mobile/src/controller/LongActions.jsx +++ b/apps/documenteditor/mobile/src/controller/LongActions.jsx @@ -94,7 +94,7 @@ const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => { const setLongActionView = (action) => { let title = ''; - let text = ''; + // let text = ''; switch (action.id) { case Asc.c_oAscAsyncAction['Open']: @@ -105,8 +105,8 @@ const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => { case Asc.c_oAscAsyncAction['Save']: title = _t.saveTitleText; - text = _t.saveTextText; - storeAppOptions.changeSavingDocStatusText(text); + // text = _t.saveTextText; + storeAppOptions.changeSavingDocStatusText(_t.saveTextText); break; case Asc.c_oAscAsyncAction['LoadDocumentFonts']: diff --git a/apps/presentationeditor/mobile/src/controller/LongActions.jsx b/apps/presentationeditor/mobile/src/controller/LongActions.jsx index d1b270146d..c5c10608c2 100644 --- a/apps/presentationeditor/mobile/src/controller/LongActions.jsx +++ b/apps/presentationeditor/mobile/src/controller/LongActions.jsx @@ -87,7 +87,7 @@ const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => { const setLongActionView = (action) => { let title = ''; - let text = ''; + // let text = ''; switch (action.id) { case Asc.c_oAscAsyncAction['Open']: title = _t.textLoadingDocument; @@ -97,8 +97,8 @@ const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => { case Asc.c_oAscAsyncAction['Save']: title = _t.saveTitleText; - text = _t.saveTextText; - storeAppOptions.changeSavingDocStatusText(text); + // text = _t.saveTextText; + storeAppOptions.changeSavingDocStatusText(_t.saveTextText); break; case Asc.c_oAscAsyncAction['LoadDocumentFonts']: diff --git a/apps/spreadsheeteditor/mobile/src/controller/LongActions.jsx b/apps/spreadsheeteditor/mobile/src/controller/LongActions.jsx index 3aab3746f0..63c3579dfe 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/LongActions.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/LongActions.jsx @@ -112,7 +112,7 @@ const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => { const setLongActionView = (action) => { let title = ''; - let text = ''; + // let text = ''; switch (action.id) { case Asc.c_oAscAsyncAction['Open']: title = _t.textLoadingDocument; @@ -122,8 +122,8 @@ const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => { case Asc.c_oAscAsyncAction['Save']: title = _t.saveTitleText; - text = _t.saveTextText; - storeAppOptions.changeSavingDocStatusText(text); + // text = _t.saveTextText; + storeAppOptions.changeSavingDocStatusText(_t.saveTextText); break; case Asc.c_oAscAsyncAction['LoadDocumentFonts']: From 2df1c9e869a6a953925dfb75c0cc59290e78e4fb Mon Sep 17 00:00:00 2001 From: nikita_bartoshuk Date: Thu, 26 Mar 2026 14:13:19 +0300 Subject: [PATCH 08/10] removing badge after save --- apps/documenteditor/mobile/src/controller/LongActions.jsx | 3 ++- apps/presentationeditor/mobile/src/controller/LongActions.jsx | 3 ++- apps/spreadsheeteditor/mobile/src/controller/LongActions.jsx | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/mobile/src/controller/LongActions.jsx b/apps/documenteditor/mobile/src/controller/LongActions.jsx index 0b6713569d..10a66d171e 100644 --- a/apps/documenteditor/mobile/src/controller/LongActions.jsx +++ b/apps/documenteditor/mobile/src/controller/LongActions.jsx @@ -88,7 +88,8 @@ const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => { if (id===Asc.c_oAscAsyncAction['Submit'] && !submitFail) { Common.Gateway.submitForm(); } else if ((id==Asc.c_oAscAsyncAction['Save'] || id==Asc.c_oAscAsyncAction['ForceSaveButton'])) { - storeAppOptions.changeSavingDocStatusText(_t.changesSaved) + storeAppOptions.changeSavingDocStatusText(_t.changesSaved); + storeAppOptions.isSaveBadgeShown && storeAppOptions.changeIsSaveBadgeShown(false); } }; diff --git a/apps/presentationeditor/mobile/src/controller/LongActions.jsx b/apps/presentationeditor/mobile/src/controller/LongActions.jsx index c5c10608c2..2d7ddf24d6 100644 --- a/apps/presentationeditor/mobile/src/controller/LongActions.jsx +++ b/apps/presentationeditor/mobile/src/controller/LongActions.jsx @@ -81,7 +81,8 @@ const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => { } if ((id==Asc.c_oAscAsyncAction['Save'] || id==Asc.c_oAscAsyncAction['ForceSaveButton'])) { - storeAppOptions.changeSavingDocStatusText(_t.changesSaved) + storeAppOptions.changeSavingDocStatusText(_t.changesSaved); + storeAppOptions.isSaveBadgeShown && storeAppOptions.changeIsSaveBadgeShown(false); } }; diff --git a/apps/spreadsheeteditor/mobile/src/controller/LongActions.jsx b/apps/spreadsheeteditor/mobile/src/controller/LongActions.jsx index 63c3579dfe..883eba280d 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/LongActions.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/LongActions.jsx @@ -106,7 +106,8 @@ const LongActionsController = inject('storeAppOptions')(({storeAppOptions}) => { } if ((id==Asc.c_oAscAsyncAction['Save'] || id==Asc.c_oAscAsyncAction['ForceSaveButton'])) { - storeAppOptions.changeSavingDocStatusText(_t.changesSaved) + storeAppOptions.changeSavingDocStatusText(_t.changesSaved); + storeAppOptions.isSaveBadgeShown && storeAppOptions.changeIsSaveBadgeShown(false); } }; From e508678d10db289b10636fc75ec9f151b2f4f676 Mon Sep 17 00:00:00 2001 From: maxkadushkin Date: Thu, 26 Mar 2026 17:01:49 +0300 Subject: [PATCH 09/10] [mobile] refactoring --- .../collaboration/Collaboration.jsx | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/apps/common/mobile/lib/controller/collaboration/Collaboration.jsx b/apps/common/mobile/lib/controller/collaboration/Collaboration.jsx index 99d86ac5bb..1be49c4e50 100644 --- a/apps/common/mobile/lib/controller/collaboration/Collaboration.jsx +++ b/apps/common/mobile/lib/controller/collaboration/Collaboration.jsx @@ -43,10 +43,11 @@ class CollaborationController extends Component { } } else if (!appOptions.isEdit && appOptions.isRestrictedEdit) { isFastCoauth = true; - const isAutosaveInLs = LocalStorage.itemExists(`${window.editorType}-mobile-autosave`); - api.asc_SetFastCollaborative(isAutosaveInLs ? LocalStorage.getBool(`${window.editorType}-mobile-autosave`) : true); + const lsvalue = LocalStorage.getItem(`${window.editorType}-mobile-autosave`), + intvalue = lsvalue != null ? parseInt(lsvalue) : 1; + api.asc_setAutoSaveGap(intvalue); + api.asc_SetFastCollaborative(intvalue == 1); window.editorType === 'de' && api.SetCollaborativeMarksShowType(Asc.c_oAscCollaborativeMarksShowType.None); - api.asc_setAutoSaveGap(isAutosaveInLs ? parseInt(LocalStorage.getItem(`${window.editorType}-mobile-autosave`)) : 1); } else if (appOptions.canLiveView) { // viewer isFastCoauth = !(appOptions.config.coEditing && appOptions.config.coEditing.mode==='strict'); api.asc_SetFastCollaborative(isFastCoauth); @@ -63,12 +64,18 @@ class CollaborationController extends Component { if (window.editorType === 'sse') { value = appOptions.canAutosave ? 1 : 0; // FORCE AUTOSAVE } else { - value = isFastCoauth; // Common.localStorage.getItem("de-settings-autosave"); - value = (!isFastCoauth && value !== null) ? parseInt(value) : (appOptions.canCoAuthoring ? 1 : 0); + value = appOptions.canCoAuthoring && isFastCoauth ? 1 : 0; + } + + if ( !value ) { + api.asc_SetFastCollaborative(false); + api.asc_setAutoSaveGap(0); + } else { + const lsvalue = LocalStorage.getItem(`${window.editorType}-mobile-autosave`), + intvalue = lsvalue != null ? parseInt(lsvalue) : 1; + api.asc_setAutoSaveGap(intvalue); + api.asc_SetFastCollaborative(intvalue == 1); } - const isAutosaveInLs = LocalStorage.itemExists(`${window.editorType}-mobile-autosave`); - api.asc_SetFastCollaborative(value ? (isAutosaveInLs ? LocalStorage.getBool(`${window.editorType}-mobile-autosave`) : true) : false); - api.asc_setAutoSaveGap(value ? (isAutosaveInLs ? parseInt(LocalStorage.getItem(`${window.editorType}-mobile-autosave`)) : 1) : 0); } /** coauthoring end **/ } From 90abe4dae59990f7c5f46bb7c0d5424ae2c442a2 Mon Sep 17 00:00:00 2001 From: Dokin Denis Date: Thu, 26 Mar 2026 11:13:09 +0500 Subject: [PATCH 10/10] category buttons color edit --- apps/common/main/resources/less/colors-table-night.less | 4 ++-- apps/common/main/resources/less/colors-table-white.less | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/common/main/resources/less/colors-table-night.less b/apps/common/main/resources/less/colors-table-night.less index 959a2b590a..a265b6d2b6 100644 --- a/apps/common/main/resources/less/colors-table-night.less +++ b/apps/common/main/resources/less/colors-table-night.less @@ -233,8 +233,8 @@ --background-fill-input-disabled: var(--background-normal); --background-fill-input-readonly: var(--background-normal); - --highlight-category-button-hover: rgba(18, 132, 238, 0.05); - --highlight-category-button-pressed: rgba(18, 132, 238, 0.12); + --highlight-category-button-hover: #585858; + --highlight-category-button-pressed: #2d2d2d; --highlight-header-input-hover: var(--highlight-header-button-hover); --highlight-header-input-pressed: var(--background-fill-input); diff --git a/apps/common/main/resources/less/colors-table-white.less b/apps/common/main/resources/less/colors-table-white.less index 566d620d5a..facfecd5d2 100644 --- a/apps/common/main/resources/less/colors-table-white.less +++ b/apps/common/main/resources/less/colors-table-white.less @@ -235,8 +235,8 @@ --background-fill-input-disabled: var(--background-normal); --background-fill-input-readonly: var(--background-normal); - --highlight-category-button-hover: rgba(18, 132, 238, 0.05); - --highlight-category-button-pressed: rgba(18, 132, 238, 0.12); + --highlight-category-button-hover: #EAEAEA; + --highlight-category-button-pressed: #d8d8d8; --highlight-header-input-hover: var(--highlight-header-button-hover); --highlight-header-input-pressed: var(--background-fill-input);