xP: remember to differentiate today

This commit is contained in:
Přemysl Eric Janouch 2022-09-07 19:23:17 +02:00
parent a2d5995cf5
commit 45aa0e8dfb
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 4 additions and 0 deletions

View File

@ -402,6 +402,10 @@ let Buffer = {
lines.push(m('.time', {...attrs}, date.toLocaleTimeString()))
lines.push(m(Content, {...attrs}, line))
})
let dateMark = new Date().toLocaleDateString()
if (dateMark !== lastDateMark)
lines.push(m('.date', {}, dateMark))
return m('.buffer', {}, lines)
},
}