Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "snakescreen",
"version": "1.0.16",
"version": "1.0.19",
"private": true,
"main": "public/electron.js",
"homepage": ".",
Expand Down Expand Up @@ -30,7 +30,7 @@
"electron:dir": "electron-builder --dir",
"electron:build": "electron-builder",
"publish": "electron-builder -p always",
"build&publish": "npm run build && npm run publish"
"build-publish": "npm run build && npm run publish"
},
"devDependencies": {
"electron": "^35.0.2",
Expand Down
5 changes: 3 additions & 2 deletions public/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const { checkForUpdates } = require('./updater');
const path = require('path');

let mainWindow;
checkForUpdates();

function createWindow() {
mainWindow = new BrowserWindow({
Expand All @@ -16,7 +15,9 @@ function createWindow() {
});

mainWindow.loadFile('./build/index.html');


checkForUpdates();

mainWindow.on('closed', function () {
mainWindow = null;
});
Expand Down
7 changes: 6 additions & 1 deletion public/updater.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ const { autoUpdater } = require('electron-updater');
autoUpdater.autoDownload = false;

autoUpdater.on('error', (error) => {
dialog.showErrorBox('Error: ', (error == null) ? "unknown" : (error.stack || error).toString());
let message = (error == null) ? "unknown" : (error.stack || error).toString();
dialog.showMessageBox({
type: "info",
title: "Error: ",
message: message
});
});

autoUpdater.on('update-available', () => {
Expand Down