diff --git a/static/css/login.css b/static/css/login.css
index 22a1f75..43910ba 100644
--- a/static/css/login.css
+++ b/static/css/login.css
@@ -84,4 +84,9 @@ body {
display: flow;
text-align: center;
color: white;
-}
\ No newline at end of file
+}
+
+.inline {
+ width: fit-content;
+ color: white;
+}
diff --git a/static/css/register.css b/static/css/register.css
index 747a067..b422f47 100644
--- a/static/css/register.css
+++ b/static/css/register.css
@@ -4,4 +4,4 @@
.ok {
color: green;
-}
\ No newline at end of file
+}
diff --git a/static/html/login.html b/static/html/login.html
index 867ef5d..e9c5cb5 100644
--- a/static/html/login.html
+++ b/static/html/login.html
@@ -23,6 +23,10 @@
+
Tu n'as pas de compte?
diff --git a/static/html/register.html b/static/html/register.html index df83562..47f3593 100644 --- a/static/html/register.html +++ b/static/html/register.html @@ -24,6 +24,11 @@Le mot de passe doit contenir plus de 8 caractères et doit contenir au minimum:
1 Majuscule
@@ -37,6 +42,10 @@
+
Les mots de passe doivent être les mêmes.
diff --git a/static/js/login.js b/static/js/login.js index b7b4e69..fbb8942 100644 --- a/static/js/login.js +++ b/static/js/login.js @@ -1,6 +1,7 @@ async function login() { let username = document.getElementById("username").value; let password = document.getElementById("password").value; + let code = await fetch("/login", {method: "POST", body: JSON.stringify({"username": username, "password": password})}) .then(r => { @@ -13,6 +14,15 @@ async function login() { } let button = document.getElementById("connect"); +let showPassword = document.getElementById("showPassword"); +showPassword.addEventListener("click", () => { + let password = document.getElementById("password"); + if (showPassword.checked) { + password.type = "text"; + } else { + password.type = "password"; + } +}) button.addEventListener("click", () => { let _ = login(); }) \ No newline at end of file diff --git a/static/js/register.js b/static/js/register.js index 1da754c..4fd22a3 100644 --- a/static/js/register.js +++ b/static/js/register.js @@ -56,3 +56,23 @@ passwordConfirm.addEventListener("input", () => { document.getElementById("passwordConfirmNotice").className = "error"; } }) + +let showPassword = document.getElementById("showPassword"); +let showConfirmPassword = document.getElementById("showConfirmPassword"); +showPassword.addEventListener("click", () => { + let password = document.getElementById("password"); + if (showPassword.checked) { + password.type = "text"; + } else { + password.type = "password"; + } +}) + +showConfirmPassword.addEventListener("click", () => { + let password = document.getElementById("passwordConfirm"); + if (showConfirmPassword.checked) { + password.type = "text"; + } else { + password.type = "password"; + } +})