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/MessageInput.svelte | 30 ------------------------------
 1 file changed, 30 deletions(-)
 delete mode 100644 hi-ui/src/lib/MessageInput.svelte

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

diff --git a/hi-ui/src/lib/MessageInput.svelte b/hi-ui/src/lib/MessageInput.svelte
deleted file mode 100644
index 2e81ee2..0000000
--- a/hi-ui/src/lib/MessageInput.svelte
+++ /dev/null
@@ -1,30 +0,0 @@
-<script>
-    import { tick } from 'svelte';
-    import { postToChannel } from '../apiServer';
-    import { activeChannel } from '../store';
-
-    let input;
-    let value;
-    let disabled;
-    activeChannel.subscribe((value) => {
-        disabled = !value.isSet();
-        if (input && !disabled) {
-            input.focus();
-        }
-    });
-
-    async function handleSubmit(event) {
-        disabled = true;
-        // TODO try/catch:
-        await postToChannel($activeChannel.get(), value);
-        value = '';
-        disabled = false;
-        await tick();
-        input.focus();
-    }
-</script>
-
-<form on:submit|preventDefault={handleSubmit} class="flex flex-row flex-nowrap">
-    <input bind:this={input} bind:value={value} disabled={disabled} type="search" class="flex-auto h-6 input rounded-r-none" />
-    <button color="primary variant-filled-secondary" type="submit" class="flex-none w-6 h-6 btn-icon variant-filled rounded-l-none">&raquo;</button>
-</form>
-- 
cgit v1.2.3

