From 5abbffca9bf9d86a6c0ace990654541c2442c8d0 Mon Sep 17 00:00:00 2001 From: Vantz Stockwell Date: Sat, 14 Mar 2026 16:01:58 -0400 Subject: [PATCH] feat(ui): add color accents across the connection manager MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Default protocol color strips on all host cards (wraith-blue for SSH, purple for RDP) - Deterministic tag colors from 8-color palette (teal, amber, violet, rose, emerald, sky, orange, indigo) - Last-connected recency coloring (green=today, amber=this week, gray=older) - Section header dots (wraith-400 for Recent, gray for All Hosts) - Active nav link highlighting (wraith-400) - Group headers get subtle wraith-500 left border accent - Tree host dots default to protocol color instead of gray - Fixed rogue modal using hardcoded #1a1a2e/#e94560 — now uses design system - Fixed sky-600 save buttons → wraith-600 for brand consistency - Credential type badges: SSH Key=wraith, Password=amber (was purple/blue) - Colored tags in right sidebar detail panel Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/components/connections/HostCard.vue | 46 ++++++++++++++++---- frontend/components/connections/HostTree.vue | 26 +++++++++-- frontend/layouts/default.vue | 8 ++-- frontend/pages/index.vue | 36 +++++++++++---- 4 files changed, 91 insertions(+), 25 deletions(-) diff --git a/frontend/components/connections/HostCard.vue b/frontend/components/connections/HostCard.vue index 4dbb4c0..5ee5cd3 100644 --- a/frontend/components/connections/HostCard.vue +++ b/frontend/components/connections/HostCard.vue @@ -34,6 +34,36 @@ function formatLastConnected(ts: string | null): string { if (diffDays < 30) return `${diffDays}d ago` return d.toLocaleDateString() } + +function recencyClass(ts: string | null): string { + if (!ts) return 'text-gray-600' + const diffDays = Math.floor((Date.now() - new Date(ts).getTime()) / 86400000) + if (diffDays === 0) return 'text-emerald-400' + if (diffDays <= 7) return 'text-amber-400' + return 'text-gray-600' +} + +// Deterministic tag color from string hash +const TAG_COLORS = [ + 'bg-teal-900/40 text-teal-300 border-teal-700/50', + 'bg-amber-900/40 text-amber-300 border-amber-700/50', + 'bg-violet-900/40 text-violet-300 border-violet-700/50', + 'bg-rose-900/40 text-rose-300 border-rose-700/50', + 'bg-emerald-900/40 text-emerald-300 border-emerald-700/50', + 'bg-sky-900/40 text-sky-300 border-sky-700/50', + 'bg-orange-900/40 text-orange-300 border-orange-700/50', + 'bg-indigo-900/40 text-indigo-300 border-indigo-700/50', +] + +function tagColor(tag: string): string { + let hash = 0 + for (let i = 0; i < tag.length; i++) hash = ((hash << 5) - hash + tag.charCodeAt(i)) | 0 + return TAG_COLORS[Math.abs(hash) % TAG_COLORS.length] +} + +function defaultStrip(protocol: string): string { + return protocol === 'rdp' ? '#a855f7' : '#5c7cfa' +}