@@ -72,7 +72,15 @@ function Timer({ lastExecutedAt }) {
72
72
} , 1000 ) ;
73
73
return ( ) => clearInterval ( interval ) ;
74
74
} , [ counter ] ) ;
75
- return < Box > Last executed: { timeDifference ( new Date ( ) , lastExecutedAt ) } </ Box > ;
75
+ return (
76
+ < Box
77
+ sx = { {
78
+ padding : "5px" ,
79
+ } }
80
+ >
81
+ Last run: { timeDifference ( new Date ( ) , lastExecutedAt ) }
82
+ </ Box >
83
+ ) ;
76
84
}
77
85
78
86
export const ResultBlock = memo < any > ( function ResultBlock ( { id, layout } ) {
@@ -173,14 +181,17 @@ export const ResultBlock = memo<any>(function ResultBlock({ id, layout }) {
173
181
borderImage : "initial" ,
174
182
borderTopLeftRadius : "20px" ,
175
183
borderTopRightRadius : "20px" ,
184
+ // FIXME: Why not a complete oval?
185
+ // borderBottomLeftRadius: "20px",
186
+ // borderBottomRightRadius: "20px",
176
187
display : "flex" ,
177
188
fontSize : "0.8em" ,
178
189
} }
179
190
>
180
191
< CheckCircleIcon
181
192
style = { { marginTop : "5px" } }
182
193
fontSize = "inherit"
183
- />
194
+ /> { " " }
184
195
< Timer lastExecutedAt = { lastExecutedAt } />
185
196
</ Box >
186
197
</ Box >
@@ -205,51 +216,55 @@ export const ResultBlock = memo<any>(function ResultBlock({ id, layout }) {
205
216
{ ( stdout || ( result ?. text && result ?. count > 0 ) || error ) &&
206
217
showMenu && (
207
218
< ButtonGroup
208
- sx = { [
209
- {
210
- fontSize : "0.8em" ,
211
- paddingTop : "3px" ,
212
- paddingBottom : "2px" ,
213
- lineHeight : "10px" ,
214
- zIndex : 201 ,
215
- position : "absolute" ,
216
- top : "-64.5px" ,
217
- right : "15px" ,
218
- "& .MuiButton-root" : {
219
- fontSize : ".9em" ,
220
- paddingTop : 0 ,
221
- paddingBottom : 0 ,
222
- } ,
223
- } ,
224
- ] }
225
- variant = "outlined"
219
+ sx = { {
220
+ // border: '1px solid #757ce8',
221
+ fontSize : "0.8em" ,
222
+ backgroundColor : "white" ,
223
+ zIndex : 201 ,
224
+ position : "absolute" ,
225
+ top : "10px" ,
226
+ right : "25px" ,
227
+ // "& .MuiButton-root": {
228
+ // fontSize: ".9em",
229
+ // paddingTop: 0,
230
+ // paddingBottom: 0,
231
+ // },
232
+ } }
233
+ variant = "contained"
234
+ size = "small"
226
235
aria-label = "outlined primary button group"
227
- orientation = "vertical"
236
+ // orientation="vertical"
228
237
>
238
+ < Box
239
+ sx = { {
240
+ color : "primary.main" ,
241
+ fontWeight : "bold" ,
242
+ display : "flex" ,
243
+ padding : "5px 5px" ,
244
+ alignItems : "center" ,
245
+ justifyContent : "center" ,
246
+ } }
247
+ >
248
+ Output options:
249
+ </ Box >
229
250
< Button
230
251
onClick = { ( ) => {
231
252
setResultScroll ( ! resultScroll ) ;
232
253
} }
233
- variant = "text"
234
- size = "small"
235
254
>
236
255
{ resultScroll ? "Unfocus" : "Focus" }
237
256
</ Button >
238
257
< Button
239
258
onClick = { ( ) => {
240
259
setShowOutput ( ! showOutput ) ;
241
260
} }
242
- variant = "text"
243
- size = "small"
244
261
>
245
262
Hide
246
263
</ Button >
247
264
< Button
248
265
onClick = { ( ) => {
249
266
clearResults ( id ) ;
250
267
} }
251
- variant = "text"
252
- size = "small"
253
268
>
254
269
Clear
255
270
</ Button >
@@ -292,10 +307,10 @@ export const ResultBlock = memo<any>(function ResultBlock({ id, layout }) {
292
307
) : (
293
308
< Box
294
309
sx = { {
295
- paddingBottom : "5px " ,
310
+ padding : "10px " ,
296
311
display : "flex" ,
297
312
justifyContent : "center" ,
298
- alignItems : "center " ,
313
+ alignItems : "bottom " ,
299
314
} }
300
315
>
301
316
< Box
@@ -306,23 +321,21 @@ export const ResultBlock = memo<any>(function ResultBlock({ id, layout }) {
306
321
paddingTop : "2px" ,
307
322
} }
308
323
>
309
- This output has been hidden.{ " " }
324
+ Output hidden.{ " " }
310
325
</ Box >
311
326
< Button
312
327
onClick = { ( ) => {
313
328
setShowOutput ( ! showOutput ) ;
314
329
} }
315
330
sx = { {
316
331
fontSize : "0.8em" ,
317
- paddingTop : "3px" ,
318
- paddingBottom : "2px" ,
319
- lineHeight : "10px" ,
332
+ // lineHeight: "8px",
320
333
zIndex : 201 ,
321
334
} }
322
335
size = "small"
323
- variant = "text "
336
+ variant = "contained "
324
337
>
325
- Show it
338
+ Reveal
326
339
</ Button >
327
340
</ Box >
328
341
) }
0 commit comments