Remove all authentication (login, sessions, bcrypt, itsdangerous) since the app runs on a private homelab LAN. Replace with a profile picker landing page and cookie-based profile selection (1-year expiry). - Add Alembic migration to drop password_hash/is_admin columns - Delete auth service, auth routes, login template, and auth tests - Rewrite app/utils/auth.py with NoProfileSelectedError and require_active_profile dependency - Add profile creation flow (GET/POST /profiles/create) - Rewrite home page as profile picker with card layout - Update all route files to use profile dependency instead of admin auth - Remove bcrypt and itsdangerous from requirements - Remove admin_username/admin_password from config - Update all tests for new profile-based access model Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
41 lines
1.2 KiB
HTML
41 lines
1.2 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}SneakySwole — Home{% endblock %}
|
|
|
|
{% block content %}
|
|
<hgroup>
|
|
<h1>SneakySwole</h1>
|
|
<p>Your open-source workout tracker</p>
|
|
</hgroup>
|
|
|
|
{% if profiles %}
|
|
<h2>Select Profile</h2>
|
|
<div class="grid">
|
|
{% for profile in profiles %}
|
|
<article>
|
|
<header>
|
|
<strong>{{ profile.display_name }}</strong>
|
|
</header>
|
|
{% if profile.height or profile.weight %}
|
|
<p>
|
|
{% if profile.height %}Height: {{ profile.height }}{% endif %}
|
|
{% if profile.height and profile.weight %} · {% endif %}
|
|
{% if profile.weight %}Weight: {{ profile.weight }}{% endif %}
|
|
</p>
|
|
{% endif %}
|
|
<footer>
|
|
<form method="POST" action="/profiles/switch">
|
|
<input type="hidden" name="profile_id" value="{{ profile.id }}">
|
|
<button type="submit" class="contrast">Select</button>
|
|
</form>
|
|
</footer>
|
|
</article>
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<p>No profiles yet. Create one to get started.</p>
|
|
{% endif %}
|
|
|
|
<a href="/profiles/create" role="button" class="secondary">Create New Profile</a>
|
|
{% endblock %}
|