aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/app/index.html26
-rw-r--r--src/app/main.css36
-rw-r--r--src/index.js25
3 files changed, 87 insertions, 0 deletions
diff --git a/src/app/index.html b/src/app/index.html
new file mode 100644
index 0000000..c2bb777
--- /dev/null
+++ b/src/app/index.html
@@ -0,0 +1,26 @@
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width,initial-scale=1.0">
+ <link rel="stylesheet" href="main.css">
+ </head>
+ <body>
+ <div class="lines">
+ <div class="line">
+ <div class="text">Welcome to Viper!</div>
+ <div class="buttons">
+ <button id="update">Update</button>
+ <button id="setpath">Game Path</button>
+ </div>
+ </div>
+ <div class="line">
+ <div class="text">Launch:</div>
+ <div class="buttons">
+ <button id="vanilla">Vanilla</button>
+ <button id="northstar">Northstar</button>
+ </div>
+ </div>
+ </div>
+
+ <script src="main.js"></script>
+ </body>
+</html>
diff --git a/src/app/main.css b/src/app/main.css
new file mode 100644
index 0000000..a9dbc9d
--- /dev/null
+++ b/src/app/main.css
@@ -0,0 +1,36 @@
+:root {
+ --background: #4C515B;
+ --foreground: #DDE2EB;
+}
+
+body, button, input {
+ font-size: 18px;
+ font-weight: 700;
+ overflow: hidden;
+ color: var(--foreground);
+ text-transform: uppercase;
+ background: var(--background);
+ font-family: "Roboto Mono", monospace;
+}
+
+.line {
+ display: flex;
+ margin-top: 15px;
+}
+
+.buttons {
+ margin-left: auto;
+ margin-right: 7px;
+}
+
+button, .text {
+ border: none;
+ outline: none;
+ padding: 5px 15px;
+ border-radius: 50px;
+}
+
+#update {background: #81A1C1}
+#setpath {background: #5E81AC}
+#vanilla {background: #656E7F}
+#northstar {background: #C7777F}
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();
+})
+