tasks: Add status indicator to the status bar (#10267)
Release Notes: - Added task status indicator to the status bar.
This commit is contained in:
parent
ce5bc399df
commit
4ce5b22989
7 changed files with 153 additions and 6 deletions
|
@ -30,6 +30,11 @@ pub struct Spawn {
|
|||
pub task_name: Option<String>,
|
||||
}
|
||||
|
||||
impl Spawn {
|
||||
pub(crate) fn modal() -> Self {
|
||||
Self { task_name: None }
|
||||
}
|
||||
}
|
||||
/// Rerun last task
|
||||
#[derive(PartialEq, Clone, Deserialize, Default)]
|
||||
pub struct Rerun {
|
||||
|
@ -144,16 +149,11 @@ impl TasksModal {
|
|||
}
|
||||
|
||||
impl Render for TasksModal {
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl gpui::prelude::IntoElement {
|
||||
fn render(&mut self, _: &mut ViewContext<Self>) -> impl gpui::prelude::IntoElement {
|
||||
v_flex()
|
||||
.key_context("TasksModal")
|
||||
.w(rems(34.))
|
||||
.child(self.picker.clone())
|
||||
.on_mouse_down_out(cx.listener(|modal, _, cx| {
|
||||
modal.picker.update(cx, |picker, cx| {
|
||||
picker.cancel(&Default::default(), cx);
|
||||
})
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue