forge
Explore
Log in

Don't you dare go Hollow

💄 data-table polish, exam status dots, past/finished status colors

Browse files at this commit

a001b1b7e2b3c5f33f753aee6ac0a498964fa140Burak BoduroğluParent: cd3f0a8
  • style
    • 💄 data-table polish, exam status dots, past/finished status colors
Show full message
style: 💄 data-table polish, exam status dots, past/finished status colors
- data-table: rounded-xl, thinner borders, muted zebra, primary hover
- schedule-status: added rose color for finished/past status
- exams-page: status badge includes colored dot indicator
src/index.cssmodified+10 -6
@@ -129,7 +129,7 @@
129129 }
130130
131131 .data-table-wrap {
132- @apply max-h-[62vh] overflow-auto rounded-lg border border-border bg-card;
132+ @apply max-h-[62vh] overflow-auto rounded-xl border border-border/80 bg-card shadow-sm;
133133 }
134134
135135 .data-table {
@@ -137,23 +137,27 @@
137137 }
138138
139139 .data-table thead {
140- @apply sticky top-0 z-10 border-b border-border bg-muted/95 text-muted-foreground backdrop-blur;
140+ @apply sticky top-0 z-10 border-b border-border bg-muted/80 text-muted-foreground backdrop-blur;
141141 }
142142
143143 .data-table th {
144- @apply h-8 overflow-hidden text-ellipsis whitespace-nowrap border-r border-border/60 px-3 text-left text-[10px] font-semibold uppercase tracking-[0.11em] last:border-r-0;
144+ @apply h-9 overflow-hidden text-ellipsis whitespace-nowrap border-r border-border/50 px-3 text-left text-[10px] font-semibold uppercase tracking-[0.11em] last:border-r-0;
145145 }
146146
147147 .data-table td {
148- @apply h-10 whitespace-nowrap border-r border-border/40 px-3 py-1.5 align-middle last:border-r-0;
148+ @apply h-11 whitespace-nowrap border-r border-border/30 px-3 py-2 align-middle last:border-r-0;
149149 }
150150
151151 .data-table tbody tr {
152- @apply border-b border-border/70 transition-colors hover:bg-muted/60;
152+ @apply border-b border-border/60 transition-colors hover:bg-primary/[0.045];
153153 }
154154
155155 .data-table tbody tr:nth-child(even) {
156- background-color: hsl(var(--muted) / 0.28);
156+ background-color: hsl(var(--muted) / 0.18);
157+ }
158+
159+ .data-table tbody tr:hover:nth-child(even) {
160+ background-color: hsl(var(--primary) / 0.045);
157161 }
158162
159163 .detail-breadcrumb {
src/lib/schedule-status.tsmodified+4 -0
@@ -15,11 +15,15 @@ export function scheduleStatusClass(status: ScheduleStatus | string): string {
1515 if (status === "today" || status === "upcoming" || status === "soon") {
1616 return "border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300";
1717 }
18+ if (status === "finished" || status === "past") {
19+ return "border-rose-500/30 bg-rose-500/10 text-rose-700 dark:text-rose-300";
20+ }
1821 return "border-muted bg-muted/50 text-muted-foreground";
1922 }
2023
2124 export function scheduleStatusDotClass(status: ScheduleStatus | string): string {
2225 if (status === "active") return "bg-emerald-600";
2326 if (status === "today" || status === "upcoming" || status === "soon") return "bg-amber-600";
27+ if (status === "finished" || status === "past") return "bg-rose-600";
2428 return "bg-muted-foreground";
2529 }
src/pages/exams-page.tsxmodified+7 -2
@@ -25,7 +25,7 @@ import { examKindLabel } from "@/lib/exam-labels";
2525 import { createFlash } from "@/lib/flash";
2626 import { formatDateTime } from "@/lib/format";
2727 import { hasMinRole } from "@/lib/roles";
28-import { scheduleStatusClass } from "@/lib/schedule-status";
28+import { scheduleStatusClass, scheduleStatusDotClass } from "@/lib/schedule-status";
2929 import { cn } from "@/lib/cn";
3030 import { useAuth } from "@/stores/auth-context";
3131 import { usePreferences, useT } from "@/stores/preferences-context";
@@ -155,7 +155,12 @@ function ExamsContent() {
155155 meta: { headerClass: "text-center", cellClass: "text-center" },
156156 cell: (cell) => {
157157 const status = examStatus(cell.row.original);
158- return <Badge variant="outline" class={cn("w-28 justify-center rounded-sm", scheduleStatusClass(status))}>{statusLabel(status)}</Badge>;
158+ return (
159+ <Badge variant="outline" class={cn("w-28 justify-center rounded-sm", scheduleStatusClass(status))}>
160+ <span class={cn("mr-1.5 h-1.5 w-1.5 rounded-full", scheduleStatusDotClass(status))} />
161+ {statusLabel(status)}
162+ </Badge>
163+ );
159164 },
160165 },
161166 {