From a4b4e0bc6280fc3f1363cfcb3aa3f41299566c9c Mon Sep 17 00:00:00 2001 From: Guilherme Eduardo <gegs23@inf.ufpr.br> Date: Thu, 5 Jun 2025 11:05:43 -0300 Subject: [PATCH] Issue #350: FIX-remove-option-profile-embed --- src/app/components/Embed.js | 2 +- src/app/components/ShareButton.js | 2 +- src/app/components/ShareModal.js | 25 ++++++++++++++----------- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/app/components/Embed.js b/src/app/components/Embed.js index d6a154c8..86301730 100644 --- a/src/app/components/Embed.js +++ b/src/app/components/Embed.js @@ -17,7 +17,7 @@ export default function Embed({ open, onClose, learningObject }) { `<iframe width="${width}" height="${height}" - src="https://www.mecred.mec.gov.br/embed/${learningObject?.id}" + src="https://mecred.mec.gov.br/embed/${learningObject?.id}" title="${learningObject?.name}" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" diff --git a/src/app/components/ShareButton.js b/src/app/components/ShareButton.js index ff426761..cd538d50 100644 --- a/src/app/components/ShareButton.js +++ b/src/app/components/ShareButton.js @@ -40,7 +40,7 @@ export default function ShareButton({ type, id }) { </span> </button> )} - + <ShareModal open={shareOpen} onClose={() => setShareOpen(false)} diff --git a/src/app/components/ShareModal.js b/src/app/components/ShareModal.js index a90e8d32..b13fc799 100644 --- a/src/app/components/ShareModal.js +++ b/src/app/components/ShareModal.js @@ -31,7 +31,7 @@ export default function ShareModal({ open, onClose, learningObject, title, type, .catch((error) => console.error("Erro ao compartilhar:", error)); } - + return ( <Modal open={open} @@ -64,16 +64,19 @@ export default function ShareModal({ open, onClose, learningObject, title, type, <ContentCopyIcon className="p-[1px]" /> {clicked ? <span>Copiado!</span> : <span>Copiar link!</span>} </Button> - <Button - disableElevation - variant="outlined" - className="border text-lg normal-case text-darkGray-HC-white hover:bg-darkGray-HC-white hover:text-white-HC-dark border-lightGray-HC-white" - aria-label="Incorporar" - onClick={() => setEmbed(true)} - > - <CodeIcon className='mr-1' /> - Incorporar - </Button> + {type != "perfil" && type != "colecao" ? ( + <Button + disableElevation + variant="outlined" + className="border text-lg normal-case text-darkGray-HC-white hover:bg-darkGray-HC-white hover:text-white-HC-dark border-lightGray-HC-white" + aria-label="Incorporar" + onClick={() => setEmbed(true)} + > + <CodeIcon className='mr-1' /> + Incorporar + </Button> + ) : null} + <Embed open={embed} onClose={() => setEmbed(false)} learningObject={learningObject} /> -- GitLab