-
-
Notifications
You must be signed in to change notification settings - Fork 48
/
StoreManager.ts
41 lines (37 loc) · 1.07 KB
/
StoreManager.ts
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { defaultBackgroundColor } from '@minsky/shared';
import Store from 'electron-store';
interface MinskyPreferences {
godleyTableShowValues: boolean;
godleyTableOutputStyle: string;
enableMultipleEquityColumns: boolean;
numberOfRecentFilesToDisplay: number;
wrapLongEquationsInLatexExport: boolean;
font: string;
// focusFollowsMouse: boolean;
numBackups: number;
}
interface MinskyStore {
recentFiles: Array<string>;
backgroundColor: string;
preferences: MinskyPreferences;
}
class StoreManager {
// TODO:: We should sync the initial values with backend
static store = new Store<MinskyStore>({
defaults: {
recentFiles: [],
backgroundColor: defaultBackgroundColor,
preferences: {
godleyTableShowValues: false,
godleyTableOutputStyle: 'sign',
enableMultipleEquityColumns: false,
numberOfRecentFilesToDisplay: 10,
wrapLongEquationsInLatexExport: false,
font: "",
// focusFollowsMouse: false,
numBackups: 1,
},
},
});
}
export { StoreManager, MinskyPreferences };