From 0f8d9d4c1a045b7ff14fbe313ef1eb6f02c7b635 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Thu, 22 Jul 2021 17:58:48 +0300 Subject: [PATCH] [DE PE mobile] Add toolbar store --- .../mobile/src/store/toolbar.js | 24 ++++++++++++++ .../mobile/src/store/toolbar.js | 32 +++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 apps/documenteditor/mobile/src/store/toolbar.js create mode 100644 apps/presentationeditor/mobile/src/store/toolbar.js diff --git a/apps/documenteditor/mobile/src/store/toolbar.js b/apps/documenteditor/mobile/src/store/toolbar.js new file mode 100644 index 000000000..ff0d1764a --- /dev/null +++ b/apps/documenteditor/mobile/src/store/toolbar.js @@ -0,0 +1,24 @@ +import {action, observable, makeObservable} from 'mobx'; + +export class storeToolbarSettings { + constructor() { + makeObservable(this, { + isCanUndo: observable, + setCanUndo: action, + isCanRedo: observable, + setCanRedo: action + }) + } + + isCanUndo = false; + + setCanUndo(can) { + this.isCanUndo = can; + } + + isCanRedo = false; + + setCanRedo(can) { + this.isCanRedo = can; + } +} \ No newline at end of file diff --git a/apps/presentationeditor/mobile/src/store/toolbar.js b/apps/presentationeditor/mobile/src/store/toolbar.js new file mode 100644 index 000000000..db3a9e87d --- /dev/null +++ b/apps/presentationeditor/mobile/src/store/toolbar.js @@ -0,0 +1,32 @@ +import {action, observable, makeObservable} from 'mobx'; + +export class storeToolbarSettings { + constructor() { + makeObservable(this, { + isCanUndo: observable, + setCanUndo: action, + isCanRedo: observable, + setCanRedo: action, + countPages: observable, + setCountPages: action + }) + } + + isCanUndo = false; + + setCanUndo(can) { + this.isCanUndo = can; + } + + isCanRedo = false; + + setCanRedo(can) { + this.isCanRedo = can; + } + + countPages = 0; + + setCountPages(count) { + this.countPages = count; + } +} \ No newline at end of file