From 4279390246a4992ead2748b9fe452d87ab93d5c7 Mon Sep 17 00:00:00 2001 From: desartstudio95 Date: Sun, 3 May 2026 22:17:02 +0200 Subject: [PATCH] feat: Implement real-time trading notifications Adds a `NotificationManager` component to the application that listens for new trading signals from Firestore. When a new signal is detected, it requests notification permission from the user and displays a browser notification if permission is granted. This change enhances user experience by providing immediate alerts for potential trading opportunities. Also includes minor UI and styling adjustments in `AnalysisView` and `LandingPage` for improved clarity and consistency. --- src/App.tsx | 2 ++ src/components/AnalysisView.tsx | 9 +++-- src/components/LandingPage.tsx | 40 ++++++++++++++++++++- src/components/NotificationManager.tsx | 48 ++++++++++++++++++++++++++ 4 files changed, 96 insertions(+), 3 deletions(-) create mode 100644 src/components/NotificationManager.tsx diff --git a/src/App.tsx b/src/App.tsx index 7812554..e36a495 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -12,6 +12,7 @@ import { PlansView } from './components/PlansView'; import { AdminDashboard } from './components/AdminDashboard'; import { LandingPage } from './components/LandingPage'; import { ProfileView } from './components/ProfileView'; +import { NotificationManager } from './components/NotificationManager'; import { TrendingUp, ShieldAlert, Ghost, Mail, Lock, UserPlus, LogIn, Loader2, ArrowLeft, User as UserIcon, Eye, EyeOff } from 'lucide-react'; import { motion, AnimatePresence } from 'motion/react'; import { onAuthStateChanged, signInWithEmailAndPassword, createUserWithEmailAndPassword, updateProfile, signOut, sendEmailVerification, sendPasswordResetEmail, User, setPersistence, browserLocalPersistence, browserSessionPersistence } from 'firebase/auth'; @@ -538,6 +539,7 @@ export default function App() { return (
+ {/* Background Image for App */}
= ({ userData }) => { strokeDashoffset={283 - (283 * result.score) / 100} className={cn( "transition-all duration-1000 ease-out", - result.decision === SignalType.BUY ? "text-green-500" : "text-brand-red" + result.decision === SignalType.BUY ? "text-green-500" : (result.decision === SignalType.SELL ? "text-brand-red" : "text-zinc-500") )} strokeLinecap="round" transform="rotate(-90 50 50)" @@ -285,7 +285,7 @@ export const AnalysisView: React.FC<{ userData?: any }> = ({ userData }) => {
{result.score}% @@ -319,6 +319,11 @@ export const AnalysisView: React.FC<{ userData?: any }> = ({ userData }) => { {/* Trading Decision */}
+
+ + {result.pair} + +
= ({ onGetStarted, onViewPl
-

82%

+

90%

Precisão média

@@ -231,6 +231,44 @@ export const LandingPage: React.FC = ({ onGetStarted, onViewPl
+ {/* Info Section - IA QuantScanner */} +
+
+
+

+ IA QuantScanner:
O Futuro do Mercado. +

+

+ O **IA QuantScanner** é uma ferramenta avançada baseada em Inteligência Artificial desenvolvida + para analisar o mercado financeiro em tempo real, com foco especial em **Forex, índices e criptomoedas**. +

+
+ +
+
+

📊 ANÁLISE

+

Técnica automatizada que identifica padrões, suportes e resistências.

+
+
+

🤖 IA

+

Aprende continuamente com dados históricos e comportamento do mercado.

+
+
+

⏱️ MONITORAMENTO

+

Escaneia múltiplos ativos 24/7 para detectar oportunidades instantâneas.

+
+
+ +
+

Testemunhos

+
+

"Desde que comecei a usar o IA QuantScanner, minhas entradas ficaram muito mais precisas. Reduzi minhas perdas e aumentei meus lucros em poucas semanas."
– **Carlos M.**

+

"A velocidade com que o sistema identifica oportunidades é impressionante. É como ter um analista profissional trabalhando para mim 24h."
– **João D.**

+
+
+
+
+ {/* Footer */}