-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
58 lines (53 loc) · 1.38 KB
/
Copy pathmain.js
File metadata and controls
58 lines (53 loc) · 1.38 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
Copyright (c) Gavin R. Isgar 2020
Developed at Hack Upstate XV (October 3-4, 2020)
*/
const { app, BrowserWindow, ipcMain } = require("electron");
require("electron-reload") ("./");
const fs = require("fs");
let createMainWindow = () => {
const win = new BrowserWindow({
width: 1200,
height: 850,
resizable: false,
maximizable: false,
fullscreenable: false,
backgroundColor: "#343940",
frame: false,
title: "Raycord",
show: false,
webPreferences: {
nodeIntegration: true,
devTools: true
}
});
win.loadFile("./index.html");
win.on('ready-to-show', () => {
win.show();
win.focus();
});
}
app.whenReady().then(createMainWindow);
ipcMain.on('open-window', (event, arg) => {
if (arg == "about") {
let win = new BrowserWindow({
width: 500,
height: 350,
show: false,
frame: false,
resizable: false,
maximizable: false,
fullscreenable: false,
backgroundColor: "#343940",
webPreferences: {
nodeIntegration: true,
devTools: true
}
});
win.loadFile("./routes/about/about.html");
win.on('ready-to-show', () => {
win.show();
win.focus();
});
}
});