In this section, we are going to perform a basic integration with the application menu. You are going to create a Help/About Node menu that sends the show-node-info command to the renderer process. Our React application is going to handle the command and display a simple alert box with the Ethereum node information. Later on, you can provide a more sophisticated dialog with detailed information.
Let's start with the main process and the Menu template:
- Switch to the public/electron.js file and import the Menu object from the Electron framework:
const { app, BrowserWindow, Menu } = require('electron');
- Append the Menu code from the following listing to the bottom of file:
Menu.setApplicationMenu(
Menu.buildFromTemplate([
{
label: 'Help',
submenu: [
{
label: 'About Node',
...