diff options
| author | Unknown <Alee14498@gmail.com> | 2017-10-21 18:53:36 -0400 |
|---|---|---|
| committer | Unknown <Alee14498@gmail.com> | 2017-10-21 18:53:36 -0400 |
| commit | 3c14f4afc8a8a20a113c7ff8c56022e8825c40d1 (patch) | |
| tree | 87e266acf0f5e18fc8dde19f41022cee2fc0a6ae /src | |
| parent | 4bad937c7fcb1c35b28d6e806c69f129f969447e (diff) | |
| download | AleeBot-3c14f4afc8a8a20a113c7ff8c56022e8825c40d1.tar.gz AleeBot-3c14f4afc8a8a20a113c7ff8c56022e8825c40d1.tar.bz2 AleeBot-3c14f4afc8a8a20a113c7ff8c56022e8825c40d1.zip | |
Added electron
Diffstat (limited to 'src')
| -rw-r--r-- | src/index.js | 35 | ||||
| -rw-r--r-- | src/setup.html | 2 |
2 files changed, 36 insertions, 1 deletions
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 @@ -<DOCTYPE HTML> +<!DOCTYPE HTML> <html> <head> </head> |
