mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 17:43:48 +01:00
fix some stuff with the timestamp settings
This commit is contained in:
parent
3fe6a6e19d
commit
e57fee00d2
@ -1,9 +1,10 @@
|
|||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { MenuItem, Select, SelectChangeEvent, TextField, Tooltip, Typography } from "@mui/material";
|
import { MenuItem, Select, SelectChangeEvent, TextField, Tooltip, Typography } from "@mui/material";
|
||||||
import { Settings } from "../../Settings/Settings";
|
import { defaultSettings, Settings } from "../../Settings/Settings";
|
||||||
import { OptionSwitch } from "../../ui/React/OptionSwitch";
|
import { OptionSwitch } from "../../ui/React/OptionSwitch";
|
||||||
import { GameOptionsPage } from "./GameOptionsPage";
|
import { GameOptionsPage } from "./GameOptionsPage";
|
||||||
import { formatTime } from "../../utils/helpers/formatTime";
|
import { formatTime } from "../../utils/helpers/formatTime";
|
||||||
|
import { Box } from "@mui/system";
|
||||||
|
|
||||||
export const InterfacePage = (): React.ReactElement => {
|
export const InterfacePage = (): React.ReactElement => {
|
||||||
const [timestampFormat, setTimestampFormat] = useState(Settings.TimestampsFormat);
|
const [timestampFormat, setTimestampFormat] = useState(Settings.TimestampsFormat);
|
||||||
@ -64,7 +65,7 @@ export const InterfacePage = (): React.ReactElement => {
|
|||||||
<Typography
|
<Typography
|
||||||
color={formatTime(timestampFormat) === "format error" && timestampFormat !== "" ? "error" : "success"}
|
color={formatTime(timestampFormat) === "format error" && timestampFormat !== "" ? "error" : "success"}
|
||||||
>
|
>
|
||||||
Timestamp format:
|
Timestamp format:
|
||||||
</Typography>
|
</Typography>
|
||||||
),
|
),
|
||||||
}}
|
}}
|
||||||
@ -73,11 +74,12 @@ export const InterfacePage = (): React.ReactElement => {
|
|||||||
placeholder="yyyy-MM-dd hh:mm:ss"
|
placeholder="yyyy-MM-dd hh:mm:ss"
|
||||||
/>
|
/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<>
|
<Typography>
|
||||||
<Tooltip title={<Typography>Sets the locale for displaying numbers.</Typography>}>
|
Example timestamp: {timestampFormat !== "" ? formatTime(timestampFormat) : "no timestamp"}
|
||||||
<Typography>Locale</Typography>
|
</Typography>
|
||||||
</Tooltip>
|
<br />
|
||||||
<Select value={locale} onChange={handleLocaleChange}>
|
|
||||||
|
<Select startAdornment={<Typography>Locale </Typography>} value={locale} onChange={handleLocaleChange}>
|
||||||
<MenuItem value="en">en</MenuItem>
|
<MenuItem value="en">en</MenuItem>
|
||||||
<MenuItem value="bg">bg</MenuItem>
|
<MenuItem value="bg">bg</MenuItem>
|
||||||
<MenuItem value="cs">cs</MenuItem>
|
<MenuItem value="cs">cs</MenuItem>
|
||||||
@ -94,7 +96,6 @@ export const InterfacePage = (): React.ReactElement => {
|
|||||||
<MenuItem value="pl">pl</MenuItem>
|
<MenuItem value="pl">pl</MenuItem>
|
||||||
<MenuItem value="ru">ru</MenuItem>
|
<MenuItem value="ru">ru</MenuItem>
|
||||||
</Select>
|
</Select>
|
||||||
</>
|
|
||||||
</GameOptionsPage>
|
</GameOptionsPage>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -18,7 +18,6 @@ export const MiscPage = (): React.ReactElement => {
|
|||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<br />
|
|
||||||
<OptionSwitch
|
<OptionSwitch
|
||||||
checked={Settings.EnableBashHotkeys}
|
checked={Settings.EnableBashHotkeys}
|
||||||
onChange={(newValue) => (Settings.EnableBashHotkeys = newValue)}
|
onChange={(newValue) => (Settings.EnableBashHotkeys = newValue)}
|
||||||
|
Loading…
Reference in New Issue
Block a user