Tweaks to classes

This commit is contained in:
nickofolas 2022-05-09 17:50:45 -05:00
parent b46718d188
commit bc9bce0d2c

@ -18,6 +18,7 @@ import { Theme } from "@mui/material";
import { findRunningScript } from "../../Script/ScriptHelpers"; import { findRunningScript } from "../../Script/ScriptHelpers";
import { Player } from "../../Player"; import { Player } from "../../Player";
import { debounce } from "lodash"; import { debounce } from "lodash";
import { Settings } from "../../Settings/Settings";
let layerCounter = 0; let layerCounter = 0;
@ -77,7 +78,7 @@ interface IProps {
onClose: () => void; onClose: () => void;
} }
const useStyles = makeStyles((theme: Theme) => const useStyles = makeStyles((_theme: Theme) =>
createStyles({ createStyles({
title: { title: {
"&.is-minimized + *": { "&.is-minimized + *": {
@ -93,26 +94,11 @@ const useStyles = makeStyles((theme: Theme) =>
overflowY: "scroll", overflowY: "scroll",
overflowX: "hidden", overflowX: "hidden",
scrollbarWidth: "auto", scrollbarWidth: "auto",
display: "flex",
flexDirection: "column-reverse", flexDirection: "column-reverse",
}, },
titleButton: { titleButton: {
padding: "1px 6px", padding: "1px 0",
}, height: "100%",
success: {
color: theme.colors.success,
},
error: {
color: theme.palette.error.main,
},
primary: {
color: theme.palette.primary.main,
},
info: {
color: theme.palette.info.main,
},
warning: {
color: theme.palette.warning.main,
}, },
}), }),
); );
@ -192,18 +178,18 @@ function LogWindow(props: IProps): React.ReactElement {
function lineClass(s: string): string { function lineClass(s: string): string {
if (s.match(/(^\[[^\]]+\] )?ERROR/) || s.match(/(^\[[^\]]+\] )?FAIL/)) { if (s.match(/(^\[[^\]]+\] )?ERROR/) || s.match(/(^\[[^\]]+\] )?FAIL/)) {
return classes.error; return Settings.theme.error;
} }
if (s.match(/(^\[[^\]]+\] )?SUCCESS/)) { if (s.match(/(^\[[^\]]+\] )?SUCCESS/)) {
return classes.success; return Settings.theme.success;
} }
if (s.match(/(^\[[^\]]+\] )?WARN/)) { if (s.match(/(^\[[^\]]+\] )?WARN/)) {
return classes.warning; return Settings.theme.warning;
} }
if (s.match(/(^\[[^\]]+\] )?INFO/)) { if (s.match(/(^\[[^\]]+\] )?INFO/)) {
return classes.info; return Settings.theme.info;
} }
return classes.primary; return Settings.theme.primary;
} }
// And trigger fakeDrag when the window is resized // And trigger fakeDrag when the window is resized