From ba96974bdebd6d4ec345907d49944b5ee644ed47 Mon Sep 17 00:00:00 2001
From: Owen Jacobson <owen@grimoire.ca>
Date: Wed, 9 Oct 2024 00:57:31 -0400
Subject: Provide a view of logins to clients.

---
 hi-ui/src/lib/Message.svelte | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

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

diff --git a/hi-ui/src/lib/Message.svelte b/hi-ui/src/lib/Message.svelte
index 7c60ac0..d10bee3 100644
--- a/hi-ui/src/lib/Message.svelte
+++ b/hi-ui/src/lib/Message.svelte
@@ -1,6 +1,6 @@
 <script>
     import SvelteMarkdown from 'svelte-markdown';
-    import { currentUser } from '../store';
+    import { currentUser, logins } from '../store';
     import { deleteMessage } from '../apiServer';
 
     export let at;  // XXX: Omitted for now.
@@ -8,12 +8,14 @@
     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? -->
-        @{sender.name}:
+        @{name}:
     </span>
     <span class="timestamp chip variant-soft absolute top-0 right-0">{at}</span>
     <section class="p-4">
-- 
cgit v1.2.3

