feat: add admin icon and banners, close #229
This commit is contained in:
1 parent
3f06735fa7
commit
2f9b2be6d0
5 files changed
+51
-11
No files matched your search
@@ -7,6 +7,7 @@
|
||||
|
||||
export let open: boolean
|
||||
export let image: FileList | null = null
|
||||
export let output: string | undefined = undefined
|
||||
let loading = false
|
||||
|
||||
const dispatcher = createEventDispatcher<{ upload: string }>()
|
||||
@@ -26,6 +27,7 @@
|
||||
if (!uploaded) throw new Error('Image upload returned undefined')
|
||||
|
||||
dispatcher('upload', uploaded)
|
||||
output = uploaded
|
||||
loading = false
|
||||
} catch (err) {
|
||||
toast({
|
||||
@@ -38,7 +40,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<Modal bind:open>
|
||||
<Modal bind:open bind:output>
|
||||
<span slot="title">Upload image</span>
|
||||
<form class="flex flex-col gap-4" on:submit|preventDefault={upload}>
|
||||
<ImageInput accept="image/jpeg,image/png,image/webp" bind:files={image} />
|
||||
|
||||
Reference in new issue
Block a user