-
-
Notifications
You must be signed in to change notification settings - Fork 461
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 #29 from hovancik/release/0.3.0
Release version 0.3.0
- Loading branch information
Showing
9 changed files
with
91 additions
and
34 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
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,6 +1,28 @@ | ||
const {ipcRenderer} = require('electron') | ||
const {ipcRenderer, shell, remote} = require('electron') | ||
let VersionChecker = require('./utils/versionChecker') | ||
|
||
ipcRenderer.on('playSound', (event, data) => { | ||
let audio = new Audio(`audio/${data}.wav`) | ||
audio.play() | ||
}) | ||
|
||
ipcRenderer.on('checkVersion', (event, data) => { | ||
if (remote.getGlobal('shared').isNewVersion) { | ||
notifyNewVersion() | ||
} else { | ||
new VersionChecker().latest(function (version) { | ||
if (data !== version) { | ||
remote.getGlobal('shared').isNewVersion = true | ||
ipcRenderer.send('update-tray') | ||
notifyNewVersion() | ||
} | ||
}) | ||
} | ||
}) | ||
|
||
function notifyNewVersion () { | ||
let notification = new Notification('stretchly', { | ||
body: 'New version is available!' | ||
}) | ||
notification.onclick = () => shell.openExternal('https://github.com/hovancik/stretchly/releases') | ||
} |
File renamed without changes.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.