fix: correzioni critiche e checklist test manuali
CORREZIONI:
- Badge confrontato ESATTAMENTE come stringa (rimosso .lstrip("0"))
- Success modal si chiude quando arriva nuovo badge (fix dipendenze useCallback)
- Polling ogni 30s per invalidare sessione se server riparte
- Area carosello allargata per testi lunghi (es. russo)
DOCUMENTAZIONE:
- API_SPECIFICATION.md aggiornata: badge come stringa esatta
- Creata TEST_CHECKLIST.md con 22 test manuali
- Aggiornati piani backend e frontend
Badge sono STRINGHE, non numeri:
- "0008988288" != "8988288" (zeri iniziali significativi)
This commit is contained in:
@@ -9,19 +9,27 @@ interface SuccessModalProps {
|
||||
isOpen: boolean;
|
||||
onClose: () => void;
|
||||
userName?: string;
|
||||
durationMs?: number;
|
||||
}
|
||||
|
||||
// Numero messaggi nel carosello
|
||||
const CAROUSEL_MESSAGE_COUNT = 10;
|
||||
|
||||
export function SuccessModal({
|
||||
isOpen,
|
||||
onClose,
|
||||
userName
|
||||
userName,
|
||||
durationMs = 8000
|
||||
}: SuccessModalProps) {
|
||||
// Calcola intervallo carosello per mostrare tutti i messaggi durante la durata
|
||||
const carouselIntervalMs = Math.floor(durationMs / (CAROUSEL_MESSAGE_COUNT * 1.2));
|
||||
|
||||
return (
|
||||
<Modal
|
||||
isOpen={isOpen}
|
||||
onClose={onClose}
|
||||
variant="success"
|
||||
autoCloseMs={5000}
|
||||
autoCloseMs={durationMs}
|
||||
fullscreen
|
||||
>
|
||||
<div className="flex flex-col items-center justify-center min-h-screen p-8">
|
||||
@@ -46,7 +54,7 @@ export function SuccessModal({
|
||||
</div>
|
||||
|
||||
{/* Carosello Messaggi Benvenuto */}
|
||||
<WelcomeCarousel userName={userName}/>
|
||||
<WelcomeCarousel userName={userName} intervalMs={carouselIntervalMs} />
|
||||
|
||||
{/* Sub text */}
|
||||
<p className="text-2xl md:text-3xl text-white/80 mt-8 animate-fade-in">
|
||||
@@ -59,7 +67,7 @@ export function SuccessModal({
|
||||
<div
|
||||
className="h-full bg-white rounded-full"
|
||||
style={{
|
||||
animation: 'shrink 5s linear forwards',
|
||||
animation: `shrink ${durationMs}ms linear forwards`,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user