Initial commit: Robot ökoszisztéma v2.0 - Stabilizált jármű és szerviz robotok

This commit is contained in:
Kincses
2026-03-04 02:03:03 +01:00
commit 250f4f4b8f
7942 changed files with 449625 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
<!DOCTYPE html>
<html lang="hu">
<head>
<meta charset="UTF-8"><title>Service Finder - Dashboard</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body { background: #0f172a; color: white; }
.vehicle-tile { background: #1e293b; border-radius: 15px; padding: 20px; border: 1px solid #334155; transition: 0.3s; position: relative; }
.vehicle-tile:hover { transform: translateY(-5px); border-color: #3b82f6; }
.brand-logo { width: 40px; height: 40px; margin-right: 10px; opacity: 0.8; }
.alert-icon { position: absolute; top: 10px; right: 10px; font-size: 1.5rem; }
</style>
</head>
<body class="p-4">
<div class="container">
<div class="d-flex justify-content-between align-items-center mb-5">
<h1 style="font-weight: 900;">GARÁZS</h1>
<button class="btn btn-primary" onclick="location.href='register_vehicle.html'">+ ÚJ JÁRMŰ</button>
</div>
<div id="vehicleList" class="row g-4">
</div>
</div>
<script>
const TOKEN = localStorage.getItem('token');
if (!TOKEN) window.location.href = 'login.html';
async function loadVehicles() {
const res = await fetch('/api/v1/fleet/vehicles', {
headers: { 'Authorization': 'Bearer ' + TOKEN }
});
const vehicles = await res.json();
const container = document.getElementById('vehicleList');
container.innerHTML = '';
vehicles.forEach(v => {
// Egyszerű logika a figyelmeztetésekhez (Backend hivatkozás helyett egyelőre itt)
let alertHtml = v.current_odometer > 150000 ? '<span class="alert-icon">🔴</span>' : '';
container.innerHTML += `
<div class="col-md-4">
<div class="vehicle-tile shadow">
${alertHtml}
<div class="d-flex align-items-center mb-3">
<img src="https://logo.clearbit.com/${v.make.toLowerCase()}.com" class="brand-logo" onerror="this.src='https://via.placeholder.com/40?text=🚗'">
<h4 class="m-0">${v.license_plate}</h4>
</div>
<p class="text-info mb-1">${v.make} ${v.model} (${v.year})</p>
<p class="small text-muted">Aktuális km: <strong>${v.current_odometer} km</strong></p>
<button class="btn btn-sm btn-outline-light w-100 mt-2">ADATLAP ÉS KÖLTSÉG</button>
</div>
</div>
`;
});
}
loadVehicles();
</script>
</body>
</html>

53
backend/app/static/login.html Executable file
View File

@@ -0,0 +1,53 @@
<!DOCTYPE html>
<html lang="hu">
<head>
<meta charset="UTF-8"><title>Service Finder - Belépés</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; height: 100vh; }
.login-card { background: #1e293b; padding: 40px; border-radius: 15px; width: 100%; max-width: 400px; border: 1px solid #334155; }
.form-control { background: white !important; color: black !important; font-weight: bold; }
.btn-primary { background: #3b82f6; font-weight: bold; width: 100%; padding: 12px; }
</style>
</head>
<body>
<div class="login-card shadow-lg">
<h3 class="text-center mb-4">🚗 BELÉPÉS</h3>
<form id="loginForm">
<label class="small text-info">E-mail cím</label>
<input type="email" id="email" class="form-control mb-3" placeholder="admin@admin.hu" required>
<label class="small text-info">Jelszó</label>
<input type="password" id="password" class="form-control mb-4" required>
<button type="submit" class="btn btn-primary">BEJELENTKEZÉS</button>
</form>
<div class="text-center mt-3">
<a href="register.html" class="text-info small">Nincs még fiókom, regisztrálok</a>
</div>
<div class="text-center mt-2">
<a href="#" onclick="alert('Fejlesztés alatt: Kérlek, írj az adminnak a jelszó pótlásához!')" class="text-muted small">Elfelejtettem a jelszavam</a>
</div>
<p id="msg" class="text-danger mt-3 text-center small"></p>
</div>
<script>
document.getElementById('loginForm').onsubmit = async (e) => {
e.preventDefault();
const formData = new FormData();
formData.append('username', document.getElementById('email').value);
formData.append('password', document.getElementById('password').value);
try {
const res = await fetch('/api/v1/auth/login', { method: 'POST', body: formData });
const data = await res.json();
if (res.ok) {
localStorage.setItem('token', data.access_token);
window.location.href = 'dashboard.html';
} else {
document.getElementById('msg').innerText = "Hiba: " + (data.detail || "Sikertelen belépés");
}
} catch (err) { document.getElementById('msg').innerText = "Szerver hiba!"; }
};
</script>
</body>
</html>

View 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>