3cf49c7fd5
The customer sets + owns the dashboard password via a hub-emailed one-time claim code. An unclaimed box (code hash present, no password) serves ONLY the claim page — every other route → claim page (302) or 401, so a Day-0 box is never open on the internet. A set password disables the gate (auth wins). Reset rides the same code engine (login "Elfelejtett jelszó"). Legacy-open (no password, no hash) shows a red transition banner until the hub delivers a hash. Report ACK caches the code state idempotently by generation; report carries claimed (set-only). --print-reset-code root escape hatch. Requires hub v0.50.0. Gate-coverage signature test + 4 red-proofs proven.
42 lines
1.7 KiB
HTML
42 lines
1.7 KiB
HTML
{{define "login"}}
|
|
<!DOCTYPE html>
|
|
<html lang="hu">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Bejelentkezés — Felhom</title>
|
|
<link rel="stylesheet" href="/static/style.css">
|
|
</head>
|
|
<body class="login-body">
|
|
<div class="login-card">
|
|
<img src="/static/felhom-logo.svg" alt="Felhom.eu" class="login-logo">
|
|
<h1 class="login-title">Otthoni <span class="title-accent">vezérlőpult</span></h1>
|
|
<p class="login-subtitle">{{.CustomerName}}</p>
|
|
{{if .Flash}}<div class="alert alert-info">{{.Flash}}</div>{{end}}
|
|
{{if .Error}}<div class="alert alert-error">{{.Error}}</div>{{end}}
|
|
<form method="POST" action="/login">
|
|
<input type="hidden" name="next" id="next-field" value="">
|
|
<div class="form-group">
|
|
<label for="password">Jelszó</label>
|
|
<input type="password" id="password" name="password" required autofocus
|
|
placeholder="Adja meg a jelszavát" class="form-control">
|
|
</div>
|
|
<button type="submit" class="btn btn-primary btn-full">Bejelentkezés</button>
|
|
</form>
|
|
<p style="text-align:center;margin:0.75rem 0 0;font-size:0.85rem"><a href="/claim">Elfelejtett jelszó</a></p>
|
|
<p class="login-footer">Felhom — Otthoni szerver kezelés<br>
|
|
<a href="https://felhom.eu" target="_blank">felhom.eu</a></p>
|
|
</div>
|
|
<script>
|
|
(function() {
|
|
var params = new URLSearchParams(window.location.search);
|
|
var next = params.get('next');
|
|
if (next) {
|
|
document.getElementById('next-field').value = next;
|
|
}
|
|
})();
|
|
</script>
|
|
</body>
|
|
</html>
|
|
{{end}}
|