From 520da5ad00168b8b8e876d4baa3e497d320b8f53 Mon Sep 17 00:00:00 2001 From: creations Date: Thu, 18 Sep 2025 17:11:05 -0400 Subject: [PATCH] add option to copy links to images and gifs inside gifcollections (#401) --- src/equicordplugins/gifCollections/index.tsx | 39 +++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/src/equicordplugins/gifCollections/index.tsx b/src/equicordplugins/gifCollections/index.tsx index c6a098223..c345aea25 100644 --- a/src/equicordplugins/gifCollections/index.tsx +++ b/src/equicordplugins/gifCollections/index.tsx @@ -41,6 +41,20 @@ const addCollectionContextMenuPatch: NavContextMenuPatchCallback = (children, pr if (group && !group.some(child => child?.props?.id === "add-to-collection")) { const collections = cache_collections; + if (settings.store.showCopyImageLink) { + group.push( + { + copyToClipboard(gif.url); + showToast("Image link copied to clipboard", Toasts.Type.SUCCESS); + }} + /> + ); + } + group.push( ( const MenuThingy = ({ gif }) => { const collections = cache_collections; - return ( + const menuItems: React.ReactNode[] = []; + + if (settings.store.showCopyImageLink) { + menuItems.push( + { + copyToClipboard(gif.url); + showToast("Image link copied to clipboard", Toasts.Type.SUCCESS); + }} + /> + ); + } + + menuItems.push( {collections.map(col => ( { /> ); + + return <>{menuItems}; }; function CreateCollectionModal({ gif, onClose, modalProps }) {