From 4401dce2b5545ce8117818812d8e3c8919f5f7fd Mon Sep 17 00:00:00 2001
From: Owen Jacobson <owen@grimoire.ca>
Date: Thu, 10 Oct 2024 21:05:48 -0400
Subject: Remove redundancy in `hi-ui` directory name.

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

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

diff --git a/ui/src/lib/components/Message.svelte b/ui/src/lib/components/Message.svelte
new file mode 100644
index 0000000..d040433
--- /dev/null
+++ b/ui/src/lib/components/Message.svelte
@@ -0,0 +1,33 @@
+<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 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>
+    <span class="timestamp chip variant-soft absolute top-0 right-0">{at}</span>
+    <section class="p-4">
+        <SvelteMarkdown source={body} />
+    </section>
+</div>
+
+<style>
+    .card .timestamp {
+        display: none;
+    }
+    .card:hover .timestamp {
+        display: flex;
+    }
+</style>
-- 
cgit v1.2.3

