diff --git a/apps/spreadsheeteditor/mobile/src/controller/Statusbar.jsx b/apps/spreadsheeteditor/mobile/src/controller/Statusbar.jsx index 4bd1095b9..bdc7adf6b 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/Statusbar.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/Statusbar.jsx @@ -19,6 +19,9 @@ const StatusbarController = inject('sheets', 'storeFocusObjects', 'users')(obser sheets.setWorksheetLocked(index, locked); storeFocusObjects.setIsLocked(api.asc_getCellInfo()); }); + api.asc_registerCallback('asc_onChangeProtectWorkbook', () => { + sheets.setProtectedWorkbook(api.asc_isProtectedWorkbook()); + }); api.asc_registerCallback('asc_onSheetsChanged', onApiSheetsChanged); api.asc_registerCallback('asc_onActiveSheetChanged', onApiActiveSheetChanged); api.asc_registerCallback('asc_onHidePopMenu', onApiHideTabContextMenu); diff --git a/apps/spreadsheeteditor/mobile/src/store/sheets.js b/apps/spreadsheeteditor/mobile/src/store/sheets.js index 54e04a34b..3a9f98ac9 100644 --- a/apps/spreadsheeteditor/mobile/src/store/sheets.js +++ b/apps/spreadsheeteditor/mobile/src/store/sheets.js @@ -33,7 +33,10 @@ export class storeWorksheets { setWorkbookLocked: action, isWorksheetLocked: observable, - setWorksheetLocked: action + setWorksheetLocked: action, + + isProtectedWorkbook: observable, + setProtectedWorkbook: action }); this.sheets = []; } @@ -89,4 +92,9 @@ export class storeWorksheets { model.locked = locked; this.isWorkbookLocked = locked; } + + isProtectedWorkbook = false; + setProtectedWorkbook(value) { + this.isProtectedWorkbook = value; + } } diff --git a/apps/spreadsheeteditor/mobile/src/view/Statusbar.jsx b/apps/spreadsheeteditor/mobile/src/view/Statusbar.jsx index 6ae773384..f31277e63 100644 --- a/apps/spreadsheeteditor/mobile/src/view/Statusbar.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/Statusbar.jsx @@ -16,15 +16,16 @@ const StatusbarView = inject('storeAppOptions', 'sheets', 'users')(observer(prop const {sheets, storeAppOptions, users} = props; const allSheets = sheets.sheets; const hiddenSheets = sheets.hiddenWorksheets(); - // const isWorkbookLocked = sheets.isWorkbookLocked; + const isWorkbookLocked = sheets.isWorkbookLocked; + const isProtectedWorkbook = sheets.isProtectedWorkbook; const isEdit = storeAppOptions.isEdit; const isDisconnected = users.isDisconnected; return ( -
- +
+