Always allow rerunning the tasks using the tab button (#20591)
Release Notes: - Improved task tabs to always rerun tasks on click
This commit is contained in:
parent
b44078781d
commit
7e82ca8082
1 changed files with 8 additions and 2 deletions
|
@ -1046,14 +1046,20 @@ impl Item for TerminalView {
|
||||||
.on_click(move |_, cx| {
|
.on_click(move |_, cx| {
|
||||||
cx.dispatch_action(Box::new(tasks_ui::Rerun {
|
cx.dispatch_action(Box::new(tasks_ui::Rerun {
|
||||||
task_id: Some(task_id.clone()),
|
task_id: Some(task_id.clone()),
|
||||||
..tasks_ui::Rerun::default()
|
allow_concurrent_runs: Some(true),
|
||||||
|
use_new_terminal: Some(false),
|
||||||
|
reevaluate_context: false,
|
||||||
}));
|
}));
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
let (icon, icon_color, rerun_button) = match terminal.task() {
|
let (icon, icon_color, rerun_button) = match terminal.task() {
|
||||||
Some(terminal_task) => match &terminal_task.status {
|
Some(terminal_task) => match &terminal_task.status {
|
||||||
TaskStatus::Running => (IconName::Play, Color::Disabled, None),
|
TaskStatus::Running => (
|
||||||
|
IconName::Play,
|
||||||
|
Color::Disabled,
|
||||||
|
Some(rerun_button(terminal_task.id.clone())),
|
||||||
|
),
|
||||||
TaskStatus::Unknown => (
|
TaskStatus::Unknown => (
|
||||||
IconName::Warning,
|
IconName::Warning,
|
||||||
Color::Warning,
|
Color::Warning,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue