Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix social notices #92

Merged
merged 2 commits into from
Nov 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions src/components/table.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ function Entry({ name, data }) {
);
}

const mfaPopoverConfig = {
html: true,
sanitize: false,
trigger: "hover focus"
};

function Methods({ methods, customSoftware, customHardware }) {
useEffect(() => {
[...document.querySelectorAll('.note')].map((el) => new Popover(el, {
Expand Down Expand Up @@ -149,13 +155,6 @@ function CustomMethods({ type, methods }) {
: <span class="icon-info" title={`Requires proprietary ${type === "hardware" ? "hardware token" : "app/software"}`}></span>;
}

// Intialize popovers
const mfaPopoverConfig = {
html: true,
sanitize: false,
trigger: "hover focus"
};

// Social Media Notices
/**
* Alert the user to the privacy implications of posting on social media.
Expand All @@ -180,8 +179,8 @@ function Contact({ contact }) {
return (
<div aria-label="2FA not supported" className="contact">
{contact.twitter && (<button className="contact-btn twitter" onClick={() => socialMediaNotice("tweet", lang, contact.twitter)}></button>)}
{contact.facebook && (<button className="contact-btn facebook" onClick={() => socialMediaNotice("facebook", lang, contact.twitter)}></button>)}
{contact.email && (<button className="contact-btn email" onClick={() => socialMediaNotice("email", lang, contact.twitter)}></button>)}
{contact.facebook && (<button className="contact-btn facebook" onClick={() => socialMediaNotice("facebook", lang, contact.facebook)}></button>)}
{contact.email && (<button className="contact-btn email" onClick={() => socialMediaNotice("email", lang, contact.email)}></button>)}
{contact.form && (<button className="contact-btn form" onClick={() => window.open(contact.form, "_blank")}></button>)}
</div>
);
Expand Down