Skip to content
This repository was archived by the owner on Jun 20, 2022. It is now read-only.

Commit

Permalink
auto update notify window
Browse files Browse the repository at this point in the history
  • Loading branch information
moughxyz committed Jan 31, 2017
1 parent 2be147f commit 5220b01
Show file tree
Hide file tree
Showing 5 changed files with 45,329 additions and 17 deletions.
8 changes: 7 additions & 1 deletion app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,17 @@

<script>
try {
const {ipcRenderer} = require('electron');

window.nodeRequire = require;
delete window.require;
delete window.exports;
delete window.module;

ipcRenderer.on('notify', function (event, message) {
alert(message);
});

const {remote} = window.nodeRequire('electron')
const {Menu, MenuItem} = remote

Expand All @@ -31,7 +37,7 @@

</script>

<script src="./js/compiled.min.js" debug="true"></script>
<script src="./js/compiled.js" debug="false"></script>
<link rel="stylesheet" media="all" href="./stylesheets/app.css" debug="false" />

</head>
Expand Down
4 changes: 4 additions & 0 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ app.setName('Standard Notes');
let win
let willQuitApp = false;

autoUpdater.on("update-downloaded", function() {
win.webContents.send("notify", "A new update is ready to install. Updates address performance and security issues, as well as bug fixes and feature enhancements. Simply quit Standard Notes and re-open it for the update to be applied.")
})

process.on('uncaughtException', function (err) {
console.log(err);
})
Expand Down
Loading

0 comments on commit 5220b01

Please sign in to comment.