mirror of
https://github.com/hibiken/asynqmon.git
synced 2025-01-19 11:15:53 +08:00
Fix dark mode styles
This commit is contained in:
parent
ad0185e96a
commit
29b6ad8c91
@ -19,7 +19,7 @@ import KeyboardArrowDownIcon from "@material-ui/icons/KeyboardArrowDown";
|
|||||||
import Typography from "@material-ui/core/Typography";
|
import Typography from "@material-ui/core/Typography";
|
||||||
import TableFooter from "@material-ui/core/TableFooter";
|
import TableFooter from "@material-ui/core/TableFooter";
|
||||||
import TablePagination from "@material-ui/core/TablePagination";
|
import TablePagination from "@material-ui/core/TablePagination";
|
||||||
import SyntaxHighlighter from "react-syntax-highlighter";
|
import SyntaxHighlighter from "./SyntaxHighlighter";
|
||||||
import TablePaginationActions, {
|
import TablePaginationActions, {
|
||||||
defaultPageSize,
|
defaultPageSize,
|
||||||
rowsPerPageOptions,
|
rowsPerPageOptions,
|
||||||
|
@ -24,7 +24,7 @@ import KeyboardArrowDownIcon from "@material-ui/icons/KeyboardArrowDown";
|
|||||||
import Typography from "@material-ui/core/Typography";
|
import Typography from "@material-ui/core/Typography";
|
||||||
import Alert from "@material-ui/lab/Alert";
|
import Alert from "@material-ui/lab/Alert";
|
||||||
import AlertTitle from "@material-ui/lab/AlertTitle";
|
import AlertTitle from "@material-ui/lab/AlertTitle";
|
||||||
import SyntaxHighlighter from "react-syntax-highlighter";
|
import SyntaxHighlighter from "./SyntaxHighlighter";
|
||||||
import {
|
import {
|
||||||
batchDeleteRetryTasksAsync,
|
batchDeleteRetryTasksAsync,
|
||||||
batchRunRetryTasksAsync,
|
batchRunRetryTasksAsync,
|
||||||
|
@ -16,6 +16,9 @@ const useStyles = makeStyles((theme) => ({
|
|||||||
table: {
|
table: {
|
||||||
height: "80vh",
|
height: "80vh",
|
||||||
},
|
},
|
||||||
|
stickyHeaderCell: {
|
||||||
|
background: theme.palette.background.paper,
|
||||||
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
function mapStateToProps(state: AppState, ownProps: Props) {
|
function mapStateToProps(state: AppState, ownProps: Props) {
|
||||||
@ -53,8 +56,12 @@ function SchedulerEnqueueEventsTable(props: Props & ReduxProps) {
|
|||||||
>
|
>
|
||||||
<TableHead>
|
<TableHead>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell>Enqueued</TableCell>
|
<TableCell classes={{ stickyHeader: classes.stickyHeaderCell }}>
|
||||||
<TableCell>Task ID</TableCell>
|
Enqueued
|
||||||
|
</TableCell>
|
||||||
|
<TableCell classes={{ stickyHeader: classes.stickyHeaderCell }}>
|
||||||
|
Task ID
|
||||||
|
</TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</TableHead>
|
</TableHead>
|
||||||
<TableBody>
|
<TableBody>
|
||||||
|
@ -40,7 +40,7 @@ const useStyles = makeStyles((theme) => ({
|
|||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
},
|
},
|
||||||
modalContent: {
|
modalContent: {
|
||||||
background: theme.palette.common.white,
|
background: theme.palette.background.paper,
|
||||||
padding: theme.spacing(2),
|
padding: theme.spacing(2),
|
||||||
width: "540px",
|
width: "540px",
|
||||||
outline: "none",
|
outline: "none",
|
||||||
@ -240,7 +240,7 @@ export default function SchedulerEntriesTable(props: Props) {
|
|||||||
className={classes.modal}
|
className={classes.modal}
|
||||||
>
|
>
|
||||||
<div className={classes.modalContent}>
|
<div className={classes.modalContent}>
|
||||||
<Typography variant="h6" gutterBottom>
|
<Typography variant="h6" gutterBottom color="textPrimary">
|
||||||
Recent History
|
Recent History
|
||||||
</Typography>
|
</Typography>
|
||||||
<SchedulerEnqueueEventsTable entryId={activeEntryId} />
|
<SchedulerEnqueueEventsTable entryId={activeEntryId} />
|
||||||
|
@ -21,11 +21,21 @@ interface Props {
|
|||||||
onSelect: (key: string) => void;
|
onSelect: (key: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useStyles = makeStyles({
|
const useStyles = makeStyles((theme) => ({
|
||||||
popper: {
|
popper: {
|
||||||
zIndex: 2,
|
zIndex: 2,
|
||||||
},
|
},
|
||||||
});
|
buttonContained: {
|
||||||
|
backgroundColor:
|
||||||
|
theme.palette.type === "dark"
|
||||||
|
? "#303030"
|
||||||
|
: theme.palette.background.default,
|
||||||
|
color: theme.palette.text.primary,
|
||||||
|
"&:hover": {
|
||||||
|
backgroundColor: theme.palette.action.hover,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}));
|
||||||
|
|
||||||
export default function SplitButton(props: Props) {
|
export default function SplitButton(props: Props) {
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
@ -69,7 +79,9 @@ export default function SplitButton(props: Props) {
|
|||||||
size="small"
|
size="small"
|
||||||
disableElevation
|
disableElevation
|
||||||
>
|
>
|
||||||
<Button>{selectedOpt ? selectedOpt.label : "Select Option"}</Button>
|
<Button classes={{ contained: classes.buttonContained }}>
|
||||||
|
{selectedOpt ? selectedOpt.label : "Select Option"}
|
||||||
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
size="small"
|
size="small"
|
||||||
aria-controls={open ? "split-button-menu" : undefined}
|
aria-controls={open ? "split-button-menu" : undefined}
|
||||||
@ -77,6 +89,7 @@ export default function SplitButton(props: Props) {
|
|||||||
aria-label="select option"
|
aria-label="select option"
|
||||||
aria-haspopup="menu"
|
aria-haspopup="menu"
|
||||||
onClick={handleToggle}
|
onClick={handleToggle}
|
||||||
|
classes={{ contained: classes.buttonContained }}
|
||||||
>
|
>
|
||||||
<ArrowDropDownIcon />
|
<ArrowDropDownIcon />
|
||||||
</Button>
|
</Button>
|
||||||
|
Loading…
Reference in New Issue
Block a user