dont show empty space if no banner is set, revoke blob urls on post upload
275 unmodified linesExpand all2762772782792802812822832841 unmodified line2862872882892902912922932949 unmodified lines304305306307308309310311312313314315316317414 unmodified linesExpand all275 unmodified linesExpand all const removeMedia = () => { if (_state.attachedMedia?.$type === 'app.bsky.embed.video') { const blobUrl = (_state.attachedMedia.video as AtpBlob<string>).ref.$link; _state.blobsState.delete(blobUrl); queueMicrotask(() => URL.revokeObjectURL(blobUrl)); } _state.attachedMedia = undefined; };
1 unmodified line if (_state.attachedMedia?.$type !== 'app.bsky.embed.images') return; const imageToRemove = _state.attachedMedia.images[index]; const blobUrl = (imageToRemove.image as AtpBlob<string>).ref.$link; _state.blobsState.delete(blobUrl); queueMicrotask(() => URL.revokeObjectURL(blobUrl));
const images = _state.attachedMedia.images.filter((_, i) => i !== index); _state.attachedMedia = images.length > 0 ? { ..._state.attachedMedia, images } : undefined; };9 unmodified lines onPostSent(res.value); _state.text = ''; _state.quoting = undefined; _state.replying = undefined; if (_state.attachedMedia?.$type === 'app.bsky.embed.video') URL.revokeObjectURL((_state.attachedMedia.video as AtpBlob<string>).ref.$link); else if (_state.attachedMedia?.$type === 'app.bsky.embed.images') _state.attachedMedia.images.forEach((image) => URL.revokeObjectURL((image.image as AtpBlob<string>).ref.$link) ); _state.attachedMedia = undefined; _state.blobsState.clear(); unfocus(); } else {414 unmodified linesExpand all148 unmodified linesExpand all14915015115215315415315415515615715815916016115615715815916016116216316416516516616716816911 unmodified lines148 unmodified linesExpand all /> </div> {:else} <!-- banner --> <div class="relative h-32 w-full overflow-hidden bg-(--nucleus-fg)/5 md:h-48"> {#if bannerUrl} {#if bannerUrl} <div class="relative h-32 w-full overflow-hidden bg-(--nucleus-fg)/5 md:h-48"> <img src={bannerUrl} alt="banner" class="h-full w-full object-cover" /> {/if} <div class="absolute inset-0 bg-linear-to-b from-transparent to-(--nucleus-bg)" style="opacity: 0.8;" ></div> </div> <div class="absolute inset-0 bg-linear-to-b from-transparent to-(--nucleus-bg)" style="opacity: 0.8;" ></div> </div> {/if}
{#if did} <div class="px-4 pb-4"> <div class="relative z-10 -mt-12 mb-4"> <div class="relative z-10 {bannerUrl ? '-mt-12' : 'mt-4'} mb-4"> <ProfileInfo {client} {did} bind:profile /> </div>
<TimelineView11 unmodified lines