replaced executeJavaScript with IPC event

This commit is contained in:
Jan Prochazka
2021-12-25 11:29:46 +01:00
parent 0e95082be6
commit ab4aef6c7e
5 changed files with 11 additions and 73 deletions

View File

@@ -25,6 +25,7 @@ import InputTextModal from '../modals/InputTextModal.svelte';
import { removeLocalStorage } from '../utility/storageCache';
import { showSnackbarSuccess } from '../utility/snackbar';
import { apiCall } from '../utility/api';
import runCommand from './runCommand';
function themeCommand(theme: ThemeDefinition) {
return {
@@ -533,3 +534,8 @@ export function registerFileCommands({
});
}
}
const electron = getElectron();
if (electron) {
electron.addEventListener('run-command', (e, commandId) => runCommand(commandId));
}