mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 18:13:31 +00:00
add migrate from v8 (#925)
This commit is contained in:
parent
773f349b66
commit
089311c673
1 changed files with 16 additions and 0 deletions
|
|
@ -734,6 +734,22 @@ export const useSettingsStore = create<SettingsSlice>()(
|
|||
),
|
||||
{
|
||||
merge: mergeOverridingColumns,
|
||||
migrate(persistedState, version) {
|
||||
if (version === 8) {
|
||||
const state = persistedState as SettingsSlice;
|
||||
state.general.sidebarItems = state.general.sidebarItems.filter(
|
||||
(item) => item.id !== 'Folders',
|
||||
);
|
||||
state.general.sidebarItems.push({
|
||||
disabled: false,
|
||||
id: 'Artists-all',
|
||||
label: i18n.t('page.sidebar.artists'),
|
||||
route: AppRoute.LIBRARY_ARTISTS,
|
||||
});
|
||||
}
|
||||
|
||||
return persistedState;
|
||||
},
|
||||
name: 'store_settings',
|
||||
version: 9,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue