From 7ec97fbd76607975fe0c567b29b8364f6d75df81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vavrinecz=20P=C3=A9ter?= Date: Thu, 6 Feb 2025 17:26:32 +0100 Subject: [PATCH 1/5] fixed logo rendering --- src/index.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/index.html b/src/index.html index e7c4417..cfe1149 100644 --- a/src/index.html +++ b/src/index.html @@ -8,8 +8,7 @@
- - + From 67fc6a103ed0555f8ce9702e7e676b76f0c68376 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vavrinecz=20P=C3=A9ter?= Date: Thu, 6 Feb 2025 17:32:01 +0100 Subject: [PATCH 2/5] added email validation --- src/index.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/index.html b/src/index.html index cfe1149..4106a84 100644 --- a/src/index.html +++ b/src/index.html @@ -12,8 +12,7 @@ - - + From 73e7bd8b0068c455f2abba384c07f3f13b1426de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vavrinecz=20P=C3=A9ter?= Date: Thu, 6 Feb 2025 17:33:15 +0100 Subject: [PATCH 3/5] hide password visibility --- src/index.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/index.html b/src/index.html index 4106a84..e35e345 100644 --- a/src/index.html +++ b/src/index.html @@ -14,8 +14,7 @@ - - + From b1457ced0336978874bf90c531f7e4b7305576b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vavrinecz=20P=C3=A9ter?= Date: Thu, 6 Feb 2025 17:34:33 +0100 Subject: [PATCH 4/5] center form on page --- src/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles.css b/src/styles.css index 25969e5..c2855b8 100644 --- a/src/styles.css +++ b/src/styles.css @@ -1,8 +1,8 @@ body { height: 100vh; display: flex; - /* TODO: Adjust CSS so that form is centered on page */ align-items: center; + justify-content: center; } form { From 028e4fe100e559d951697784aa14dc04241bb9d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vavrinecz=20P=C3=A9ter?= Date: Thu, 6 Feb 2025 17:45:08 +0100 Subject: [PATCH 5/5] user validation & status message --- src/script.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/script.js b/src/script.js index 4e3be16..ff4f76d 100644 --- a/src/script.js +++ b/src/script.js @@ -24,10 +24,11 @@ addEventListener("submit", (event) => { console.log(`email submitted: ${email}`); console.log(`password submitted: ${password}`); - /* - TODO: - 1. Check if the email and password are valid (using the usersTable) - 2. If they are, call renderSuccess() - 3. If they are not, call renderError() - */ + + user = usersTable.find(user => user.username === email && user.password === password) + if (user) { + renderSuccess() + } else { + renderError() + } });