From 45aa0e8dfba2a51d26b6a4fe4990a1686ab4af65 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Wed, 7 Sep 2022 19:23:17 +0200 Subject: xP: remember to differentiate today --- xP/public/xP.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'xP') diff --git a/xP/public/xP.js b/xP/public/xP.js index 0a939c2..a941752 100644 --- a/xP/public/xP.js +++ b/xP/public/xP.js @@ -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) }, } -- cgit v1.2.3-70-g09d2