Compare commits
1 commit
154141a6ed
...
a2cd391827
Author | SHA1 | Date | |
---|---|---|---|
a2cd391827 |
1 changed files with 5 additions and 11 deletions
|
@ -40,15 +40,6 @@ impl State {
|
|||
*tick += 1;
|
||||
}
|
||||
}
|
||||
|
||||
fn beating_heart(&self) -> String {
|
||||
if self.last_update.duration_since(self.started).as_secs() % 2 == 0 {
|
||||
"💚 "
|
||||
} else {
|
||||
" 💚"
|
||||
}
|
||||
.to_string()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
|
@ -335,8 +326,11 @@ impl StatefulWidget for &State {
|
|||
.title(
|
||||
Title::from(Line::from(vec![
|
||||
" [q]uit ".into(),
|
||||
self.beating_heart().into(),
|
||||
" ".into(),
|
||||
format!(
|
||||
"{}s ",
|
||||
self.last_update.duration_since(self.started).as_secs()
|
||||
)
|
||||
.into(),
|
||||
]))
|
||||
.alignment(Alignment::Center)
|
||||
.position(ratatui::widgets::block::Position::Bottom),
|
||||
|
|
Loading…
Reference in a new issue