mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 10:03:33 +00:00
add local store migration for default window bar style
This commit is contained in:
parent
dd34888961
commit
6925727ccb
1 changed files with 10 additions and 1 deletions
|
|
@ -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}`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue