chore: update persist keys to new interface

This commit is contained in:
Matthias 2024-09-11 19:29:21 +02:00
parent 11e6969cd3
commit 952965c3ba
4 changed files with 5 additions and 5 deletions

View File

@ -36,7 +36,7 @@ export const useColorStore = defineStore('colorStore', {
},
persist: {
key: STORE_UI_COLORS,
paths: ['colorPreference'],
pick: ['colorPreference'],
},
});

View File

@ -117,7 +117,7 @@ export const useLayoutStore = defineStore('layoutStore', {
},
persist: {
key: STORE_LAYOUTS,
afterRestore: (context) => {
afterHydrate: (context) => {
if (
context.store.dashboardLayout === null ||
typeof context.store.dashboardLayout === 'string' ||

View File

@ -250,7 +250,7 @@ export const usePairlistConfigStore = defineStore(
{
persist: {
key: 'ftPairlistConfig',
paths: ['savedConfigs', 'configName'],
pick: ['savedConfigs', 'configName'],
},
},
);

View File

@ -80,8 +80,8 @@ export const usePlotConfigStore = defineStore('plotConfig', {
},
persist: {
key: FT_PLOT_CONFIG_KEY,
paths: ['plotConfigName', 'customPlotConfigs'],
afterRestore: (context) => {
pick: ['plotConfigName', 'customPlotConfigs'],
afterHydrate: (context) => {
if (Object.keys(context.store.customPlotConfigs).length === 0) {
console.log('Initialized plotconfig');
context.store.customPlotConfigs = { default: deepClone(EMPTY_PLOTCONFIG) };