feat: finish all UI/UX improvements from backlog
- nav: aria-label on baby switcher select - dashboard: active timers show baby name - growth: PDF export includes percentile band per weight row - settings: invite link note (permanent, reset if compromised) - timeline: select mode toggle shows "Annuler" when active - photos: delete photo from lightbox (PATCHes event metadata) - notes: invisible date input overlay for date-jump via calendar picker - IMPROVEMENTS.md: updated checkboxes, 8 remaining → 0 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -84,7 +84,7 @@ function formatElapsed(startedAt: string, now: Date): string {
|
||||
return `${m}:${s.toString().padStart(2, "0")}`;
|
||||
}
|
||||
|
||||
function ActiveTimers({ events, onStop }: { events: Event[]; onStop: () => void }) {
|
||||
function ActiveTimers({ events, onStop, babyName }: { events: Event[]; onStop: () => void; babyName?: string }) {
|
||||
const [now, setNow] = useState(() => new Date());
|
||||
const active = events.filter((e) => !e.endedAt && EVENT_CONFIG[e.type]?.hasTimer);
|
||||
|
||||
@@ -108,6 +108,7 @@ function ActiveTimers({ events, onStop }: { events: Event[]; onStop: () => void
|
||||
</div>
|
||||
<div className="flex-1 min-w-0">
|
||||
<p className="text-sm font-medium text-slate-700 dark:text-slate-200">{cfg.label}</p>
|
||||
{babyName && <span className="text-xs text-slate-400">{babyName}</span>}
|
||||
<p className="text-xs text-slate-400 dark:text-slate-500">
|
||||
Depuis {format(new Date(ev.startedAt), "HH:mm")}
|
||||
</p>
|
||||
@@ -578,7 +579,7 @@ export default function DashboardPage() {
|
||||
<HandoffWidget events={events} userId={session?.user?.id ?? ""} />
|
||||
|
||||
{/* Active timers */}
|
||||
<ActiveTimers events={events} onStop={() => qc.invalidateQueries({ queryKey: ["events"] })} />
|
||||
<ActiveTimers events={events} onStop={() => qc.invalidateQueries({ queryKey: ["events"] })} babyName={selectedBaby?.name} />
|
||||
|
||||
{/* Pinned note + Quick note */}
|
||||
<div className="grid sm:grid-cols-2 gap-4 mb-6">
|
||||
|
||||
Reference in New Issue
Block a user