diff --git a/src/components/ActionBar.tsx b/src/components/ActionBar.tsx index aa3f761..dc37e85 100644 --- a/src/components/ActionBar.tsx +++ b/src/components/ActionBar.tsx @@ -17,6 +17,11 @@ interface ActionBarProps { showVerifyProof?: boolean; // If true, show verify proof button instead of verify button proofVerified?: boolean; hasMaskedContent?: boolean; // If false, disable the View & Download button + // NOTE: inline=true renders the bar in normal page flow instead of pinned to the viewport + // bottom. Used when the verify page is embedded in an iframe: there the viewport is short, so + // the fixed bar sat on top of the email text and, below the md breakpoint, showed only an + // unlabeled icon. Removing this brings that overlap back for every embed. + inline?: boolean; } export default function ActionBar({ @@ -31,6 +36,7 @@ export default function ActionBar({ showVerifyProof = false, proofVerified = false, hasMaskedContent = false, + inline = false, }: ActionBarProps) { const verifyLabel = isVerifyingProof ? "Verifying..." @@ -44,7 +50,13 @@ export default function ActionBar({ const isViewDownloadDisabled = isGeneratingProof || !hasMaskedContent; return ( -
+
{/* {!showVerifyProof && ( @@ -95,7 +107,7 @@ export default function ActionBar({ )}
diff --git a/src/pages/VerifyPage.tsx b/src/pages/VerifyPage.tsx index 44468b4..f75f816 100644 --- a/src/pages/VerifyPage.tsx +++ b/src/pages/VerifyPage.tsx @@ -305,11 +305,23 @@ export default function VerifyPage() { ); } + // NOTE: when this page is iframed (e.g. a blog embedding a proof), render the action bar + // inline after the email instead of fixed to the viewport, so it can't cover the email text. + // Accessing window.top can throw for cross-origin parents in some browsers; treat that as embedded. + let isEmbedded = false; + try { + isEmbedded = window.self !== window.top; + } catch { + isEmbedded = true; + } + return (
-
+ {/* NOTE: pb-32 reserves room for the fixed action bar on the standalone page, so the end of + the email can scroll clear of it instead of staying hidden underneath. */} +
{/* Verification Status Banner */} {verificationStatus && ( @@ -411,15 +423,15 @@ export default function VerifyPage() {
+ - - setShowVerificationModal(false)}