{#if uploadingImage} {#await import('$lib/components/lemmy/modal/ImageUploadModal.svelte') then { default: UploadModal }} { if (e.detail) data.url = e.detail uploadingImage = false }} /> {/await} {/if} {edit ? 'Edit' : 'Create'} Post {#if !edit && data} Community * {#if data.community} {/if} { const c = e.detail if (!c) { data.community = null return } data.community = c.id communitySearch = `${c.name}@${new URL(c.actor_id).hostname}` }} /> {/if} generateTitle(data.url)} style="width: 38px; height: 38px; padding: 0;" class="flex-shrink-0" title="Generate title/body" loading={generation.loading} disabled={!generation.generatable || generation.loading} > (uploadingImage = !uploadingImage)} style="width: 38px; height: 38px; padding: 0;" class="flex-shrink-0" title="Upload image" > NSFW {#if !edit} { const draft = getSessionStorage('postDraft') if (draft && !edit) { // @ts-ignore draft.loading = false // @ts-ignore data = draft } }} size="lg" disabled={!getSessionStorage('postDraft')} > Restore from draft {/if} Submit