web-apps/apps/presentationeditor/mobile/src/store/applicationSettings.js

37 lines
932 B
JavaScript
Raw Normal View History

import {action, observable, makeObservable} from 'mobx';
2020-12-09 18:05:51 +00:00
export class storeApplicationSettings {
constructor() {
makeObservable(this, {
unitMeasurement: observable,
isSpellChecking: observable,
macrosMode: observable,
2022-05-23 13:27:13 +00:00
macrosRequest: observable,
changeUnitMeasurement: action,
changeSpellCheck: action,
2022-05-23 13:27:13 +00:00
changeMacrosSettings: action,
changeMacrosRequest: action
});
}
unitMeasurement = 1;
isSpellChecking = true;
macrosMode = 0;
2022-05-23 13:27:13 +00:00
macrosRequest = 0;
2020-12-09 18:05:51 +00:00
changeUnitMeasurement(value) {
2020-12-09 18:05:51 +00:00
this.unitMeasurement = +value;
}
changeSpellCheck(value) {
2020-12-09 18:05:51 +00:00
this.isSpellChecking = value;
}
changeMacrosSettings(value) {
2020-12-09 18:05:51 +00:00
this.macrosMode = +value;
}
2022-05-23 13:27:13 +00:00
changeMacrosRequest(value) {
this.macrosRequest = value;
}
2020-12-09 18:05:51 +00:00
}