feat(conversations): swap button, year dividers, summary bar, new-doc link #43

Merged
marcel merged 11 commits from feat/conversation-page-improvements into main 2026-03-20 21:35:23 +01:00
4 changed files with 31 additions and 0 deletions
Showing only changes of commit ca212e871f - Show all commits

View File

@@ -140,6 +140,7 @@
"conv_empty_text": "Die Korrespondenz wird hier angezeigt.",
"conv_no_results_heading": "Keine Dokumente gefunden.",
"conv_no_results_text": "Versuchen Sie, den Zeitraum anzupassen.",
"conv_swap_btn": "Personen tauschen",
"admin_heading": "Admin Dashboard",
"admin_tab_users": "Benutzer",

View File

@@ -140,6 +140,7 @@
"conv_empty_text": "The correspondence will be shown here.",
"conv_no_results_heading": "No documents found.",
"conv_no_results_text": "Try adjusting the time period.",
"conv_swap_btn": "Swap persons",
"admin_heading": "Admin Dashboard",
"admin_tab_users": "Users",

View File

@@ -140,6 +140,7 @@
"conv_empty_text": "La correspondencia se mostrará aquí.",
"conv_no_results_heading": "No se encontraron documentos.",
"conv_no_results_text": "Intente ajustar el período de tiempo.",
"conv_swap_btn": "Intercambiar personas",
"admin_heading": "Panel de administración",
"admin_tab_users": "Usuarios",

View File

@@ -37,6 +37,13 @@ function toggleSort() {
sortDir = sortDir === 'DESC' ? 'ASC' : 'DESC';
applyFilters();
}
function swapPersons() {
const tmp = senderId;
senderId = receiverId;
receiverId = tmp;
applyFilters();
}
</script>
<div class="mx-auto max-w-5xl px-4 py-10">
@@ -80,6 +87,27 @@ function toggleSort() {
</div>
</div>
{#if senderId && receiverId}
<div class="mb-4 flex justify-center">
<button
data-testid="conv-swap-btn"
onclick={swapPersons}
class="flex items-center gap-2 rounded-sm border border-brand-sand px-4 py-2 text-xs font-bold tracking-widest text-brand-navy uppercase transition-colors hover:bg-brand-navy hover:text-white"
title={m.conv_swap_btn()}
>
<svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M7 16V4m0 0L3 8m4-4l4 4M17 8v12m0 0l4-4m-4 4l-4-4"
></path>
</svg>
{m.conv_swap_btn()}
</button>
</div>
{/if}
<div class="relative z-10 grid grid-cols-1 items-end gap-6 md:grid-cols-3">
<!-- Date From -->
<div>