forked from akanyan/STARTLINER
feat: slightly better config
This commit is contained in:
@ -25,7 +25,7 @@ export const usePkgStore = defineStore('pkg', {
|
||||
profile: (state) => state.prf,
|
||||
isEnabled: (state) => (pkg: Package | undefined) =>
|
||||
pkg !== undefined && state.prf?.mods.includes(pkgKey(pkg)),
|
||||
cfg: (state) => (key: string) => state.prf?.cfg[key]
|
||||
cfg: (state) => (key: string) => state.prf?.cfg[key],
|
||||
},
|
||||
actions: {
|
||||
setupListeners() {
|
||||
@ -102,9 +102,9 @@ export const usePkgStore = defineStore('pkg', {
|
||||
},
|
||||
|
||||
async set_cfg(key: string, value: string | boolean | number) {
|
||||
await invoke('set_cfg', { key, value: `${value}` });
|
||||
await invoke('set_cfg', { key, value });
|
||||
await this.reloadProfile();
|
||||
await this.saveProfile();
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user