From b9b3f70a6c988a38835ff20c896d1c4deb9f6ddc Mon Sep 17 00:00:00 2001 From: James Xylight Date: Wed, 20 Aug 2025 21:19:36 -0700 Subject: [PATCH] design: improve file attachments --- .../components/form/ImageInputUpload.svelte | 57 ++++++++++++++++ .../lemmy/community/CommunityForm.svelte | 65 +++---------------- src/lib/i18n/en.json | 5 +- src/lib/mono/forms/ImageInput.svelte | 22 ++++--- 4 files changed, 82 insertions(+), 67 deletions(-) create mode 100644 src/lib/components/form/ImageInputUpload.svelte diff --git a/src/lib/components/form/ImageInputUpload.svelte b/src/lib/components/form/ImageInputUpload.svelte new file mode 100644 index 00000000..cf4d1b1e --- /dev/null +++ b/src/lib/components/form/ImageInputUpload.svelte @@ -0,0 +1,57 @@ + + +
+ + + +
diff --git a/src/lib/components/lemmy/community/CommunityForm.svelte b/src/lib/components/lemmy/community/CommunityForm.svelte index 68787276..b1534a43 100644 --- a/src/lib/components/lemmy/community/CommunityForm.svelte +++ b/src/lib/components/lemmy/community/CommunityForm.svelte @@ -25,6 +25,7 @@ import { DocumentPlus, GlobeAlt, Icon, MapPin, Plus } from 'svelte-hero-icons' import ImageUploadModal from '../modal/ImageUploadModal.svelte' import { errorMessage } from '$lib/lemmy/error' + import ImageInputUpload from '$lib/components/form/ImageInputUpload.svelte' interface Props { /** @@ -168,62 +169,14 @@ bind:value={formData.displayName} />
-
- - - {#if uploading.icon} - { - uploading.icon = false - formData.icon = uploaded[0] - }} - /> - {/if} -
-
- - - {#if uploading.banner} - { - uploading.banner = false - formData.banner = uploaded[0] - }} - /> - {/if} -
+ +
{/if}