🎨 dashboard equal-height attention/upcoming, pomodoro badge polish
Browse files at this commite6caffe5a4537e79348d265a397e9ebdba6ef7f1Parent: aec4c70- style
- 🎨 dashboard equal-height attention/upcoming, pomodoro badge polish
2 changed files +7 -7
src/pages/dashboard-page.tsxmodified+6 -6
| @@ -401,8 +401,8 @@ function DashboardContent() { | ||
| 401 | 401 | </div> |
| 402 | 402 | </section> |
| 403 | 403 | |
| 404 | - <div class="grid gap-5 lg:grid-cols-2"> | |
| 405 | - <section class="space-y-2.5" aria-labelledby="dash-attention"> | |
| 404 | + <div class="grid items-stretch gap-5 lg:grid-cols-2"> | |
| 405 | + <section class="flex min-h-[17rem] flex-col space-y-2.5" aria-labelledby="dash-attention"> | |
| 406 | 406 | <div class="flex items-baseline justify-between gap-2"> |
| 407 | 407 | <h2 id="dash-attention" class="text-sm font-semibold tracking-tight text-foreground"> |
| 408 | 408 | {t("dashboard.attention")} |
| @@ -416,7 +416,7 @@ function DashboardContent() { | ||
| 416 | 416 | when={attention().length > 0} |
| 417 | 417 | fallback={<DashEmpty>{t("dashboard.noAttention")}</DashEmpty>} |
| 418 | 418 | > |
| 419 | - <ul class="divide-y divide-border/80 overflow-hidden rounded-xl border border-border bg-card shadow-[0_10px_30px_rgba(15,23,42,0.05)]"> | |
| 419 | + <ul class="flex-1 divide-y divide-border/80 overflow-hidden rounded-xl border border-border bg-card shadow-[0_10px_30px_rgba(15,23,42,0.05)]"> | |
| 420 | 420 | <For each={attention()}> |
| 421 | 421 | {(item) => ( |
| 422 | 422 | <li> |
| @@ -452,7 +452,7 @@ function DashboardContent() { | ||
| 452 | 452 | </Show> |
| 453 | 453 | </section> |
| 454 | 454 | |
| 455 | - <section class="space-y-2.5" aria-labelledby="dash-upcoming"> | |
| 455 | + <section class="flex min-h-[17rem] flex-col space-y-2.5" aria-labelledby="dash-upcoming"> | |
| 456 | 456 | <h2 id="dash-upcoming" class="text-sm font-semibold tracking-tight text-foreground"> |
| 457 | 457 | {t("dashboard.upcoming")} |
| 458 | 458 | </h2> |
| @@ -460,7 +460,7 @@ function DashboardContent() { | ||
| 460 | 460 | when={upcoming().length > 0} |
| 461 | 461 | fallback={<DashEmpty>{t("dashboard.upcomingEmpty")}</DashEmpty>} |
| 462 | 462 | > |
| 463 | - <ul class="divide-y divide-border/80 overflow-hidden rounded-xl border border-border bg-card shadow-[0_10px_30px_rgba(15,23,42,0.05)]"> | |
| 463 | + <ul class="flex-1 divide-y divide-border/80 overflow-hidden rounded-xl border border-border bg-card shadow-[0_10px_30px_rgba(15,23,42,0.05)]"> | |
| 464 | 464 | <For each={upcoming()}> |
| 465 | 465 | {(item) => ( |
| 466 | 466 | <li> |
| @@ -498,7 +498,7 @@ function DashboardContent() { | ||
| 498 | 498 | |
| 499 | 499 | function DashEmpty(props: { children: string }) { |
| 500 | 500 | return ( |
| 501 | - <div class="rounded-xl border border-dashed border-border bg-card/80 px-4 py-8 text-center text-sm text-muted-foreground shadow-sm"> | |
| 501 | + <div class="flex min-h-0 flex-1 items-center justify-center rounded-xl border border-dashed border-border bg-card/80 px-4 py-8 text-center text-sm text-muted-foreground shadow-sm"> | |
| 502 | 502 | {props.children} |
| 503 | 503 | </div> |
| 504 | 504 | ); |
src/pages/pomodoro-page.tsxmodified+1 -1
| @@ -99,7 +99,7 @@ function PomodoroContent() { | ||
| 99 | 99 | <div class="detail-metric-card"> |
| 100 | 100 | <p class="text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground">{t("attempt.status")}</p> |
| 101 | 101 | <div class="mt-2 flex flex-wrap items-center gap-2"> |
| 102 | - <Badge variant={running() ? "default" : "secondary"} class="rounded-sm"> | |
| 102 | + <Badge variant={running() ? "default" : "secondary"} class="rounded-md px-3 py-1 text-sm"> | |
| 103 | 103 | {running() ? t("pomodoro.running") : t("pomodoro.idle")} |
| 104 | 104 | </Badge> |
| 105 | 105 | </div> |