Files
MicroNAS/templates/login.html
T
marcandClaude Sonnet 4.6 5d9a9e62ec Phase 3: full share CRUD + session login page
Backend:
- SMB config parser/writer (_parse_smb_conf, _write_smb_conf) for
  safe whole-file rewrites instead of append-only
- NFS exports parser/writer (_parse_exports, _write_exports) with
  support for disabled (commented-out) exports
- DELETE/PATCH/toggle endpoints for SMB and NFS shares
- parse_smb() now returns enabled field (reads available = no)
- get_nfs_shares() uses the new parser and returns enabled field
- Replace HTTP Basic Auth with Flask session auth (secret key derived
  from MICRONAS_PASS so sessions survive restarts)
- /login GET/POST, /logout routes

Frontend:
- Login page (templates/login.html) with same dark theme
- Sign out button in header
- Edit modal pre-filled with current share values
- Delete buttons wired up (with confirm dialog)
- Enable/Disable toggle per share (green/grey dot status indicator)
- Disabled shares shown at reduced opacity

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 22:26:32 +02:00

42 lines
1.7 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MicroNAS — Login</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="{{ url_for('static', filename='css/app.css') }}">
<style>
body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { width: 100%; max-width: 360px; }
</style>
</head>
<body>
<div class="login-card">
<div class="text-center mb-4">
<div class="fw-bold fs-4" style="color:var(--text)">MicroNAS</div>
<div class="small" style="color:var(--muted)">Sign in to continue</div>
</div>
<div class="card">
<div class="card-body p-4">
{% if error %}
<div class="alert mb-3 py-2 px-3" style="background:#2d1515; border:1px solid var(--red); color:var(--red); border-radius:6px; font-size:.9rem;">
{{ error }}
</div>
{% endif %}
<form method="POST">
<div class="mb-3">
<label class="form-label" style="color:var(--muted); font-size:.85rem">Username</label>
<input type="text" name="username" class="form-control" autofocus autocomplete="username">
</div>
<div class="mb-4">
<label class="form-label" style="color:var(--muted); font-size:.85rem">Password</label>
<input type="password" name="password" class="form-control" autocomplete="current-password">
</div>
<button type="submit" class="btn btn-primary w-100">Sign in</button>
</form>
</div>
</div>
</div>
</body>
</html>