This repository has been archived by the owner on Jan 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
bd4e8c2
commit ab6a6fe
Showing
6 changed files
with
67 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
const React = require("react"); | ||
const { Localized } = require("fluent-react/compat"); | ||
const { Footer } = require("../../footer-view.js"); | ||
const sendEvent = require("../../browser-send-event.js"); | ||
|
||
exports.ShotFooter = class ShotFooter extends Footer { | ||
updateLinks() { | ||
if (this.props.isOwner) { | ||
this.links.push(<li key="removedata"> | ||
<Localized id="footerLinkRemoveAllData"><a href="/leave-screenshots">Remove All Data</a></Localized> | ||
</li>); | ||
} else { | ||
const dmcaIdx = this.links.findIndex(link => link.key === "dmca"); | ||
if (dmcaIdx !== -1) { | ||
this.links.splice(dmcaIdx, 0, | ||
<li key="reportshot"><Localized id="footerReportShot"> | ||
<a href={`https://qsurvey.mozilla.com/s3/screenshots-flagged-shots?ref=${this.props.id}`} | ||
title="Report this shot for abuse, spam, or other problems" | ||
target="_blank" rel="noopener noreferrer" | ||
onClick={this.onReportShot.bind(this)}>Report Shot</a> | ||
</Localized></li>); | ||
} | ||
} | ||
} | ||
|
||
onReportShot() { | ||
sendEvent("start-flag", "navbar", {useBeacon: true}); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const React = require("react"); | ||
const { Localized } = require("fluent-react/compat"); | ||
const { Footer } = require("../../footer-view.js"); | ||
|
||
exports.MyShotsFooter = class MyShotsFooter extends Footer { | ||
updateLinks() { | ||
this.links.push(<li key="removedata"> | ||
<Localized id="footerLinkRemoveAllData"><a href="/leave-screenshots">Remove All Data</a></Localized> | ||
</li>); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters