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 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'src/index.js') 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 -- cgit v1.2.3