feat: Implement maintenance mode functionality

Introduces a new maintenance mode feature to allow administrators to temporarily disable the application for updates or maintenance.

This includes:
- A dedicated `MaintenancePage` component.
- Global state management for maintenance mode and message in `App.tsx`.
- Firestore integration for storing and retrieving maintenance settings.
- Updates to `AdminDashboard.tsx` to manage these settings.
- Firebase security rules adjustments for the new settings collection.
- Animate transitions for signal results in `SignalHistory.tsx`.
This commit is contained in:
desartstudio95
2026-05-08 11:42:38 +02:00
parent 15b618dda3
commit 6af03ef95e
6 changed files with 216 additions and 11 deletions
+14 -7
View File
@@ -1,4 +1,5 @@
import React, { useEffect, useState } from 'react';
import { motion } from 'motion/react';
import { Signal, SignalResult, SignalType } from '../types';
import { cn } from '../lib/utils';
import { Clock, TrendingUp, TrendingDown, ChevronDown, ChevronUp } from 'lucide-react';
@@ -169,14 +170,20 @@ export const SignalHistory: React.FC = () => {
</div>
<div className="text-right">
<span className="text-[10px] text-zinc-500 font-black uppercase">Resultado</span>
<div className={cn(
"flex items-center justify-end gap-1 font-black italic uppercase text-sm",
signal.result === SignalResult.GAIN ? "text-green-500" :
signal.result === SignalResult.LOSS ? "text-brand-red" :
"text-zinc-500"
)}>
<motion.div
key={signal.result}
initial={{ opacity: 0, scale: 0.8 }}
animate={{ opacity: 1, scale: 1 }}
transition={{ duration: 0.3, type: 'spring', bounce: 0.4 }}
className={cn(
"flex items-center justify-end gap-1 font-black italic uppercase text-sm",
signal.result === SignalResult.GAIN ? "text-green-500" :
signal.result === SignalResult.LOSS ? "text-brand-red" :
"text-zinc-500"
)}
>
{signal.result}
</div>
</motion.div>
</div>
</div>