Files
phishboard/old_overview.txt
m3tam3re 514ee9a2e3 first
2026-07-16 15:05:58 +02:00

3 lines
4.1 KiB
Plaintext

"import React from 'react';\nimport { Send, Users, Eye, Trash2, ShieldAlert, CheckCircle, TrendingUp, TrendingDown, Minus } from 'lucide-react';\nimport { Metrics } from '../types';\nimport { AnimatedNumber } from './AnimatedNumber';\n\ninterface TrendProps {\n current: number;\n refValue: number;\n hasRef: boolean;\n totalCurrent?: number;\n totalRef?: number;\n invertGoodBad?: boolean;\n absolute?: boolean;\n neutralOnly?: boolean;\n}\n\nexport const Trend: React.FC<TrendProps> = ({ current, refValue, hasRef, totalCurrent, totalRef, invertGoodBad = false, absolute = false, neutralOnly = false }) => {\n if (!hasRef) return null;\n if (!absolute && (totalRef === 0 || totalRef === undefined || totalCurrent === undefined)) return null;\n\n const valCurrent = absolute ? current : (totalCurrent! > 0 ? (current / totalCurrent!) * 100 : 0);\n const valRef = absolute ? refValue : (totalRef! > 0 ? (refValue / totalRef!) * 100 : 0);\n const diff = valCurrent - valRef;\n\n const displayRef = absolute ? refValue : `${Math.round(valRef)}%`;\n\n if (neutralOnly || Math.abs(diff) < 0.1) {\n return (\n <span className=\"trend-indicator trend-neutral\" style={{ fontSize: '0.8rem' }}>\n {!neutralOnly && <Minus size={14} style={{ marginRight: '4px' }} />}\n Vergleich: {displayRef}\n </span>\n );\n }\n\n const isIncrease = diff > 0;\n const isGoodTrend = invertGoodBad ? !isIncrease : isIncrease;\n\n const Icon = isIncrease ? TrendingUp : TrendingDown;\n const trendClass = isGoodTrend ? \"trend-positive\" : \"trend-negative\";\n\n return (\n <span className={`trend-indicator ${trendClass}`} style={{ fontSize: '0.8rem' }}>\n <Icon size={14} style={{ marginRight: '4px' }} />\n Vergleich: {displayRef}\n </span>\n );\n};\n\ninterface OverviewTabProps {\n currentMetrics: Metrics;\n refMetrics: Metrics;\n hasRef: boolean;\n}\n\nexport default function OverviewTab({ currentMetrics, refMetrics, hasRef }: OverviewTabProps) {\n return (\n <>\n <div style={{ displa
<truncated 5072 bytes>