mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-29 19:13:49 +01:00
Update options button
This commit is contained in:
parent
a9314f2447
commit
258a1b262e
@ -32,7 +32,6 @@ import Button from "@mui/material/Button";
|
|||||||
import Typography from "@mui/material/Typography";
|
import Typography from "@mui/material/Typography";
|
||||||
import Link from "@mui/material/Link";
|
import Link from "@mui/material/Link";
|
||||||
import Box from "@mui/material/Box";
|
import Box from "@mui/material/Box";
|
||||||
import IconButton from "@mui/material/IconButton";
|
|
||||||
import SettingsIcon from "@mui/icons-material/Settings";
|
import SettingsIcon from "@mui/icons-material/Settings";
|
||||||
import Table from "@mui/material/Table";
|
import Table from "@mui/material/Table";
|
||||||
import TableCell from "@mui/material/TableCell";
|
import TableCell from "@mui/material/TableCell";
|
||||||
@ -814,24 +813,11 @@ export function Root(props: IProps): React.ReactElement {
|
|||||||
></Box>
|
></Box>
|
||||||
|
|
||||||
<Box display="flex" flexDirection="row" sx={{ m: 1 }} alignItems="center">
|
<Box display="flex" flexDirection="row" sx={{ m: 1 }} alignItems="center">
|
||||||
|
<Button startIcon={<SettingsIcon />} onClick={() => setOptionsOpen(true)} sx={{ mr: 1 }}>Options</Button>
|
||||||
<Button onClick={beautify}>Beautify</Button>
|
<Button onClick={beautify}>Beautify</Button>
|
||||||
<Button color={updatingRam ? "secondary" : "primary"} sx={{ mx: 1 }} onClick={() => { setRamInfoOpen(true) }}>
|
<Button color={updatingRam ? "secondary" : "primary"} sx={{ mx: 1 }} onClick={() => { setRamInfoOpen(true) }}>
|
||||||
{ram}
|
{ram}
|
||||||
</Button>
|
</Button>
|
||||||
<Modal open={ramInfoOpen} onClose={() => setRamInfoOpen(false)}>
|
|
||||||
<Table>
|
|
||||||
<TableBody>
|
|
||||||
{ramEntries.map(([n, r]) => (
|
|
||||||
<React.Fragment key={n + r}>
|
|
||||||
<TableRow>
|
|
||||||
<TableCell sx={{ color: Settings.theme.primary }}>{n}</TableCell>
|
|
||||||
<TableCell align="right" sx={{ color: Settings.theme.primary }}>{r}</TableCell>
|
|
||||||
</TableRow>
|
|
||||||
</React.Fragment>
|
|
||||||
))}
|
|
||||||
</TableBody>
|
|
||||||
</Table>
|
|
||||||
</Modal>
|
|
||||||
<Button onClick={save}>Save (Ctrl/Cmd + s)</Button>
|
<Button onClick={save}>Save (Ctrl/Cmd + s)</Button>
|
||||||
<Button onClick={props.router.toTerminal}>Close (Ctrl/Cmd + b)</Button>
|
<Button onClick={props.router.toTerminal}>Close (Ctrl/Cmd + b)</Button>
|
||||||
<Typography sx={{ mx: 1 }}>
|
<Typography sx={{ mx: 1 }}>
|
||||||
@ -845,12 +831,6 @@ export function Root(props: IProps): React.ReactElement {
|
|||||||
Full
|
Full
|
||||||
</Link>
|
</Link>
|
||||||
</Typography>
|
</Typography>
|
||||||
<IconButton style={{ marginLeft: "auto" }} onClick={() => setOptionsOpen(true)}>
|
|
||||||
<>
|
|
||||||
<SettingsIcon />
|
|
||||||
options
|
|
||||||
</>
|
|
||||||
</IconButton>
|
|
||||||
</Box>
|
</Box>
|
||||||
<OptionsModal
|
<OptionsModal
|
||||||
open={optionsOpen}
|
open={optionsOpen}
|
||||||
@ -871,6 +851,20 @@ export function Root(props: IProps): React.ReactElement {
|
|||||||
Settings.MonacoVim = options.vim;
|
Settings.MonacoVim = options.vim;
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
<Modal open={ramInfoOpen} onClose={() => setRamInfoOpen(false)}>
|
||||||
|
<Table>
|
||||||
|
<TableBody>
|
||||||
|
{ramEntries.map(([n, r]) => (
|
||||||
|
<React.Fragment key={n + r}>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell sx={{ color: Settings.theme.primary }}>{n}</TableCell>
|
||||||
|
<TableCell align="right" sx={{ color: Settings.theme.primary }}>{r}</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
</React.Fragment>
|
||||||
|
))}
|
||||||
|
</TableBody>
|
||||||
|
</Table>
|
||||||
|
</Modal>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
|
Loading…
Reference in New Issue
Block a user