From ade79c53a59cd3a991224f5e82b9a6e3861457bf Mon Sep 17 00:00:00 2001 From: SnapOtter Date: Sun, 14 Jun 2026 21:03:52 +0800 Subject: [PATCH] feat: polish home page UI -- card borders, colored icons, 3-col grid, Cmd+K hint - Tool cards: subtle border, modality-colored icon backgrounds, better hover - Category headers: bottom border separator for visual structure - Grid: 3 columns on lg screens instead of 2 - Search bar: Cmd+K keyboard shortcut hint, tighter styling - Tabs: softer styling, count separated from label - Recent pills: subtler border style instead of bright orange - Tighter vertical spacing throughout - Wider max-width (max-w-6xl) for better use of screen space --- apps/web/src/components/common/tool-card.tsx | 87 ++++++-------- apps/web/src/pages/home-page.tsx | 118 +++++-------------- 2 files changed, 68 insertions(+), 137 deletions(-) diff --git a/apps/web/src/components/common/tool-card.tsx b/apps/web/src/components/common/tool-card.tsx index a8c2584e..2216939a 100644 --- a/apps/web/src/components/common/tool-card.tsx +++ b/apps/web/src/components/common/tool-card.tsx @@ -1,6 +1,6 @@ import type { Tool } from "@snapotter/shared"; import { MODALITIES, PYTHON_SIDECAR_TOOLS, TOOL_BUNDLE_MAP } from "@snapotter/shared"; -import { Clock, Download, FileImage, Loader2, Star } from "lucide-react"; +import { Clock, Download, FileImage, Loader2 } from "lucide-react"; import { useMemo } from "react"; import { Link } from "react-router-dom"; import { useTranslation } from "@/contexts/i18n-context"; @@ -38,12 +38,14 @@ export function ToolCard({ tool, variant = "compact", showModalityBadge }: ToolC return bundle?.status === "installed" ? "installed" : "not_installed"; }, [isAiTool, tool.id, bundles, installing, queued]); + const modalityColor = MODALITY_COLOR_MAP[tool.modality] ?? "#6B7280"; + const modalityBadge = showModalityBadge ? ( {MODALITIES.find((m) => m.id === tool.modality)?.name ?? tool.modality} @@ -52,20 +54,14 @@ export function ToolCard({ tool, variant = "compact", showModalityBadge }: ToolC const aiStatusIcon = aiStatus === "not_installed" ? ( - <> -