From 27887c2a7264da299434a46cda48fc2a28204e52 Mon Sep 17 00:00:00 2001 From: X3F200C Date: Fri, 8 Nov 2024 23:32:10 -0500 Subject: [PATCH] Start working on login UI --- src/main.js | 2 +- src/preload.js | 1 + src/sripts/login.js | 11 +++++++++++ src/styles/common.css | 4 ++++ src/views/login.html | 23 +++++++++++++++++++++++ 5 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 src/preload.js create mode 100644 src/sripts/login.js create mode 100644 src/styles/common.css create mode 100644 src/views/login.html diff --git a/src/main.js b/src/main.js index 36f0867..aa278dd 100644 --- a/src/main.js +++ b/src/main.js @@ -38,7 +38,7 @@ function createMainWindow() { } }); - mainWindow.loadFile(path.join(__dirname, "index.html")); + mainWindow.loadFile(path.join(__dirname, "views", "login.html")); mainWindow.once("ready-to-show", function () { mainWindow.show(); diff --git a/src/preload.js b/src/preload.js new file mode 100644 index 0000000..5af98f0 --- /dev/null +++ b/src/preload.js @@ -0,0 +1 @@ +const electron = require("electron"); diff --git a/src/sripts/login.js b/src/sripts/login.js new file mode 100644 index 0000000..6a0ed15 --- /dev/null +++ b/src/sripts/login.js @@ -0,0 +1,11 @@ +let usernameField; +let passwordField; + +function tryAuth() { + window.authenticate(usernameField.value, passwordField.value); +} + +window.addEventListener("load", function () { + usernameField = document.querySelector("#username-field"); + passwordField = document.querySelector("#password-field"); +}); diff --git a/src/styles/common.css b/src/styles/common.css new file mode 100644 index 0000000..00cf87c --- /dev/null +++ b/src/styles/common.css @@ -0,0 +1,4 @@ +:root { + background-color: #181820; + color: #F8F8FC; +} diff --git a/src/views/login.html b/src/views/login.html new file mode 100644 index 0000000..a045baa --- /dev/null +++ b/src/views/login.html @@ -0,0 +1,23 @@ + + + + + Open Plutonium Launcher + + + + +
+
+
+ + + + + Create an account at https://forum.plutonium.pw/register if you don't have one. + +
+
+
+ +