Skip to content

Commit

Permalink
feat: close options page after save
Browse files Browse the repository at this point in the history
  • Loading branch information
KarimAziev committed Apr 17, 2024
1 parent 9f724b2 commit e9843e9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/options/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,14 @@ const initOptions = async () => {
},
onSave: async (fields, newhints?: string) => {
const config = pairsToConfig(fields);
console.log('CONFIG', config);

try {
await chrome.storage.local.set({
keybindings: config,
hints: newhints || keybindingsConfig.hints || DEFAULT_HINTS,
});

messager.success('Configuration saved.', {
title: 'Chrome Emacs: ',
delay: 1000,
});
window.close();
} catch (err) {
messager.error('Error occured.', { title: 'Chrome Emacs: ' });
}
Expand Down

0 comments on commit e9843e9

Please sign in to comment.