Improve tail window buttons

This commit is contained in:
Snarling 2022-04-23 16:48:48 -04:00
parent 69781359d5
commit f05df0659d

@ -96,6 +96,9 @@ const useStyles = makeStyles((theme: Theme) =>
display: "flex", display: "flex",
flexDirection: "column-reverse", flexDirection: "column-reverse",
}, },
titleButton: {
padding: "1px 6px",
},
success: { success: {
color: theme.colors.success, color: theme.colors.success,
}, },
@ -260,29 +263,27 @@ function LogWindow(props: IProps): React.ReactElement {
}} }}
> >
<Box className="drag" display="flex" alignItems="center" ref={draggableRef}> <Box className="drag" display="flex" alignItems="center" ref={draggableRef}>
<Typography color="primary" variant="h6" title={title(true)}> <Typography color="primary" variant="h6" sx={{ marginRight: "auto" }} title={title(true)}>
{title()} {title()}
</Typography> </Typography>
<Box position="absolute" right={0}>
{!workerScripts.has(script.pid) && ( {!workerScripts.has(script.pid) && (
<Button onClick={run} onTouchEnd={run}> <Button className={classes.titleButton} onClick={run} onTouchEnd={run}>
Run Run
</Button> </Button>
)} )}
{workerScripts.has(script.pid) && ( {workerScripts.has(script.pid) && (
<Button onClick={kill} onTouchEnd={kill}> <Button className={classes.titleButton} onClick={kill} onTouchEnd={kill}>
Kill Kill
</Button> </Button>
)} )}
<Button onClick={minimize} onTouchEnd={minimize}> <Button className={classes.titleButton} onClick={minimize} onTouchEnd={minimize}>
{minimized ? "\u{1F5D6}" : "\u{1F5D5}"} {minimized ? "\u{1F5D6}" : "\u{1F5D5}"}
</Button> </Button>
<Button onClick={props.onClose} onTouchEnd={props.onClose}> <Button className={classes.titleButton} onClick={props.onClose} onTouchEnd={props.onClose}>
Close Close
</Button> </Button>
</Box> </Box>
</Box>
</Paper> </Paper>
<Paper sx={{ overflow: "scroll", overflowWrap: "break-word", whiteSpace: "pre-wrap" }}> <Paper sx={{ overflow: "scroll", overflowWrap: "break-word", whiteSpace: "pre-wrap" }}>
<ResizableBox <ResizableBox