mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-03 01:33:19 +00:00
Add hint to show how many days left relative to today
This commit is contained in:
parent
53b1280115
commit
534da46a26
4 changed files with 33 additions and 13 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue