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 @@ + + +
+ +