summaryrefslogtreecommitdiff
path: root/frontend/admin
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/admin')
-rw-r--r--frontend/admin/admin-style.css11
-rw-r--r--frontend/admin/admin.js16
-rw-r--r--frontend/admin/index.html13
-rw-r--r--frontend/admin/panel.html31
4 files changed, 71 insertions, 0 deletions
diff --git a/frontend/admin/admin-style.css b/frontend/admin/admin-style.css
new file mode 100644
index 0000000..86be9f5
--- /dev/null
+++ b/frontend/admin/admin-style.css
@@ -0,0 +1,11 @@
+#unauthorised {
+
+}
+
+#authorised {
+
+}
+
+.admin-machine-container {
+
+}
diff --git a/frontend/admin/admin.js b/frontend/admin/admin.js
new file mode 100644
index 0000000..5a194c9
--- /dev/null
+++ b/frontend/admin/admin.js
@@ -0,0 +1,16 @@
+const API_URL = "https://backend.laundryweb.altafcreator.com"
+
+async function login() {
+ const field = document.getElementById("pwfield");
+
+ const response = await fetch(`${API_URL}/admin_login`, {
+ method: "POST",
+ credentials: "include",
+ headers: {
+ "Content-Type": "text/plain"
+ },
+ body: field.value,
+ });
+
+ alert("loggin' in");
+}
diff --git a/frontend/admin/index.html b/frontend/admin/index.html
new file mode 100644
index 0000000..8d415a1
--- /dev/null
+++ b/frontend/admin/index.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>Victoria Hall LaundryWeb Admin Panel</title>
+ <link rel="stylesheet" href="./admin-style.css">
+</head>
+<body>
+ <h1>LaundryWeb Admin Panel Log In</h1>
+ <input type="password" id="pwfield"> <button onclick="login()">Log In</button>
+ <script src="./admin.js"></script>
+</body>
+</html>
diff --git a/frontend/admin/panel.html b/frontend/admin/panel.html
new file mode 100644
index 0000000..b912553
--- /dev/null
+++ b/frontend/admin/panel.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>Victoria Hall LaundryWeb Admin Panel</title>
+ <link rel="stylesheet" href="./admin-style.css">
+</head>
+<body>
+ <h1>LaundryWeb Admin Panel</h1>
+ <p id="unauthorised">You are unauthorised.</p>
+ <!-- even if you make this div visible, you won't be able to do anything if you are unauthorised -->
+ <div id="authorised">
+ <div class="admin-machine-container">
+ <div>
+ <img src="" alt="">
+ <select id="h1w1" name="">
+ <option value="normal">Normal</option>
+ <option value="down">Out of Service</option>
+ </select>
+ </div>
+ <div>
+ <img src="" alt="">
+ <select id="h1d1" name="">
+ <option value="normal">Normal</option>
+ <option value="down">Out of Service</option>
+ </select>
+ </div>
+ </div>
+ </div>
+</body>
+</html>