diff --git a/meshview/templates/chat.html b/meshview/templates/chat.html index 248e2db..aab9224 100644 --- a/meshview/templates/chat.html +++ b/meshview/templates/chat.html @@ -22,6 +22,12 @@ .chat-packet.flash { animation: flash 3.5s ease-out; } + +/* New CSS for smaller Replying to text */ +.replying-to { + font-size: 0.85em; + color: #ccc; +} {% endblock %} {% block body %} @@ -48,8 +54,10 @@ {{ packet.payload }} - {% if packet.raw_mesh_packet.decoded.reply_id %} - (Replying to: {{packet.raw_mesh_packet.decoded.reply_id}}) + {% if packet.raw_mesh_packet.decoded.reply_id %} + + (Replying to: {{ packet.raw_mesh_packet.decoded.reply_id }}) + {% endif %} @@ -105,7 +113,8 @@ async function fetchUpdates() { const formattedTime = date.toLocaleTimeString([], { hour: 'numeric', minute: '2-digit', - second: '2-digit' + second: '2-digit', + hour12: true }); const formattedDate = `${(date.getMonth() + 1).toString().padStart(2, '0')}/${date.getDate().toString().padStart(2, '0')}/${date.getFullYear()}`; const formattedTimestamp = `${formattedTime} - ${formattedDate}`; @@ -122,7 +131,12 @@ async function fetchUpdates() { ${packet.long_name || (packet.from_node_id || '').toString(16)} - ${escapeHtml(packet.payload)} + + ${escapeHtml(packet.payload)} + ${packet.raw_mesh_packet && packet.raw_mesh_packet.decoded && packet.raw_mesh_packet.decoded.reply_id + ? `(Replying to: ${packet.raw_mesh_packet.decoded.reply_id})` + : ''} + `; chatContainer.prepend(div);