feat: 添加快捷键 以及快捷键管理功能

ref #39
This commit is contained in:
alger
2025-01-15 00:30:00 +08:00
parent 072025a543
commit 45cbc15c0f
9 changed files with 681 additions and 12 deletions
+8 -1
View File
@@ -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;
}