ls-vertretungsplan-desktop

UNOFFICIAL Desktop App for the schedule of Lornsenschule, Schleswig
git clone git://archive.git.mtrnord.blog/MTRNord/ls-vertretungsplan-desktop.git
Log | Files | Refs | README

commit 89e29944eafa111290e2bb4bd76eefa3c7b22529
parent 8af440d27930b06df81d5aef05ab6d874a4a344e
Author: MTRNord <mtrnord1@gmail.com>
Date:   Sun,  4 Sep 2016 19:28:49 +0200

fix finally Autoupdater

Diffstat:
Mapp/main.js | 27++++++++++++++++++++++-----
Mapp/package.json | 2+-
Mpackage.json | 4++--
3 files changed, 25 insertions(+), 8 deletions(-)

diff --git a/app/main.js b/app/main.js @@ -9,18 +9,35 @@ let win function update () { console.warn("Starting Autoupdater") console.warn(app.getVersion()) - var feedUrl = 'https://ls-desktop.herokuapp.com/update/' + os.platform() + '/' + app.getVersion() + '/'; + var feedUrl = 'http://ls-desktop.herokuapp.com/update/' + os.platform() + '/' + app.getVersion() + '/'; autoUpdater.setFeedURL(feedUrl); - autoUpdater.checkForUpdates() + console.log('created'); + autoUpdater.on('checking-for-update', function() { + console.log("checking-for-update"); + }); + + autoUpdater.on('update-available', function() { + console.log("update-available"); + }); + + autoUpdater.on('update-not-available', function() { + console.log("update-not-available"); + }); + + autoUpdater.on('update-downloaded', function() { + console.log(" update-downloaded"); + }); + + setTimeout(function() {autoUpdater.checkForUpdates()}, 10000); autoUpdater.on('update-downloaded', function (event, releaseNotes, releaseName, releaseDate, updateUrl, quitAndUpdate) { - var index = dialog.showMessageBox(mainWindow, { + var index = dialog.showMessageBox({ type: 'info', buttons: ['Restart', 'Later'], title: "Lornsenschule Vertretungsplan", - message: i18n.__('The new version has been downloaded. Please restart the application to apply the updates.'), + message: ('The new version has been downloaded. Please restart the application to apply the updates.'), detail: releaseName + "\n\n" + releaseNotes }); @@ -28,7 +45,7 @@ function update () { return; } - autoUpdater.quitAndUpdate(); + quitAndUpdate() }); } diff --git a/app/package.json b/app/package.json @@ -1,7 +1,7 @@ { "name": "ls_vertretungsplan_desktop", "productName": "Lornsenschule Vertretungsplan", - "version": "0.1.0", + "version": "0.1.1", "description": "Eine Anwendung die den Vertretungsplan auf dem Desktop anzeigt", "main": "./main.js", "author": { diff --git a/package.json b/package.json @@ -1,6 +1,6 @@ { "name": "ls_vertretungsplan_desktop", - "version": "0.1.0", + "version": "0.1.1", "description": "Eine Anwendung die den Vertretungsplan auf dem Desktop anzeigt", "author": "Marcel Radzio", "license": "", @@ -34,7 +34,7 @@ }, "win": { "iconUrl": "https://github.com/MTRNord/ls-vertretungsplan-desktop/tree/master/app/LS.ico?raw=true", - "remoteReleases": "http://ls-desktop.herokuapp.com/download/0.0.4/", + "remoteReleases": "http://ls-desktop.herokuapp.com/download/0.1.0/", "icon": "app/LS.ico" }, "linux": {