Skip to content

Commit

Permalink
Merge pull request brave#12633 from brave/fix/12631
Browse files Browse the repository at this point in the history
Add warning about the privacy risks of torrenting
  • Loading branch information
bsclifton authored Jan 13, 2018
2 parents 0a9f1fb + 5a1eb33 commit 1e43f3d
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 16 deletions.
11 changes: 6 additions & 5 deletions app/extensions/torrent/locales/en-US/app.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
startPrompt=Start Downloading "{{name}}"?
startPromptUntitled=Start Downloading?
startDownload=Start Download
startPrompt=Start Torrenting "{{name}}"?
startPromptUntitled=Start Torrenting?
startDownload=Start Torrent
saveTorrentFile=Save Torrent File...
legalNotice=When you start a torrent, its data will be made available to others by means of upload. You are responsible for abiding by your local laws.
missingFilesList=Click "Start Download" to load the torrent file list.
privacyNoticeTitle=Privacy Warning:
privacyNotice=When you click "Start Torrent", Brave will download pieces of the torrent file from other users and upload pieces to them in turn. This will share the fact that you're downloading this file: other people will know what you're downloading, and they may also have access to your public IP address.
missingFilesList=Click "Start Torrent" to load the torrent file list.
loadingFilesList=Loading the torrent file list...
name=Name
size=Size
Expand Down
23 changes: 15 additions & 8 deletions js/webtorrent/components/torrentViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class TorrentViewer extends React.Component {
dispatch
} = this.props

let titleElem, mainButton, saveButton, legalNotice
let titleElem, mainButton, saveButton, privacyNotice

if (torrent) {
if (name) {
Expand All @@ -47,9 +47,9 @@ class TorrentViewer extends React.Component {
onClick={() => dispatch('stop')}
/>
)
legalNotice = (
privacyNotice = (
<a className={cx({
legalNotice: true,
footerText: true,
[css(commonStyles.userSelectNone)]: true
})}
data-l10n-id='poweredByWebTorrent'
Expand All @@ -73,10 +73,17 @@ class TorrentViewer extends React.Component {
onClick={() => dispatch('start')}
/>
)
legalNotice = <div className={cx({
legalNotice: true,
[css(commonStyles.userSelectNone)]: true
})} data-l10n-id='legalNotice' />
privacyNotice = <div className={
cx({
privacyNotice: true,
[css(commonStyles.userSelectNone)]: true
})
}>
<span className={cx({
boldFooterText: true,
})} data-l10n-id='privacyNoticeTitle' />
<span data-l10n-id='privacyNotice' />
</div>
}

if (torrentIdProtocol === 'magnet:') {
Expand Down Expand Up @@ -120,7 +127,7 @@ class TorrentViewer extends React.Component {
stateOwner={this}
/>

{legalNotice}
{privacyNotice}
</div>
</div>
)
Expand Down
15 changes: 12 additions & 3 deletions less/webtorrent.less
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,22 @@
color: red;
}

.legalNotice {
font-size: 9pt;
.privacyNotice {
margin-top: 15px;
color: @gray;
margin-right: 15px;
font-size: 12pt;
text-decoration: none; // for when legal notice is a link
}

.boldFooterText {
font-weight: bold;
}

.footerText {
font-size: 9pt;
margin-top: 15px;
color: @gray;
}

.content {
margin-top: 20px;
Expand Down

0 comments on commit 1e43f3d

Please sign in to comment.