blob: 824b4c20cc520870c5cd7513c26bb0e84ec32835 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
import { observable } from 'mobx';
import { DEFAULT_APP_SETTINGS } from '../config';
export default class Settings {
@observable store = {
autoLaunchOnStart: DEFAULT_APP_SETTINGS.autoLaunchOnStart,
autoLaunchInBackground: DEFAULT_APP_SETTINGS.autoLaunchInBackground,
runInBackground: DEFAULT_APP_SETTINGS.runInBackground,
enableSystemTray: DEFAULT_APP_SETTINGS.enableSystemTray,
minimizeToSystemTray: DEFAULT_APP_SETTINGS.minimizeToSystemTray,
locale: DEFAULT_APP_SETTINGS.locale,
beta: DEFAULT_APP_SETTINGS.beta,
};
set(settings) {
this.store = Object.assign(this.store, settings);
}
all() {
return this.store;
}
get(key) {
return this.store[key];
}
}
|