diff --git a/ui/panel.js b/ui/panel.js index 3a8946d..9fc85dd 100644 --- a/ui/panel.js +++ b/ui/panel.js @@ -5749,18 +5749,23 @@ async function _handleTaskProfileWorkspaceClick(event) { const action = actionEl.dataset.taskAction || ""; const state = _getTaskProfileWorkspaceState(); const selectedProfile = state.profile; - if (!selectedProfile && action !== "switch-task-type") return; + if ( + !selectedProfile && + action !== "switch-task-type" && + action !== "switch-global-regex" + ) return; switch (action) { case "switch-task-type": currentTaskProfileTaskType = actionEl.dataset.taskType || currentTaskProfileTaskType; + showGlobalRegexPanel = false; currentTaskProfileBlockId = ""; currentTaskProfileRuleId = ""; _refreshTaskProfileWorkspace(); return; - case "toggle-global-regex": - showGlobalRegexPanel = !showGlobalRegexPanel; + case "switch-global-regex": + showGlobalRegexPanel = true; _refreshTaskProfileWorkspace(); return; case "switch-task-tab": @@ -6006,7 +6011,7 @@ function _renderTaskProfileWorkspace(state) { .map( (item) => `
- ${state.showGlobalRegex ? _renderGlobalRegexPanel(state) : ""} - + ${state.showGlobalRegex + ? _renderGlobalRegexPanel(state) + : `