Skip to content
This repository has been archived by the owner on Apr 26, 2019. It is now read-only.

Commit

Permalink
Fix some bugs regardling app staying open past close.. and fix update…
Browse files Browse the repository at this point in the history
…r window
  • Loading branch information
zerkz committed Aug 15, 2016
1 parent 8e3ceca commit c30268e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 10 deletions.
16 changes: 9 additions & 7 deletions app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ function checkForUpdatesAndStart() {
createMainWindow();
} else {
let updateWindow = new BrowserWindow({width: 300, height: 300, frame: false, show:false})

updateWindow.loadURL(`file://${__dirname}/updateCheck.html`);
updateWindow.show();
autoUpdater.setFeedURL(updateFeed + app.getVersion());

autoUpdater.addListener("checking-for-update", (event) => {
updateWindow.show();
//updateWindow.show();
});

autoUpdater.addListener("update-not-available", (event) => {
Expand Down Expand Up @@ -62,8 +63,8 @@ function checkForUpdatesAndStart() {
dialog.showErrorBox("HOTSBA Updater Exploded :(", "An error log was generated at " + process.cwd());
createMainWindow();
});

autoUpdater.checkForUpdates();

}

function createMainWindow() {
Expand All @@ -81,16 +82,17 @@ function checkForUpdatesAndStart() {
win.once('ready-to-show', () => {
win.show()
});
app.on('window-all-closed', function() {
app.quit();
});

app.on('will-quit', saveConfigs);
}
}


app.on('ready', checkForUpdatesAndStart);



app.on('will-quit', saveConfigs);

function saveConfigs () {
//save screen stuff to configs before closing.
}
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "hotsba",
"productName": "HOTSBA",
"version": "1.0.1",
"version": "1.0.2",
"homepage": "www.hotsba.com",
"description": "A draft helper/ban aid for Heroes of the Storm.",
"main": "main.js",
Expand Down
14 changes: 13 additions & 1 deletion app/updateCheck.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<script src="./ui/js/jquery-3.1.0.min.js"></script>
<script src="./ui/js/materialize.min.js"></script>
<link href="./ui/css/materialize.min.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<h1>Updating...</h1>
<h3 class="valign center-align">Checking for Updates</h3>
<div class="progress">
<div class="indeterminate"></div>
</div>
<h5 class="valign center-align">HOTSBA</h5>
<img class="center-block" src="./ui/images/hotsba_icon.png"></img>
</div>

</body>
</html>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hotsba",
"version": "1.0.1",
"version": "1.0.2",
"description": "A draft helper/ban aid for Heroes of the Storm.",
"repository": "https://github.com/zerkz/HOTSBA",
"build": {
Expand Down

0 comments on commit c30268e

Please sign in to comment.