diff options
| author | Kit La Touche <kit@transneptune.net> | 2024-10-30 23:26:23 -0400 |
|---|---|---|
| committer | Kit La Touche <kit@transneptune.net> | 2024-10-30 23:26:23 -0400 |
| commit | 80220d2188e0553304f2c78d225bbe275d8ba572 (patch) | |
| tree | de0a62325c698197612574c7a9f37dad279581be /ui/lib/components/CreateChannelForm.svelte | |
| parent | 51aabd07ca5eeaee45a564f8799cc42dc195068c (diff) | |
| parent | 35b8a914b867237c9c64f33838b1e1f85fc46fb8 (diff) | |
Merge branch 'main' into wip/mobile
Diffstat (limited to 'ui/lib/components/CreateChannelForm.svelte')
| -rw-r--r-- | ui/lib/components/CreateChannelForm.svelte | 9 |
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> |
