From 3c14f4afc8a8a20a113c7ff8c56022e8825c40d1 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 21 Oct 2017 18:53:36 -0400 Subject: Added electron --- src/index.js | 35 +++++++++++++++++++++++++++++++++++ src/setup.html | 2 +- 2 files changed, 36 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/index.js b/src/index.js index e69de29..27b7f3a 100644 --- a/src/index.js +++ b/src/index.js @@ -0,0 +1,35 @@ +/********************************************* +* +* AleeBot for Discord servers +* Copyright (C) 2017 AleeCorp +* +**********************************************/ +const {app, BrowserWindow} = require('electron'); +const path = require('path'); +const url = require('url'); + +let win; + +function createWindow(){ + win = new BrowserWindow({width:800, height:600}) + + win.loadURL(url.format({ + pathname: path.join(__dirname, 'setup.html'), + protocol: 'file:', + slashes: true + })); + + win.webContents.openDevTools(); + + win.on('closed', () => { + win = null; + }); + } + + app.on('ready', createWindow); + + app.on('window-all-closed', () => { + if(process.platform !== 'darwin'){ + app.quit(); + } + }); \ No newline at end of file diff --git a/src/setup.html b/src/setup.html index a14e779..f2e4b7b 100644 --- a/src/setup.html +++ b/src/setup.html @@ -1,4 +1,4 @@ - + -- cgit v1.2.3