From 3ecda4be174ca8113097796eedb8d24e8bfddaa6 Mon Sep 17 00:00:00 2001 From: Lennart van der Molen Date: Fri, 14 Nov 2025 17:11:23 +0100 Subject: [PATCH] Keep active tab after generating schedule --- web/app.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/app.js b/web/app.js index bac02d1..730c5e7 100644 --- a/web/app.js +++ b/web/app.js @@ -2256,7 +2256,7 @@ async function handleGenerate(event) { calendarHistoryState.activeId = null; renderCalendarRunHistory(); - beginConsoleRun('Generating payload…'); + beginConsoleRun('Generating payload…', { autoSwitch: false }); const runnerFnMap = { mk1: { default: 'mk1_run' }, @@ -2645,8 +2645,8 @@ function applyConsoleIndicatorVisible(isVisible) { consoleIndicator.style.opacity = isVisible ? '1' : '0'; } -function beginConsoleRun(message) { - pendingAutoSwitch = true; +function beginConsoleRun(message, { autoSwitch = true } = {}) { + pendingAutoSwitch = Boolean(autoSwitch); setConsoleOutputContent(stdoutOutput, message, defaultStdoutMessage); setConsoleOutputContent(stderrOutput, '', defaultStderrMessage); setConsoleResult(null);