mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-24 08:07:23 +08:00
@@ -2,6 +2,7 @@ import { app, ipcMain } from 'electron';
|
||||
import Store from 'electron-store';
|
||||
|
||||
import set from '../set.json';
|
||||
import { defaultShortcuts } from './shortcuts';
|
||||
|
||||
interface StoreType {
|
||||
set: {
|
||||
@@ -12,6 +13,7 @@ interface StoreType {
|
||||
authorUrl: string;
|
||||
musicApiPort: number;
|
||||
};
|
||||
shortcuts: typeof defaultShortcuts;
|
||||
}
|
||||
|
||||
let store: Store<StoreType>;
|
||||
@@ -23,7 +25,8 @@ export function initializeConfig() {
|
||||
store = new Store<StoreType>({
|
||||
name: 'config',
|
||||
defaults: {
|
||||
set
|
||||
set,
|
||||
shortcuts: defaultShortcuts
|
||||
}
|
||||
});
|
||||
|
||||
@@ -41,3 +44,7 @@ export function initializeConfig() {
|
||||
|
||||
return store;
|
||||
}
|
||||
|
||||
export function getStore() {
|
||||
return store;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user