Spaces:
Sleeping
Sleeping
Delete templates/login.html
Browse files- templates/login.html +0 -44
templates/login.html
DELETED
|
@@ -1,44 +0,0 @@
|
|
| 1 |
-
<!DOCTYPE html>
|
| 2 |
-
<html lang="en">
|
| 3 |
-
<head>
|
| 4 |
-
<meta charset="UTF-8">
|
| 5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>Biryani Hub - Login</title>
|
| 7 |
-
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
|
| 8 |
-
</head>
|
| 9 |
-
<body>
|
| 10 |
-
<div class="container">
|
| 11 |
-
<h1>Login to Biryani Hub 🍽</h1>
|
| 12 |
-
<label for="loginEmail">Your Email</label>
|
| 13 |
-
<input type="text" id="loginEmail" placeholder="Your email..." readonly>
|
| 14 |
-
|
| 15 |
-
<label for="loginMobile">Your Mobile Number</label>
|
| 16 |
-
<input type="text" id="loginMobile" placeholder="Your mobile number..." readonly>
|
| 17 |
-
|
| 18 |
-
<p class="info" id="infoMessageLogin">Listening 🗣🎙️...</p>
|
| 19 |
-
<button onclick="startLogin()">Login</button>
|
| 20 |
-
</div>
|
| 21 |
-
|
| 22 |
-
<script>
|
| 23 |
-
function startLogin() {
|
| 24 |
-
fetch('/validate_login', {
|
| 25 |
-
method: 'POST',
|
| 26 |
-
headers: { 'Content-Type': 'application/json' },
|
| 27 |
-
body: JSON.stringify({
|
| 28 |
-
email: document.getElementById('loginEmail').value,
|
| 29 |
-
mobile: document.getElementById('loginMobile').value
|
| 30 |
-
})
|
| 31 |
-
})
|
| 32 |
-
.then(response => response.json())
|
| 33 |
-
.then(data => {
|
| 34 |
-
if (data.success) {
|
| 35 |
-
alert("Login successful! Redirecting...");
|
| 36 |
-
window.location.href = "/menu"; // Redirect to the menu or home page
|
| 37 |
-
} else {
|
| 38 |
-
alert("Error: " + data.error);
|
| 39 |
-
}
|
| 40 |
-
});
|
| 41 |
-
}
|
| 42 |
-
</script>
|
| 43 |
-
</body>
|
| 44 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|