From 3402dc3b6403bb190c72d5b413c979c95822c2b2 Mon Sep 17 00:00:00 2001 From: lza_menace Date: Wed, 11 Jan 2023 11:28:39 -0800 Subject: [PATCH] make chat slightly better --- src/styles/sections.css | 7 +++++-- src/template/Sections.jsx | 7 +++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/styles/sections.css b/src/styles/sections.css index 40aa4b9..21c5131 100644 --- a/src/styles/sections.css +++ b/src/styles/sections.css @@ -241,6 +241,9 @@ #trollbox { min-width: 200px; } + .messageDate { + display: none; + } } #trollbox ul li, #trollbox span, #trollbox a { @@ -269,5 +272,5 @@ font-size: 8px; float: right; line-height: 1em; -} - + padding-right: 8px; +} \ No newline at end of file diff --git a/src/template/Sections.jsx b/src/template/Sections.jsx index 564bf26..6aaf917 100644 --- a/src/template/Sections.jsx +++ b/src/template/Sections.jsx @@ -593,6 +593,7 @@ function Trollbox(props) { if (message) { sendJsonMessage({ from: props.address, + date: new Date(), message }) } @@ -628,6 +629,12 @@ function Trollbox(props) { : {message.message} + + {new Date(message.date).getMonth() + 1}/ + {new Date(message.date).getDate()} @ + {new Date(message.date).getUTCHours()}: + {new Date(message.date).getUTCMinutes()} UTC + ))}