mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-27 19:37:07 +02:00
Active Scripts
This commit is contained in:
@@ -257,7 +257,7 @@ export function GameOptionsRoot(props: IProps): React.ReactElement {
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<FormControlLabel
|
||||
control={<Switch color="primary" checked={suppressMessages} onChange={handleSuppressMessagesChange} />}
|
||||
control={<Switch checked={suppressMessages} onChange={handleSuppressMessagesChange} />}
|
||||
label={
|
||||
<Tooltip
|
||||
title={
|
||||
@@ -275,13 +275,7 @@ export function GameOptionsRoot(props: IProps): React.ReactElement {
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Switch
|
||||
color="primary"
|
||||
checked={suppressFactionInvites}
|
||||
onChange={handleSuppressFactionInvitesChange}
|
||||
/>
|
||||
}
|
||||
control={<Switch checked={suppressFactionInvites} onChange={handleSuppressFactionInvitesChange} />}
|
||||
label={
|
||||
<Tooltip
|
||||
title={
|
||||
@@ -299,11 +293,7 @@ export function GameOptionsRoot(props: IProps): React.ReactElement {
|
||||
<ListItem>
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Switch
|
||||
color="primary"
|
||||
checked={suppressTravelConfirmations}
|
||||
onChange={handleSuppressTravelConfirmationsChange}
|
||||
/>
|
||||
<Switch checked={suppressTravelConfirmations} onChange={handleSuppressTravelConfirmationsChange} />
|
||||
}
|
||||
label={
|
||||
<Tooltip
|
||||
@@ -323,7 +313,6 @@ export function GameOptionsRoot(props: IProps): React.ReactElement {
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Switch
|
||||
color="primary"
|
||||
checked={suppressBuyAugmentationConfirmation}
|
||||
onChange={handleSuppressBuyAugmentationConfirmationChange}
|
||||
/>
|
||||
@@ -344,11 +333,7 @@ export function GameOptionsRoot(props: IProps): React.ReactElement {
|
||||
<ListItem>
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Switch
|
||||
color="primary"
|
||||
checked={suppressHospitalizationPopup}
|
||||
onChange={handleSuppressHospitalizationPopupChange}
|
||||
/>
|
||||
<Switch checked={suppressHospitalizationPopup} onChange={handleSuppressHospitalizationPopupChange} />
|
||||
}
|
||||
label={
|
||||
<Tooltip
|
||||
@@ -368,11 +353,7 @@ export function GameOptionsRoot(props: IProps): React.ReactElement {
|
||||
<ListItem>
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Switch
|
||||
color="primary"
|
||||
checked={suppressBladeburnerPopup}
|
||||
onChange={handleSuppressBladeburnerPopupChange}
|
||||
/>
|
||||
<Switch checked={suppressBladeburnerPopup} onChange={handleSuppressBladeburnerPopupChange} />
|
||||
}
|
||||
label={
|
||||
<Tooltip
|
||||
@@ -391,7 +372,7 @@ export function GameOptionsRoot(props: IProps): React.ReactElement {
|
||||
)}
|
||||
<ListItem>
|
||||
<FormControlLabel
|
||||
control={<Switch color="primary" checked={disableHotkeys} onChange={handleDisableHotkeysChange} />}
|
||||
control={<Switch checked={disableHotkeys} onChange={handleDisableHotkeysChange} />}
|
||||
label={
|
||||
<Tooltip
|
||||
title={
|
||||
@@ -409,7 +390,7 @@ export function GameOptionsRoot(props: IProps): React.ReactElement {
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<FormControlLabel
|
||||
control={<Switch color="primary" checked={disableASCIIArt} onChange={handleDisableASCIIArtChange} />}
|
||||
control={<Switch checked={disableASCIIArt} onChange={handleDisableASCIIArtChange} />}
|
||||
label={
|
||||
<Tooltip title={<Typography>If this is set all ASCII art will be disabled.</Typography>}>
|
||||
<Typography>Disable ascii art</Typography>
|
||||
@@ -419,9 +400,7 @@ export function GameOptionsRoot(props: IProps): React.ReactElement {
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Switch color="primary" checked={disableTextEffects} onChange={handleDisableTextEffectsChange} />
|
||||
}
|
||||
control={<Switch checked={disableTextEffects} onChange={handleDisableTextEffectsChange} />}
|
||||
label={
|
||||
<Tooltip
|
||||
title={
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
import * as React from "react";
|
||||
import { useTheme } from "@mui/material/styles";
|
||||
import Box from "@mui/material/Box";
|
||||
import Table from "@mui/material/Table";
|
||||
import TableBody from "@mui/material/TableBody";
|
||||
import TableCell from "@mui/material/TableCell";
|
||||
import TableContainer from "@mui/material/TableContainer";
|
||||
import TableFooter from "@mui/material/TableFooter";
|
||||
import TablePagination from "@mui/material/TablePagination";
|
||||
import TableRow from "@mui/material/TableRow";
|
||||
import Paper from "@mui/material/Paper";
|
||||
import IconButton from "@mui/material/IconButton";
|
||||
import FirstPageIcon from "@mui/icons-material/FirstPage";
|
||||
import KeyboardArrowLeft from "@mui/icons-material/KeyboardArrowLeft";
|
||||
import KeyboardArrowRight from "@mui/icons-material/KeyboardArrowRight";
|
||||
import LastPageIcon from "@mui/icons-material/LastPage";
|
||||
|
||||
interface TablePaginationActionsProps {
|
||||
count: number;
|
||||
page: number;
|
||||
rowsPerPage: number;
|
||||
onPageChange: (event: React.MouseEvent<HTMLButtonElement>, newPage: number) => void;
|
||||
}
|
||||
|
||||
export function TablePaginationActionsAll(props: TablePaginationActionsProps) {
|
||||
const theme = useTheme();
|
||||
const { count, page, rowsPerPage, onPageChange } = props;
|
||||
|
||||
const handleFirstPageButtonClick = (event: React.MouseEvent<HTMLButtonElement>) => {
|
||||
onPageChange(event, 0);
|
||||
};
|
||||
|
||||
const handleBackButtonClick = (event: React.MouseEvent<HTMLButtonElement>) => {
|
||||
onPageChange(event, page - 1);
|
||||
};
|
||||
|
||||
const handleNextButtonClick = (event: React.MouseEvent<HTMLButtonElement>) => {
|
||||
onPageChange(event, page + 1);
|
||||
};
|
||||
|
||||
const handleLastPageButtonClick = (event: React.MouseEvent<HTMLButtonElement>) => {
|
||||
onPageChange(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1));
|
||||
};
|
||||
|
||||
return (
|
||||
<Box sx={{ flexShrink: 0, ml: 2.5 }}>
|
||||
<IconButton onClick={handleFirstPageButtonClick} disabled={page === 0} aria-label="first page">
|
||||
{theme.direction === "rtl" ? <LastPageIcon /> : <FirstPageIcon />}
|
||||
</IconButton>
|
||||
<IconButton onClick={handleBackButtonClick} disabled={page === 0} aria-label="previous page">
|
||||
{theme.direction === "rtl" ? <KeyboardArrowRight /> : <KeyboardArrowLeft />}
|
||||
</IconButton>
|
||||
<IconButton
|
||||
onClick={handleNextButtonClick}
|
||||
disabled={page >= Math.ceil(count / rowsPerPage) - 1}
|
||||
aria-label="next page"
|
||||
>
|
||||
{theme.direction === "rtl" ? <KeyboardArrowLeft /> : <KeyboardArrowRight />}
|
||||
</IconButton>
|
||||
<IconButton
|
||||
onClick={handleLastPageButtonClick}
|
||||
disabled={page >= Math.ceil(count / rowsPerPage) - 1}
|
||||
aria-label="last page"
|
||||
>
|
||||
{theme.direction === "rtl" ? <FirstPageIcon /> : <LastPageIcon />}
|
||||
</IconButton>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
+33
-15
@@ -23,6 +23,10 @@ export const colors = {
|
||||
warning: "#cc0",
|
||||
warningdark: "#990",
|
||||
|
||||
infolight: "#69f",
|
||||
info: "#36c",
|
||||
infodark: "#039",
|
||||
|
||||
welllight: "#444",
|
||||
well: "#222",
|
||||
white: "#fff",
|
||||
@@ -53,6 +57,11 @@ export const theme = createTheme({
|
||||
main: colors.error,
|
||||
dark: colors.errordark,
|
||||
},
|
||||
info: {
|
||||
light: colors.infolight,
|
||||
main: colors.info,
|
||||
dark: colors.infodark,
|
||||
},
|
||||
warning: {
|
||||
light: colors.warninglight,
|
||||
main: colors.warning,
|
||||
@@ -73,6 +82,7 @@ export const theme = createTheme({
|
||||
styleOverrides: {
|
||||
root: {
|
||||
backgroundColor: colors.well,
|
||||
color: colors.primary,
|
||||
},
|
||||
input: {
|
||||
"&::placeholder": {
|
||||
@@ -114,22 +124,22 @@ export const theme = createTheme({
|
||||
},
|
||||
},
|
||||
},
|
||||
// MuiButton: {
|
||||
// styleOverrides: {
|
||||
// root: {
|
||||
// backgroundColor: "#333",
|
||||
// border: "1px solid " + colors.well,
|
||||
// // color: colors.primary,
|
||||
// margin: "5px",
|
||||
// padding: "3px 5px",
|
||||
// "&:hover": {
|
||||
// backgroundColor: colors.black,
|
||||
// },
|
||||
MuiButton: {
|
||||
styleOverrides: {
|
||||
root: {
|
||||
backgroundColor: "#333",
|
||||
border: "1px solid " + colors.well,
|
||||
// color: colors.primary,
|
||||
margin: "5px",
|
||||
padding: "3px 5px",
|
||||
"&:hover": {
|
||||
backgroundColor: colors.black,
|
||||
},
|
||||
|
||||
// borderRadius: 0,
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
borderRadius: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
MuiSelect: {
|
||||
styleOverrides: {
|
||||
icon: {
|
||||
@@ -233,11 +243,19 @@ export const theme = createTheme({
|
||||
MuiPaper: {
|
||||
styleOverrides: {
|
||||
root: {
|
||||
borderRadius: 0,
|
||||
backgroundColor: colors.black,
|
||||
border: "1px solid " + colors.welllight,
|
||||
},
|
||||
},
|
||||
},
|
||||
MuiTablePagination: {
|
||||
styleOverrides: {
|
||||
select: {
|
||||
color: colors.primary,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user