improve(messages): clickable avatar and name links to user profile
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Maciej Pienczyn 2026-03-20 11:41:09 +01:00
parent 28cc252133
commit 3e26f1e289

View File

@ -417,16 +417,16 @@
<div class="thread-message {% if msg.id == message.id %}is-current{% endif %}">
<div class="thread-msg-header">
<div class="thread-msg-sender">
<div class="thread-avatar {% if msg.sender_id == current_user.id %}is-me{% endif %}">
<a href="{{ url_for('public.user_profile', user_id=msg.sender_id) }}" class="thread-avatar {% if msg.sender_id == current_user.id %}is-me{% endif %}" style="text-decoration: none; color: white;">
{% if msg.sender.avatar_path %}
<img src="{{ url_for('static', filename=msg.sender.avatar_path) }}" style="width: 100%; height: 100%; border-radius: 50%; object-fit: cover;">
{% else %}
{{ (msg.sender.name or msg.sender.email)[0].upper() }}
{% endif %}
</div>
</a>
<span class="thread-sender-name">
{% if msg.sender_id == current_user.id %}Ty{% else %}{{ msg.sender.name or msg.sender.email.split('@')[0] }}{% endif %}
<span style="font-weight: 400; color: var(--text-secondary);">→ {% if msg.recipient_id == current_user.id %}Ty{% else %}{{ msg.recipient.name or msg.recipient.email.split('@')[0] }}{% endif %}</span>
{% if msg.sender_id == current_user.id %}Ty{% else %}<a href="{{ url_for('public.user_profile', user_id=msg.sender_id) }}" style="color: inherit; text-decoration: none;" onmouseover="this.style.textDecoration='underline'" onmouseout="this.style.textDecoration='none'">{{ msg.sender.name or msg.sender.email.split('@')[0] }}</a>{% endif %}
<span style="font-weight: 400; color: var(--text-secondary);">→ {% if msg.recipient_id == current_user.id %}Ty{% else %}<a href="{{ url_for('public.user_profile', user_id=msg.recipient_id) }}" style="color: inherit; text-decoration: none;" onmouseover="this.style.textDecoration='underline'" onmouseout="this.style.textDecoration='none'">{{ msg.recipient.name or msg.recipient.email.split('@')[0] }}</a>{% endif %}</span>
</span>
</div>
<div class="thread-msg-meta">
@ -499,19 +499,19 @@
<div class="message-subject">{{ message.subject or '(brak tematu)' }}</div>
</div>
<div class="message-participants">
<div class="participant-avatar {% if message.sender_id == current_user.id %}is-me{% endif %}">
<a href="{{ url_for('public.user_profile', user_id=message.sender_id) }}" class="participant-avatar {% if message.sender_id == current_user.id %}is-me{% endif %}" style="text-decoration: none; color: white;">
{% if message.sender.avatar_path %}
<img src="{{ url_for('static', filename=message.sender.avatar_path) }}" style="width: 100%; height: 100%; border-radius: 50%; object-fit: cover;">
{% else %}
{{ (message.sender.name or message.sender.email)[0].upper() }}
{% endif %}
</div>
</a>
<div class="participant-info">
<div class="participant-name">
{% if message.sender_id == current_user.id %}Ty{% else %}{{ message.sender.name or message.sender.email.split('@')[0] }}{% endif %}
{% if message.sender_id == current_user.id %}Ty{% else %}<a href="{{ url_for('public.user_profile', user_id=message.sender_id) }}" style="color: inherit; text-decoration: none;" onmouseover="this.style.textDecoration='underline'" onmouseout="this.style.textDecoration='none'">{{ message.sender.name or message.sender.email.split('@')[0] }}</a>{% endif %}
</div>
<div class="participant-detail">
Do: {% if message.recipient_id == current_user.id %}mnie{% else %}{{ message.recipient.name or message.recipient.email.split('@')[0] }}{% endif %}
Do: {% if message.recipient_id == current_user.id %}mnie{% else %}<a href="{{ url_for('public.user_profile', user_id=message.recipient_id) }}" style="color: inherit; text-decoration: none;" onmouseover="this.style.textDecoration='underline'" onmouseout="this.style.textDecoration='none'">{{ message.recipient.name or message.recipient.email.split('@')[0] }}</a>{% endif %}
</div>
</div>
</div>