fix: close image upload modal after upload

This commit is contained in:
Xylight committed 2024-07-20 11:49:05 -07:00
1 parent c7803eb095
commit b7e503ae4f
1 file changed
+2 -1
@@ -29,6 +29,7 @@
dispatcher('upload', uploaded) dispatcher('upload', uploaded)
output = uploaded output = uploaded
loading = false loading = false
open = false
} catch (err) { } catch (err) {
toast({ toast({
content: err as any, content: err as any,
@@ -40,7 +41,7 @@
} }
</script> </script>
<Modal bind:open bind:output> <Modal bind:open>
<span slot="title">Upload image</span> <span slot="title">Upload image</span>
<form class="flex flex-col gap-4" on:submit|preventDefault={upload}> <form class="flex flex-col gap-4" on:submit|preventDefault={upload}>
<ImageInput accept="image/jpeg,image/png,image/webp" bind:files={image} /> <ImageInput accept="image/jpeg,image/png,image/webp" bind:files={image} />