From 4c1dd74db3f9ac37134db13c8e5a499a9f37594a Mon Sep 17 00:00:00 2001 From: Parker Date: Wed, 6 Nov 2024 01:08:04 -0600 Subject: Lots more functionality - working towards UI --- app/templates/dashboard.html | 74 +++++++++++++++++++++++++++++++++++--------- app/templates/signup.html | 13 ++++---- 2 files changed, 66 insertions(+), 21 deletions(-) (limited to 'app/templates') diff --git a/app/templates/dashboard.html b/app/templates/dashboard.html index f1c98e3..c2c9ebc 100644 --- a/app/templates/dashboard.html +++ b/app/templates/dashboard.html @@ -7,9 +7,15 @@
- -

Your Username: {{ user }}

- + + + + + + + + + @@ -31,17 +37,55 @@ font-size: 25px; color: #ccc; } + - button { - display: block; - margin: 10px auto; - width: 200px; - border-radius: 5px; - padding: 15px; - color: #ccc; - background-color: #415eac; - border: none; - font-size: 17px; - cursor: pointer; + \ No newline at end of file diff --git a/app/templates/signup.html b/app/templates/signup.html index 446aaeb..32962b7 100644 --- a/app/templates/signup.html +++ b/app/templates/signup.html @@ -91,21 +91,22 @@ // Prevent default form submission event.preventDefault(); + // Get form data const formData = new FormData(this); - // Send POST request to /signup containing form data + + // Send POST request const response = await fetch('/api/users/register', { method: 'POST', body: formData }); if (response.status != 200) { - const data = await response.json(); - + const data = await response.json() + document.getElementById('error').style.display = 'block'; document.getElementById('error').innerText = data.detail; - } - else { - window.location.href = '/login'; + } else { + window.location.href = '/dashboard'; } }); \ No newline at end of file -- cgit v1.2.3-70-g09d2
IDTimestampIPLocationISP