aboutsummaryrefslogtreecommitdiff
path: root/src/index.js
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2021-12-25 03:28:35 +0100
committer0neGal <mail@0negal.com>2021-12-25 03:28:35 +0100
commitb9079cde31ac7d4d39971e955dea6542e7431305 (patch)
tree5f4799a6d13186b31d821390a55a976398da47d6 /src/index.js
parent208e7528a2e120c954e7eb28e93510b1b9240905 (diff)
downloadViper-b9079cde31ac7d4d39971e955dea6542e7431305.tar.gz
Viper-b9079cde31ac7d4d39971e955dea6542e7431305.zip
basic frontend
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/index.js b/src/index.js
new file mode 100644
index 0000000..50f2b6e
--- /dev/null
+++ b/src/index.js
@@ -0,0 +1,25 @@
+const path = require("path");
+const { app, BrowserWindow } = require("electron");
+
+function start() {
+ win = new BrowserWindow({
+ width: 500,
+ height: 115,
+ show: false,
+ title: "Viper",
+ webPreferences: {
+ nodeIntegration: true,
+ contextIsolation: false,
+ },
+ }); win.openDevTools()
+
+ win.removeMenu();
+ win.loadFile(__dirname + "/app/index.html");
+ win.webContents.once("dom-ready", () => {win.show()});
+}
+
+app.on("ready", () => {
+ app.setPath("userData", path.join(app.getPath("cache"), app.name));
+ start();
+})
+