fix: exclude embed thumbnails from image context menu actions
Add data-embed-thumbnail marker to VideoEmbed, GenericEmbed, and RichEmbed thumbnail containers. Update detection logic to skip these alongside avatars. Also remove redundant filename derivation in Save Image menu item.
This commit is contained in:
@@ -41,7 +41,7 @@ export function GenericEmbed({ embed }: GenericEmbedProps) {
|
||||
)}
|
||||
</div>
|
||||
{embed.image && (
|
||||
<div className="w-[80px] h-[80px] m-3 flex-shrink-0">
|
||||
<div data-embed-thumbnail className="w-[80px] h-[80px] m-3 flex-shrink-0">
|
||||
<img
|
||||
src={embed.image}
|
||||
alt=""
|
||||
|
||||
@@ -50,7 +50,7 @@ export function RichEmbed({ embed }: RichEmbedProps) {
|
||||
>
|
||||
<div className="flex items-start gap-3 p-3">
|
||||
{embed.image && (
|
||||
<div className="w-[80px] h-[80px] flex-shrink-0">
|
||||
<div data-embed-thumbnail className="w-[80px] h-[80px] flex-shrink-0">
|
||||
<img
|
||||
src={embed.image}
|
||||
alt=""
|
||||
|
||||
@@ -45,6 +45,7 @@ export function VideoEmbed({ embed }: VideoEmbedProps) {
|
||||
) : (
|
||||
<button
|
||||
type="button"
|
||||
data-embed-thumbnail
|
||||
onClick={() => setIsPlaying(true)}
|
||||
className="absolute inset-0 w-full h-full flex items-center justify-center group focus:outline-none"
|
||||
aria-label={`Play ${embed.title ?? 'video'}`}
|
||||
|
||||
Reference in New Issue
Block a user