Rende leggibili card, badge e testi mute in tema scuro.

Le righe task di oggi restavano crema con testo chiaro; i badge e gli heading senza dark: si perdevano sullo sfondo.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-03 07:36:48 +02:00
co-authored by Cursor
parent 8f73105dfe
commit b5737a7ee7
11 changed files with 104 additions and 47 deletions
+3 -3
View File
@@ -22,11 +22,11 @@
<h2 class="mb-3 text-lg font-semibold">Cosa devo fare oggi</h2>
<div class="grid gap-4 lg:grid-cols-3">
<div>
<h3 class="mb-2 text-sm font-semibold uppercase tracking-wide text-rose-700">In ritardo (<%= @overdue_tasks.size %>)</h3>
<h3 class="mb-2 text-sm font-semibold uppercase tracking-wide text-rose-700 dark:text-rose-400">In ritardo (<%= @overdue_tasks.size %>)</h3>
<%= render "shared/task_list", tasks: @overdue_tasks %>
</div>
<div>
<h3 class="mb-2 text-sm font-semibold uppercase tracking-wide text-amber-700">Da fare oggi (<%= @today_tasks.size %>)</h3>
<h3 class="mb-2 text-sm font-semibold uppercase tracking-wide text-amber-700 dark:text-amber-400">Da fare oggi (<%= @today_tasks.size %>)</h3>
<%= render "shared/task_list", tasks: @today_tasks %>
</div>
<div>
@@ -55,7 +55,7 @@
["Task scaduti", @metrics.overdue_tasks_count]
].each do |label, value| %>
<div class="rounded-xl border border-zinc-200 bg-white text-zinc-900 dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-100 p-4">
<div class="text-xs font-medium uppercase tracking-wide text-slate-500"><%= label %></div>
<div class="text-xs font-medium uppercase tracking-wide text-zinc-500 dark:text-zinc-400"><%= label %></div>
<div class="mt-1 text-2xl font-semibold tabular-nums"><%= value %></div>
</div>
<% end %>
+1 -1
View File
@@ -2,7 +2,7 @@
<h1 class="text-2xl font-semibold">Anteprima import</h1>
<div class="overflow-x-auto rounded-xl border border-zinc-200 bg-white text-zinc-900 dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-100">
<table class="min-w-full text-xs">
<thead class="bg-slate-50">
<thead class="bg-zinc-50 dark:bg-zinc-800">
<tr><% @preview[:headers].each do |h| %><th class="px-2 py-2 text-left"><%= h %></th><% end %></tr>
</thead>
<tbody>
+1 -1
View File
@@ -118,7 +118,7 @@
<% if mailing.draft? && mailing.tested? %>
<div class="mt-1 text-xs text-emerald-700 dark:text-emerald-300">Prova ok</div>
<% elsif mailing.draft? %>
<div class="mt-1 text-xs text-zinc-500">Manca prova</div>
<div class="mt-1 text-xs text-amber-700 dark:text-amber-400">Manca prova</div>
<% end %>
</td>
<td class="px-4 py-3 text-sm text-zinc-500">
+1 -1
View File
@@ -96,7 +96,7 @@
<div>
<div class="font-medium">
<%= contact.full_name %>
<% if contact.primary_contact? %><span class="ml-1 rounded bg-emerald-100 px-1.5 py-0.5 text-[10px] font-semibold uppercase text-emerald-800">Principale</span><% end %>
<% if contact.primary_contact? %><span class="ml-1 rounded bg-emerald-100 px-1.5 py-0.5 text-[10px] font-semibold uppercase text-emerald-800 dark:bg-emerald-950 dark:text-emerald-200">Principale</span><% end %>
</div>
<div class="break-anywhere text-sm text-slate-500"><%= [contact.role, contact.email, contact.phone.presence || contact.mobile].compact_blank.join(" · ") %></div>
</div>
+6 -6
View File
@@ -1,27 +1,27 @@
<div class="overflow-hidden rounded-xl border border-zinc-200 bg-white text-zinc-900 dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-100">
<div class="divide-y divide-zinc-100 dark:divide-zinc-800">
<% tasks.each do |task| %>
<div class="flex flex-col gap-3 px-4 py-3 sm:flex-row sm:items-center <%= 'bg-rose-50' if task.overdue? %> <%= 'bg-amber-50' if task.due_today? %>">
<div class="flex flex-col gap-3 px-4 py-3 sm:flex-row sm:items-center <%= 'bg-rose-50 dark:bg-rose-950' if task.overdue? %> <%= 'bg-amber-50 dark:bg-amber-950' if task.due_today? && !task.overdue? %>">
<div class="min-w-0 flex-1">
<div class="flex flex-wrap items-center gap-2">
<%= link_to task.organization.name, task.organization, class: "font-medium text-zinc-900 hover:underline dark:text-zinc-100" %>
<%= priority_badge(task.priority) %>
<span class="text-xs text-zinc-500"><%= task.task_type_label %></span>
<span class="text-xs text-zinc-500 dark:text-zinc-400"><%= task.task_type_label %></span>
</div>
<div class="mt-0.5 text-sm text-zinc-700 dark:text-zinc-200"><%= task.title %></div>
<div class="mt-0.5 text-xs text-zinc-500">
<div class="mt-0.5 text-xs text-zinc-500 dark:text-zinc-400">
<%= task.contact&.full_name || "—" %> · <%= format_dt(task.due_at) %>
<% if task.assigned_user %>· <%= task.assigned_user.full_name %><% end %>
</div>
</div>
<div class="flex w-full flex-wrap items-center gap-2 sm:w-auto">
<%= button_to "Completa", complete_task_path(task), method: :patch, class: "rounded-md bg-emerald-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-emerald-700" %>
<%= link_to "Modifica", edit_task_path(task), class: "rounded-md border border-zinc-300 px-3 py-1.5 text-xs font-medium text-zinc-700 hover:bg-zinc-50 dark:border-zinc-600 dark:text-zinc-200 dark:hover:bg-zinc-800" %>
<%= button_to "Completa", complete_task_path(task), method: :patch, class: "rounded-md bg-emerald-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-emerald-700 dark:bg-emerald-700 dark:hover:bg-emerald-600" %>
<%= link_to "Modifica", edit_task_path(task), class: "rounded-md border border-zinc-300 bg-white px-3 py-1.5 text-xs font-medium text-zinc-700 hover:bg-zinc-50 dark:border-zinc-500 dark:bg-zinc-700 dark:text-zinc-50 dark:hover:bg-zinc-600" %>
</div>
</div>
<% end %>
<% if tasks.blank? %>
<div class="px-4 py-6 text-center text-sm text-slate-500">Nessun task</div>
<div class="px-4 py-6 text-center text-sm text-zinc-500 dark:text-zinc-400">Nessun task</div>
<% end %>
</div>
</div>
+2 -2
View File
@@ -4,11 +4,11 @@
<%= link_to "Nuovo task", new_task_path, class: "#{btn_primary} w-full sm:w-auto" %>
</div>
<section>
<h2 class="mb-2 text-sm font-semibold uppercase text-rose-700">In ritardo</h2>
<h2 class="mb-2 text-sm font-semibold uppercase text-rose-700 dark:text-rose-400">In ritardo</h2>
<%= render "shared/task_list", tasks: @overdue_tasks %>
</section>
<section>
<h2 class="mb-2 text-sm font-semibold uppercase text-amber-700">Oggi</h2>
<h2 class="mb-2 text-sm font-semibold uppercase text-amber-700 dark:text-amber-400">Oggi</h2>
<%= render "shared/task_list", tasks: @today_tasks %>
</section>
<section>
+2 -2
View File
@@ -5,12 +5,12 @@
</div>
<section>
<h2 class="mb-2 text-sm font-semibold uppercase tracking-wide text-rose-700">In ritardo</h2>
<h2 class="mb-2 text-sm font-semibold uppercase tracking-wide text-rose-700 dark:text-rose-400">In ritardo</h2>
<%= render "shared/task_list", tasks: @overdue_tasks %>
</section>
<section>
<h2 class="mb-2 text-sm font-semibold uppercase tracking-wide text-amber-700">Oggi</h2>
<h2 class="mb-2 text-sm font-semibold uppercase tracking-wide text-amber-700 dark:text-amber-400">Oggi</h2>
<%= render "shared/task_list", tasks: @today_tasks %>
</section>