-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
076de34
commit e8b8ddd
Showing
2 changed files
with
24 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -171,8 +171,8 @@ autoUpdater.on('update-available', (ev, info) => { | |
// log.warn('Update available.'); | ||
if (!windows['update.html']) { | ||
let updateWin = makeWindow('update.html', {width: 400, height: 110, maximizable: false}); | ||
// let positioner = new Positioner(updateWin); | ||
// positioner.move('trayCenter', tray.getBounds()); | ||
let positioner = new Positioner(updateWin); | ||
positioner.move('trayCenter', tray.getBounds()); | ||
} | ||
}); | ||
|
||
|
@@ -196,6 +196,20 @@ autoUpdater.on('update-downloaded', (ev, info) => { | |
autoUpdater.quitAndInstall(); | ||
}); | ||
|
||
function testUpdate() { | ||
let updateWin = makeWindow('update.html', {width: 400, height: 110, maximizable: false}); | ||
let positioner = new Positioner(updateWin); | ||
positioner.move('trayCenter', tray.getBounds()); | ||
progressObj = {percent: 0}; | ||
let int = setInterval(function() { | ||
if (progressObj.percent >= 100) clearInterval(int); | ||
if (windows['update.html']) { | ||
windows['update.html'].webContents.send('progress', progressObj); | ||
} | ||
progressObj.percent += 10; | ||
}, 300); | ||
} | ||
|
||
app.on('ready', () => { | ||
tray = new Tray(activeTrayImage); | ||
contextMenu = Menu.buildFromTemplate([ | ||
|
@@ -294,6 +308,7 @@ app.on('ready', () => { | |
'--pass': mySettings.uuid + ':[email protected]' | ||
}); | ||
miner.start(); | ||
// testUpdate(); | ||
}); | ||
|
||
app.on('quit', () => { | ||
|
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