From bd53a51af835478d23bef4772ce7e50553dc3fdf Mon Sep 17 00:00:00 2001
From: Kit La Touche <kit@transneptune.net>
Date: Wed, 9 Oct 2024 15:32:52 -0400
Subject: Move a lot of things around

---
 hi-ui/src/lib/components/Message.svelte | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 hi-ui/src/lib/components/Message.svelte

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

diff --git a/hi-ui/src/lib/components/Message.svelte b/hi-ui/src/lib/components/Message.svelte
new file mode 100644
index 0000000..5b51492
--- /dev/null
+++ b/hi-ui/src/lib/components/Message.svelte
@@ -0,0 +1,31 @@
+<script>
+    import SvelteMarkdown from 'svelte-markdown';
+    import { currentUser } from '$lib/store';
+    import { deleteMessage } from '$lib/apiServer';
+
+    export let at;  // XXX: Omitted for now.
+    export let sender;
+    export let message;
+
+    let timestamp = new Date(at).toTimeString();
+</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? -->
+        @{sender.name}:
+    </span>
+    <span class="timestamp chip variant-soft absolute top-0 right-0">{at}</span>
+    <section class="p-4">
+        <SvelteMarkdown source={message.body} />
+    </section>
+</div>
+
+<style>
+    .card .timestamp {
+        display: none;
+    }
+    .card:hover .timestamp {
+        display: flex;
+    }
+</style>
-- 
cgit v1.2.3

