small refactor

This commit is contained in:
Jan Prochazka
2021-01-30 20:05:50 +01:00
parent a17b76c570
commit a714f7ae54
4 changed files with 10 additions and 11 deletions

View File

@@ -152,8 +152,7 @@ function buildMenu() {
}
ipcMain.on('update-menu', async (event, arg) => {
const commands = await mainWindow.webContents.executeJavaScript(`getCurrentTabCommands()`);
console.log('getCurrentTabCommands', commands);
const commands = await mainWindow.webContents.executeJavaScript(`dbgate_getCurrentTabCommands()`);
mainMenu.getMenuItemById('save').enabled = !!commands.save;
mainMenu.getMenuItemById('saveAs').enabled = !!commands.saveAs;
});