Merge pull request #1201 from mozilla/html-pn

Html pn
This commit is contained in:
Danny Coates 2019-03-07 10:29:28 -08:00 committed by GitHub
commit 28e31f4870
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 150 additions and 116 deletions

View File

@ -1,5 +1,4 @@
const html = require('choo/html');
const raw = require('choo/html/raw');
const modal = require('./modal');
module.exports = function(state, emit) {
@ -11,53 +10,88 @@ module.exports = function(state, emit) {
>
<h1 class="text-center">${state.translate('legalTitle')}</h1>
<p class="mt-2">${state.translate('legalDateStamp')}</p>
<div class="overflow-scroll px-4">
${raw(
replaceLinks(state.translate('legalNoticeSend'), [
'https://www.mozilla.org/privacy/',
'https://github.com/mozilla/send/blob/master/docs/metrics.md'
])
)}
<ul class="mt-10 max-w-md leading-normal">
<div class="overflow-scroll py-8 px-12">
<p class="leading-normal">
When Mozilla receives information from you, our
<a
href="https://www.mozilla.org/privacy/"
target="__blank"
rel="noopener noreferrer"
>Mozilla Privacy Policy</a
>
describes how we handle that information. Below are the top things
you should know about Firefox Send. You can also view the code
<a
href="https://github.com/mozilla/send/blob/master/docs/metrics.md"
target="__blank"
rel="noopener noreferrer"
>here</a
>.
</p>
<ul class="mt-6 leading-normal">
<li class="mb-4">
<b>${state.translate('legalNoticeSendContentHeader')}:</b>
${state.translate('legalNoticeSendContent')}
<b>Content</b>: Mozilla receives an encrypted copy of the file you
upload but we cannot access the content or name of your encrypted
file. By default, files are stored for a maximum of either 24
hours or 7 days. If you choose a download cap, the file can be
deleted from our server sooner.
</li>
<li class="mb-4">
<b>${state.translate('legalNoticeSendDataHeader')}:</b>
${state.translate('legalNoticeSendData')}
<b>Data on your device</b>: So that you can check status or delete
files, basic information about your uploaded files is stored on
your local device. This includes our identifier for the file, the
filename, and the files unique download URL. This is cleared if
you delete your uploaded file or upon visiting Send after the file
expires. Note, however, that the URL will persist in your browsing
history (and with whomever you shared it) until manually deleted.
</li>
<li class="mb-4">
<b>${state.translate('legalNoticeSendPersonalHeader')}:</b>
${state.translate('legalNoticeSendPersonal')}:
<ul class="leading-normal">
<li class="my-4">
<u>${state.translate('legalNoticeSendIPHeader')}:</u>
${state.translate('legalNoticeSendIP')}
<b>Personal data</b>: The following is necessary to provide the
service:
<ul class="mt-6 leading-normal">
<li class="mb-4">
<u>IP addresses</u>: We receive IP addresses of downloaders
and uploaders as part of our standard server logs. These are
retained for 90 days, and for that period, may be connected to
activity of a files download URL. Although we develop our
services in ways that minimize identification, you should know
that it may be possible to correlate the IP address of a Send
user to the IP address of other Mozilla services with
accounts; and if there is a match, this could identify the
account email address.
</li>
<li class="mb-4">
<u>${state.translate('legalNoticeSendFXAHeader')}:</u>
${state.translate('legalNoticeSendFXA')}
<u>Firefox Account</u>: This is required for authentication
only if you wish to upload larger file sizes. Your Firefox
Account record will retain aggregate data on your usage of
Send: for example, if you created a Firefox Account in
connection with Send, number of files sent and approximate
file sizes, and how many times youve used the service.
</li>
</ul>
</li>
<li class="mb-4">
<b>${state.translate('legalNoticeSendNonPersonalHeader')}:</b>
${state.translate('legalNoticeSendNonPersonal')}:
<ul class="leading-normal">
<li class="my-4">
<u>${state.translate('legalNoticeSendInteractionHeader')}:</u>
${state.translate('legalNoticeSendInteraction')}
<b>Non-personal data</b>: We receive the following to improve our
service and performance:
<ul class="mt-6 leading-normal">
<li class="mb-4">
<u>Interaction data</u>: This includes information such as
number of people sending and receiving files, number of files
uploaded and approximate file sizes, percentage of file
downloaders who become uploaders, how people engage with the
website (time spent, clicks, referrer information, site exit
path, use of passwords).
</li>
<li class="mb-4">
<u>${state.translate('legalNoticeSendTechnicalHeader')}:</u>
${state.translate('legalNoticeSendTechnical')}
<u>Technical data</u>: This includes information such as
operating system, browser, language preference, country,
timestamps, duration for file transfer, reasons for errors,
reasons for file expiration.
</li>
</ul>
</li>
<li class="mb-4">
<b>${state.translate('legalNoticeSendThirdPartyHeader')}:</b>
${state.translate('legalNoticeSendThirdParty')}
<b>Third Party Services</b>: We use Google Cloud Platform.
</li>
</ul>
</div>
@ -65,12 +99,3 @@ module.exports = function(state, emit) {
</main>
`;
};
function replaceLinks(str, urls) {
let i = 0;
const s = str.replace(
/<a>([^<]+)<\/a>/g,
(m, v) => `<a class="text-blue" href="${urls[i++]}">${v}</a>`
);
return `<p class="mt-10 max-w-md leading-normal">${s}</p>`;
}

161
package-lock.json generated
View File

@ -5286,6 +5286,14 @@
"requires": {
"esm": "3.2.7",
"ws": "github:dannycoates/ws#c83cbb3bce478122cedcb8c475d9e86e1112824a"
},
"dependencies": {
"ws": {
"version": "github:dannycoates/ws#c83cbb3bce478122cedcb8c475d9e86e1112824a",
"requires": {
"async-limiter": "1.0.0"
}
}
}
},
"extend": {
@ -5993,8 +6001,8 @@
"dev": true,
"optional": true,
"requires": {
"delegates": "^1.0.0",
"readable-stream": "^2.0.6"
"delegates": "1.0.0",
"readable-stream": "2.3.6"
}
},
"balanced-match": {
@ -6009,7 +6017,7 @@
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0",
"balanced-match": "1.0.0",
"concat-map": "0.0.1"
}
},
@ -6083,7 +6091,7 @@
"dev": true,
"optional": true,
"requires": {
"minipass": "^2.2.1"
"minipass": "2.3.5"
}
},
"fs.realpath": {
@ -6100,14 +6108,14 @@
"dev": true,
"optional": true,
"requires": {
"aproba": "^1.0.3",
"console-control-strings": "^1.0.0",
"has-unicode": "^2.0.0",
"object-assign": "^4.1.0",
"signal-exit": "^3.0.0",
"string-width": "^1.0.1",
"strip-ansi": "^3.0.1",
"wide-align": "^1.1.0"
"aproba": "1.2.0",
"console-control-strings": "1.1.0",
"has-unicode": "2.0.1",
"object-assign": "4.1.1",
"signal-exit": "3.0.2",
"string-width": "1.0.2",
"strip-ansi": "3.0.1",
"wide-align": "1.1.3"
}
},
"glob": {
@ -6117,12 +6125,12 @@
"dev": true,
"optional": true,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
"fs.realpath": "1.0.0",
"inflight": "1.0.6",
"inherits": "2.0.3",
"minimatch": "3.0.4",
"once": "1.4.0",
"path-is-absolute": "1.0.1"
}
},
"has-unicode": {
@ -6139,7 +6147,7 @@
"dev": true,
"optional": true,
"requires": {
"safer-buffer": ">= 2.1.2 < 3"
"safer-buffer": "2.1.2"
}
},
"ignore-walk": {
@ -6149,7 +6157,7 @@
"dev": true,
"optional": true,
"requires": {
"minimatch": "^3.0.4"
"minimatch": "3.0.4"
}
},
"inflight": {
@ -6159,8 +6167,8 @@
"dev": true,
"optional": true,
"requires": {
"once": "^1.3.0",
"wrappy": "1"
"once": "1.4.0",
"wrappy": "1.0.2"
}
},
"inherits": {
@ -6182,7 +6190,7 @@
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
"dev": true,
"requires": {
"number-is-nan": "^1.0.0"
"number-is-nan": "1.0.1"
}
},
"isarray": {
@ -6198,7 +6206,7 @@
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true,
"requires": {
"brace-expansion": "^1.1.7"
"brace-expansion": "1.1.11"
}
},
"minimist": {
@ -6213,8 +6221,8 @@
"integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==",
"dev": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
"safe-buffer": "5.1.2",
"yallist": "3.0.3"
}
},
"minizlib": {
@ -6224,7 +6232,7 @@
"dev": true,
"optional": true,
"requires": {
"minipass": "^2.2.1"
"minipass": "2.3.5"
}
},
"mkdirp": {
@ -6250,9 +6258,9 @@
"dev": true,
"optional": true,
"requires": {
"debug": "^2.1.2",
"iconv-lite": "^0.4.4",
"sax": "^1.2.4"
"debug": "2.6.9",
"iconv-lite": "0.4.24",
"sax": "1.2.4"
}
},
"node-pre-gyp": {
@ -6262,16 +6270,16 @@
"dev": true,
"optional": true,
"requires": {
"detect-libc": "^1.0.2",
"mkdirp": "^0.5.1",
"needle": "^2.2.1",
"nopt": "^4.0.1",
"npm-packlist": "^1.1.6",
"npmlog": "^4.0.2",
"rc": "^1.2.7",
"rimraf": "^2.6.1",
"semver": "^5.3.0",
"tar": "^4"
"detect-libc": "1.0.3",
"mkdirp": "0.5.1",
"needle": "2.2.4",
"nopt": "4.0.1",
"npm-packlist": "1.2.0",
"npmlog": "4.1.2",
"rc": "1.2.8",
"rimraf": "2.6.3",
"semver": "5.6.0",
"tar": "4.4.8"
}
},
"nopt": {
@ -6281,8 +6289,8 @@
"dev": true,
"optional": true,
"requires": {
"abbrev": "1",
"osenv": "^0.1.4"
"abbrev": "1.1.1",
"osenv": "0.1.5"
}
},
"npm-bundled": {
@ -6299,8 +6307,8 @@
"dev": true,
"optional": true,
"requires": {
"ignore-walk": "^3.0.1",
"npm-bundled": "^1.0.1"
"ignore-walk": "3.0.1",
"npm-bundled": "1.0.5"
}
},
"npmlog": {
@ -6310,10 +6318,10 @@
"dev": true,
"optional": true,
"requires": {
"are-we-there-yet": "~1.1.2",
"console-control-strings": "~1.1.0",
"gauge": "~2.7.3",
"set-blocking": "~2.0.0"
"are-we-there-yet": "1.1.5",
"console-control-strings": "1.1.0",
"gauge": "2.7.4",
"set-blocking": "2.0.0"
}
},
"number-is-nan": {
@ -6335,7 +6343,7 @@
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"dev": true,
"requires": {
"wrappy": "1"
"wrappy": "1.0.2"
}
},
"os-homedir": {
@ -6359,8 +6367,8 @@
"dev": true,
"optional": true,
"requires": {
"os-homedir": "^1.0.0",
"os-tmpdir": "^1.0.0"
"os-homedir": "1.0.2",
"os-tmpdir": "1.0.2"
}
},
"path-is-absolute": {
@ -6384,10 +6392,10 @@
"dev": true,
"optional": true,
"requires": {
"deep-extend": "^0.6.0",
"ini": "~1.3.0",
"minimist": "^1.2.0",
"strip-json-comments": "~2.0.1"
"deep-extend": "0.6.0",
"ini": "1.3.5",
"minimist": "1.2.0",
"strip-json-comments": "2.0.1"
},
"dependencies": {
"minimist": {
@ -6406,13 +6414,13 @@
"dev": true,
"optional": true,
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "1.0.0",
"process-nextick-args": "2.0.0",
"safe-buffer": "5.1.2",
"string_decoder": "1.1.1",
"util-deprecate": "1.0.2"
}
},
"rimraf": {
@ -6422,7 +6430,7 @@
"dev": true,
"optional": true,
"requires": {
"glob": "^7.1.3"
"glob": "7.1.3"
}
},
"safe-buffer": {
@ -6472,9 +6480,9 @@
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"dev": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
"strip-ansi": "^3.0.0"
"code-point-at": "1.1.0",
"is-fullwidth-code-point": "1.0.0",
"strip-ansi": "3.0.1"
}
},
"string_decoder": {
@ -6484,7 +6492,7 @@
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "~5.1.0"
"safe-buffer": "5.1.2"
}
},
"strip-ansi": {
@ -6493,7 +6501,7 @@
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true,
"requires": {
"ansi-regex": "^2.0.0"
"ansi-regex": "2.1.1"
}
},
"strip-json-comments": {
@ -6510,13 +6518,13 @@
"dev": true,
"optional": true,
"requires": {
"chownr": "^1.1.1",
"fs-minipass": "^1.2.5",
"minipass": "^2.3.4",
"minizlib": "^1.1.1",
"mkdirp": "^0.5.0",
"safe-buffer": "^5.1.2",
"yallist": "^3.0.2"
"chownr": "1.1.1",
"fs-minipass": "1.2.5",
"minipass": "2.3.5",
"minizlib": "1.2.1",
"mkdirp": "0.5.1",
"safe-buffer": "5.1.2",
"yallist": "3.0.3"
}
},
"util-deprecate": {
@ -6533,7 +6541,7 @@
"dev": true,
"optional": true,
"requires": {
"string-width": "^1.0.2 || 2"
"string-width": "1.0.2"
}
},
"wrappy": {
@ -17351,6 +17359,7 @@
},
"ws": {
"version": "github:dannycoates/ws#c83cbb3bce478122cedcb8c475d9e86e1112824a",
"dev": true,
"requires": {
"async-limiter": "1.0.0"
}