mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-12 18:53:55 +01:00
Merge pull request #2720 from MartinFournier/feature/add-version-title
Add game version in document.title
This commit is contained in:
commit
51efb0b72d
@ -30,6 +30,13 @@ export function LoadingScreen(): React.ReactElement {
|
|||||||
const [show, setShow] = useState(false);
|
const [show, setShow] = useState(false);
|
||||||
const [loaded, setLoaded] = useState(false);
|
const [loaded, setLoaded] = useState(false);
|
||||||
|
|
||||||
|
const version = `v${CONSTANTS.VersionString} (${hash()})`;
|
||||||
|
if (process.env.NODE_ENV === "development") {
|
||||||
|
document.title = `[dev] Bitburner ${version}`;
|
||||||
|
} else {
|
||||||
|
document.title = `Bitburner ${version}`;
|
||||||
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const id = setTimeout(() => {
|
const id = setTimeout(() => {
|
||||||
if (!loaded) setShow(true);
|
if (!loaded) setShow(true);
|
||||||
@ -70,9 +77,7 @@ export function LoadingScreen(): React.ReactElement {
|
|||||||
<CircularProgress size={150} color="primary" />
|
<CircularProgress size={150} color="primary" />
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item>
|
<Grid item>
|
||||||
<Typography variant="h3">
|
<Typography variant="h3">Loading Bitburner {version}</Typography>
|
||||||
Loading Bitburner v{CONSTANTS.VersionString} ({hash()})
|
|
||||||
</Typography>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
{show && (
|
{show && (
|
||||||
<Grid item>
|
<Grid item>
|
||||||
|
Loading…
Reference in New Issue
Block a user