From 9b38cb1a62ede4900fde4ba47a7b065db329e994 Mon Sep 17 00:00:00 2001
From: Owen Jacobson <owen@grimoire.ca>
Date: Tue, 1 Jul 2025 15:40:11 -0400
Subject: Rename "channel" to "conversation" throughout the client.

Existing client state, stored in local storage, is migrated to new keys (that mention "conversation" instead of "channel" where appropriate) the first time the client loads.
---
 ui/lib/components/CreateConversationForm.svelte | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 ui/lib/components/CreateConversationForm.svelte

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

diff --git a/ui/lib/components/CreateConversationForm.svelte b/ui/lib/components/CreateConversationForm.svelte
new file mode 100644
index 0000000..e390a78
--- /dev/null
+++ b/ui/lib/components/CreateConversationForm.svelte
@@ -0,0 +1,22 @@
+<script>
+  let { createConversation = async (name) => {} } = $props();
+
+  let name = $state('');
+  let disabled = $state(false);
+
+  async function onsubmit(event) {
+    event.preventDefault();
+    disabled = true;
+    try {
+      await createConversation(name);
+      event.target.reset();
+    } finally {
+      disabled = false;
+    }
+  }
+</script>
+
+<form {onsubmit}>
+  <input type="text" placeholder="start a conversation" bind:value={name} {disabled} />
+  <button type="submit">&#x2795;</button>
+</form>
-- 
cgit v1.2.3

