From a356546fc706b2ade758e7f42069e6d669330421 Mon Sep 17 00:00:00 2001
From: Owen Jacobson <owen@grimoire.ca>
Date: Wed, 30 Oct 2024 18:50:01 -0400
Subject: Coalesce adjacent messages by the same author into runs, to
 consolidate message display.

---
 ui/lib/components/Message.svelte | 21 +++++----------------
 1 file changed, 5 insertions(+), 16 deletions(-)

(limited to 'ui/lib/components/Message.svelte')

diff --git a/ui/lib/components/Message.svelte b/ui/lib/components/Message.svelte
index d040433..ef8ea0b 100644
--- a/ui/lib/components/Message.svelte
+++ b/ui/lib/components/Message.svelte
@@ -1,33 +1,22 @@
 <script>
     import SvelteMarkdown from 'svelte-markdown';
-    import { currentUser, logins } from '$lib/store';
-    import { deleteMessage } from '$lib/apiServer';
 
-    export let at;  // XXX: Omitted for now.
-    export let sender;
+    export let at;
     export let body;
-
-    let timestamp = new Date(at).toTimeString();
-    let name;
-    $: name = $logins.get(sender);
 </script>
 
-<div class="card card-hover m-4 relative">
-    <span class="chip variant-soft sticky top-o left-0">
-        <!-- TODO: should this show up for only the first of a run? -->
-        @{name}:
-    </span>
+<div class="message relative">
     <span class="timestamp chip variant-soft absolute top-0 right-0">{at}</span>
-    <section class="p-4">
+    <section class="p-1">
         <SvelteMarkdown source={body} />
     </section>
 </div>
 
 <style>
-    .card .timestamp {
+    .message .timestamp {
         display: none;
     }
-    .card:hover .timestamp {
+    .message:hover .timestamp {
         display: flex;
     }
 </style>
-- 
cgit v1.2.3


From 35b8a914b867237c9c64f33838b1e1f85fc46fb8 Mon Sep 17 00:00:00 2001
From: Owen Jacobson <owen@grimoire.ca>
Date: Wed, 30 Oct 2024 18:55:32 -0400
Subject: Nicer margins

---
 ui/lib/components/Message.svelte | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'ui/lib/components/Message.svelte')

diff --git a/ui/lib/components/Message.svelte b/ui/lib/components/Message.svelte
index ef8ea0b..004a484 100644
--- a/ui/lib/components/Message.svelte
+++ b/ui/lib/components/Message.svelte
@@ -7,7 +7,7 @@
 
 <div class="message relative">
     <span class="timestamp chip variant-soft absolute top-0 right-0">{at}</span>
-    <section class="p-1">
+    <section class="mx-4 my-1">
         <SvelteMarkdown source={body} />
     </section>
 </div>
-- 
cgit v1.2.3

