[DE mobile] fix some stores according to mobx v. 6
This commit is contained in:
parent
1232c64fc7
commit
46747c223a
|
@ -1,45 +1,59 @@
|
||||||
import {action, observable} from 'mobx';
|
import {makeObservable, action, observable} from 'mobx';
|
||||||
|
|
||||||
export class storeApplicationSettings {
|
export class storeApplicationSettings {
|
||||||
|
constructor() {
|
||||||
|
makeObservable(this, {
|
||||||
|
unitMeasurement: observable
|
||||||
|
, isSpellChecking: observable
|
||||||
|
, isNonprintingCharacters: observable
|
||||||
|
, isHiddenTableBorders: observable
|
||||||
|
, isComments: observable
|
||||||
|
, isResolvedComments: observable
|
||||||
|
, macrosMode: observable
|
||||||
|
, changeSpellCheck: action
|
||||||
|
, changeUnitMeasurement: action
|
||||||
|
, changeNoCharacters: action
|
||||||
|
, changeShowTableEmptyLine: action
|
||||||
|
, changeDisplayComments: action
|
||||||
|
, changeDisplayResolved: action
|
||||||
|
, changeMacrosSettings: action
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
@observable unitMeasurement = 1;
|
unitMeasurement = 1;
|
||||||
|
isSpellChecking = true;
|
||||||
|
isNonprintingCharacters = false;
|
||||||
|
isHiddenTableBorders = false;
|
||||||
|
isComments = true;
|
||||||
|
isResolvedComments = true;
|
||||||
|
macrosMode = 0;
|
||||||
|
|
||||||
@observable isSpellChecking = true;
|
changeUnitMeasurement(value) {
|
||||||
|
|
||||||
@observable isNonprintingCharacters = false;
|
|
||||||
@observable isHiddenTableBorders = false;
|
|
||||||
|
|
||||||
@observable isComments = true;
|
|
||||||
@observable isResolvedComments = true;
|
|
||||||
|
|
||||||
@observable macrosMode = 0;
|
|
||||||
|
|
||||||
@action changeUnitMeasurement(value) {
|
|
||||||
this.unitMeasurement = +value;
|
this.unitMeasurement = +value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@action changeSpellCheck(value) {
|
changeSpellCheck(value) {
|
||||||
this.isSpellChecking = value;
|
this.isSpellChecking = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@action changeNoCharacters(value) {
|
changeNoCharacters(value) {
|
||||||
this.isNonprintingCharacters = value;
|
this.isNonprintingCharacters = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@action changeShowTableEmptyLine(value) {
|
changeShowTableEmptyLine(value) {
|
||||||
this.isHiddenTableBorders = value;
|
this.isHiddenTableBorders = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@action changeDisplayComments(value) {
|
changeDisplayComments(value) {
|
||||||
this.isComments = value;
|
this.isComments = value;
|
||||||
if (!value) this.changeDisplayResolved(value);
|
if (!value) this.changeDisplayResolved(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@action changeDisplayResolved(value) {
|
changeDisplayResolved(value) {
|
||||||
this.isResolvedComments = value;
|
this.isResolvedComments = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@action changeMacrosSettings(value) {
|
changeMacrosSettings(value) {
|
||||||
this.macrosMode = +value;
|
this.macrosMode = +value;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,7 +1,11 @@
|
||||||
import {action, observable, computed} from 'mobx';
|
import {makeObservable, action, observable, computed} from 'mobx';
|
||||||
import {f7} from 'framework7-react';
|
import {f7} from 'framework7-react';
|
||||||
|
|
||||||
export class storeTableSettings {
|
export class storeTableSettings {
|
||||||
|
constructor() {
|
||||||
|
makeObservable(this)
|
||||||
|
}
|
||||||
|
|
||||||
@observable _templates = [];
|
@observable _templates = [];
|
||||||
@action initTableTemplates (templates) {
|
@action initTableTemplates (templates) {
|
||||||
this._templates = templates;
|
this._templates = templates;
|
||||||
|
|
Loading…
Reference in a new issue