Skip to content

Commit 94676b6

Browse files
committed
fix(main: menu): add check for updates for other platforms
1 parent 658d3c0 commit 94676b6

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

src/main/menu/main.ts

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const aboutApp = () => {
3636
}
3737

3838
const appMenuCommon: Record<
39-
'preferences' | 'quit',
39+
'preferences' | 'quit' | 'update',
4040
MenuItemConstructorOptions
4141
> = {
4242
preferences: {
@@ -48,18 +48,7 @@ MenuItemConstructorOptions
4848
)
4949
}
5050
},
51-
quit: {
52-
label: 'Quit massCode',
53-
role: 'quit'
54-
}
55-
}
56-
57-
const appMenuMac: MenuItemConstructorOptions[] = [
58-
{
59-
label: 'About massCode',
60-
click: () => aboutApp()
61-
},
62-
{
51+
update: {
6352
label: 'Check for Updates...',
6453
click: async () => {
6554
const newVersion = await checkForUpdate()
@@ -85,6 +74,20 @@ const appMenuMac: MenuItemConstructorOptions[] = [
8574
}
8675
}
8776
},
77+
quit: {
78+
label: 'Quit massCode',
79+
role: 'quit'
80+
}
81+
}
82+
83+
const appMenuMac: MenuItemConstructorOptions[] = [
84+
{
85+
label: 'About massCode',
86+
click: () => aboutApp()
87+
},
88+
{
89+
...appMenuCommon.update
90+
},
8891
{
8992
type: 'separator'
9093
},
@@ -116,6 +119,7 @@ const appMenuMac: MenuItemConstructorOptions[] = [
116119

117120
const appMenu: MenuItemConstructorOptions[] = [
118121
{ ...appMenuCommon.preferences },
122+
{ ...appMenuCommon.update },
119123
{ ...appMenuCommon.quit }
120124
]
121125

0 commit comments

Comments
 (0)