Skip to content

Commit

Permalink
update osx codesign, added loading spinner for update downloading
Browse files Browse the repository at this point in the history
  • Loading branch information
hanayik committed Jul 13, 2017
1 parent cc9b76c commit 1e48991
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ autoUpdater.on('update-available', function(){
dialog.showMessageBox(mainWindow, dialogOptions , function (response) {
updateResponse = response
if (response == 1) {
console.log('showing spinner now...')
mainWindow.webContents.send('showSpinner', 'whoooooooh!')
} else {

}
})
Expand Down
8 changes: 8 additions & 0 deletions core.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,15 @@ var savePath



ipcRenderer.on('showSpinner', function () {
//<div class="loader">Loading...</div>
spinnerDiv = document.createElement('div')
spinnerDiv.className = 'loader'
spinnerDiv.style.zIndex = "1000";
content.appendChild(spinnerDiv)
console.log("added spinner!")

})

function checkForUpdateFromRender() {
ipcRenderer.send('user-requests-update')
Expand Down
15 changes: 15 additions & 0 deletions css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,18 @@ video {
height: 60%;
object-fit: contain;
}

.loader {
position: absolute;
border: 16px solid #f3f3f3; /* Light grey */
border-top: 16px solid #3498db; /* Blue */
border-radius: 50%;
width: 120px;
height: 120px;
animation: spin 2s linear infinite;
}

@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"test": "echo \"Error: no test specified\" && exit 1",
"start": "electron app.js",
"build-mac": "electron-packager . --out=dist --icon ./icon.icns --platform=darwin --overwrite --tmpdir=false",
"osx-sign": "codesign --deep --force --verbose --sign 'PLJK232T8G' ./dist/Discourse-darwin-x64/Discourse.app",
"osx-sign": "codesign --deep --force --verbose -s 'Developer ID Application: Taylor Hanayik' ./dist/Discourse-darwin-x64/Discourse.app",
"startAppWithLogging": "./dist/Discourse-darwin-x64/Discourse.app/Contents/MacOS/Discourse"
},
"repository": {
Expand Down

0 comments on commit 1e48991

Please sign in to comment.