From 7b991a565db97d796849f0a6e7085c2e535ade94 Mon Sep 17 00:00:00 2001 From: yiekheng Date: Sun, 10 May 2026 11:35:38 +0800 Subject: [PATCH] feat(ui): equal-width Yes/Close buttons in confirm dialogs; trim dashboard activity to 3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DialogFooter with showCloseButton now lays out the auto-rendered Close and the caller's primary action (typically a
-wrapped Submit) in a 2-column grid that's identical at every viewport. Both buttons are sized "sm" with w-full so they fill their column and match in height. The trick to making this transparent for callers: \`[&>form]:contents\` collapses the form box so its + )} + {hasRuns && ( - )} + )} + {hasRuns ? ( diff --git a/apps/web/src/components/ui/dialog.tsx b/apps/web/src/components/ui/dialog.tsx index d9aecca..d147994 100644 --- a/apps/web/src/components/ui/dialog.tsx +++ b/apps/web/src/components/ui/dialog.tsx @@ -107,7 +107,16 @@ function DialogFooter({
) get equal width on the + // same row at every viewport. `[&>form]:contents` makes the form + // a transparent grid parent so its + )}
diff --git a/apps/web/src/lib/queries.ts b/apps/web/src/lib/queries.ts index fd13033..6e172d0 100644 --- a/apps/web/src/lib/queries.ts +++ b/apps/web/src/lib/queries.ts @@ -26,7 +26,7 @@ export async function getDashboardStats(operatorId: string) { LEFT JOIN whatsapp_accounts wa ON wa.id = r.account_id WHERE wa.operator_id = ${operatorId} OR r.id IS NULL ORDER BY rr.fired_at DESC - LIMIT 10 + LIMIT 3 `); return { connectedAccounts: accounts.filter((a) => a.status === "connected").length,