fix: hide Open Original when sourceUrl is present to avoid redundancy

This commit is contained in:
Jannis Braun
2026-03-25 05:13:14 +01:00
parent e0d45da97c
commit f7fa7371d6
@@ -73,19 +73,21 @@ export function buildMessageMenuItems(params: MessageMenuParams): ContextMenuIte
copyImageToClipboard(imageUrl); copyImageToClipboard(imageUrl);
}, },
}); });
items.push({ if (!sourceUrl) {
key: 'open-original', items.push({
type: 'action', key: 'open-original',
label: 'Open Original', type: 'action',
icon: ( label: 'Open Original',
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"> icon: (
<path d="M19 19H5V5h7V3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z" /> <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
</svg> <path d="M19 19H5V5h7V3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z" />
), </svg>
onClick: () => { ),
window.open(imageUrl, '_blank', 'noopener'); onClick: () => {
}, window.open(imageUrl, '_blank', 'noopener');
}); },
});
}
items.push({ key: 'image-sep', type: 'separator' }); items.push({ key: 'image-sep', type: 'separator' });
} }