Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamBasly authored Nov 23, 2024
1 parent 9823783 commit 59c7b5d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html lang="de">
<head>
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Anmeldeseite</title>
Expand Down Expand Up @@ -134,10 +135,12 @@ <h2>Anmelden</h2>
<form onsubmit="return startLogin()">
<input type="text" id="username" placeholder="Benutzername" required>
<input type="password" id="password" placeholder="Passwort" required>
<div class="g-recaptcha" data-sitekey="6LczuocqAAAAABNgINCGJoOz-NxH1CHlKYHjjG7G"></div> <!-- Hier ist das Widget -->
<button type="submit">Anmelden</button>
</form>
<p id="message"></p>
<div class="quick-access" id="quickAccessContainer"></div>

</div>

<div id="verificationContainer" class="container" style="display: none;">
Expand Down Expand Up @@ -175,7 +178,12 @@ <h2>Bestätigungscode</h2>
const username = document.getElementById('username').value;
const password = document.getElementById('password').value;
const message = document.getElementById('message');
const recaptchaResponse = grecaptcha.getResponse();
if (recaptchaResponse.length === 0) {
message.textContent = 'Bitte bestätigen Sie, dass Sie kein Roboter sind.';
return false;

}
let users = JSON.parse(localStorage.getItem('users')) || {};
if (users[username] && users[username].password === password) {
userEmail = users[username].email; // Vorausgesetzt, die E-Mail wird bei der Registrierung gespeichert
Expand Down

0 comments on commit 59c7b5d

Please sign in to comment.