feat: real live EKAP government data feed integration & live refresh stream

This commit is contained in:
2026-08-07 18:03:23 +03:00
parent d40bcd3937
commit 796b22bc5a
3 changed files with 222 additions and 6 deletions
+15 -2
View File
@@ -1,6 +1,6 @@
import React, { useState } from 'react';
import { useApp } from '../context/AppContext';
import { Bot, Search, SlidersHorizontal, Gift, Bell, User, ChevronDown, CheckCircle, LogOut, Globe, Sparkles } from 'lucide-react';
import { Bot, Search, SlidersHorizontal, Gift, Bell, User, ChevronDown, CheckCircle, LogOut, Globe, Sparkles, RefreshCw } from 'lucide-react';
export const Header = () => {
const {
@@ -12,7 +12,9 @@ export const Header = () => {
userProfile,
notifications,
setActiveTab,
clearAllFilters
clearAllFilters,
isRefreshingLive,
refreshLiveEKAPData
} = useApp();
const [showNotifications, setShowNotifications] = useState(false);
@@ -82,6 +84,17 @@ export const Header = () => {
{/* Right Action Icons */}
<div className="flex items-center gap-3">
{/* Real Live EKAP Mode Badge */}
<button
onClick={refreshLiveEKAPData}
disabled={isRefreshingLive}
className="bg-emerald-600 hover:bg-emerald-500 text-white font-extrabold px-3 py-1.5 rounded-lg text-xs flex items-center gap-1.5 shadow-xs transition-colors shrink-0 disabled:opacity-50"
title="Canlı EKAP ve Doğrudan Temin Verilerini Anlık Güncelleyin"
>
<RefreshCw className={`w-3.5 h-3.5 text-white ${isRefreshingLive ? 'animate-spin' : ''}`} />
<span className="hidden lg:inline">{isRefreshingLive ? 'EKAP Çekiliyor...' : '🔴 CANLI EKAP VERİSİ'}</span>
</button>
{/* Gemini 3.6 Flash PDF Spec Analyzer Button */}
<button
onClick={() => setIsAiSpecAnalyzerOpen(true)}