Skip to content

Commit

Permalink
fix RunningCommand title formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cartercanedy committed Oct 2, 2024
1 parent 7332293 commit 3d874c9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions tui/src/running_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,20 @@ impl FloatContent for RunningCommand {
let (content, content_style) = if !self.is_finished() {
(" Running command... ", Style::default().reversed())
} else if self.wait_command().success() {
(" Success ", Style::default().green().reversed())
(" Success ", Style::default().bold().green().reversed())
} else {
(" Failed ", Style::default().red().reversed())
(" Failed ", Style::default().bold().red().reversed())
};

Some(Line::from(content).style(content_style))
}

fn bottom_title(&self) -> Option<Line<'_>> {
Some(Line::from("Press Ctrl-C to KILL the command"))
Some(Line::from(if !self.is_finished() {
" Press [CTRL-c] to KILL the command "
} else {
" Press [Enter] to close this window "
}))
}

fn draw(&mut self, frame: &mut Frame, area: Rect) {
Expand Down

0 comments on commit 3d874c9

Please sign in to comment.