mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-24 07:02:26 +01:00
ui
This commit is contained in:
parent
f7aa393a8f
commit
ef17f0d617
10
index.html
10
index.html
@ -36,7 +36,10 @@
|
||||
ga("send", "pageview");
|
||||
</script>
|
||||
|
||||
<link rel="shortcut icon" href="favicon.ico"><link href="dist/vendor.css" rel="stylesheet"><link href="main.css" rel="stylesheet"></head>
|
||||
<link rel="shortcut icon" href="favicon.ico" />
|
||||
<link href="dist/vendor.css" rel="stylesheet" />
|
||||
<link href="main.css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="entire-game-container">
|
||||
<div id="mainmenu-container" style="display: flex; flex-direction: row"></div>
|
||||
@ -47,8 +50,11 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="modal-portal"></div>
|
||||
<div id="unclickable" style="display: none">Click on this to upgrade your Source-File -1!</div>
|
||||
<script type="text/javascript" src="dist/vendor.bundle.js"></script><script type="text/javascript" src="main.bundle.js"></script></body>
|
||||
<script type="text/javascript" src="dist/vendor.bundle.js"></script>
|
||||
<script type="text/javascript" src="main.bundle.js"></script>
|
||||
</body>
|
||||
|
||||
<script src="src/ThirdParty/raphael.min.js"></script>
|
||||
</html>
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Root React component for the Augmentations UI page that display all of your
|
||||
* owned and purchased Augmentations and Source-Files.
|
||||
*/
|
||||
import React, { useState } from "react";
|
||||
import React, { useState, useEffect } from "react";
|
||||
|
||||
import { InstalledAugmentations } from "./InstalledAugmentations";
|
||||
import { PlayerMultipliers } from "./PlayerMultipliers";
|
||||
@ -23,10 +23,17 @@ interface IProps {
|
||||
|
||||
export function AugmentationsRoot(props: IProps): React.ReactElement {
|
||||
const setRerender = useState(false)[1];
|
||||
function rerender(): void {
|
||||
setRerender((o) => !o);
|
||||
}
|
||||
useEffect(() => {
|
||||
const id = setInterval(rerender, 200);
|
||||
return () => clearInterval(id);
|
||||
}, []);
|
||||
|
||||
function doExport(): void {
|
||||
props.exportGameFn();
|
||||
setRerender((o) => !o);
|
||||
rerender();
|
||||
}
|
||||
|
||||
function exportBonusStr(): string {
|
||||
|
@ -24,7 +24,7 @@ export function FactionsRoot(props: IProps): React.ReactElement {
|
||||
setRerender((old) => !old);
|
||||
}
|
||||
useEffect(() => {
|
||||
const id = setInterval(rerender, 1000);
|
||||
const id = setInterval(rerender, 200);
|
||||
return () => clearInterval(id);
|
||||
}, []);
|
||||
function openFaction(faction: Faction): void {
|
||||
|
@ -38,7 +38,7 @@ export function Info(props: IProps): React.ReactElement {
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
const id = setInterval(rerender, 1000);
|
||||
const id = setInterval(rerender, 200);
|
||||
return () => clearInterval(id);
|
||||
}, []);
|
||||
|
||||
|
@ -42,7 +42,7 @@ export function HacknetRoot(props: IProps): React.ReactElement {
|
||||
const [purchaseMultiplier, setPurchaseMultiplier] = useState<number | string>(PurchaseMultipliers.x1);
|
||||
|
||||
useEffect(() => {
|
||||
const id = setInterval(rerender, 1000);
|
||||
const id = setInterval(rerender, 200);
|
||||
return () => clearInterval(id);
|
||||
}, []);
|
||||
|
||||
|
@ -14,7 +14,7 @@ export function ProgramsRoot(): React.ReactElement {
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
const id = setInterval(rerender, 1000);
|
||||
const id = setInterval(rerender, 200);
|
||||
return () => clearInterval(id);
|
||||
}, []);
|
||||
|
||||
@ -33,7 +33,7 @@ export function ProgramsRoot(): React.ReactElement {
|
||||
|
||||
return (
|
||||
<React.Fragment key={program.name}>
|
||||
<Tooltip title={create.tooltip}>
|
||||
<Tooltip title={create.tooltip} disableInteractive>
|
||||
<Button
|
||||
sx={{ my: 1 }}
|
||||
onClick={(event) => {
|
||||
|
@ -47,6 +47,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="modal-portal"></div>
|
||||
<div id="unclickable" style="display: none">Click on this to upgrade your Source-File -1!</div>
|
||||
</body>
|
||||
|
||||
|
@ -22,7 +22,7 @@ export function ActiveScriptsRoot(props: IProps): React.ReactElement {
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
const id = setInterval(rerender, 20);
|
||||
const id = setInterval(rerender, 200);
|
||||
return () => clearInterval(id);
|
||||
}, []);
|
||||
|
||||
|
@ -253,7 +253,7 @@ export function CharacterStats(): React.ReactElement {
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
const id = setInterval(rerender, 20);
|
||||
const id = setInterval(rerender, 200);
|
||||
return () => clearInterval(id);
|
||||
}, []);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user