Skip to content

Commit 51f9ea4

Browse files
committed
create Learn More submenu
1 parent 9d39087 commit 51f9ea4

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

Desktop-Client/main.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
const { app, BrowserWindow, screen } = require('electron');
1+
const {
2+
app,
3+
BrowserWindow,
4+
screen,
5+
Menu,
6+
MenuItem,
7+
shell,
8+
} = require('electron');
29
const url = require('url');
310
const path = require('path');
411

@@ -18,6 +25,18 @@ function createAppWindow() {
1825
})
1926
);
2027

28+
Menu.getApplicationMenu().items[4].submenu.insert(
29+
0,
30+
new MenuItem({
31+
label: 'Learn More',
32+
click: async () => {
33+
await shell.openExternal(
34+
'https://github.com/AbdulMoizAli/Realtime-Code-Sharing'
35+
);
36+
},
37+
})
38+
);
39+
2140
window.once('ready-to-show', () => {
2241
window.show();
2342
window.focus();

0 commit comments

Comments
 (0)