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

30 lines
746 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,
changeUnitMeasurement: action,
changeSpellCheck: action,
changeMacrosSettings: action
});
}
unitMeasurement = 1;
isSpellChecking = true;
macrosMode = 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;
}
}