Add profile management features

- Introduced profile update and password change functionalities in main.py.
- Added new ProfileUpdate and PasswordChange schemas in user.py.
- Updated base.html to include a profile link in the navigation and modified user chip for better accessibility.
- Enhanced CSS for user chip links to improve UI interaction.
This commit is contained in:
smueller
2026-07-07 15:26:29 +02:00
parent 9c75357150
commit 6b0402103a
5 changed files with 206 additions and 4 deletions

View File

@@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}{{ title if title else "Wiki Newsletter Admin" }}{% endblock %} · Thomas-Krenn.AG</title>
<link rel="stylesheet" href="/static/css/main.css?v=4">
<link rel="stylesheet" href="/static/css/main.css?v=5">
</head>
<body class="{% block body_class %}{% endblock %}">
<header class="topbar">
@@ -22,11 +22,12 @@
{% if user.role == "admin" %}
<a href="/admin/users" class="{% if active_nav == 'users' %}active{% endif %}">Benutzer</a>
{% endif %}
<a href="/profil" class="{% if active_nav == 'profile' %}active{% endif %}">Profil</a>
</nav>
<div class="user-chip">
<a href="/profil" class="user-chip user-chip-link">
<span>{{ user.full_name }}</span>
<span class="badge badge-{{ user.role }}">{{ user.role }}</span>
</div>
</a>
<form method="post" action="/logout">
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
<button type="submit" class="btn-logout">Abmelden</button>