Add hint to show how many days left relative to today

This commit is contained in:
Vyn 2024-10-08 17:05:52 +02:00
parent 53b1280115
commit 534da46a26
4 changed files with 33 additions and 13 deletions

View file

@ -80,10 +80,14 @@ export component MainView inherits Rectangle {
color: day.isLate ? Palette.orange : Palette.foreground;
font-size: 1.2rem;
}
if day.isToday : VerticalLayout {
VerticalLayout {
alignment: center;
VText {
text: " - Today";
text: day.relativeDaysDiff == 0 ? " - today" :
day.relativeDaysDiff == 1 ? " - tomorrow" :
day.relativeDaysDiff == -1 ? " - yesterday" :
day.relativeDaysDiff > 0 ? " - in \{day.relativeDaysDiff} days" :
" - \{-day.relativeDaysDiff} days ago";
color: Palette.foreground-hint;
font-size: 1rem;
}