@@ -521,20 +521,43 @@ const FileUploadZone: React.FC<FileUploadZoneProps> = ({
521
521
</ div >
522
522
523
523
< div style = { { display : 'flex' , flexDirection : 'column' , gap : '13px' , width : '837px' , paddingBottom : 10 , borderRadius : '4px' , } } >
524
- { allUploadsComplete && (
524
+ { /* Show network error message bar if any file has error */ }
525
+ { uploadingFiles . some ( f => f . status === 'error' ) && (
526
+ < MessageBar
527
+ messageBarType = { MessageBarType . error }
528
+ isMultiline = { false }
529
+ styles = { {
530
+ root : { display : "flex" , alignItems : "left" , background : "#fff4f4" } ,
531
+ icon : { display : "none" } ,
532
+ } }
533
+ >
534
+ < div style = { { display : "flex" , alignItems : "left" } } >
535
+ < X
536
+ strokeWidth = "2.5px"
537
+ color = "#d83b01"
538
+ size = "16px"
539
+ style = { { marginRight : "8px" } }
540
+ />
541
+ < span > Unable to connect to the server. Please try again later.</ span >
542
+ </ div >
543
+ </ MessageBar >
544
+ ) }
545
+
546
+ { /* Success message bar if all uploads complete and no errors */ }
547
+ { allUploadsComplete && ! uploadingFiles . some ( f => f . status === 'error' ) && (
525
548
< MessageBar
526
549
messageBarType = { MessageBarType . success }
527
550
isMultiline = { false }
528
551
styles = { {
529
- root : { display : "flex" , alignItems : "left" } , // Align the icon and text
552
+ root : { display : "flex" , alignItems : "left" } ,
530
553
icon : { display : "none" } ,
531
554
} }
532
555
>
533
556
< div style = { { display : "flex" , alignItems : "left" } } >
534
557
< CircleCheck
535
558
strokeWidth = "2.5px"
536
559
color = "#37a04c"
537
- size = "16px" // Slightly larger for better balance
560
+ size = "16px"
538
561
style = { { marginRight : "8px" } }
539
562
/>
540
563
< span > All valid files uploaded successfully!</ span >
@@ -584,6 +607,7 @@ const FileUploadZone: React.FC<FileUploadZoneProps> = ({
584
607
backgroundColor : 'white' ,
585
608
borderRadius : '4px' ,
586
609
border : '1px solid #eee' ,
610
+ position : 'relative'
587
611
} }
588
612
>
589
613
< div style = { { display : 'flex' , alignItems : 'center' , width : '24px' } } >
@@ -634,7 +658,7 @@ const FileUploadZone: React.FC<FileUploadZoneProps> = ({
634
658
background : 'none' ,
635
659
cursor : 'pointer' ,
636
660
padding : '4px' ,
637
- color : '#666' ,
661
+ color : file . status === 'error' ? '#d83b01' : '#666' ,
638
662
display : 'flex' ,
639
663
alignItems : 'center' ,
640
664
justifyContent : 'center' ,
0 commit comments