@@ -59,138 +59,138 @@ export const RobotConfigPage: React.FC<RobotConfigPageProps> = ({
5959 } ;
6060
6161 return (
62- < Box sx = { {
63- maxWidth : 1000 ,
64- margin : '50px auto' ,
65- display : 'flex' ,
66- flexDirection : 'column' ,
67- width : '100%' ,
68- height : 'auto' ,
69- minHeight : 'calc(100vh - 64px)' ,
70- boxSizing : 'border-box'
71- } } >
7262 < Box sx = { {
73- display : 'flex' ,
74- alignItems : 'center' ,
75- maxHeight : '64px' ,
76- mb : 2 ,
77- flexShrink : 0
78- } } >
79- < IconButton
80- onClick = { onArrowBack ? onArrowBack : handleBack }
81- sx = { {
82- ml : - 1 ,
83- mr : 1 ,
84- color : theme . palette . text . primary ,
85- backgroundColor : 'transparent !important' ,
86- '&:hover' : {
87- backgroundColor : 'transparent !important' ,
88- } ,
89- '&:active' : {
90- backgroundColor : 'transparent !important' ,
91- } ,
92- '&:focus' : {
93- backgroundColor : 'transparent !important' ,
94- } ,
95- '&:focus-visible' : {
96- backgroundColor : 'transparent !important' ,
97- } ,
98- } }
99- disableRipple
100- >
101- < ArrowBack />
102- </ IconButton >
103- { icon && (
104- < Box sx = { { mr : 2 , color : theme . palette . text . primary } } >
105- { icon }
106- </ Box >
107- ) }
108- < Typography
109- variant = "h5"
110- sx = { {
111- color : theme . palette . text . primary ,
112- lineHeight : 1.2
113- } }
114- >
115- { title }
116- </ Typography >
117- </ Box >
118- < Divider sx = { { mb : 4 , flexShrink : 0 } } />
119-
120- < Box sx = { {
121- flex : 1 ,
63+ maxWidth : 1000 ,
64+ margin : '50px auto' ,
12265 display : 'flex' ,
12366 flexDirection : 'column' ,
124- minHeight : 0 ,
125- mt : 2 ,
126- mb : 3 ,
67+ width : '100%' ,
68+ height : 'auto' ,
69+ minHeight : 'calc(100vh - 64px)' ,
70+ boxSizing : 'border-box'
12771 } } >
128- { children }
129- </ Box >
130-
131- { ( showSaveButton || showCancelButton || onBackToSelection ) && (
132- < Box
133- sx = { {
134- display : 'flex' ,
135- justifyContent : onBackToSelection ? 'space-between' : 'flex-start' ,
136- gap : 2 ,
137- pt : 3 ,
138- borderTop : `1px solid ${ theme . palette . divider } ` ,
139- flexShrink : 0 ,
140- width : '100%' ,
141- } }
142- >
143- { onBackToSelection && (
144- < Button
145- variant = "outlined"
146- onClick = { onBackToSelection }
147- disabled = { isLoading }
148- sx = { {
149- color : '#ff00c3 !important' ,
150- borderColor : '#ff00c3 !important' ,
151- backgroundColor : 'white !important' ,
152- } } >
153- { backToSelectionText || t ( "buttons.back_arrow" ) }
154- </ Button >
72+ < Box sx = { {
73+ display : 'flex' ,
74+ alignItems : 'center' ,
75+ maxHeight : '64px' ,
76+ mb : 2 ,
77+ flexShrink : 0
78+ } } >
79+ < IconButton
80+ onClick = { onArrowBack ? onArrowBack : handleBack }
81+ sx = { {
82+ ml : - 1 ,
83+ mr : 1 ,
84+ color : theme . palette . text . primary ,
85+ backgroundColor : 'transparent !important' ,
86+ '&:hover' : {
87+ backgroundColor : 'transparent !important' ,
88+ } ,
89+ '&:active' : {
90+ backgroundColor : 'transparent !important' ,
91+ } ,
92+ '&:focus' : {
93+ backgroundColor : 'transparent !important' ,
94+ } ,
95+ '&:focus-visible' : {
96+ backgroundColor : 'transparent !important' ,
97+ } ,
98+ } }
99+ disableRipple
100+ >
101+ < ArrowBack />
102+ </ IconButton >
103+ { icon && (
104+ < Box sx = { { mr : 2 , color : theme . palette . text . primary } } >
105+ { icon }
106+ </ Box >
155107 ) }
108+ < Typography
109+ variant = "h5"
110+ sx = { {
111+ color : theme . palette . text . primary ,
112+ lineHeight : 1.2
113+ } }
114+ >
115+ { title }
116+ </ Typography >
117+ </ Box >
118+ < Divider sx = { { mb : 4 , flexShrink : 0 } } />
119+
120+ < Box sx = { {
121+ flex : 1 ,
122+ display : 'flex' ,
123+ flexDirection : 'column' ,
124+ minHeight : 0 ,
125+ mt : 2 ,
126+ mb : 3 ,
127+ } } >
128+ { children }
129+ </ Box >
156130
157- < Box sx = { { display : 'flex' , gap : 2 } } >
158- { showCancelButton && (
131+ { ( showSaveButton || showCancelButton || onBackToSelection ) && (
132+ < Box
133+ sx = { {
134+ display : 'flex' ,
135+ justifyContent : onBackToSelection ? 'space-between' : 'flex-start' ,
136+ gap : 2 ,
137+ pt : 3 ,
138+ borderTop : `1px solid ${ theme . palette . divider } ` ,
139+ flexShrink : 0 ,
140+ width : '100%' ,
141+ } }
142+ >
143+ { onBackToSelection && (
159144 < Button
160145 variant = "outlined"
161- onClick = { handleBack }
146+ onClick = { onBackToSelection }
162147 disabled = { isLoading }
163148 sx = { {
164149 color : '#ff00c3 !important' ,
165150 borderColor : '#ff00c3 !important' ,
166151 backgroundColor : 'white !important' ,
167152 } } >
168- { cancelButtonText || t ( "buttons.cancel " ) }
153+ { backToSelectionText || t ( "buttons.back_arrow " ) }
169154 </ Button >
170155 ) }
171- { showSaveButton && onSave && (
172- < Button
173- variant = "contained"
174- onClick = { onSave }
175- disabled = { isLoading }
176- sx = { {
177- bgcolor : '#ff00c3' ,
178- '&:hover' : {
179- bgcolor : '#cc0099' ,
156+
157+ < Box sx = { { display : 'flex' , gap : 2 } } >
158+ { showCancelButton && (
159+ < Button
160+ variant = "outlined"
161+ onClick = { handleBack }
162+ disabled = { isLoading }
163+ sx = { {
164+ color : '#ff00c3 !important' ,
165+ borderColor : '#ff00c3 !important' ,
166+ backgroundColor : 'white !important' ,
167+ } } >
168+ { cancelButtonText || t ( "buttons.cancel" ) }
169+ </ Button >
170+ ) }
171+ { showSaveButton && onSave && (
172+ < Button
173+ variant = "contained"
174+ onClick = { onSave }
175+ disabled = { isLoading }
176+ sx = { {
177+ bgcolor : '#ff00c3' ,
178+ '&:hover' : {
179+ bgcolor : '#cc0099' ,
180+ boxShadow : 'none' ,
181+ } ,
182+ textTransform : 'none' ,
183+ fontWeight : 500 ,
184+ px : 3 ,
180185 boxShadow : 'none' ,
181- } ,
182- textTransform : 'none' ,
183- fontWeight : 500 ,
184- px : 3 ,
185- boxShadow : 'none' ,
186- } }
187- >
188- { isLoading ? t ( "buttons.saving" ) : ( saveButtonText || t ( "buttons.save" ) ) }
189- </ Button >
190- ) }
186+ } }
187+ >
188+ { isLoading ? t ( "buttons.saving" ) : ( saveButtonText || t ( "buttons.save" ) ) }
189+ </ Button >
190+ ) }
191+ </ Box >
191192 </ Box >
192- </ Box >
193- ) }
194- </ Box >
195- ) ;
193+ ) }
194+ </ Box >
195+ ) ;
196196}
0 commit comments