Move BLANK_PRESET_DATA to Table class

This commit is contained in:
redphx
2024-12-24 06:43:08 +07:00
parent c1786d3fba
commit 907e595b1e
12 changed files with 103 additions and 78 deletions

View File

@@ -22,10 +22,6 @@ export class KeyboardShortcutsManagerDialog extends BaseProfileManagerDialog<Key
private $unbindNote: HTMLElement;
private readonly allKeyElements: BxKeyBindingButton[] = [];
protected readonly BLANK_PRESET_DATA: KeyboardShortcutPresetData = {
mapping: {},
};
constructor(title: string) {
super(title, KeyboardShortcutsTable.getInstance());
@@ -132,7 +128,7 @@ export class KeyboardShortcutsManagerDialog extends BaseProfileManagerDialog<Key
}
private savePreset() {
const presetData = deepClone(this.BLANK_PRESET_DATA) as KeyboardShortcutPresetData;
const presetData = deepClone(this.presetsDb.BLANK_PRESET_DATA) as KeyboardShortcutPresetData;
// Get mapping
for (const $elm of this.allKeyElements) {