2021-03-15 17:29:01 +00:00
|
|
|
import {action, observable, makeObservable} from 'mobx';
|
2020-12-09 18:05:51 +00:00
|
|
|
|
|
|
|
export class storeApplicationSettings {
|
2021-03-15 17:29:01 +00:00
|
|
|
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
|
|
|
|
2021-03-15 17:29:01 +00:00
|
|
|
changeUnitMeasurement(value) {
|
2020-12-09 18:05:51 +00:00
|
|
|
this.unitMeasurement = +value;
|
|
|
|
}
|
|
|
|
|
2021-03-15 17:29:01 +00:00
|
|
|
changeSpellCheck(value) {
|
2020-12-09 18:05:51 +00:00
|
|
|
this.isSpellChecking = value;
|
|
|
|
}
|
|
|
|
|
2021-03-15 17:29:01 +00:00
|
|
|
changeMacrosSettings(value) {
|
2020-12-09 18:05:51 +00:00
|
|
|
this.macrosMode = +value;
|
|
|
|
}
|
|
|
|
}
|