From d6860160f4c074dc6d853a716f43542ee81efd38 Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Tue, 18 Apr 2023 22:34:45 -0700 Subject: [PATCH] Padding fix for message UI --- web/static/js/BareRTC.js | 3 +-- web/templates/chat.html | 7 +++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/web/static/js/BareRTC.js b/web/static/js/BareRTC.js index 3ceebc6..db729de 100644 --- a/web/static/js/BareRTC.js +++ b/web/static/js/BareRTC.js @@ -1285,11 +1285,10 @@ const app = Vue.createApp({ prettyDate(date) { let hours = date.getHours(), minutes = String(date.getMinutes()).padStart(2, '0'), - seconds = String(date.getSeconds()).padStart(2, '0'), ampm = hours >= 11 ? "pm" : "am"; let hour = hours%12 || 12; - return `${(hour)}:${minutes}:${seconds} ${ampm}`; + return `${(hour)}:${minutes} ${ampm}`; }, /** diff --git a/web/templates/chat.html b/web/templates/chat.html index 6709f32..82d6b0d 100644 --- a/web/templates/chat.html +++ b/web/templates/chat.html @@ -718,6 +718,9 @@ [[nicknameForUsername(msg.username)]] +
+ [[prettyDate(msg.at)]] +
@@ -780,10 +783,6 @@
-
- [[prettyDate(msg.at)]] -
-