mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-20 16:22:56 +02:00
tail box close on soft reset
This commit is contained in:
@@ -19,6 +19,7 @@ import { Theme } from "@mui/material";
|
||||
let layerCounter = 0;
|
||||
|
||||
export const LogBoxEvents = new EventEmitter<[RunningScript]>();
|
||||
export const LogBoxClearEvents = new EventEmitter<[]>();
|
||||
|
||||
interface Log {
|
||||
id: string;
|
||||
@@ -46,6 +47,13 @@ export function LogBoxManager(): React.ReactElement {
|
||||
[],
|
||||
);
|
||||
|
||||
useEffect(() =>
|
||||
LogBoxClearEvents.subscribe(() => {
|
||||
logs = [];
|
||||
rerender();
|
||||
}),
|
||||
);
|
||||
|
||||
function close(id: string): void {
|
||||
logs = logs.filter((l) => l.id !== id);
|
||||
rerender();
|
||||
|
||||
Reference in New Issue
Block a user