atagen

malice

public
Star0
Watch0

Commit 01351a71d24a

tarball

atagen <boss@atagen.co>2026-10-24 12:18 UTC

1 file changed+10-6
web: always show image MXC control
Modified file: web/src/lib/ImageLightbox.svelte+10 additions−6 deletions
@@ -47,12 +47,16 @@
4747 <div class="lightbox" role="dialog" tabindex="-1" aria-modal="true" aria-label={$lightbox.filename} on:click|self={close}>
4848 <div class="lightbox-bar">
4949 <span class="lightbox-name">{$lightbox.filename}</span>
50- {#if $lightbox.mxc}
51- {@const mxc = $lightbox.mxc}
52- <button type="button" class="ghost-btn" aria-label="Copy MXC URI" title={mxc} on:click={() => void copyMxc(mxc)}>
53- {copied ? 'Copied' : 'Copy MXC'}
54- </button>
55- {/if}
50+ <button
51+ type="button"
52+ class="ghost-btn"
53+ aria-label="Copy MXC URI"
54+ title={$lightbox.mxc ?? 'MXC URI unavailable for this attachment'}
55+ disabled={!$lightbox.mxc}
56+ on:click={() => $lightbox.mxc && void copyMxc($lightbox.mxc)}
57+ >
58+ {copied ? 'Copied' : 'Copy MXC'}
59+ </button>
5660 <a class="ghost-btn" href={$lightbox.src} target="_blank" rel="noopener noreferrer">Open original</a>
5761 <a class="ghost-btn" href={$lightbox.src} download={$lightbox.filename}>Download</a>
5862 <button type="button" class="icon-btn" aria-label="Close image" title="Close (Esc)" bind:this={closeBtn} on:click={close}>