[DE PE mobile] Add toolbar store
This commit is contained in:
parent
e631e35f5f
commit
0f8d9d4c1a
24
apps/documenteditor/mobile/src/store/toolbar.js
Normal file
24
apps/documenteditor/mobile/src/store/toolbar.js
Normal file
|
@ -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;
|
||||
}
|
||||
}
|
32
apps/presentationeditor/mobile/src/store/toolbar.js
Normal file
32
apps/presentationeditor/mobile/src/store/toolbar.js
Normal file
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue