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 {
|
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('+++') || line.startsWith('---')) return 'text-text-muted'
|
||||||
if (line.startsWith('+')) return 'bg-green-900/30 text-green-300'
|
if (line.startsWith('+')) return 'bg-success/10 text-success'
|
||||||
if (line.startsWith('-')) return 'bg-red-900/30 text-red-300'
|
if (line.startsWith('-')) return 'bg-error/10 text-error'
|
||||||
return 'text-text-primary'
|
return 'text-text-primary'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -71,14 +71,14 @@ const SUB_TABS: { key: SubTab; label: string; icon: React.ElementType }[] = [
|
|||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
const TYPE_COLORS: Record<string, string> = {
|
const TYPE_COLORS: Record<string, string> = {
|
||||||
ether: '#3B82F6',
|
ether: 'hsl(var(--accent))',
|
||||||
bridge: '#8B5CF6',
|
bridge: 'hsl(var(--info))',
|
||||||
vlan: '#F59E0B',
|
vlan: 'hsl(var(--warning))',
|
||||||
bonding: '#10B981',
|
bonding: 'hsl(var(--success))',
|
||||||
pppoe: '#EF4444',
|
pppoe: 'hsl(var(--error))',
|
||||||
l2tp: '#EC4899',
|
l2tp: 'hsl(var(--error))',
|
||||||
ovpn: '#06B6D4',
|
ovpn: 'hsl(var(--info))',
|
||||||
wlan: '#84CC16',
|
wlan: 'hsl(var(--success))',
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user