mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-03 06:17:04 +02:00
merge dev
This commit is contained in:
+7
-1
@@ -315,7 +315,13 @@ export function GameRoot({ player, engine, terminal }: IProps): React.ReactEleme
|
||||
) : page === Page.Stats ? (
|
||||
<CharacterStats />
|
||||
) : page === Page.ScriptEditor ? (
|
||||
<ScriptEditorRoot filename={filename} code={code} player={player} router={Router} />
|
||||
<ScriptEditorRoot
|
||||
filename={filename}
|
||||
code={code}
|
||||
hostname={player.getCurrentServer().hostname}
|
||||
player={player}
|
||||
router={Router}
|
||||
/>
|
||||
) : page === Page.ActiveScripts ? (
|
||||
<ActiveScriptsRoot workerScripts={workerScripts} />
|
||||
) : page === Page.Hacknet ? (
|
||||
|
||||
@@ -88,7 +88,6 @@ function LogWindow(props: IProps): React.ReactElement {
|
||||
killWorkerScript(props.script, props.script.server, true);
|
||||
props.onClose();
|
||||
}
|
||||
//useEffect(() => TerminalEvents.subscribe(_.debounce(async () => rerender(), 25, { maxWait: 50 })), []);
|
||||
|
||||
function updateLayer(): void {
|
||||
const c = container.current;
|
||||
@@ -98,6 +97,15 @@ function LogWindow(props: IProps): React.ReactElement {
|
||||
rerender();
|
||||
}
|
||||
|
||||
function title(): string {
|
||||
const maxLength = 30;
|
||||
const t = `${props.script.filename} ${props.script.args.map((x: any): string => `${x}`).join(" ")}`;
|
||||
if (t.length <= maxLength) {
|
||||
return t;
|
||||
}
|
||||
return t.slice(0, maxLength - 3) + "...";
|
||||
}
|
||||
|
||||
return (
|
||||
<Draggable handle=".drag">
|
||||
<Paper
|
||||
@@ -119,7 +127,7 @@ function LogWindow(props: IProps): React.ReactElement {
|
||||
>
|
||||
<Box className="drag" display="flex" alignItems="center">
|
||||
<Typography color="primary" variant="h6">
|
||||
{props.script.filename} {props.script.args.map((x: any): string => `${x}`).join(" ")}
|
||||
{title()}
|
||||
</Typography>
|
||||
|
||||
<Box position="absolute" right={0}>
|
||||
|
||||
@@ -302,7 +302,7 @@ export function refreshTheme(): void {
|
||||
border: "1px solid " + Settings.theme.well,
|
||||
},
|
||||
standardSuccess: {
|
||||
color: Settings.theme.successLight,
|
||||
color: Settings.theme.primaryLight,
|
||||
},
|
||||
standardError: {
|
||||
color: Settings.theme.errorlight,
|
||||
|
||||
Reference in New Issue
Block a user