-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from brendancboyle/dev
1.0.3
- Loading branch information
Showing
13 changed files
with
54 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
// @flow | ||
import { app, Menu, shell, BrowserWindow } from 'electron'; | ||
import { app, Menu, shell, BrowserWindow, dialog } from 'electron'; | ||
import { autoUpdater } from 'electron-updater'; | ||
import ElectronLog from 'electron-log'; | ||
|
||
export default class MenuBuilder { | ||
mainWindow: BrowserWindow; | ||
|
@@ -97,7 +99,8 @@ export default class MenuBuilder { | |
label: 'Help', | ||
submenu: [ | ||
{ label: 'Learn More', click() { shell.openExternal('https://universalpresenterremote.com'); } }, | ||
{ label: 'Support', click() { shell.openExternal('mailto:[email protected]'); } } | ||
{ label: 'Support', click() { shell.openExternal('mailto:[email protected]'); } }, | ||
{ label: 'Check For Updates', click: () => { MenuBuilder.checkForUpdates(); } } | ||
] | ||
}; | ||
|
||
|
@@ -163,9 +166,25 @@ export default class MenuBuilder { | |
click() { | ||
shell.openExternal('mailto:[email protected]'); | ||
} | ||
}, { | ||
label: 'Check For Updates', | ||
click: () => { | ||
MenuBuilder.checkForUpdates(); | ||
} | ||
}] | ||
}]; | ||
|
||
return templateDefault; | ||
} | ||
|
||
static checkForUpdates() { | ||
ElectronLog.info('Checking for updates...'); | ||
autoUpdater.on('update-not-available', () => { | ||
dialog.showMessageBox({ | ||
title: 'No Updates', | ||
message: 'Current version is up-to-date.' | ||
}); | ||
}); | ||
autoUpdater.checkForUpdates(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.