summaryrefslogtreecommitdiff
path: root/ui/lib/components/CreateChannelForm.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'ui/lib/components/CreateChannelForm.svelte')
-rw-r--r--ui/lib/components/CreateChannelForm.svelte9
1 files changed, 5 insertions, 4 deletions
diff --git a/ui/lib/components/CreateChannelForm.svelte b/ui/lib/components/CreateChannelForm.svelte
index ddcf486..b716736 100644
--- a/ui/lib/components/CreateChannelForm.svelte
+++ b/ui/lib/components/CreateChannelForm.svelte
@@ -1,16 +1,17 @@
<script>
import { createChannel } from '$lib/apiServer';
- let name = '';
- let disabled = false;
+ let name = "";
+ let pending = false;
+ $: disabled = pending;
async function handleSubmit(event) {
- disabled = true;
+ pending = true;
const response = await createChannel(name);
if (200 <= response.status && response.status < 300) {
name = '';
}
- disabled = false;
+ pending = false;
}
</script>