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,28 +263,26 @@ 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 className={classes.titleButton} onClick={run} onTouchEnd={run}>
<Button onClick={run} onTouchEnd={run}> Run
Run
</Button>
)}
{workerScripts.has(script.pid) && (
<Button onClick={kill} onTouchEnd={kill}>
Kill
</Button>
)}
<Button onClick={minimize} onTouchEnd={minimize}>
{minimized ? "\u{1F5D6}" : "\u{1F5D5}"}
</Button> </Button>
<Button onClick={props.onClose} onTouchEnd={props.onClose}> )}
Close {workerScripts.has(script.pid) && (
<Button className={classes.titleButton} onClick={kill} onTouchEnd={kill}>
Kill
</Button> </Button>
</Box> )}
<Button className={classes.titleButton} onClick={minimize} onTouchEnd={minimize}>
{minimized ? "\u{1F5D6}" : "\u{1F5D5}"}
</Button>
<Button className={classes.titleButton} onClick={props.onClose} onTouchEnd={props.onClose}>
Close
</Button>
</Box> </Box>
</Paper> </Paper>
<Paper sx={{ overflow: "scroll", overflowWrap: "break-word", whiteSpace: "pre-wrap" }}> <Paper sx={{ overflow: "scroll", overflowWrap: "break-word", whiteSpace: "pre-wrap" }}>