From a56e12149bc4ef0cc1082ee75b0546116f4c5872 Mon Sep 17 00:00:00 2001
From: JustTemmie <47639983+JustTemmie@users.noreply.github.com>
Date: Tue, 3 Jun 2025 06:15:51 +0200
Subject: [PATCH 01/17] fix: modify message css to avoid weird line spacing
---
components/Message.vue | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/components/Message.vue b/components/Message.vue
index 64af1d9..5db6ec3 100644
--- a/components/Message.vue
+++ b/components/Message.vue
@@ -19,7 +19,7 @@
+
-
@@ -100,8 +100,7 @@ onMounted(async () => {
.message {
text-align: left;
/* border: 1px solid lightcoral; */
- display: grid;
- grid-template-columns: 1fr 19fr;
+ display: contents;
align-items: center;
}
@@ -110,7 +109,7 @@ onMounted(async () => {
}
#last-message {
- margin-bottom: 2dvh;
+ margin-bottom: 1dvh;
}
.message-metadata {
@@ -143,6 +142,7 @@ onMounted(async () => {
min-width: 4dvw;
text-align: center;
align-content: center;
+ white-space: nowrap;
}
.author-username {
diff --git a/components/MessageArea.vue b/components/MessageArea.vue
index e3dcdbf..e142641 100644
--- a/components/MessageArea.vue
+++ b/components/MessageArea.vue
@@ -245,8 +245,8 @@ onMounted(async () => {
#messages {
overflow-y: scroll;
- display: flex;
- flex-direction: column;
+ display: grid;
+ grid-template-columns: min-content 1fr;
gap: 1dvh;
padding-left: 1dvw;
padding-right: 1dvw;
From d986f601dec7466d9a81974c9336c31e0e64a238 Mon Sep 17 00:00:00 2001
From: SauceyRed
Date: Tue, 3 Jun 2025 20:42:34 +0200
Subject: [PATCH 03/17] feat: improve 24-hour to 12-hour format conversion by
using Date methods
---
components/Message.vue | 24 +++---------------------
1 file changed, 3 insertions(+), 21 deletions(-)
diff --git a/components/Message.vue b/components/Message.vue
index e488adc..61f1c10 100644
--- a/components/Message.vue
+++ b/components/Message.vue
@@ -10,7 +10,7 @@
{{ username }}
- {{ messageDate }}
+ {{ date.toLocaleTimeString(undefined, { timeStyle: "short" }) }}
@@ -20,7 +20,7 @@
- {{ messageDate }}
+ {{ date.toLocaleTimeString(undefined, { timeStyle: "short" }) }}
@@ -46,32 +46,14 @@ const props = defineProps<{
last: boolean
}>();
-const messageDate = ref
();
-
const messageElement = ref();
const dateHidden = ref(true);
const date = new Date(props.timestamp);
-let dateHour = date.getHours();
-let dateMinute = date.getMinutes();
-if (props.format == "12") {
- if (dateHour > 12) {
- dateHour = dateHour - 12;
- messageDate.value = `${dateHour}:${dateMinute < 10 ? "0" + dateMinute : dateMinute} PM`
- } else {
- if (dateHour == 0) {
- dateHour = 12;
- }
- messageDate.value = `${dateHour}:${dateMinute < 10 ? "0" + dateMinute : dateMinute} ${dateHour >= 0 && dateHour < 13 ? "AM" : "PM"}`
- }
-} else {
- messageDate.value = `${dateHour}:${dateMinute < 10 ? "0" + dateMinute : dateMinute}`
-}
-
console.log("message:", props.text);
-console.log("author:", props.username);
+console.log("author:", props.username)
const sanitized = ref();
From 82fde5671dc68a9f9bd47292ae6991d5ef377c3e Mon Sep 17 00:00:00 2001
From: SauceyRed
Date: Tue, 3 Jun 2025 20:49:41 +0200
Subject: [PATCH 04/17] fix: last message from user not having bottom margin
---
components/Message.vue | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/components/Message.vue b/components/Message.vue
index 61f1c10..1912854 100644
--- a/components/Message.vue
+++ b/components/Message.vue
@@ -1,5 +1,5 @@
-
+
@@ -16,7 +16,7 @@
-
+
@@ -86,6 +86,10 @@ onMounted(async () => {
align-items: center;
}
+.message-margin-bottom > * {
+ margin-bottom: 1dvh;
+}
+
.normal-message {
margin-top: 1dvh;
}
@@ -121,7 +125,6 @@ onMounted(async () => {
}
.left-column {
- min-width: 4dvw;
text-align: center;
align-content: center;
white-space: nowrap;
From 263c823ceb920592a64c6d6b6bd0daa93adb2cca Mon Sep 17 00:00:00 2001
From: SauceyRed
Date: Tue, 3 Jun 2025 20:50:28 +0200
Subject: [PATCH 05/17] fix: tabIndex not working after changing messages to
use "display: contents;"
---
components/Message.vue | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/components/Message.vue b/components/Message.vue
index 1912854..66cf1b5 100644
--- a/components/Message.vue
+++ b/components/Message.vue
@@ -1,19 +1,19 @@
-
![]()
+
-
+
{{ username }}
{{ date.toLocaleTimeString(undefined, { timeStyle: "short" }) }}
-
+
@@ -25,7 +25,7 @@
From 67e10a4387f6838548d0de95b3a56c8701da4277 Mon Sep 17 00:00:00 2001
From: SauceyRed
Date: Tue, 3 Jun 2025 20:52:42 +0200
Subject: [PATCH 06/17] feat: refactor to allow more markdown tags, syling
changes to make lists and headings not take up as much space
---
components/Message.vue | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/components/Message.vue b/components/Message.vue
index 66cf1b5..8df20cd 100644
--- a/components/Message.vue
+++ b/components/Message.vue
@@ -32,7 +32,7 @@