feat: 快捷键整体重构优化

This commit is contained in:
alger
2026-03-04 20:28:38 +08:00
parent 36917a979d
commit 19092647d1
16 changed files with 2168 additions and 663 deletions
+3 -3
View File
@@ -1,8 +1,8 @@
import { app, ipcMain } from 'electron';
import Store from 'electron-store';
import { createDefaultShortcuts, type ShortcutsConfig } from '../../shared/shortcuts';
import set from '../set.json';
import { defaultShortcuts } from './shortcuts';
type SetConfig = {
isProxy: boolean;
@@ -29,7 +29,7 @@ type SetConfig = {
};
interface StoreType {
set: SetConfig;
shortcuts: typeof defaultShortcuts;
shortcuts: ShortcutsConfig;
}
let store: Store<StoreType>;
@@ -42,7 +42,7 @@ export function initializeConfig() {
name: 'config',
defaults: {
set: set as SetConfig,
shortcuts: defaultShortcuts
shortcuts: createDefaultShortcuts()
}
});