Closes #ISSUE-009 - Implement DEV_MODE Offline-First Protection Shield
This commit is contained in:
@@ -46,6 +46,7 @@ export default function ScannerDemo() {
|
||||
|
||||
const [showMathAccordion, setShowMathAccordion] = useState(false);
|
||||
const [isMathModalOpen, setIsMathModalOpen] = useState(false);
|
||||
const [isShieldActive, setIsShieldActive] = useState(false);
|
||||
|
||||
// Cache for metadata and prices retrieved dynamically
|
||||
const [alertsMetadata, setAlertsMetadata] = useState<Record<string, { name: string; whyDropped: string; sentiment: 'GREEN' | 'YELLOW' | 'RED' }>>({});
|
||||
@@ -94,6 +95,7 @@ export default function ScannerDemo() {
|
||||
throw new Error('Failed to fetch scanner tickers');
|
||||
}
|
||||
const data = await response.json();
|
||||
setIsShieldActive(!!data.isShieldActive);
|
||||
const results = data.results || [];
|
||||
|
||||
setScanProgress('Berechne GJR-GARCH Volatilitäten...');
|
||||
@@ -551,8 +553,20 @@ export default function ScannerDemo() {
|
||||
<div className="flex flex-col md:flex-row justify-between items-start md:items-center gap-6">
|
||||
<div className="space-y-1">
|
||||
<span className="text-amber-400 text-xs font-semibold uppercase tracking-wider">Market Scanner Engine</span>
|
||||
<h2 className="text-xl font-bold text-white flex items-center gap-2">
|
||||
<ShieldAlert className="text-amber-400 w-5 h-5" /> Anomalien-Scanner & Marktverzerrungen
|
||||
<h2 className="text-xl font-bold text-white flex flex-wrap items-center gap-2">
|
||||
<ShieldAlert className="text-amber-400 w-5 h-5" />
|
||||
<span>Anomalien-Scanner & Marktverzerrungen</span>
|
||||
{isShieldActive ? (
|
||||
<span className="inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-[10px] font-bold bg-amber-500/10 text-amber-400 border border-amber-500/20 shadow-[0_0_10px_rgba(245,158,11,0.15)] ml-2 animate-pulse">
|
||||
<span className="w-1.5 h-1.5 rounded-full bg-amber-500" />
|
||||
DEV-ARCHIV AKTIV (0 CALLS)
|
||||
</span>
|
||||
) : (
|
||||
<span className="inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-[10px] font-bold bg-emerald-500/10 text-emerald-400 border border-emerald-500/20 shadow-[0_0_10px_rgba(16,185,129,0.15)] ml-2">
|
||||
<span className="w-1.5 h-1.5 rounded-full bg-emerald-500 animate-ping" />
|
||||
LIVE-API ENDPUNKT (FMP CORPO)
|
||||
</span>
|
||||
)}
|
||||
</h2>
|
||||
<p className="text-slate-400 text-xs max-w-2xl">
|
||||
Isoliert Kursstürze > 5% bei relativem Gesamtmarkt-Stopp (S&P 500 driftet seitwärts oder steigt). Misst die Asymmetrie mittels GJR-GARCH, um Panik von strukturellen Risiken zu separieren.
|
||||
|
||||
@@ -77,6 +77,7 @@ export default function AiSpecialSilo() {
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
const [payload, setPayload] = useState<Payload | null>(null);
|
||||
const [isMathModalOpen, setIsMathModalOpen] = useState(false);
|
||||
const [isShieldActive, setIsShieldActive] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
const fetchData = async () => {
|
||||
@@ -87,6 +88,7 @@ export default function AiSpecialSilo() {
|
||||
if (response.ok) {
|
||||
const data = await response.json();
|
||||
setPayload(data);
|
||||
setIsShieldActive(!!data.isShieldActive);
|
||||
} else {
|
||||
setError('Error fetching AI Tech Hyper-Leverage metrics.');
|
||||
}
|
||||
@@ -186,8 +188,20 @@ export default function AiSpecialSilo() {
|
||||
<div className="flex flex-col md:flex-row justify-between items-start md:items-center gap-4">
|
||||
<div className="space-y-1">
|
||||
<span className="text-teal-400 text-xs font-semibold uppercase tracking-wider">AI & Tech Silo</span>
|
||||
<h2 className="text-2xl font-extrabold text-white flex items-center gap-2">
|
||||
<Zap className="text-teal-400 w-6 h-6" /> AI Hyper-Leverage & CapEx Matrix
|
||||
<h2 className="text-2xl font-extrabold text-white flex flex-wrap items-center gap-2">
|
||||
<Zap className="text-teal-400 w-6 h-6" />
|
||||
<span>AI Hyper-Leverage & CapEx Matrix</span>
|
||||
{isShieldActive ? (
|
||||
<span className="inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-[10px] font-bold bg-amber-500/10 text-amber-400 border border-amber-500/20 shadow-[0_0_10px_rgba(245,158,11,0.15)] ml-2 animate-pulse">
|
||||
<span className="w-1.5 h-1.5 rounded-full bg-amber-500" />
|
||||
DEV-ARCHIV AKTIV (0 CALLS)
|
||||
</span>
|
||||
) : (
|
||||
<span className="inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-[10px] font-bold bg-emerald-500/10 text-emerald-400 border border-emerald-500/20 shadow-[0_0_10px_rgba(16,185,129,0.15)] ml-2">
|
||||
<span className="w-1.5 h-1.5 rounded-full bg-emerald-500 animate-ping" />
|
||||
LIVE-API ENDPUNKT (FMP CORPO)
|
||||
</span>
|
||||
)}
|
||||
</h2>
|
||||
<p className="text-xs text-slate-400">
|
||||
Monitors Big Tech capital expenditures, segment revenues, and inventory velocities to diagnose infrastructure bubbles.
|
||||
|
||||
Reference in New Issue
Block a user