mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-20 08:13:50 +02:00
UI: Added new locale-aware and configurable number formatting (#354)
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
import * as React from "react";
|
||||
|
||||
import { numeralWrapper } from "../numeralFormat";
|
||||
import { formatExp, formatThreads } from "../formatNumber";
|
||||
|
||||
import Table from "@mui/material/Table";
|
||||
import TableCell from "@mui/material/TableCell";
|
||||
@@ -73,7 +73,7 @@ export function RecentScriptAccordion(props: IProps): React.ReactElement {
|
||||
<Typography>└ Threads:</Typography>
|
||||
</TableCell>
|
||||
<TableCell className={classes.noborder}>
|
||||
<Typography>{numeralWrapper.formatThreads(recentScript.runningScript.threads)}</Typography>
|
||||
<Typography>{formatThreads(recentScript.runningScript.threads)}</Typography>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
@@ -115,7 +115,7 @@ export function RecentScriptAccordion(props: IProps): React.ReactElement {
|
||||
<TableCell className={classes.noborder} colSpan={1} />
|
||||
<TableCell className={classes.noborder} align="left">
|
||||
<Typography>
|
||||
{numeralWrapper.formatExp(recentScript.runningScript.onlineExpGained) + " hacking exp"}
|
||||
{formatExp(recentScript.runningScript.onlineExpGained) + " hacking exp"}
|
||||
</Typography>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
@@ -133,7 +133,7 @@ export function RecentScriptAccordion(props: IProps): React.ReactElement {
|
||||
<TableRow>
|
||||
<TableCell className={classes.noborder} colSpan={1} />
|
||||
<TableCell className={classes.noborder} align="left">
|
||||
<Typography> {numeralWrapper.formatExp(onlineEps) + " hacking exp / sec"}</Typography>
|
||||
<Typography> {formatExp(onlineEps) + " hacking exp / sec"}</Typography>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
|
||||
@@ -151,7 +151,7 @@ export function RecentScriptAccordion(props: IProps): React.ReactElement {
|
||||
<TableCell className={classes.noborder} colSpan={1} />
|
||||
<TableCell className={classes.noborder} align="left">
|
||||
<Typography>
|
||||
{numeralWrapper.formatExp(recentScript.runningScript.offlineExpGained) + " hacking exp"}
|
||||
{formatExp(recentScript.runningScript.offlineExpGained) + " hacking exp"}
|
||||
</Typography>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
|
||||
Reference in New Issue
Block a user