forked from NiceneNerd/ice-spear
-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.js
42 lines (36 loc) · 1.99 KB
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**
* ██╗ ██████╗███████╗ ███████╗██████╗ ███████╗ █████╗ ██████╗
* ██║██╔════╝██╔════╝ ██╔════╝██╔══██╗██╔════╝██╔══██╗██╔══██╗
* ██║██║ █████╗█████╗███████╗██████╔╝█████╗ ███████║██████╔╝
* ██║██║ ██╔══╝╚════╝╚════██║██╔═══╝ ██╔══╝ ██╔══██║██╔══██╗
* ██║╚██████╗███████╗ ███████║██║ ███████╗██║ ██║██║ ██║
* ╚═╝ ╚═════╝╚══════╝ ╚══════╝╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝
* ~~~~ Ice-Spear Tools - 2018 Max Bebök ~~~~
*
* @copyright 2018 - Max Bebök
* @author Max Bebök
* @license GNU-GPLv3 - see the "LICENSE" file in the root directory
* @see https://gitlab.com/ice-spear-tools/
*/
const app = require('electron').app;
const packageJson = require("./package.json");
const Window_Handler = require("./lib/window_handler.js");
var windowHandler = new Window_Handler();
app.on('ready', function()
{
windowHandler.open(packageJson["ice-spear"]["default-app"]);
});
app.on('window-all-closed', function()
{
if(process.platform !== 'darwin')
app.quit();
});
app.on('activate', function()
{
if(windowHandler.countWindows() == 0)
windowHandler.open(packageJson["ice-spear"]["default-app"]);
});
app.on('browser-window-created', function(e, window)
{
windowHandler.onWindowCreated(e, window);
});