Use Jquery globally, Bootstrap JS Globally, Prevent buttons from Breaking on macOS.

This commit is contained in:
FallenGravity
2019-10-14 17:48:01 +02:00
parent 9a6a831c83
commit f4772342f4
11 changed files with 1130 additions and 1122 deletions

17
main.js
View File

@@ -1,12 +1,17 @@
// Modules to control application life and create native browser window
const {app, Menu, ipcMain, BrowserWindow} = require("electron");
const {
app,
Menu,
ipcMain,
BrowserWindow
} = require("electron");
const singleInstance = require("single-instance");
const path = require("path");
const fs = require("fs");
var locker = new singleInstance("Ether1DesktopWallet");
locker.lock().then(function () {
locker.lock().then(function() {
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
mainWindow = null;
@@ -30,7 +35,7 @@ locker.lock().then(function () {
mainWindow.webContents.openDevTools()
// Emitted when the window is closed.
mainWindow.on("closed", function () {
mainWindow.on("closed", function() {
// Dereference the window object, usually you would store windows
// in an array if your app supports multi windows, this is the time
// when you should delete the corresponding element.
@@ -46,7 +51,7 @@ locker.lock().then(function () {
app.on("ready", createWindow);
// Quit when all windows are closed.
app.on("window-all-closed", function () {
app.on("window-all-closed", function() {
// 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") {
@@ -55,7 +60,7 @@ locker.lock().then(function () {
}
});
app.on("activate", function () {
app.on("activate", function() {
// On OS X it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open.
if (mainWindow === null) {
@@ -76,7 +81,7 @@ locker.lock().then(function () {
ipcMain.on("appQuit", (event, arg) => {
app.quit();
});
}).catch(function (err) {
}).catch(function(err) {
app.quit();
});