Skip to content

Commit

Permalink
create Learn More submenu
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdulMoizAli committed Jul 18, 2021
1 parent 9d39087 commit 51f9ea4
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion Desktop-Client/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
const { app, BrowserWindow, screen } = require('electron');
const {
app,
BrowserWindow,
screen,
Menu,
MenuItem,
shell,
} = require('electron');
const url = require('url');
const path = require('path');

Expand All @@ -18,6 +25,18 @@ function createAppWindow() {
})
);

Menu.getApplicationMenu().items[4].submenu.insert(
0,
new MenuItem({
label: 'Learn More',
click: async () => {
await shell.openExternal(
'https://github.com/AbdulMoizAli/Realtime-Code-Sharing'
);
},
})
);

window.once('ready-to-show', () => {
window.show();
window.focus();
Expand Down

0 comments on commit 51f9ea4

Please sign in to comment.