]> Repos - mime-chat/commitdiff
merging
authorAndrew Gundersen <gundersena@xavier.edu>
Tue, 13 Apr 2021 14:35:03 +0000 (09:35 -0500)
committerAndrew Gundersen <gundersena@xavier.edu>
Tue, 13 Apr 2021 14:35:03 +0000 (09:35 -0500)
1  2 
package.json
src/background.ts
yarn.lock

diff --cc package.json
Simple merge
index 654c6733e47362d85091ee97848b9cc7ad8e9414,abb19614080bbfe3d979c97cb10c7576fbc619de..be717718229a709b1cd76cbc2df67829105bd742
@@@ -5,8 -5,10 +5,11 @@@
  
  "use strict";
  
- import { protocol, autoUpdater, dialog } from "electron";
 -import { protocol, dialog } from "electron";
 -const { autoUpdater } = require('electron-updater')
+ const log = require("electron-log")
++const { autoUpdater } = require('electron-updater')
++
  import { initApp } from './background/init';
++import { protocol, dialog } from "electron";
  
  // Scheme must be registered before the app is ready
  protocol.registerSchemesAsPrivileged([
  // Load environment variable
  const isDev = require('electron-is-dev');
  
 -
 -
 -// setTimeout(function () {
 -//   autoUpdater.checkForUpdatesAndNotify()
 -// }, 10000)
 -
 -// Check for an update every 2min.
 -// setInterval(() => {
 -//   autoUpdater.checkForUpdatesAndNotify()
 -// }, 120000)
 -
  // NOTE Program Begins Here
  (async () => {
+     autoUpdater.requestHeaders = { 'PRIVATE-TOKEN': 'seMF_apn237iUw8puG9a' }
+     autoUpdater.logger = log;
+     // Check for an update 10sec after Program Starts
+     setTimeout(function () {
+       autoUpdater.checkForUpdatesAndNotify()
+     }, 10000)
+     // Check for an update every 2min.
+     setInterval(() => {
+       autoUpdater.checkForUpdatesAndNotify()
+     }, 120000)
  
      console.log('Starting Crimata electron app.');
      initApp(isDev);
  
  })();
- // Code for auto app updates.
- if (!isDev) {
-     autoUpdater.setFeedURL({
-         url: "https://gitlab.com/api/v4/projects/25637892/releases",
-         headers: {"PRIVATE-TOKEN": "fSCN8xr4EgccV7z1UNaw"},
-         serverType: "default"
-     })
-     autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => {
-       const dialogOpts = {
-         type: 'info',
-         buttons: ['Restart', 'Later'],
-         title: 'Application Update',
-         message: process.platform === 'win32' ? releaseNotes : releaseName,
-         detail: 'A new version has been downloaded. Restart the application to apply the updates.'
-       }
--
-       dialog.showMessageBox(dialogOpts).then((returnValue) => {
-         if (returnValue.response === 0) autoUpdater.quitAndInstall()
-       })
-     })
--
-     setInterval(() => {
-         autoUpdater.checkForUpdates()
-     }, 5000)
- }
 -// Auto app updates.
 -// if (!isDev) {
 -//     autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => {
 -//       const dialogOpts = {
 -//         type: 'info',
 -//         buttons: ['Restart', 'Later'],
 -//         title: 'Application Update',
 -//         message: releaseName,
 -//         detail: 'A new version has been downloaded. Restart the application to apply the updates.'
 -//       }
 -//
 -//       dialog.showMessageBox(dialogOpts).then((returnValue) => {
 -//         if (returnValue.response === 0) autoUpdater.quitAndInstall()
 -//       })
 -//     })
 -//
 -//     setInterval(() => {
 -//         autoUpdater.checkForUpdates()
 -//     }, 5000)
 -// }
diff --cc yarn.lock
Simple merge