Initial commit: Robot ökoszisztéma v2.0 - Stabilizált jármű és szerviz robotok
This commit is contained in:
38
backend/app/static/register.html
Executable file
38
backend/app/static/register.html
Executable file
@@ -0,0 +1,38 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="hu">
|
||||
<head>
|
||||
<meta charset="UTF-8"><title>Service Finder - Regisztráció</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<style>
|
||||
body { background-color: #0f172a; color: white; display: flex; align-items: center; justify-content: center; min-height: 100vh; }
|
||||
.reg-card { background: #1e293b; padding: 40px; border-radius: 15px; width: 100%; max-width: 450px; border: 1px solid #334155; }
|
||||
.form-control { background: white !important; color: black !important; font-weight: bold; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="reg-card shadow-lg">
|
||||
<h3 class="text-center mb-4" style="color: #3b82f6;">REGISZTRÁCIÓ</h3>
|
||||
<form id="regForm">
|
||||
<input type="text" id="fullName" class="form-control mb-3" placeholder="Teljes név" required>
|
||||
<input type="email" id="email" class="form-control mb-3" placeholder="E-mail cím" required>
|
||||
<input type="password" id="password" class="form-control mb-3" placeholder="Jelszó" required>
|
||||
<button type="submit" class="btn btn-success w-100 py-2">FIÓK LÉTREHOZÁSA</button>
|
||||
</form>
|
||||
<div class="text-center mt-3"><a href="login.html" class="text-info small">Vissza a belépéshez</a></div>
|
||||
<p id="msg" class="mt-3 text-center"></p>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById('regForm').onsubmit = async (e) => {
|
||||
e.preventDefault();
|
||||
const url = `/api/v1/auth/register?email=${encodeURIComponent(document.getElementById('email').value)}&password=${encodeURIComponent(document.getElementById('password').value)}&full_name=${encodeURIComponent(document.getElementById('fullName').value)}`;
|
||||
const res = await fetch(url, { method: 'POST' });
|
||||
if (res.ok) {
|
||||
document.getElementById('msg').innerHTML = "<span class='text-success'>Sikeres regisztráció! Jelentkezz be.</span>";
|
||||
} else {
|
||||
const data = await res.json();
|
||||
document.getElementById('msg').innerText = "Hiba: " + JSON.stringify(data.detail);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user