Skip to content

Commit 7e7255f

Browse files
committed
style(workspaces): add colorful status accents to cards
Cards read "dry" — bring color back tastefully (the heavy gradient tile was too much). Soft flat status tints on the folder icon box (emerald / amber / slate) + a thin solid status accent strip across the top, staying inside the app's tinted-surface design language. Folder name + full path + feature-set summary unchanged. Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com>
1 parent 6a92037 commit 7e7255f

1 file changed

Lines changed: 33 additions & 8 deletions

File tree

apps/desktop/src/features/workspaces/WorkspacesPage.tsx

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,26 @@ function summarizeFeatureSets(names: string[]): string {
530530
return `${names[0]} + ${names.length - 1} more`;
531531
}
532532

533+
/**
534+
* Per-status color. Soft flat tints (not heavy gradients) + a thin solid
535+
* accent strip — adds life and at-a-glance status while staying inside the
536+
* app's tinted-surface design language.
537+
*/
538+
const CARD_TONES = {
539+
emerald: {
540+
strip: 'bg-emerald-500',
541+
box: 'bg-emerald-50 text-emerald-600 ring-emerald-200/70 dark:bg-emerald-900/20 dark:text-emerald-400 dark:ring-emerald-800/50',
542+
},
543+
amber: {
544+
strip: 'bg-amber-500',
545+
box: 'bg-amber-50 text-amber-600 ring-amber-200/70 dark:bg-amber-900/20 dark:text-amber-400 dark:ring-amber-800/50',
546+
},
547+
neutral: {
548+
strip: 'bg-slate-300 dark:bg-slate-600',
549+
box: 'bg-[rgb(var(--surface))] text-[rgb(var(--muted))] ring-[rgb(var(--border-subtle))]',
550+
},
551+
} as const;
552+
533553
function EntryCard({
534554
entry,
535555
spaceName,
@@ -544,30 +564,35 @@ function EntryCard({
544564
selected: boolean;
545565
onClick: () => void;
546566
}) {
547-
const folderColor =
567+
const tone =
548568
entry.kind === 'unmapped-live'
549-
? 'text-amber-500'
569+
? 'amber'
550570
: entry.kind === 'mapped-live'
551-
? 'text-emerald-500'
552-
: 'text-[rgb(var(--muted))]';
571+
? 'emerald'
572+
: 'neutral';
573+
const t = CARD_TONES[tone];
553574
const name = folderName(entry.root);
554575

555576
return (
556577
<Card
557-
className={`cursor-pointer transition-all hover:shadow-lg hover:scale-[1.01] ${
578+
className={`relative cursor-pointer overflow-hidden transition-all hover:shadow-lg hover:scale-[1.01] ${
558579
selected ? 'ring-2 ring-primary-500 shadow-lg' : ''
559580
}`}
560581
onClick={onClick}
561582
data-testid={`workspace-entry-${entry.id}`}
562583
>
584+
{/* Status accent strip across the top — a splash of color per state. */}
585+
<div className={`absolute inset-x-0 top-0 h-1 ${t.strip}`} />
563586
<CardContent className="p-6">
564587
<div className="mb-4 flex items-start gap-4">
565588
<div className="relative flex-shrink-0">
566-
<div className="flex h-14 w-14 items-center justify-center rounded-xl border border-[rgb(var(--border-subtle))] bg-[rgb(var(--surface))]">
589+
<div
590+
className={`flex h-14 w-14 items-center justify-center rounded-xl ring-1 ring-inset ${t.box}`}
591+
>
567592
{entry.isLive ? (
568-
<FolderOpen className={`h-6 w-6 ${folderColor}`} />
593+
<FolderOpen className="h-6 w-6" />
569594
) : (
570-
<Folder className={`h-6 w-6 ${folderColor}`} />
595+
<Folder className="h-6 w-6" />
571596
)}
572597
</div>
573598
{entry.isLive && (

0 commit comments

Comments
 (0)