closeTail(fn, host, ...args) can now close dead script tails

closeTail(pid) still cannot
This commit is contained in:
Undeemiss
2022-05-17 14:46:30 -05:00
parent 2b9d408b55
commit e17fe6f618
2 changed files with 28 additions and 14 deletions
+3 -3
View File
@@ -23,7 +23,7 @@ import { Settings } from "../../Settings/Settings";
let layerCounter = 0;
export const LogBoxEvents = new EventEmitter<[RunningScript]>();
export const LogBoxCloserEvents = new EventEmitter<[RunningScript]>();
export const LogBoxCloserEvents = new EventEmitter<[any, any, any[]]>();
export const LogBoxClearEvents = new EventEmitter<[]>();
interface Log {
@@ -55,8 +55,8 @@ export function LogBoxManager(): React.ReactElement {
//Event used by ns.closeTail to close tail windows
useEffect(
() =>
LogBoxCloserEvents.subscribe((script: RunningScript) => {
const id = script.server + "-" + script.filename + script.args.map((x: any): string => `${x}`).join("-");
LogBoxCloserEvents.subscribe((hostname: any, filename: any, stringArgs: any[]) => {
const id = hostname + "-" + filename + stringArgs.map((x: any): string => `${x}`).join("-");
close(id);
}),
[],