mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-24 02:03:01 +02:00
mui5
This commit is contained in:
@@ -2,20 +2,23 @@ import React, { useState } from "react";
|
||||
|
||||
import { IPlayer } from "../../PersonObjects/IPlayer";
|
||||
|
||||
import { makeStyles, createStyles, Theme } from "@material-ui/core/styles";
|
||||
import Typography from "@material-ui/core/Typography";
|
||||
import Slider from "@material-ui/core/Slider";
|
||||
import Grid from "@material-ui/core/Grid";
|
||||
import FormControlLabel from "@material-ui/core/FormControlLabel";
|
||||
import Switch from "@material-ui/core/Switch";
|
||||
import Select from "@material-ui/core/Select";
|
||||
import MenuItem from "@material-ui/core/MenuItem";
|
||||
import Button from "@material-ui/core/Button";
|
||||
import Box from "@material-ui/core/Box";
|
||||
import List from "@material-ui/core/List";
|
||||
import ListItem from "@material-ui/core/ListItem";
|
||||
import Link from "@material-ui/core/Link";
|
||||
import Tooltip from "@material-ui/core/Tooltip";
|
||||
import { Theme } from "@mui/material/styles";
|
||||
import makeStyles from "@mui/styles/makeStyles";
|
||||
import createStyles from "@mui/styles/createStyles";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import Slider from "@mui/material/Slider";
|
||||
import Grid from "@mui/material/Grid";
|
||||
import FormControlLabel from "@mui/material/FormControlLabel";
|
||||
import Switch from "@mui/material/Switch";
|
||||
import Select, { SelectChangeEvent } from "@mui/material/Select";
|
||||
import MenuItem from "@mui/material/MenuItem";
|
||||
import Button from "@mui/material/Button";
|
||||
import Box from "@mui/material/Box";
|
||||
import List from "@mui/material/List";
|
||||
import ListItem from "@mui/material/ListItem";
|
||||
import Link from "@mui/material/Link";
|
||||
import Tooltip from "@mui/material/Tooltip";
|
||||
|
||||
import { FileDiagnosticModal } from "../../Diagnostic/FileDiagnosticModal";
|
||||
import { ConfirmationModal } from "./ConfirmationModal";
|
||||
|
||||
@@ -24,12 +27,12 @@ import { Settings } from "../../Settings/Settings";
|
||||
const useStyles = makeStyles((theme: Theme) =>
|
||||
createStyles({
|
||||
root: {
|
||||
width: theme.spacing(50),
|
||||
padding: theme.spacing(2),
|
||||
width: 50,
|
||||
padding: 2,
|
||||
userSelect: "none",
|
||||
},
|
||||
pad: {
|
||||
padding: theme.spacing(2),
|
||||
padding: 2,
|
||||
},
|
||||
}),
|
||||
);
|
||||
@@ -142,7 +145,7 @@ export function GameOptionsRoot(props: IProps): React.ReactElement {
|
||||
setDisableTextEffects(event.target.checked);
|
||||
Settings.DisableTextEffects = event.target.checked;
|
||||
}
|
||||
function handleLocaleChange(event: React.ChangeEvent<{ value: unknown }>): void {
|
||||
function handleLocaleChange(event: SelectChangeEvent<string>): void {
|
||||
setLocale(event.target.value as string);
|
||||
Settings.Locale = event.target.value as string;
|
||||
}
|
||||
@@ -544,10 +547,13 @@ export function GameOptionsRoot(props: IProps): React.ReactElement {
|
||||
</Grid>
|
||||
<FileDiagnosticModal open={diagnosticOpen} onClose={() => setDiagnosticOpen(false)} />
|
||||
<ConfirmationModal
|
||||
onConfirm={() => {props.delete(); setDeleteOpen(false);}}
|
||||
open={deleteGameOpen}
|
||||
onClose={() => setDeleteOpen(false)}
|
||||
confirmationText={"Really delete your game? (It's permanent!)"}
|
||||
onConfirm={() => {
|
||||
props.delete();
|
||||
setDeleteOpen(false);
|
||||
}}
|
||||
open={deleteGameOpen}
|
||||
onClose={() => setDeleteOpen(false)}
|
||||
confirmationText={"Really delete your game? (It's permanent!)"}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user