@@ -12,67 +12,70 @@ export const AnalysisNotification: React.FC<Props> = ({
1212 onCancel,
1313} ) => {
1414 const hasTotals = progress . totalMoves > 0
15- const progressPercentage =
16- hasTotals
17- ? Math . round ( ( progress . currentMoveIndex / progress . totalMoves ) * 100 )
18- : 0
15+ const progressPercentage = hasTotals
16+ ? Math . round ( ( progress . currentMoveIndex / progress . totalMoves ) * 100 )
17+ : 0
1918
2019 if ( ! progress . isAnalyzing ) return null
2120
2221 return (
2322 < motion . div
24- className = "pointer-events-auto fixed bottom-8 right-8 z-30 w-[22rem ] overflow-hidden rounded-xl border border-white/30 bg-white/10 backdrop-blur-xl"
23+ className = "pointer-events-auto fixed bottom-6 right-6 z-30 w-[20rem ] overflow-hidden rounded-lg border border-white/25 bg-white/10 shadow-lg backdrop-blur-xl"
2524 initial = { { opacity : 0 , y : 24 , scale : 0.95 } }
2625 animate = { { opacity : 1 , y : 0 , scale : 1 } }
2726 exit = { { opacity : 0 , y : 24 , scale : 0.95 } }
2827 transition = { { duration : 0.2 , ease : 'easeOut' } }
2928 data-testid = "analysis-notification"
3029 >
31- < div className = "flex items-start justify-between px-5 pt-4 " >
32- < div className = "flex items-center gap-3 " >
33- < div className = "flex h-9 w-9 items-center justify-center rounded-full border border- white/40 bg-white/15 " >
34- < span className = "material-symbols-outlined animate-spin !text-lg text-white/90" >
35- neurology
36- </ span >
37- </ div >
38- < div className = "flex flex-col" >
39- < span className = "text-xs uppercase tracking-[0.2em] text-white/60 " >
40- Preparing Insights
41- </ span >
42- < h3 className = "mt-1 text-base font-semibold text-white/95" > Analyzing Game < /h3 >
30+ < div className = "flex items-center gap-3 px-4 py-3 " >
31+ < div className = "flex h-8 w-8 flex-none items-center justify-center rounded-full border border-white/40 bg-white/15 " >
32+ < span className = "material-symbols-outlined animate-spin !text-base text- white/90 " >
33+ neurology
34+ </ span >
35+ </ div >
36+
37+ < div className = "flex min-w-0 flex-1 flex- col justify-center gap-1 " >
38+ < div className = "flex items-start justify-between gap-2 " >
39+ < h3 className = "truncate text-sm font-semibold leading-tight text-white/95" >
40+ Analyzing Game
41+ </ h3 >
4342 </ div >
43+ < span className = "truncate text-xs text-white/70" >
44+ { hasTotals
45+ ? `Position ${ Math . max ( progress . currentMoveIndex , 1 ) } of ${ progress . totalMoves } `
46+ : 'Calibrating engine positions…' }
47+ </ span >
4448 </ div >
49+
4550 < button
4651 onClick = { onCancel }
47- className = "flex h-7 w-7 items-center justify-center rounded-full border border-white/30 bg-white/10 text-white/70 transition-all duration-200 hover:bg-white/20"
52+ className = "flex h-8 w-8 flex-none items-center justify-center rounded-full border border-white/25 bg-white/10 text-white/70 transition-colors duration-150 hover:bg-white/20"
4853 title = "Cancel Analysis"
4954 >
50- < span className = "material-symbols-outlined !text-base " > close</ span >
55+ < span className = "material-symbols-outlined !text-sm " > close</ span >
5156 </ button >
5257 </ div >
5358
54- < div className = "px-5 pt-4 pb-5" >
55- < div className = "flex items-center justify-between text-xs text-white/70" >
56- < span >
57- { hasTotals
58- ? `Position ${ Math . max ( progress . currentMoveIndex , 1 ) } of ${ progress . totalMoves } `
59- : 'Calibrating engine positions…' }
59+ < div className = "flex flex-col px-4 pb-3" >
60+ < div className = "flex flex-row items-center justify-center gap-2" >
61+ < div className = "h-1.5 w-full overflow-hidden rounded-full bg-white/15" >
62+ < motion . div
63+ className = "h-full rounded-full bg-gradient-to-r from-white/60 via-white to-white/70"
64+ initial = { { width : 0 } }
65+ animate = { { width : `${ progressPercentage } %` } }
66+ transition = { { duration : 0.35 , ease : 'easeOut' } }
67+ />
68+ </ div >
69+ < span className = "text-xs font-medium text-white/90" >
70+ { progressPercentage } %
6071 </ span >
61- < span className = "font-medium text-white/90" > { progressPercentage } %</ span >
62- </ div >
63- < div className = "mt-2 h-1.5 w-full overflow-hidden rounded-full bg-white/15" >
64- < motion . div
65- className = "h-full rounded-full bg-gradient-to-r from-white/60 via-white to-white/70"
66- initial = { { width : 0 } }
67- animate = { { width : `${ progressPercentage } %` } }
68- transition = { { duration : 0.35 , ease : 'easeOut' } }
69- />
7072 </ div >
71-
7273 { progress . currentMove && (
73- < div className = "mt-4 rounded-lg border border-white/20 bg-white/10 px-4 py-3" >
74- < p className = "text-xs text-white/60" > Current position</ p >
75- < p className = "mt-1 font-mono text-sm text-white/90" >
74+ < div className = "mt-3 rounded-md border border-white/15 bg-white/10 px-3 py-2" >
75+ < p className = "text-[0.65rem] uppercase tracking-[0.18em] text-white/55" >
76+ Current Position
77+ </ p >
78+ < p className = "mt-1 truncate font-mono text-xs text-white/90" >
7679 { progress . currentMove }
7780 </ p >
7881 </ div >
0 commit comments