mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-24 22:14:28 +00:00
fix RunningCommand
title formatting
This commit is contained in:
parent
694055ccbd
commit
d7226ad57d
|
@ -52,16 +52,20 @@ impl FloatContent for RunningCommand {
|
||||||
let (content, content_style) = if !self.is_finished() {
|
let (content, content_style) = if !self.is_finished() {
|
||||||
(" Running command... ", Style::default().reversed())
|
(" Running command... ", Style::default().reversed())
|
||||||
} else if self.wait_command().success() {
|
} else if self.wait_command().success() {
|
||||||
(" Success ", Style::default().green().reversed())
|
(" Success ", Style::default().bold().green().reversed())
|
||||||
} else {
|
} else {
|
||||||
(" Failed ", Style::default().red().reversed())
|
(" Failed ", Style::default().bold().red().reversed())
|
||||||
};
|
};
|
||||||
|
|
||||||
Some(Line::from(content).style(content_style))
|
Some(Line::from(content).style(content_style))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn bottom_title(&self) -> Option<Line<'_>> {
|
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) {
|
fn draw(&mut self, frame: &mut Frame, area: Rect) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user