5cf3f944b1
- Updated docker-compose.yml to include Mailhog service for email testing. - Added environment variables for email configuration in docker-compose. - Updated requirements.txt to include fastapi-mail for email support. - Created templates for password reset, email verification, and welcome emails. - Developed mail utility module to handle sending emails using FastAPI-Mail. - Added documentation for email testing with Mailhog.
66 lines
2.7 KiB
HTML
66 lines
2.7 KiB
HTML
{% extends "base.html" %}
|
|
{% block content %}
|
|
<div class="max-w-3xl mx-auto my-8">
|
|
<div class="bg-white p-8 rounded-lg shadow-md">
|
|
<!-- Display messages if present -->
|
|
{% if request.query_params.message %}
|
|
<div class="bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded mb-4">
|
|
{{ request.query_params.message }}
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="flex flex-col md:flex-row items-center md:items-start md:space-x-8">
|
|
<!-- Profile Image -->
|
|
<div class="mb-6 md:mb-0">
|
|
{% if user.picture %}
|
|
<img src="{{ user.picture }}" alt="Profile Picture" class="w-32 h-32 rounded-full object-cover border-4 border-irish-green">
|
|
{% else %}
|
|
<div class="w-32 h-32 rounded-full bg-irish-green flex items-center justify-center text-white text-4xl">
|
|
{{ user.username[0]|upper }}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<!-- User Info -->
|
|
<div class="flex-grow">
|
|
<h1 class="text-2xl font-bold text-irish-green">{{ user.username }}</h1>
|
|
<p class="text-gray-600 mb-4">{{ user.email }}</p>
|
|
|
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6">
|
|
<div class="bg-cream-white p-4 rounded-md">
|
|
<h3 class="font-semibold text-irish-green mb-1">Account Type</h3>
|
|
<p>{% if user.is_admin %}Administrator{% else %}User{% endif %}</p>
|
|
</div>
|
|
|
|
<div class="bg-cream-white p-4 rounded-md">
|
|
<h3 class="font-semibold text-irish-green mb-1">Member Since</h3>
|
|
<p>{{ user.created_at.strftime('%Y-%m-%d') }}</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="space-y-4">
|
|
<h2 class="text-xl font-semibold text-irish-green">Account Settings</h2>
|
|
|
|
<div class="border-b border-gray-200 pb-4">
|
|
<h3 class="text-gray-700 font-medium mb-2">Change Password</h3>
|
|
<p class="text-sm text-gray-600 mb-3">Update your password to keep your account secure.</p>
|
|
<a href="/auth/change-password" class="inline-block bg-irish-green text-white py-2 px-4 rounded-md hover:bg-opacity-90 transition">
|
|
Change Password
|
|
</a>
|
|
</div>
|
|
|
|
<div class="pt-4">
|
|
<h3 class="text-gray-700 font-medium mb-2">Danger Zone</h3>
|
|
<p class="text-sm text-gray-600 mb-3">Permanently delete your account and all of your data.</p>
|
|
<button class="border border-red-600 text-red-600 py-2 px-4 rounded-md hover:bg-red-600 hover:text-white transition" disabled>
|
|
Delete Account
|
|
<span class="text-xs">(Coming Soon)</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|