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: { persist: {
key: STORE_UI_COLORS, key: STORE_UI_COLORS,
paths: ['colorPreference'], pick: ['colorPreference'],
}, },
}); });

View File

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

View File

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

View File

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