How to use the electron.app.quit function in electron

To help you get started, we’ve selected a few electron examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mihirpathak97 / audius / src / js / main.js View on Github external
case '--squirrel-uninstall':
      // Undo anything you did in the --squirrel-install and
      // --squirrel-updated handlers

      // Remove desktop and start menu shortcuts
      spawnUpdate(['--removeShortcut', exeName]);

      setTimeout(app.quit, 1000);
      return true;

    case '--squirrel-obsolete':
      // This is called on the outgoing version of your app before
      // we update to the new version - it's the opposite of
      // --squirrel-updated

      app.quit();
      return true;
  }
}
github tickbh / VisualUIEditor / app.js View on Github external
app.on('window-all-closed', function() {
        if (process.platform != 'darwin')
            app.quit()
    })
    // This method will be called when Electron has done everything
github scottbot95 / RoR2ModManager / main.ts View on Github external
app.on('window-all-closed', () => {
    // On OS X it is common for applications and their menu bar
    // to stay active until the user quits explicitly with Cmd + Q
    if (process.platform !== 'darwin') {
      app.quit();
    }
  });
github megmogmog1965 / cloudwatchlogs-downloader / src / main / index.ts View on Github external
app.on('window-all-closed', () => {
  // if (process.platform !== 'darwin') { app.quit(); }
  app.quit();
});
github stephnr / electron-angular-boilerplate / main.js View on Github external
app.on('window-all-closed', function() {
  if(process.platform !== 'darwin') { app.quit(); }
});
github hundredrabbits / Orca / desktop / main.js View on Github external
app.win.on('closed', () => {
    win = null
    app.quit()
  })
github signalapp / Signal-Desktop / ts / updater / windows.ts View on Github external
}

    try {
      await verifyAndInstall(updateFilePath, version, logger);
      installing = true;
    } catch (error) {
      logger.info(
        'checkDownloadAndInstall: showing general update failure dialog...'
      );
      await showCannotUpdateDialog(getMainWindow(), messages);

      throw error;
    }

    markShouldQuit();
    app.quit();
  } catch (error) {
    logger.error('checkDownloadAndInstall: error', getPrintableError(error));
  } finally {
    isChecking = false;
  }
}
github stoplightio / desktop / app / main.js View on Github external
ipcMain.on('app.relaunch', () => {
  app.relaunch();
  app.quit();
});
github be5invis / Iosevka / snapshot / get-snap.js View on Github external
function checkQuit() {
	if (allWindowClosed && pendingTasks == 0) app.quit();
}