show mode of timebar with extra info #18

Merged
cscherrNT merged 10 commits from feat/mode-show into devel 2024-07-19 10:06:09 +02:00
1 changed files with 6 additions and 2 deletions
Showing only changes of commit 01c3f44026 - Show all commits

View File

@ -155,8 +155,12 @@ pub fn timebarw_label<'a>(
// example with `-o` #17
.checked_add_signed(len.into())
.expect("could not calculate when the countdown finishes");
let timestamp_until: String =
format!("{}:{}:{}", until.hour(), until.minute(), until.second());
let timestamp_until: String = format!(
"{:02}:{:02}:{:02}",
until.hour(),
until.minute(),
until.second()
);
Paragraph::new(format!("{time_now} / {len} ({timestamp_until})"))
.alignment(Alignment::Center)
.block(