diff --git a/src/main/features/core/settings/index.ts b/src/main/features/core/settings/index.ts index 6a4af724..0369d62e 100644 --- a/src/main/features/core/settings/index.ts +++ b/src/main/features/core/settings/index.ts @@ -3,7 +3,16 @@ import type { TitleTheme } from '/@/shared/types/types'; import { dialog, ipcMain, nativeTheme, OpenDialogOptions, safeStorage } from 'electron'; import Store from 'electron-store'; -export const store = new Store(); +export const store = new Store({ + beforeEachMigration: (_store, context) => { + console.log(`settings migrate from ${context.fromVersion} → ${context.toVersion}`); + }, + migrations: { + '>=0.21.2': (store) => { + store.set('window_bar_style', 'linux'); + }, + }, +}); ipcMain.handle('settings-get', (_event, data: { property: string }) => { return store.get(`${data.property}`);