Files
SneakySwole/app/templates/partials/nav.html
Phillip Tarrant 576d3bbb68 feat: replace admin auth with cookie-based profile picker
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>
2026-03-13 12:40:54 -05:00

34 lines
1.2 KiB
HTML

{% set profiles = request.state.profiles %}
{% set active_profile = request.state.active_profile %}
<li>
<details class="dropdown">
<summary>
{% if active_profile %}
{{ active_profile.display_name }}
{% else %}
Select Profile
{% endif %}
</summary>
<ul dir="rtl">
{% for profile in profiles %}
<li>
<form method="POST" action="/profiles/switch" style="margin:0;">
<input type="hidden" name="profile_id" value="{{ profile.id }}">
<button type="submit" class="outline secondary"
style="width:100%; text-align:left; border:none;">
{{ profile.display_name }}
</button>
</form>
</li>
{% endfor %}
</ul>
</details>
</li>
<li><a href="/">Home</a></li>
<li><a href="/workouts">Workouts</a></li>
<li><a href="/schedule">Schedule</a></li>
<li><a href="/dashboard">Dashboard</a></li>
<li><a href="/history">History</a></li>
<li><a href="/exercises">Exercises</a></li>
<li><a href="/profiles">Profiles</a></li>