fix(ui): replace hardcoded interface type colors and diff viewer colors
InterfacesPanel: replace Tailwind palette hex (#3B82F6 blue, #8B5CF6 purple, etc.) with token references (accent, info, warning, success, error). No more blue or purple interface badges. DiffViewer: replace raw blue/green/red Tailwind classes with token classes (info, success, error). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -10,10 +10,10 @@ interface DiffViewerProps {
|
||||
}
|
||||
|
||||
function classifyLine(line: string): string {
|
||||
if (line.startsWith('@@')) return 'bg-blue-900/20 text-blue-300'
|
||||
if (line.startsWith('@@')) return 'bg-info/10 text-info'
|
||||
if (line.startsWith('+++') || line.startsWith('---')) return 'text-text-muted'
|
||||
if (line.startsWith('+')) return 'bg-green-900/30 text-green-300'
|
||||
if (line.startsWith('-')) return 'bg-red-900/30 text-red-300'
|
||||
if (line.startsWith('+')) return 'bg-success/10 text-success'
|
||||
if (line.startsWith('-')) return 'bg-error/10 text-error'
|
||||
return 'text-text-primary'
|
||||
}
|
||||
|
||||
|
||||
@@ -71,14 +71,14 @@ const SUB_TABS: { key: SubTab; label: string; icon: React.ElementType }[] = [
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
const TYPE_COLORS: Record<string, string> = {
|
||||
ether: '#3B82F6',
|
||||
bridge: '#8B5CF6',
|
||||
vlan: '#F59E0B',
|
||||
bonding: '#10B981',
|
||||
pppoe: '#EF4444',
|
||||
l2tp: '#EC4899',
|
||||
ovpn: '#06B6D4',
|
||||
wlan: '#84CC16',
|
||||
ether: 'hsl(var(--accent))',
|
||||
bridge: 'hsl(var(--info))',
|
||||
vlan: 'hsl(var(--warning))',
|
||||
bonding: 'hsl(var(--success))',
|
||||
pppoe: 'hsl(var(--error))',
|
||||
l2tp: 'hsl(var(--error))',
|
||||
ovpn: 'hsl(var(--info))',
|
||||
wlan: 'hsl(var(--success))',
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user