67a69ab073
- Go backend API with full CRUD for all modules - Rust analytics service with parallel processing - C runtime with POSIX shared memory IPC - PostgreSQL schema with 30+ tables - Redis cache, Kafka event streaming - WebSocket hub, automation engine - PDF generation, Resend email integration - JWT auth, multi-tenant - Docker Compose deployment - Nginx reverse proxy Refs: BOC-001
133 lines
3.5 KiB
HTML
133 lines
3.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="sv">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>BOC — Logga in</title>
|
|
<link rel="stylesheet" href="assets/boc.css">
|
|
<style>
|
|
.login-container {
|
|
min-height: 100vh;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
}
|
|
.login-box {
|
|
background: white;
|
|
padding: 40px;
|
|
border-radius: 16px;
|
|
box-shadow: 0 20px 60px rgba(0,0,0,0.3);
|
|
width: 100%;
|
|
max-width: 400px;
|
|
}
|
|
.login-box h1 {
|
|
text-align: center;
|
|
margin-bottom: 8px;
|
|
font-size: 28px;
|
|
}
|
|
.login-box p {
|
|
text-align: center;
|
|
color: var(--text-secondary);
|
|
margin-bottom: 32px;
|
|
}
|
|
.form-group {
|
|
margin-bottom: 20px;
|
|
}
|
|
.form-group label {
|
|
display: block;
|
|
margin-bottom: 8px;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
}
|
|
.form-group input {
|
|
width: 100%;
|
|
padding: 12px 16px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
font-size: 16px;
|
|
transition: border-color 0.2s;
|
|
}
|
|
.form-group input:focus {
|
|
outline: none;
|
|
border-color: var(--primary);
|
|
}
|
|
.btn-primary {
|
|
width: 100%;
|
|
padding: 14px;
|
|
background: var(--primary);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 8px;
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: background 0.2s;
|
|
}
|
|
.btn-primary:hover {
|
|
background: #0056CC;
|
|
}
|
|
.error {
|
|
color: var(--danger);
|
|
font-size: 14px;
|
|
margin-top: 12px;
|
|
text-align: center;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="login-container">
|
|
<div class="login-box">
|
|
<h1>🏢 BOC</h1>
|
|
<p>Business Operations Center</p>
|
|
<form id="login-form">
|
|
<div class="form-group">
|
|
<label for="email">E-post</label>
|
|
<input type="email" id="email" name="email" required
|
|
placeholder="erik@landvex.com" value="erik@landvex.com">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="password">Lösenord</label>
|
|
<input type="password" id="password" name="password" required
|
|
placeholder="••••••••" value="admin123">
|
|
</div>
|
|
<button type="submit" class="btn-primary">Logga in</button>
|
|
<div id="error" class="error"></div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
const API_BASE = window.location.hostname === 'localhost'
|
|
? 'http://localhost:9092'
|
|
: 'https://boc.aamos.com';
|
|
|
|
document.getElementById('login-form').addEventListener('submit', async (e) => {
|
|
e.preventDefault();
|
|
|
|
const email = document.getElementById('email').value;
|
|
const password = document.getElementById('password').value;
|
|
|
|
try {
|
|
const res = await fetch(`${API_BASE}/api/v1/auth/login`, {
|
|
method: 'POST',
|
|
headers: { 'Content-Type': 'application/json' },
|
|
body: JSON.stringify({ email, password }),
|
|
});
|
|
|
|
const data = await res.json();
|
|
|
|
if (data.token) {
|
|
localStorage.setItem('boc_token', data.token);
|
|
window.location.href = '/';
|
|
} else {
|
|
document.getElementById('error').textContent = data.error || 'Inloggning misslyckades';
|
|
}
|
|
} catch (err) {
|
|
document.getElementById('error').textContent = 'Nätverksfel';
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|