Livrare Lot 3 (Frontend): aplicație web, aplicație mobilă Android, extensie browser
- Surse complete web (React/Vite) + mobil (React Native/Expo) + extensie (MV3) - Documentație de livrare: ghid utilizare, matrice trasabilitate cerințe, raport testare furnizor - Artefacte binare: imagine Docker didi-frontend:lot3-1.0, APK, extensie v3.2.6 + SHA256SUMS - Configurare adresă platformă externalizată (build args / .env / config.js) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
commit
cec967f953
321 changed files with 80506 additions and 0 deletions
42
web/src/components/PipelineAnalysis/details/domain.tsx
Normal file
42
web/src/components/PipelineAnalysis/details/domain.tsx
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
import React from 'react';
|
||||
import { Globe } from 'lucide-react';
|
||||
import { enumLabel } from '../../../utils/i18n-enums';
|
||||
import type { FindingAccent } from '../sections/FindingCard';
|
||||
import { FindingCard } from '../sections/FindingCard';
|
||||
|
||||
function domainAccent(trust: number): FindingAccent {
|
||||
if (trust >= 70) return 'success';
|
||||
if (trust >= 40) return 'warning';
|
||||
return 'critical';
|
||||
}
|
||||
|
||||
export function renderDomainDetail(data: any) {
|
||||
if (!data) return null;
|
||||
const trust = data.trust_score ?? 0;
|
||||
const verdictText = enumLabel(data.verdict || '') || 'Unknown';
|
||||
const isRo = (typeof document !== 'undefined' && document.documentElement.lang || '').toLowerCase().startsWith('ro');
|
||||
return (
|
||||
<FindingCard
|
||||
icon={Globe}
|
||||
accent={domainAccent(trust)}
|
||||
eyebrow={isRo ? `Domeniu · trust ${trust}` : `Domain · trust ${trust}`}
|
||||
headline={typeof data.domain === 'string' ? data.domain : data.domain?.name || (isRo ? 'Necunoscut' : 'Unknown')}
|
||||
quote={data.category}
|
||||
source={
|
||||
<span>{verdictText}</span>
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export function renderDomainSummary(data: any) {
|
||||
if (!data) return null;
|
||||
const trust = parseFloat(data.trust_score);
|
||||
const validTrust = !isNaN(trust) && trust >= 0;
|
||||
return (
|
||||
<span style={{ fontSize: 12, color: 'var(--fg-secondary)' }}>
|
||||
{data.domain && typeof data.domain === 'string' ? `${data.domain} · ` : ''}
|
||||
{validTrust ? `Trust ${trust}%` : 'Trust N/A'}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue