feat: add admin icon and banners, close #229

This commit is contained in:
Xylight committed 2023-12-29 13:52:24 -08:00
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} />
@@ -124,7 +124,7 @@
</Label>
{/if}
<div
class="flex flex-col border border-slate-300 dark:border-zinc-800 rounded-md
class="flex flex-col border border-slate-300 dark:border-zinc-800 rounded-xl
overflow-hidden focus-within:border-black focus-within:dark:border-white transition-colors"
class:mt-1={label}
>