From 59ef91416648d832619560c47107ac201333a852 Mon Sep 17 00:00:00 2001 From: Taylor Hanayik Date: Thu, 13 Jul 2017 15:00:50 -0400 Subject: [PATCH] update osx codesign and added update spinner --- app.js | 3 +++ core.js | 8 ++++++++ css/app.css | 15 +++++++++++++++ package.json | 2 +- 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index fca240c..5b8cef1 100644 --- a/app.js +++ b/app.js @@ -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 { } }) diff --git a/core.js b/core.js index 63508c6..0a2e544 100644 --- a/core.js +++ b/core.js @@ -48,7 +48,15 @@ function checkForUpdateFromRender() { //alert('checked for update') } +ipcRenderer.on('showSpinner', function () { + //
Loading...
+ spinnerDiv = document.createElement('div') + spinnerDiv.className = 'loader' + spinnerDiv.style.zIndex = "1000"; + content.appendChild(spinnerDiv) + console.log("added spinner!") +}) diff --git a/css/app.css b/css/app.css index 4c85a75..d561eee 100644 --- a/css/app.css +++ b/css/app.css @@ -131,3 +131,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); } +} diff --git a/package.json b/package.json index 056f00e..0835fdc 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "test": "echo \"Error: no test specified\" && exit 1", "start": "electron app.js", "build-mac": "electron-packager . --out=dist --platform=darwin --icon ./icon.icns --overwrite --tmpdir=false", - "osx-sign": "codesign --deep --force --verbose --sign 'PLJK232T8G' ./dist/PNT-darwin-x64/PNT.app", + "osx-sign": "codesign --deep --force --verbose -s 'Developer ID Application: Taylor Hanayik' ./dist/PNT-darwin-x64/PNT.app", "startAppWithLogging": "./dist/PNT-darwin-x64/PNT.app/Contents/MacOS/PNT" }, "repository": {