@@ -785,136 +785,6 @@ export const RightSidePanel: React.FC<RightSidePanelProps> = ({ onFinishCapture
785785 </ Box >
786786 ) }
787787 </ Box >
788-
789- < Box >
790- { browserSteps . map ( step => (
791- < Box key = { step . id } onMouseEnter = { ( ) => handleMouseEnter ( step . id ) } onMouseLeave = { ( ) => handleMouseLeave ( step . id ) } sx = { { padding : '10px' , margin : '11px' , borderRadius : '5px' , position : 'relative' , background : isDarkMode ? "#1d1c1cff" : 'white' , color : isDarkMode ? "white" : 'black' } } >
792- {
793- step . type === 'text' && (
794- < >
795- < TextField
796- label = { t ( 'right_panel.fields.label' ) }
797- value = { textLabels [ step . id ] || step . label || '' }
798- onChange = { ( e ) => handleTextLabelChange ( step . id , e . target . value ) }
799- fullWidth
800- size = "small"
801- margin = "normal"
802- error = { ! ! errors [ step . id ] }
803- helperText = { errors [ step . id ] }
804- InputProps = { {
805- readOnly : confirmedTextSteps [ step . id ] ,
806- startAdornment : (
807- < InputAdornment position = "start" >
808- < EditIcon />
809- </ InputAdornment >
810- )
811- } }
812- />
813- < TextField
814- label = { t ( 'right_panel.fields.data' ) }
815- value = { step . data }
816- fullWidth
817- margin = "normal"
818- InputProps = { {
819- readOnly : confirmedTextSteps [ step . id ] ,
820- startAdornment : (
821- < InputAdornment position = "start" >
822- < TextFieldsIcon />
823- </ InputAdornment >
824- )
825- } }
826- />
827- { ! confirmedTextSteps [ step . id ] ? (
828- < Box display = "flex" justifyContent = "space-between" gap = { 2 } >
829- < Button variant = "contained" onClick = { ( ) => handleTextStepConfirm ( step . id ) } disabled = { ! textLabels [ step . id ] ?. trim ( ) } > { t ( 'right_panel.buttons.confirm' ) } </ Button >
830- < Button variant = "contained" color = "error" onClick = { ( ) => handleTextStepDiscard ( step . id ) } > { t ( 'right_panel.buttons.discard' ) } </ Button >
831- </ Box >
832- ) : ! isCaptureTextConfirmed && (
833- < Box display = "flex" justifyContent = "flex-end" gap = { 2 } >
834- < Button
835- variant = "contained"
836- color = "error"
837- onClick = { ( ) => handleTextStepDelete ( step . id ) }
838- >
839- { t ( 'right_panel.buttons.delete' ) }
840- </ Button >
841- </ Box >
842- ) }
843- </ >
844- ) }
845- { step . type === 'screenshot' && (
846- < Box display = "flex" alignItems = "center" >
847- < DocumentScannerIcon sx = { { mr : 1 } } />
848- < Typography >
849- { step . fullPage ?
850- t ( 'right_panel.screenshot.display_fullpage' ) :
851- t ( 'right_panel.screenshot.display_visible' ) }
852- </ Typography >
853- </ Box >
854- ) }
855- { step . type === 'list' && (
856- Object . entries ( step . fields ) . length === 0 ? (
857- < Typography > { t ( 'right_panel.messages.list_empty' ) } </ Typography >
858- ) : (
859- < >
860- < Typography > { t ( 'right_panel.messages.list_selected' ) } </ Typography >
861- { Object . entries ( step . fields ) . map ( ( [ key , field ] ) => (
862- < Box key = { key } >
863- < TextField
864- label = { t ( 'right_panel.fields.field_label' ) }
865- value = { field . label || '' }
866- onChange = { ( e ) => handleTextLabelChange ( field . id , e . target . value , step . id , key ) }
867- fullWidth
868- margin = "normal"
869- InputProps = { {
870- readOnly : confirmedListTextFields [ field . id ] ?. [ key ] ,
871- startAdornment : (
872- < InputAdornment position = "start" >
873- < EditIcon />
874- </ InputAdornment >
875- )
876- } }
877- />
878- < TextField
879- label = { t ( 'right_panel.fields.field_data' ) }
880- value = { field . data || '' }
881- fullWidth
882- margin = "normal"
883- InputProps = { {
884- readOnly : true ,
885- startAdornment : (
886- < InputAdornment position = "start" >
887- < TextFieldsIcon />
888- </ InputAdornment >
889- )
890- } }
891- />
892- { ! confirmedListTextFields [ step . id ] ?. [ key ] && (
893- < Box display = "flex" justifyContent = "space-between" gap = { 2 } >
894- < Button
895- variant = "contained"
896- onClick = { ( ) => handleListTextFieldConfirm ( step . id , key ) }
897- disabled = { ! field . label ?. trim ( ) }
898- >
899- { t ( 'right_panel.buttons.confirm' ) }
900- </ Button >
901- < Button
902- variant = "contained"
903- color = "error"
904- onClick = { ( ) => handleListTextFieldDiscard ( step . id , key ) }
905- >
906- { t ( 'right_panel.buttons.discard' ) }
907- </ Button >
908- </ Box >
909- ) }
910- </ Box >
911- ) ) }
912- </ >
913- )
914- ) }
915- </ Box >
916- ) ) }
917- </ Box >
918788 </ Paper >
919789 ) ;
920790} ;
0 commit comments