Compare commits

..

934 Commits

Author SHA1 Message Date
Danny Coates
cbd7a99e38 v3.0.8 2019-03-18 16:26:12 -07:00
Danny Coates
6a5960c254 updated CONTRIBUTORS 2019-03-18 15:38:28 -07:00
Danny Coates
b70cbd8359 Merge pull request #1259 from co16353sidak/patch-1
Updated file size limit (as of March 2019)
2019-03-18 15:33:35 -07:00
Danny Coates
ad72fa11a4 added locales to production 2019-03-18 15:26:06 -07:00
Danny Coates
cc9a5d112a added entrypoint param to fxa auth request 2019-03-18 15:01:01 -07:00
Danny Coates
122867b926 updated webcrypto-liner 2019-03-18 12:43:20 -07:00
Michal Stanke
3f7d755070 Pontoon: Update Czech (cs) localization of Firefox Send
Localization authors:
- Michal Stanke <mstanke@mozilla.cz>
2019-03-18 18:11:34 +00:00
Danny Coates
ad9070b7c6 changed webpack output filenames to use contenthash 2019-03-17 19:21:28 -07:00
Sidak Singh Aulakh
30678b824b Updated file size limit (as of March 2019)
The file size limit was previously marked as 2 hours, but now it supports 2.5GB (1GB for non signed in users)
2019-03-17 21:44:01 +05:30
josotrix
5dedad8ae7 Pontoon: Update Spanish (Chile) (es-CL) localization of Firefox Send
Localization authors:
- josotrix <josotrix@ravmn.cl>
- ravmn <ravmn@ravmn.cl>
2019-03-17 15:53:11 +00:00
victor.gonzalezro
748f8cc7f8 Pontoon: Update Spanish (Chile) (es-CL) localization of Firefox Send
Localization authors:
- victor.gonzalezro <victor.gonzalezro@gmail.com>
- josotrix <josotrix@ravmn.cl>
2019-03-16 19:51:52 +00:00
Victor Bychek
be9b51adbb Pontoon: Update Russian (ru) localization of Firefox Send
Localization authors:
- MytnikAA <MytnikAA@gmail.com>
- Victor Bychek <a@bychek.ru>
2019-03-16 16:32:15 +00:00
Danny Coates
7f13d4d9b6 fixed incorrect uncompressed size in zip 2019-03-16 09:19:28 -07:00
Edi Santoso
0e81ef2514 Pontoon: Update Indonesian (id) localization of Firefox Send
Localization authors:
- Edi Santoso <repopamor@gmail.com>
2019-03-16 14:12:13 +00:00
Björn I
b0907095e4 Pontoon: Update Norwegian Nynorsk (nn-NO) localization of Firefox Send
Localization authors:
- Björn I. <bjorni.svindseth@yahoo.com>
2019-03-16 12:12:58 +00:00
Piotr Drąg
c4cc736cff Pontoon: Update Polish (pl) localization of Firefox Send
Localization authors:
- tomowoj <tomowoj@gmail.com>
- Piotr Drąg <piotrdrag@gmail.com>
- Paweł <bauerp@bauerp.info>
2019-03-16 11:18:13 +00:00
Piotr Drąg
c4118c5684 Pontoon: Update Polish (pl) localization of Firefox Send
Localization authors:
- tomowoj <tomowoj@gmail.com>
- Piotr Drąg <piotrdrag@gmail.com>
- Paweł <bauerp@bauerp.info>
2019-03-16 10:52:16 +00:00
Jakob Kappel
fad35cf8fc Pontoon: Update Danish (da) localization of Firefox Send
Localization authors:
- Jakob Kappel <jakobkpetersen@gmail.com>
2019-03-16 09:32:00 +00:00
Edi Santoso
062cbbd1f8 Pontoon: Update Indonesian (id) localization of Firefox Send
Localization authors:
- Francesco Lodolo <francesco.lodolo@mozillaitalia.org>
- Edi Santoso <repopamor@gmail.com>
2019-03-16 06:32:00 +00:00
dskmori
f200bd51d2 Pontoon: Update Japanese (ja) localization of Firefox Send
Localization authors:
- dskmori <ghoti.fish.dsk@gmail.com>
2019-03-16 02:52:18 +00:00
Enol
152616574f Pontoon: Update Asturian (ast) localization of Firefox Send
Localization authors:
- Enol <enolp@softastur.org>
2019-03-15 18:52:57 +00:00
Enol
822fcb363d Pontoon: Update Asturian (ast) localization of Firefox Send
Localization authors:
- Enol <enolp@softastur.org>
2019-03-15 18:32:08 +00:00
Enol
e1c6e59495 Pontoon: Update Asturian (ast) localization of Firefox Send
Localization authors:
- Enol <enolp@softastur.org>
2019-03-15 18:12:41 +00:00
Danny Coates
d42d8f8b75 v3.0.7 2019-03-15 09:40:03 -07:00
Danny Coates
ebbb1d05d2 use crypto.timingSafeEqual in hmac and ownerToken authentication 2019-03-14 22:09:34 -07:00
Melo46
67b55d1477 Pontoon: Update Interlingua (ia) localization of Firefox Send
Localization authors:
- Melo46 <melo@carmu.com>
2019-03-14 23:52:14 +00:00
Danny Coates
e3391ca823 Merge pull request #1242 from mgalicer/fix-1130
[Integration-Test] Add test to ensure that file size stays consistent
2019-03-14 14:54:37 -07:00
ravmn
0cac3bd0dc Pontoon: Update Spanish (Chile) (es-CL) localization of Firefox Send
Localization authors:
- victor.gonzalezro <victor.gonzalezro@gmail.com>
- josotrix <josotrix@ravmn.cl>
- ravmn <ravmn@ravmn.cl>
2019-03-14 21:52:00 +00:00
Juan Sián
78de0b7a22 Pontoon: Update Kaqchikel (cak) localization of Firefox Send
Localization authors:
- Juan Sián <ajtzibsyan@yahoo.com>
2019-03-14 21:51:56 +00:00
Juraj Cigáň
14308dc491 Pontoon: Update Slovak (sk) localization of Firefox Send
Localization authors:
- Juraj Cigáň <kusavica@gmail.com>
2019-03-14 21:31:50 +00:00
Danny Coates
f690e4a705 v3.0.6 2019-03-14 13:19:25 -07:00
Danny Coates
3e14d3049d only index / route 2019-03-14 13:17:47 -07:00
Danny Coates
6a6f8b86e4 v3.0.5 2019-03-14 12:04:01 -07:00
Danny Coates
c4891c3866 fixed req.route bug when no routes match 2019-03-14 12:02:36 -07:00
Danny Coates
5d0d5ef858 v3.0.4 2019-03-14 11:44:42 -07:00
Danny Coates
4e26c6ab75 added robots meta tag 2019-03-14 11:40:01 -07:00
julenx
7413a3336a Pontoon: Update Basque (eu) localization of Firefox Send
Localization authors:
- p.sanroman.bengoetxea <p.sanroman.bengoetxea@gmail.com>
- julenx <julenx@gmail.com>
- Ander Elortondo <ander.elor@gmail.com>
2019-03-14 17:52:22 +00:00
Artem Polivanchuk
ef825206a4 Pontoon: Update Ukrainian (uk) localization of Firefox Send
Localization authors:
- Artem Polivanchuk <artem@mozilla.org.ua>
2019-03-14 15:11:51 +00:00
stripTM
f6a2e3ef53 Pontoon: Update Spanish (Spain) (es-ES) localization of Firefox Send
Localization authors:
- avelper <avelper@mozilla-hispano.org>
- stripTM <striptm@yahoo.com>
2019-03-14 12:32:53 +00:00
Rhoslyn Prys
98bf370ccb Pontoon: Update Welsh (cy) localization of Firefox Send
Localization authors:
- Rhoslyn Prys <rprys@posteo.net>
2019-03-14 08:51:39 +00:00
Mikeyy
1e9e9d6494 Pontoon: Update Croatian (hr) localization of Firefox Send
Localization authors:
- Mikeyy <mihovil@miho.im>
2019-03-14 08:32:08 +00:00
Artem Polivanchuk
c698b39d5c Pontoon: Update Ukrainian (uk) localization of Firefox Send
Localization authors:
- Artem Polivanchuk <artem@mozilla.org.ua>
2019-03-14 07:13:37 +00:00
Melo46
109ee6aa29 Pontoon: Update Interlingua (ia) localization of Firefox Send
Localization authors:
- Melo46 <melo@carmu.com>
2019-03-14 05:32:26 +00:00
Melo46
fe9ed5f001 Pontoon: Update Interlingua (ia) localization of Firefox Send
Localization authors:
- Melo46 <melo@carmu.com>
2019-03-14 05:16:00 +00:00
Hyeonseok Shin
84d74a096c Pontoon: Update Korean (ko) localization of Firefox Send
Localization authors:
- Hyeonseok Shin <hyeonseok@gmail.com>
- dskmori <ghoti.fish.dsk@gmail.com>
2019-03-14 02:12:19 +00:00
victor.gonzalezro
770d276f6d Pontoon: Update Spanish (Chile) (es-CL) localization of Firefox Send
Localization authors:
- victor.gonzalezro <victor.gonzalezro@gmail.com>
- ravmn <ravmn@ravmn.cl>
2019-03-14 00:32:17 +00:00
G12r
ddf69120e8 Pontoon: Update Georgian (ka) localization of Firefox Send
Localization authors:
- G12r <georgianization@outlook.com>
2019-03-14 00:32:15 +00:00
G12r
6c583e09a7 Pontoon: Update Georgian (ka) localization of Firefox Send
Localization authors:
- G12r <georgianization@outlook.com>
2019-03-14 00:11:37 +00:00
Danny Coates
677ff65e8d Merge pull request #1227 from jrbenny35/run-download-tests-on-ci
Update config for running download tests on CI
2019-03-13 16:11:34 -07:00
Anika Dorn
8445657b72 Pontoon: Update German (de) localization of Firefox Send
Localization authors:
- Anika Dorn <adorn@mozilla.com>
2019-03-13 20:53:06 +00:00
Andreas Pettersson
33ef1f33a5 Pontoon: Update Swedish (sv-SE) localization of Firefox Send
Localization authors:
- Andreas Pettersson <az@kth.se>
2019-03-13 20:32:15 +00:00
Anika Dorn
ff79662b72 Pontoon: Update German (de) localization of Firefox Send
Localization authors:
- Anika Dorn <adorn@mozilla.com>
2019-03-13 20:32:13 +00:00
marigalicer
0012dec277 [Integration-Test] Add test to ensure that file size stays consistent
fixes #1130
2019-03-13 16:03:44 -04:00
Danny Coates
a648c5ead9 v3.0.3 2019-03-13 12:14:48 -07:00
Danny Coates
017bb0d146 wrap openid-config request in try/catch 2019-03-13 12:07:59 -07:00
Danny Coates
555c615711 Merge pull request #1237 from mozilla/quick-style-banner
style banner
2019-03-13 11:42:14 -07:00
Danny Coates
ce8dba4200 fixed disappearing header in Chrome 2019-03-13 11:40:51 -07:00
Rimas Kudelis
44dcf8a260 Pontoon: Update Lithuanian (lt) localization of Firefox Send
Localization authors:
- Rimas Kudelis <rimas@mozilla.lt>
2019-03-13 18:31:34 +00:00
Danny Coates
e702022d7f default accept-language to en-US when regexp does not match 2019-03-13 11:30:37 -07:00
John Gruen
4ee80abce9 style banner 2019-03-13 19:16:58 +01:00
Kohei Yoshino
45d9bdb577 Pontoon: Update English (Canada) (en-CA) localization of Firefox Send
Localization authors:
- Kohei Yoshino <kohei.yoshino@gmail.com>
2019-03-13 18:11:00 +00:00
Piotr Drąg
013cca5d86 Pontoon: Update Polish (pl) localization of Firefox Send
Localization authors:
- Piotr Drąg <piotrdrag@gmail.com>
2019-03-13 17:51:58 +00:00
Ander Elortondo
0bf162592f Pontoon: Update Basque (eu) localization of Firefox Send
Localization authors:
- julenx <julenx@gmail.com>
- Ander Elortondo <ander.elor@gmail.com>
2019-03-13 17:51:55 +00:00
Danny Coates
da6cbc05c2 added more locales to production 2019-03-13 10:44:23 -07:00
Danny Coates
d28da3247d enable promo banner 2019-03-13 10:30:27 -07:00
Danny Coates
44043b54b3 Merge pull request #1235 from christopher-ramirez/master
Fix link to dev.js and prod.js files.
2019-03-13 09:23:40 -07:00
Danny Coates
813ddc6c6c Merge pull request #1231 from aaaaalbert/fix-small-typo-in-docs-encryption
Fix a small typo in docs/encryption.md: it's --> its
2019-03-13 09:22:59 -07:00
Danny Coates
1b9c02d86c Merge pull request #1230 from airuikun/master
【typo fixed】1.an download ---> a download  2.be at issue ---> be an i…
2019-03-13 09:22:18 -07:00
Jordi Serratosa
135b4a9669 Pontoon: Update Catalan (ca) localization of Firefox Send
Localization authors:
- Jordi Serratosa <jordis@softcatala.cat>
2019-03-13 15:51:28 +00:00
Jordi Serratosa
426464641f Pontoon: Update Catalan (ca) localization of Firefox Send
Localization authors:
- Jordi Serratosa <jordis@softcatala.cat>
2019-03-13 15:33:13 +00:00
Rodrigo
9ea3b19b8e Pontoon: Update Portuguese (Portugal) (pt-PT) localization of Firefox Send
Localization authors:
- Rodrigo <rodrigo.mcunha@hotmail.com>
2019-03-13 14:51:50 +00:00
Marcelo Ghelman
4a8bfd829b Pontoon: Update Portuguese (Brazil) (pt-BR) localization of Firefox Send
Localization authors:
- Marcelo Ghelman <marcelo.ghelman@gmail.com>
2019-03-13 14:51:47 +00:00
Michael Köhler
f40bfe6a96 Pontoon: Update German (de) localization of Firefox Send
Localization authors:
- Michael Köhler <michael.koehler1@gmx.de>
2019-03-13 14:51:44 +00:00
Benjamin Forehand Jr
3f8ebdaf4b Remove extra changes from package.json. 2019-03-13 10:02:36 -04:00
Christopher Ramírez
f3fb433531 Fix link to dev.js and prod.js files.
The links on readme.md were pointing to no longer existant files.
With this PR these links are updated to the new location of the
files inside the ./bin directory.
2019-03-13 07:45:55 -06:00
Gabriela
d7f097a2e0 Pontoon: Update Spanish (Argentina) (es-AR) localization of Firefox Send
Localization authors:
- Gabriela <gmontagu@gmail.com>
2019-03-13 13:32:19 +00:00
Michal Vašíček
1c42f2b397 Pontoon: Update Czech (cs) localization of Firefox Send
Localization authors:
- Michal Vašíček <mvasicek@mozilla.cz>
- Michal Stanke <mstanke@mozilla.cz>
2019-03-13 12:51:29 +00:00
aaaaalbert
ae7f7de28a Fix small typo in docs/encryption.md: it's --> its 2019-03-13 13:28:45 +01:00
Selim Şumlu
bfb9b7ea4e Pontoon: Update Turkish (tr) localization of Firefox Send
Localization authors:
- Selim Şumlu <selim@sum.lu>
2019-03-13 12:12:36 +00:00
Balázs Meskó
761c041069 Pontoon: Update Hungarian (hu) localization of Firefox Send
Localization authors:
- Balázs Meskó <meskobalazs@gmail.com>
2019-03-13 10:51:40 +00:00
Belayet Hossain
85fa38df53 Pontoon: Update Bengali (Bangladesh) (bn-BD) localization of Firefox Send
Localization authors:
- Belayet Hossain <bellayet@gmail.com>
2019-03-13 10:51:36 +00:00
Michael Wolf
d0cd84f5f5 Pontoon: Update Sorbian, Upper (hsb) localization of Firefox Send
Localization authors:
- Michael Wolf <milupo@sorbzilla.de>
2019-03-13 10:31:23 +00:00
Michael Wolf
35af2cf0a1 Pontoon: Update Sorbian, Lower (dsb) localization of Firefox Send
Localization authors:
- Michael Wolf <milupo@sorbzilla.de>
2019-03-13 10:31:20 +00:00
ruikunai
d2d472e2b4 【typo fixed】1.an download ---> a download 2.be at issue ---> be an issue 3.the the hamburger menu ---> the hamburger menu 2019-03-13 18:15:36 +08:00
goofy
773bea01fb Pontoon: Update French (fr) localization of Firefox Send
Localization authors:
- Théo Chevalier <theo.chevalier11@gmail.com>
- goofy <goofy@babelzilla.org>
2019-03-13 09:12:08 +00:00
Fjoerfoks
158575a2ff Pontoon: Update Frisian (fy-NL) localization of Firefox Send
Localization authors:
- Fjoerfoks <fryskefirefox@gmail.com>
2019-03-13 08:51:33 +00:00
Pin-guang Chen
f2f504c93d Pontoon: Update Chinese (Taiwan) (zh-TW) localization of Firefox Send
Localization authors:
- Pin-guang Chen <petercpg@mail.moztw.org>
2019-03-13 08:32:25 +00:00
Quế Tùng
ff9d45eb71 Pontoon: Update Vietnamese (vi) localization of Firefox Send
Localization authors:
- Quế Tùng <best.cloney.1301@gmail.com>
2019-03-13 08:12:20 +00:00
passionforlife
b133be9f01 Pontoon: Update Chinese (China) (zh-CN) localization of Firefox Send
Localization authors:
- passionforlife <eloli@foxmail.com>
2019-03-13 07:31:27 +00:00
Mark Heijl
9b1c1feb80 Pontoon: Update Dutch (nl) localization of Firefox Send
Localization authors:
- Mark Heijl <markh@babelzilla.org>
2019-03-13 06:52:22 +00:00
Quế Tùng
f2e8d3e988 Pontoon: Update Vietnamese (vi) localization of Firefox Send
Localization authors:
- Quế Tùng <best.cloney.1301@gmail.com>
2019-03-13 06:32:25 +00:00
Rok Žerdin
d29ded2c79 Pontoon: Update Slovenian (sl) localization of Firefox Send
Localization authors:
- Rok Žerdin <zerdo90@gmail.com>
2019-03-13 06:32:22 +00:00
Francesco Lodolo
160bfed7a9 Pontoon: Update Italian (it) localization of Firefox Send
Localization authors:
- Francesco Lodolo <francesco.lodolo@mozillaitalia.org>
2019-03-13 06:32:19 +00:00
Marcelo Ghelman
9e3d28a98a Pontoon: Update Portuguese (Brazil) (pt-BR) localization of Firefox Send
Localization authors:
- Marcelo Ghelman <marcelo.ghelman@gmail.com>
2019-03-13 05:52:35 +00:00
Michal Stanke
8728402d14 Pontoon: Update Czech (cs) localization of Firefox Send
Localization authors:
- Michal Stanke <mstanke@mozilla.cz>
2019-03-13 05:32:28 +00:00
Rok Žerdin
e215738c67 Pontoon: Update Slovenian (sl) localization of Firefox Send
Localization authors:
- Rok Žerdin <zerdo90@gmail.com>
2019-03-13 05:13:04 +00:00
Danny Coates
f4e185bdc0 Merge pull request #1213 from mozilla/localized-filesize
localize file sizes
2019-03-12 21:49:36 -07:00
Danny Coates
adf9c7b96f localize file sizes 2019-03-12 21:46:50 -07:00
Danny Coates
f78e025d33 disable streaming download if registering sw fails. fixes #1226 2019-03-12 20:53:54 -07:00
Benjamin Forehand Jr
6559afba37 Fix port. 2019-03-12 20:56:31 -04:00
Benjamin Forehand Jr
f07988426b Fix permissions. 2019-03-12 20:52:41 -04:00
Benjamin Forehand Jr
bada0707c5 Update config for running download tests on CI 2019-03-12 20:47:54 -04:00
Danny Coates
9da70931e4 body overflow-x: hidden. fixes #1219 2019-03-12 13:36:46 -07:00
Selim Şumlu
43ad9ad057 Pontoon: Update Turkish (tr) localization of Firefox Send
Localization authors:
- Selim Şumlu <selim@sum.lu>
2019-03-12 19:11:35 +00:00
Selim Şumlu
e08146ebfd Pontoon: Update Turkish (tr) localization of Firefox Send
Localization authors:
- Selim Şumlu <selim@sum.lu>
2019-03-12 18:52:00 +00:00
Juraj Cigáň
88c97a199d Pontoon: Update Slovak (sk) localization of Firefox Send
Localization authors:
- Juraj Cigáň <kusavica@gmail.com>
2019-03-12 18:51:57 +00:00
Selim Şumlu
5105de66f8 Pontoon: Update Turkish (tr) localization of Firefox Send
Localization authors:
- Selim Şumlu <selim@sum.lu>
2019-03-12 18:31:47 +00:00
Danny Coates
cdff2884cd Merge pull request #1220 from mozilla/really-use-send.firefox.com
Really switch the android beta to use send.firefox.com.
2019-03-12 11:10:57 -07:00
Donovan Preston
862fedb420 Really switch the android beta to use send.firefox.com. 2019-03-12 13:59:30 -04:00
Björn I
3e5fa8525f Pontoon: Update Norwegian Nynorsk (nn-NO) localization of Firefox Send
Localization authors:
- Björn I. <bjorni.svindseth@yahoo.com>
2019-03-12 17:52:09 +00:00
Björn I
7eb43d9046 Pontoon: Update Norwegian Nynorsk (nn-NO) localization of Firefox Send
Localization authors:
- Björn I. <bjorni.svindseth@yahoo.com>
2019-03-12 17:32:16 +00:00
Danny Coates
30fc4e7e08 Merge pull request #1216 from mozilla/new-package-name-and-release-server
Switch the package name, for signing with a new key; switch the server to send.firefox.com
2019-03-12 10:05:02 -07:00
Danny Coates
2f3e4c72c3 v3.0.2 2019-03-12 10:02:38 -07:00
Danny Coates
d6becdcf3c fixed meta image urls 2019-03-12 09:57:26 -07:00
Donovan Preston
8c59e54677 Switch the package name, for signing with a new key; switch the server to send.firefox.com 2019-03-12 12:35:45 -04:00
Danny Coates
d068dd2954 Revert "updated legal page. closes #1214"
This reverts commit 2f50c29152.
2019-03-12 09:34:52 -07:00
Marcelo Ghelman
4157f5264d Pontoon: Update Portuguese (Brazil) (pt-BR) localization of Firefox Send
Localization authors:
- Marcelo Ghelman <marcelo.ghelman@gmail.com>
2019-03-12 16:32:14 +00:00
Belayet Hossain
2edd0cbc36 Pontoon: Update Bengali (Bangladesh) (bn-BD) localization of Firefox Send
Localization authors:
- Belayet Hossain <bellayet@gmail.com>
2019-03-12 16:32:11 +00:00
Belayet Hossain
0c013f38ee Pontoon: Update Bengali (Bangladesh) (bn-BD) localization of Firefox Send
Localization authors:
- Belayet Hossain <bellayet@gmail.com>
2019-03-12 16:11:21 +00:00
Belayet Hossain
767ae24083 Pontoon: Update Bengali (Bangladesh) (bn-BD) localization of Firefox Send
Localization authors:
- Belayet Hossain <bellayet@gmail.com>
2019-03-12 15:51:29 +00:00
Danny Coates
7710cf98e9 fixed paste email bug 2019-03-12 08:37:43 -07:00
Belayet Hossain
5b4f623070 Pontoon: Update Bengali (Bangladesh) (bn-BD) localization of Firefox Send
Localization authors:
- Belayet Hossain <bellayet@gmail.com>
2019-03-12 15:32:14 +00:00
Belayet Hossain
b4220010ee Pontoon: Update Bengali (Bangladesh) (bn-BD) localization of Firefox Send
Localization authors:
- Belayet Hossain <bellayet@gmail.com>
2019-03-12 15:11:46 +00:00
Danny Coates
60ba8429d6 v3.0.1 2019-03-12 08:08:12 -07:00
Danny Coates
2f50c29152 updated legal page. closes #1214 2019-03-12 07:52:54 -07:00
Belayet Hossain
26bc3fa5a1 Pontoon: Update Bengali (Bangladesh) (bn-BD) localization of Firefox Send
Localization authors:
- Belayet Hossain <bellayet@gmail.com>
2019-03-12 14:51:42 +00:00
Danny Coates
0c458e180c error if file from localStorage is old (no manifest) 2019-03-12 07:39:50 -07:00
Rodrigo
c908f0a927 Pontoon: Update Portuguese (Portugal) (pt-PT) localization of Firefox Send
Localization authors:
- Rodrigo <rodrigo.mcunha@hotmail.com>
2019-03-12 14:32:04 +00:00
dskmori
b3cfcf3fd3 Pontoon: Update Japanese (ja) localization of Firefox Send
Localization authors:
- dskmori <ghoti.fish.dsk@gmail.com>
2019-03-12 13:57:20 +00:00
Francesco Lodolo
986d70a521 Pontoon: Update Italian (it) localization of Firefox Send
Localization authors:
- Francesco Lodolo <francesco.lodolo@mozillaitalia.org>
2019-03-12 13:57:17 +00:00
dskmori
653a1a44e9 Pontoon: Update Japanese (ja) localization of Firefox Send
Localization authors:
- dskmori <ghoti.fish.dsk@gmail.com>
2019-03-12 12:51:42 +00:00
Rok Žerdin
d06a7a01be Pontoon: Update Slovenian (sl) localization of Firefox Send
Localization authors:
- Rok Žerdin <zerdo90@gmail.com>
- Matjaž Horvat <matjaz.horvat@gmail.com>
2019-03-12 09:11:42 +00:00
Danny Coates
163899467d check capabilities.account before showing upsell button 2019-03-11 19:02:44 -07:00
Danny Coates
15704cb6dc updated prod locales for v3 2019-03-11 13:45:34 -07:00
Mark Heijl
3d7c87e4dc Pontoon: Update Dutch (nl) localization of Firefox Send
Localization authors:
- Mark Heijl <markh@babelzilla.org>
- Ton <tonnes.mb@gmail.com>
2019-03-11 18:32:10 +00:00
Danny Coates
d3438a52ac try android share before navigator.share 2019-03-11 10:43:32 -07:00
Mark Heijl
03b86cf772 Pontoon: Update Dutch (nl) localization of Firefox Send
Localization authors:
- Mark Heijl <markh@babelzilla.org>
2019-03-11 14:32:47 +00:00
Lan Glad
100aab06c3 Pontoon: Update Slovenian (sl) localization of Firefox Send
Localization authors:
- Lan Glad <upwinxp@gmail.com>
2019-03-11 12:31:35 +00:00
Mark Heijl
6e69e57120 Pontoon: Update Dutch (nl) localization of Firefox Send
Localization authors:
- Mark Heijl <markh@babelzilla.org>
2019-03-11 12:11:56 +00:00
goofy
f0540a48e9 Pontoon: Update French (fr) localization of Firefox Send
Localization authors:
- goofy <goofy@babelzilla.org>
2019-03-11 09:31:18 +00:00
Ton
41c51c2a3c Pontoon: Update Dutch (nl) localization of Firefox Send
Localization authors:
- Ton <tonnes.mb@gmail.com>
2019-03-11 08:11:17 +00:00
Mahay Alam Khan
d238a40ffd Pontoon: Update Bengali (Bangladesh) (bn-BD) localization of Firefox Send
Localization authors:
- Ashikur Rahman <ashikurrahman068@gmail.com>
- Mahay Alam Khan <mahayalamkhan@gmail.com>
2019-03-10 23:11:15 +00:00
Juraj Cigáň
cc178c0594 Pontoon: Update Slovak (sk) localization of Firefox Send
Localization authors:
- Juraj Cigáň <kusavica@gmail.com>
2019-03-10 22:51:18 +00:00
Lan Glad
925b1c873f Pontoon: Update Slovenian (sl) localization of Firefox Send
Localization authors:
- Lan Glad <upwinxp@gmail.com>
2019-03-10 21:31:22 +00:00
Lan Glad
b59b447982 Pontoon: Update Slovenian (sl) localization of Firefox Send
Localization authors:
- Lan Glad <upwinxp@gmail.com>
2019-03-10 16:32:28 +00:00
Rimas Kudelis
039815ae9d Pontoon: Update Lithuanian (lt) localization of Firefox Send
Localization authors:
- Rimas Kudelis <rimas@mozilla.lt>
2019-03-10 16:12:26 +00:00
Pin-guang Chen
0b46308d46 Pontoon: Update Chinese (Taiwan) (zh-TW) localization of Firefox Send
Localization authors:
- Pin-guang Chen <petercpg@mail.moztw.org>
2019-03-10 16:12:23 +00:00
Rimas Kudelis
f2b2fc3aa8 Pontoon: Update Lithuanian (lt) localization of Firefox Send
Localization authors:
- Rimas Kudelis <rimas@mozilla.lt>
2019-03-10 15:52:21 +00:00
Lan Glad
3bcb447718 Pontoon: Update Slovenian (sl) localization of Firefox Send
Localization authors:
- Lan Glad <upwinxp@gmail.com>
2019-03-10 15:32:35 +00:00
Rimas Kudelis
ff40debb88 Pontoon: Update Lithuanian (lt) localization of Firefox Send
Localization authors:
- Rimas Kudelis <rimas@mozilla.lt>
2019-03-10 15:32:32 +00:00
Rimas Kudelis
ccc271a76c Pontoon: Update Lithuanian (lt) localization of Firefox Send
Localization authors:
- Rimas Kudelis <rimas@mozilla.lt>
2019-03-10 15:13:49 +00:00
Rimas Kudelis
01c4f0d6df Pontoon: Update Lithuanian (lt) localization of Firefox Send
Localization authors:
- Rimas Kudelis <rimas@mozilla.lt>
2019-03-10 14:52:12 +00:00
Pin-guang Chen
6985547b49 Pontoon: Update Chinese (Taiwan) (zh-TW) localization of Firefox Send
Localization authors:
- Pin-guang Chen <petercpg@mail.moztw.org>
2019-03-10 14:52:10 +00:00
Rimas Kudelis
e313d9f9e1 Pontoon: Update Lithuanian (lt) localization of Firefox Send
Localization authors:
- Rimas Kudelis <rimas@mozilla.lt>
2019-03-10 14:32:51 +00:00
Rimas Kudelis
9e547c0648 Pontoon: Update Lithuanian (lt) localization of Firefox Send
Localization authors:
- Rimas Kudelis <rimas@mozilla.lt>
2019-03-10 14:12:50 +00:00
Théo Chevalier
d9c3fd094b Pontoon: Update French (fr) localization of Firefox Send
Localization authors:
- Théo Chevalier <theo.chevalier11@gmail.com>
- goofy <goofy@babelzilla.org>
2019-03-10 10:14:17 +00:00
dskmori
279c76ce89 Pontoon: Update Japanese (ja) localization of Firefox Send
Localization authors:
- dskmori <ghoti.fish.dsk@gmail.com>
2019-03-10 08:32:41 +00:00
dskmori
fab6c7cf6a Pontoon: Update Japanese (ja) localization of Firefox Send
Localization authors:
- dskmori <ghoti.fish.dsk@gmail.com>
2019-03-10 07:11:51 +00:00
dskmori
986acb4e3e Pontoon: Update Japanese (ja) localization of Firefox Send
Localization authors:
- dskmori <ghoti.fish.dsk@gmail.com>
2019-03-10 06:57:23 +00:00
Danny Coates
8abc1b6364 updated share button text 2019-03-09 20:56:33 -08:00
Danny Coates
bd61d2fb3e added share to tile 2019-03-09 20:41:20 -08:00
Håvar Henriksen
edc95f42cb Pontoon: Update Norwegian Bokmål (nb-NO) localization of Firefox Send
Localization authors:
- Håvar Henriksen <havar@firefox.no>
2019-03-10 03:11:38 +00:00
Danny Coates
9294ecb09f try web share api 2019-03-09 17:59:21 -08:00
Mahay Alam Khan
aa56216e76 Pontoon: Update Bengali (Bangladesh) (bn-BD) localization of Firefox Send
Localization authors:
- Ashikur Rahman <ashikurrahman068@gmail.com>
- Mahay Alam Khan <mahayalamkhan@gmail.com>
2019-03-10 01:51:47 +00:00
Danny Coates
3b7bf2ae7e updated pwa theme-color 2019-03-09 16:45:17 -08:00
Lan Glad
4224d2ba0a Pontoon: Update Slovenian (sl) localization of Firefox Send
Localization authors:
- Lan Glad <upwinxp@gmail.com>
2019-03-09 21:11:32 +00:00
Victor Bychek
9e314fca7c Pontoon: Update Russian (ru) localization of Firefox Send
Localization authors:
- Alexander Slovesnik <unghost@mozilla-russia.org>
- Victor Bychek <a@bychek.ru>
2019-03-09 14:34:43 +00:00
Selim Şumlu
1d9d37b5b9 Pontoon: Update Turkish (tr) localization of Firefox Send
Localization authors:
- Selim Şumlu <selim@sum.lu>
2019-03-09 13:31:57 +00:00
Selim Şumlu
302c436e94 Pontoon: Update Turkish (tr) localization of Firefox Send
Localization authors:
- Selim Şumlu <selim@sum.lu>
2019-03-09 13:13:08 +00:00
Kim Ludvigsen
1778345bd9 Pontoon: Update Danish (da) localization of Firefox Send
Localization authors:
- Kim Ludvigsen <kim@kimsside.dk>
2019-03-09 10:51:42 +00:00
Théo Chevalier
fce4e70c6e Pontoon: Update French (fr) localization of Firefox Send
Localization authors:
- Théo Chevalier <theo.chevalier11@gmail.com>
2019-03-09 09:31:52 +00:00
Joergen
776839f97f Pontoon: Update Danish (da) localization of Firefox Send
Localization authors:
- Joergen <joergenr@stofanet.dk>
2019-03-09 01:12:23 +00:00
Danny Coates
7c0f227f15 updated android icon 2019-03-08 16:32:29 -08:00
Danny Coates
da5f503dbc no-op startAuthFlow on android 2019-03-08 16:13:15 -08:00
Mikeyy
07eefcafdb Pontoon: Update Croatian (hr) localization of Firefox Send
Localization authors:
- Mikeyy <mihovil@miho.im>
2019-03-08 21:31:54 +00:00
Cristian Silaghi
f167f9de22 Pontoon: Update Romanian (ro) localization of Firefox Send
Localization authors:
- Cristian Silaghi <cristian.silaghi@mozilla.ro>
2019-03-08 18:51:33 +00:00
Cristian Silaghi
918366db1d Pontoon: Update Romanian (ro) localization of Firefox Send
Localization authors:
- Cristian Silaghi <cristian.silaghi@mozilla.ro>
2019-03-08 18:32:04 +00:00
Danny Coates
d101a76962 fixed android login. closes #1199 2019-03-08 10:17:10 -08:00
Danny Coates
2b53b76fed removed unused assets 2019-03-08 08:58:30 -08:00
Théo Chevalier
cffc717c86 Pontoon: Update French (fr) localization of Firefox Send
Localization authors:
- Théo Chevalier <theo.chevalier11@gmail.com>
2019-03-08 16:34:07 +00:00
Roberto Alvarado
bb79819de2 Pontoon: Update Spanish (Mexico) (es-MX) localization of Firefox Send
Localization authors:
- Roberto Alvarado <ralv888@gmail.com>
2019-03-08 15:51:28 +00:00
Danny Coates
f946a32156 Merge pull request #1208 from mozilla/change-launcher-name
change launcher name
2019-03-08 07:42:36 -08:00
张无忌
d6eccb5f9f Pontoon: Update Chinese (China) (zh-CN) localization of Firefox Send
Localization authors:
- 张无忌 <eloli@foxmail.com>
2019-03-08 15:12:08 +00:00
Mikeyy
53b45bdc6d Pontoon: Update Croatian (hr) localization of Firefox Send
Localization authors:
- Mikeyy <mihovil@miho.im>
2019-03-08 14:12:09 +00:00
Mikeyy
549c87c97a Pontoon: Update Croatian (hr) localization of Firefox Send
Localization authors:
- Rok Žerdin <zerdo90@gmail.com>
- Mikeyy <mihovil@miho.im>
- yoshimitsu002 <yoshimitsu002@gmail.com>
2019-03-08 13:51:49 +00:00
John Gruen
821be1d1e0 change launcher name 2019-03-08 14:14:19 +01:00
Michal Stanke
a8d5a92a52 Pontoon: Update Czech (cs) localization of Firefox Send
Localization authors:
- Michal Stanke <mstanke@mozilla.cz>
2019-03-08 07:33:14 +00:00
Michal Stanke
dc3e8a4ba4 Pontoon: Update Czech (cs) localization of Firefox Send
Localization authors:
- Michal Stanke <mstanke@mozilla.cz>
2019-03-08 07:11:52 +00:00
Danny Coates
04846eb29f updated readme environment urls. closes #1161 2019-03-07 17:03:50 -08:00
Danny Coates
6f89c4039b removed browserstack from readme 2019-03-07 16:47:08 -08:00
Juan Sián
b947949bb1 Pontoon: Update Kaqchikel (cak) localization of Firefox Send
Localization authors:
- Juan Sián <ajtzibsyan@yahoo.com>
2019-03-08 00:32:17 +00:00
Juan Sián
92a84f08b0 Pontoon: Update Kaqchikel (cak) localization of Firefox Send
Localization authors:
- Juan Sián <ajtzibsyan@yahoo.com>
2019-03-08 00:12:40 +00:00
Juan Sián
cb94c763ff Pontoon: Update Kaqchikel (cak) localization of Firefox Send
Localization authors:
- Juan Sián <ajtzibsyan@yahoo.com>
2019-03-07 23:51:36 +00:00
Danny Coates
dd8477da64 fixed legal page links. closes #1206 2019-03-07 15:25:28 -08:00
Håvar Henriksen
53acb4ed8b Pontoon: Update Norwegian Bokmål (nb-NO) localization of Firefox Send
Localization authors:
- Håvar Henriksen <havar@firefox.no>
2019-03-07 23:11:39 +00:00
Danny Coates
ab2e8b4634 updated deps 2019-03-07 15:01:55 -08:00
Håvar Henriksen
39e820ba34 Pontoon: Update Norwegian Bokmål (nb-NO) localization of Firefox Send
Localization authors:
- Håvar Henriksen <havar@firefox.no>
2019-03-07 22:32:16 +00:00
Danny Coates
40fcd8506a use fxa email-first flow 2019-03-07 12:08:42 -08:00
Danny Coates
fc1d2f43da added top margin to intro 2019-03-07 11:17:27 -08:00
Danny Coates
ea78382e5e fixes #1204, fixes #1205, also intro font weight 2019-03-07 10:58:19 -08:00
Danny Coates
28e31f4870 Merge pull request #1201 from mozilla/html-pn
Html pn
2019-03-07 10:29:28 -08:00
John Gruen
a28aad274d convert legal notice to html 2019-03-07 10:24:17 -08:00
Danny Coates
0371f1906a Merge pull request #1198 from mozilla/vnext
Merge vnext into master
2019-03-07 10:21:10 -08:00
Breana Gonzales
90b885fadc Pontoon: Update Spanish (Mexico) (es-MX) localization of Firefox Send
Localization authors:
- Breana Gonzales <breanajones@hotmail.com>
2019-03-07 17:34:18 +00:00
张无忌
0fcb53763c Pontoon: Update Chinese (China) (zh-CN) localization of Firefox Send
Localization authors:
- 张无忌 <eloli@foxmail.com>
2019-03-07 15:32:55 +00:00
xcffl
42797d3409 Pontoon: Update Chinese (China) (zh-CN) localization of Firefox Send
Localization authors:
- 莫非前世那一眼 <eloli@foxmail.com>
- xcffl <xcffl@outlook.com>
2019-03-07 15:12:21 +00:00
Balázs Meskó
7856b8b4a0 Pontoon: Update Hungarian (hu) localization of Firefox Send
Localization authors:
- Balázs Meskó <meskobalazs@gmail.com>
2019-03-07 14:32:43 +00:00
Ian Neal
058d972ef0 Pontoon: Update English (Great Britain) (en-GB) localization of Firefox Send
Localization authors:
- Ian Neal <iann_bugzilla@blueyonder.co.uk>
2019-03-07 14:12:46 +00:00
Artem Polivanchuk
ed0e6c03eb Pontoon: Update Ukrainian (uk) localization of Firefox Send
Localization authors:
- Artem Polivanchuk <artem@mozilla.org.ua>
2019-03-07 12:53:31 +00:00
Selim Şumlu
f4fd594452 Pontoon: Update Turkish (tr) localization of Firefox Send
Localization authors:
- Selim Şumlu <selim@sum.lu>
2019-03-07 12:53:27 +00:00
Mikeyy
23a98b1047 Pontoon: Update Croatian (hr) localization of Firefox Send
Localization authors:
- Mikeyy <mihovil@miho.im>
2019-03-07 10:29:53 +00:00
Lan Glad
fa502954f6 Pontoon: Update Slovenian (sl) localization of Firefox Send
Localization authors:
- Lan Glad <upwinxp@gmail.com>
2019-03-07 09:51:13 +00:00
Mikeyy
deed7f920b Pontoon: Update Croatian (hr) localization of Firefox Send
Localization authors:
- Mikeyy <mihovil@miho.im>
2019-03-07 09:51:10 +00:00
Artem Polivanchuk
868f666aa8 Pontoon: Update Ukrainian (uk) localization of Firefox Send
Localization authors:
- Artem Polivanchuk <artem@mozilla.org.ua>
2019-03-07 09:32:24 +00:00
Fauzan Alfi
33c1bf650d Pontoon: Update Indonesian (id) localization of Firefox Send
Localization authors:
- Fauzan Alfi <fauzanalfi@mozilla.web.id>
2019-03-07 09:11:53 +00:00
Artem Polivanchuk
745b71beff Pontoon: Update Ukrainian (uk) localization of Firefox Send
Localization authors:
- Artem Polivanchuk <artem@mozilla.org.ua>
2019-03-07 08:12:02 +00:00
goofy
f1f2020f09 Pontoon: Update French (fr) localization of Firefox Send
Localization authors:
- Théo Chevalier <theo.chevalier11@gmail.com>
- goofy <goofy@babelzilla.org>
2019-03-07 08:11:58 +00:00
Artem Polivanchuk
a6ed23616f Pontoon: Update Ukrainian (uk) localization of Firefox Send
Localization authors:
- Artem Polivanchuk <artem@mozilla.org.ua>
2019-03-07 07:51:31 +00:00
Michal Stanke
c9cd8fd156 Pontoon: Update Czech (cs) localization of Firefox Send
Localization authors:
- Michal Stanke <mstanke@mozilla.cz>
2019-03-07 06:11:42 +00:00
Michal Stanke
c1815d62d9 Pontoon: Update Czech (cs) localization of Firefox Send
Localization authors:
- Michal Stanke <mstanke@mozilla.cz>
2019-03-07 05:51:32 +00:00
Pin-guang Chen
6d9444c6bb Pontoon: Update Chinese (Taiwan) (zh-TW) localization of Firefox Send
Localization authors:
- Pin-guang Chen <petercpg@mail.moztw.org>
2019-03-07 05:15:00 +00:00
莫非前世那一眼
534598d6b0 Pontoon: Update Chinese (China) (zh-CN) localization of Firefox Send
Localization authors:
- 莫非前世那一眼 <eloli@foxmail.com>
2019-03-07 02:12:23 +00:00
莫非前世那一眼
d7ab4c4a65 Pontoon: Update Chinese (China) (zh-CN) localization of Firefox Send
Localization authors:
- 莫非前世那一眼 <eloli@foxmail.com>
2019-03-07 01:51:38 +00:00
莫非前世那一眼
1102f00658 Pontoon: Update Chinese (China) (zh-CN) localization of Firefox Send
Localization authors:
- 莫非前世那一眼 <eloli@foxmail.com>
2019-03-07 01:31:39 +00:00
莫非前世那一眼
27c5867e2b Pontoon: Update Chinese (China) (zh-CN) localization of Firefox Send
Localization authors:
- 莫非前世那一眼 <eloli@foxmail.com>
2019-03-07 01:12:33 +00:00
Danny Coates
7464d46843 removed unused fira bits 2019-03-06 16:37:02 -08:00
Danny Coates
f9fd9940bd fixed server l10n parse error 2019-03-06 16:36:17 -08:00
Danny Coates
796b98680c fixed a couple weird merge issues in en-US/send.ftl 2019-03-06 14:16:15 -08:00
Jim Spentzos
68ef4008a6 Pontoon: Update Greek (el) localization of Firefox Send
Localization authors:
- Jim Spentzos <jimspentzos2000@gmail.com>
2019-03-06 21:31:38 +00:00
Danny Coates
fb0f0f0b5d added gcp dev to csp 2019-03-06 12:59:54 -08:00
G12r
be5ea12408 Pontoon: Update Georgian (ka) localization of Firefox Send
Localization authors:
- G12r <georgianization@outlook.com>
2019-03-06 19:51:29 +00:00
Danny Coates
2dd425c46e Merge pull request #1197 from mozilla/vnext-master
merged master into vnext
2019-03-06 11:45:21 -08:00
Danny Coates
92ae9c38ef Merge remote-tracking branch 'origin/master' into vnext 2019-03-06 11:35:35 -08:00
G12r
ede3188986 Pontoon: Update Georgian (ka) localization of Firefox Send
Localization authors:
- G12r <georgianization@outlook.com>
2019-03-06 19:31:53 +00:00
G12r
36a68ff829 Pontoon: Update Georgian (ka) localization of Firefox Send
Localization authors:
- G12r <georgianization@outlook.com>
2019-03-06 19:11:37 +00:00
G12r
4dd659c9d9 Pontoon: Update Georgian (ka) localization of Firefox Send
Localization authors:
- G12r <georgianization@outlook.com>
2019-03-06 18:52:13 +00:00
Danny Coates
fb9f35413c clear settings after removing last file from wip 2019-03-06 10:43:58 -08:00
Danny Coates
7f9674f494 fixed size limit on server to include crypto overhead 2019-03-06 10:31:50 -08:00
G12r
7f31b54b69 Pontoon: Update Georgian (ka) localization of Firefox Send
Localization authors:
- G12r <georgianization@outlook.com>
2019-03-06 17:52:22 +00:00
Michal Stanke
b7f1769ea8 Pontoon: Update Czech (cs) localization of Firefox Send
Localization authors:
- Michal Stanke <mstanke@mozilla.cz>
2019-03-06 17:32:29 +00:00
Gabriela
cb2e459858 Pontoon: Update Spanish (Argentina) (es-AR) localization of Firefox Send
Localization authors:
- Gabriela <gmontagu@gmail.com>
2019-03-06 17:11:40 +00:00
avelper
a08d23fcf1 Pontoon: Update Spanish (Spain) (es-ES) localization of Firefox Send
Localization authors:
- avelper <avelper@mozilla-hispano.org>
2019-03-06 16:52:01 +00:00
Gabriela
60fdcc05fa Pontoon: Update Spanish (Argentina) (es-AR) localization of Firefox Send
Localization authors:
- Gabriela <gmontagu@gmail.com>
2019-03-06 16:51:58 +00:00
avelper
3b84bb0239 Pontoon: Update Spanish (Spain) (es-ES) localization of Firefox Send
Localization authors:
- avelper <avelper@mozilla-hispano.org>
2019-03-06 16:31:41 +00:00
Gabriela
de5634a817 Pontoon: Update Spanish (Argentina) (es-AR) localization of Firefox Send
Localization authors:
- Gabriela <gmontagu@gmail.com>
2019-03-06 16:31:37 +00:00
Gabriela
bd74be1414 Pontoon: Update Spanish (Argentina) (es-AR) localization of Firefox Send
Localization authors:
- Gabriela <gmontagu@gmail.com>
2019-03-06 16:11:52 +00:00
Fjoerfoks
8c2615c06e Pontoon: Update Frisian (fy-NL) localization of Firefox Send
Localization authors:
- Fjoerfoks <fryskefirefox@gmail.com>
2019-03-06 13:51:20 +00:00
Michael Wolf
f58cc15bbd Pontoon: Update Sorbian, Upper (hsb) localization of Firefox Send
Localization authors:
- Michael Wolf <milupo@sorbzilla.de>
2019-03-06 13:32:09 +00:00
Fjoerfoks
473774bb5b Pontoon: Update Frisian (fy-NL) localization of Firefox Send
Localization authors:
- Fjoerfoks <fryskefirefox@gmail.com>
2019-03-06 13:32:05 +00:00
Michael Wolf
da2c918f44 Pontoon: Update Sorbian, Lower (dsb) localization of Firefox Send
Localization authors:
- Michael Wolf <milupo@sorbzilla.de>
2019-03-06 13:13:03 +00:00
Balázs Meskó
b4c6a447e1 Pontoon: Update Hungarian (hu) localization of Firefox Send
Localization authors:
- Rok Žerdin <zerdo90@gmail.com>
- Balázs Meskó <meskobalazs@gmail.com>
2019-03-06 13:12:59 +00:00
Michael Wolf
1846a74d89 Pontoon: Update Sorbian, Lower (dsb) localization of Firefox Send
Localization authors:
- Michael Wolf <milupo@sorbzilla.de>
2019-03-06 12:51:13 +00:00
Fjoerfoks
112bfce07f Pontoon: Update Frisian (fy-NL) localization of Firefox Send
Localization authors:
- Fjoerfoks <fryskefirefox@gmail.com>
2019-03-06 12:51:10 +00:00
Michael Wolf
d7e02d07f9 Pontoon: Update Sorbian, Upper (hsb) localization of Firefox Send
Localization authors:
- Michael Wolf <milupo@sorbzilla.de>
2019-03-06 12:12:34 +00:00
Sara Todaro
343aefaa03 Pontoon: Update Italian (it) localization of Firefox Send
Localization authors:
- Sara Todaro <sara.todaro@mozillaitalia.org>
2019-03-06 12:12:31 +00:00
Michael Wolf
10078eac94 Pontoon: Update Sorbian, Upper (hsb) localization of Firefox Send
Localization authors:
- Michael Wolf <milupo@sorbzilla.de>
2019-03-06 11:51:33 +00:00
Michael Wolf
032b6376ca Pontoon: Update Sorbian, Upper (hsb) localization of Firefox Send
Localization authors:
- Michael Wolf <milupo@sorbzilla.de>
2019-03-06 11:32:07 +00:00
Michael Wolf
70712188e1 Pontoon: Update Sorbian, Upper (hsb) localization of Firefox Send
Localization authors:
- Michael Wolf <milupo@sorbzilla.de>
2019-03-06 11:26:22 +00:00
Fjoerfoks
70366e7c94 Pontoon: Update Frisian (fy-NL) localization of Firefox Send
Localization authors:
- Fjoerfoks <fryskefirefox@gmail.com>
2019-03-06 11:26:19 +00:00
Fjoerfoks
f80eed6e2f Pontoon: Update Frisian (fy-NL) localization of Firefox Send
Localization authors:
- Fjoerfoks <fryskefirefox@gmail.com>
2019-03-06 10:51:34 +00:00
Björn I
9183689200 Pontoon: Update Norwegian Nynorsk (nn-NO) localization of Firefox Send
Localization authors:
- Björn I. <bjorni.svindseth@yahoo.com>
2019-03-06 10:33:20 +00:00
Rok Žerdin
85378c393a Pontoon: Update Slovenian (sl) localization of Firefox Send
Localization authors:
- Rok Žerdin <zerdo90@gmail.com>
2019-03-06 10:15:48 +00:00
Björn I
9dcddf1f71 Pontoon: Update Norwegian Nynorsk (nn-NO) localization of Firefox Send
Localization authors:
- Björn I. <bjorni.svindseth@yahoo.com>
2019-03-06 10:15:45 +00:00
Rhoslyn Prys
67093d7c86 Pontoon: Update Welsh (cy) localization of Firefox Send
Localization authors:
- Rhoslyn Prys <rprys@posteo.net>
2019-03-06 09:32:33 +00:00
Rhoslyn Prys
665ddeb416 Pontoon: Update Welsh (cy) localization of Firefox Send
Localization authors:
- Rhoslyn Prys <rprys@posteo.net>
2019-03-06 09:11:12 +00:00
Francesco Lodolo
2623740451 Pontoon: Update Italian (it) localization of Firefox Send
Localization authors:
- Francesco Lodolo <francesco.lodolo@mozillaitalia.org>
2019-03-06 09:11:09 +00:00
Francesco Lodolo
0f7efdee80 Pontoon: Update Italian (it) localization of Firefox Send
Localization authors:
- Francesco Lodolo <francesco.lodolo@mozillaitalia.org>
2019-03-06 08:51:59 +00:00
Rok Žerdin
7bafbc99c5 Pontoon: Update Slovenian (sl) localization of Firefox Send
Localization authors:
- Rok Žerdin <zerdo90@gmail.com>
2019-03-06 07:51:54 +00:00
Quế Tùng
a1e07b5439 Pontoon: Update Vietnamese (vi) localization of Firefox Send
Localization authors:
- Quế Tùng <best.cloney.1301@gmail.com>
2019-03-06 07:11:26 +00:00
Quế Tùng
58a11ccc63 Pontoon: Update Vietnamese (vi) localization of Firefox Send
Localization authors:
- Quế Tùng <best.cloney.1301@gmail.com>
2019-03-06 06:51:43 +00:00
Rok Žerdin
02ad860ea0 Pontoon: Update Slovenian (sl) localization of Firefox Send
Localization authors:
- Rok Žerdin <zerdo90@gmail.com>
2019-03-06 06:12:22 +00:00
莫非前世那一眼
3b2382f9d7 Pontoon: Update Chinese (China) (zh-CN) localization of Firefox Send
Localization authors:
- 莫非前世那一眼 <eloli@foxmail.com>
2019-03-06 04:32:31 +00:00
Marcelo Ghelman
64615d7b76 Pontoon: Update Portuguese (Brazil) (pt-BR) localization of Test Pilot: Firefox Send
Localization authors:
- Marcelo Ghelman <marcelo.ghelman@gmail.com>
2019-03-06 01:11:39 +00:00
Marcelo Ghelman
39d57c6d11 Pontoon: Update Portuguese (Brazil) (pt-BR) localization of Test Pilot: Firefox Send
Localization authors:
- Marcelo Ghelman <marcelo.ghelman@gmail.com>
2019-03-06 00:51:46 +00:00
Danny Coates
dce8b6e525 fixed cancel button string 2019-03-05 14:44:06 -08:00
Danny Coates
d25c41190a fixes #1143 android ui bug 2019-03-05 14:27:55 -08:00
Balázs Meskó
6c23476713 Pontoon: Update Hungarian (hu) localization of Test Pilot: Firefox Send
Localization authors:
- Balázs Meskó <meskobalazs@gmail.com>
2019-03-05 21:51:27 +00:00
Danny Coates
e7b881e975 added cors mode to /metrics-flow request 2019-03-05 13:31:51 -08:00
Danny Coates
445811931f added accounts.firefox.com to csp connect-src for /metrics-flow 2019-03-05 13:05:51 -08:00
Danny Coates
5e04f367c1 utms for everybody 2019-03-05 12:58:40 -08:00
Andreas Pettersson
9d97a84f29 Pontoon: Update Swedish (sv-SE) localization of Test Pilot: Firefox Send
Localization authors:
- Andreas Pettersson <az@kth.se>
2019-03-05 20:51:23 +00:00
Francesco Lodolo
6ab577dabf Pontoon: Update Italian (it) localization of Test Pilot: Firefox Send
Localization authors:
- Francesco Lodolo <francesco.lodolo@mozillaitalia.org>
2019-03-05 20:51:20 +00:00
Andreas Pettersson
5f6f8b826a Pontoon: Update Swedish (sv-SE) localization of Test Pilot: Firefox Send
Localization authors:
- Andreas Pettersson <az@kth.se>
2019-03-05 20:32:37 +00:00
Marcelo Ghelman
43a2c5bbf3 Pontoon: Update Portuguese (Brazil) (pt-BR) localization of Test Pilot: Firefox Send
Localization authors:
- Marcelo Ghelman <marcelo.ghelman@gmail.com>
2019-03-05 20:32:34 +00:00
Marcelo Ghelman
f328d69d0c Pontoon: Update Portuguese (Brazil) (pt-BR) localization of Test Pilot: Firefox Send
Localization authors:
- Marcelo Ghelman <marcelo.ghelman@gmail.com>
2019-03-05 20:12:47 +00:00
Rodrigo
eab0074cdf Pontoon: Update Portuguese (Portugal) (pt-PT) localization of Test Pilot: Firefox Send
Localization authors:
- Rodrigo <rodrigo.mcunha@hotmail.com>
2019-03-05 19:51:56 +00:00
Marcelo Ghelman
1f27da19bc Pontoon: Update Portuguese (Brazil) (pt-BR) localization of Test Pilot: Firefox Send
Localization authors:
- Marcelo Ghelman <marcelo.ghelman@gmail.com>
2019-03-05 19:51:53 +00:00
Rok Žerdin
14dbcfd487 Pontoon: Update Slovenian (sl) localization of Test Pilot: Firefox Send
Localization authors:
- Rok Žerdin <zerdo90@gmail.com>
2019-03-05 19:32:32 +00:00
Michael Köhler
26a55c5258 Pontoon: Update German (de) localization of Test Pilot: Firefox Send
Localization authors:
- Michael Köhler <michael.koehler1@gmx.de>
2019-03-05 19:32:29 +00:00
Kohei Yoshino
18a7feaacb Pontoon: Update English (Canada) (en-CA) localization of Test Pilot: Firefox Send
Localization authors:
- Kohei Yoshino <kohei.yoshino@gmail.com>
2019-03-05 19:32:25 +00:00
Danny Coates
c8ea3a6138 updated vnext strings with latest merge to master 2019-03-05 10:58:27 -08:00
Danny Coates
0ba59bc324 added vnext strings for translation (#1188)
* added vnext strings for translation
2019-03-05 10:33:07 -08:00
John Gruen
7197cc3bea Add legal and final strings (#1185)
* add legal and final strings

* removed unneeded suffixes from string ids

* removed unused strings and simplified string ids for vnext-only strings

* reword nostreams option
2019-03-04 14:13:17 -08:00
Danny Coates
6ab006de61 use email type for signin input tag 2019-03-02 17:05:58 -08:00
Jiri Grönroos
befbd8c1c5 Pontoon: Update Finnish (fi) localization of Test Pilot: Firefox Send
Localization authors:
- Jiri Grönroos <jiri.gronroos@iki.fi>
2019-03-02 15:11:52 +00:00
Danny Coates
3666900f13 removed errant console.log 2019-03-01 16:26:27 -08:00
Danny Coates
1ddfeac81f added md and lg layouts for signin dialog 2019-03-01 16:19:55 -08:00
Danny Coates
8f74ccdb48 a few style tweaks 2019-03-01 14:12:23 -08:00
Danny Coates
4820f175dd updated signin dialog 2019-03-01 12:56:10 -08:00
Danny Coates
1b9182aac7 updated secondary pages style & illustrations 2019-03-01 11:05:59 -08:00
John Gruen
4e7b205dfd update acceptance (#1181) 2019-03-01 09:07:28 -08:00
John Gruen
0ef26b739f update social cards (#1180) 2019-03-01 09:06:04 -08:00
John Gruen
10c7f8ab43 update survey url (#1179) 2019-03-01 09:05:26 -08:00
Danny Coates
421967ea81 updated default config values 2019-02-28 16:39:38 -08:00
Danny Coates
3bd2996c14 tweaked title and illustration styles 2019-02-28 15:53:13 -08:00
Danny Coates
7716ba6e77 added warning page for browsers without streams downloading big files (#1175)
* added warning page for browsers without streams downloading big files

* fixed illustration size in Edge

* updated nostreams style
2019-02-28 14:28:18 -08:00
Danny Coates
eddabac191 updated android app icon 2019-02-28 12:30:00 -08:00
Donovan Preston
a30ea6cddc Another slight speed boost (#1176) 2019-02-28 08:29:10 -08:00
Donovan Preston
5b03c64e8d Fix slow upload by turning on hardware accelleration on the webview (#1173) 2019-02-27 16:04:57 -08:00
Danny Coates
beeb0d16c0 fixed svg style issues 2019-02-27 12:20:10 -08:00
Danny Coates
eb94a4fd14 updated deps 2019-02-27 12:06:11 -08:00
Danny Coates
72ee9c13d2 added illustrations 2019-02-27 11:42:43 -08:00
pyup.io bot
45a270ddce Scheduled weekly dependency update for week 08 (#1168)
* Update flake8 from 3.7.5 to 3.7.7

* Update pytest from 4.2.0 to 4.3.0

* Update pytest-selenium from 1.15.1 to 1.16.0
2019-02-27 10:37:48 -05:00
Danny Coates
f968083f74 added '-' to /api/filelist validation 2019-02-26 19:58:03 -08:00
Danny Coates
72b41c158b added flex-no-shrink to archive info icons 2019-02-26 17:31:53 -08:00
Danny Coates
7c540b8903 updated tiles styles 2019-02-26 17:22:45 -08:00
Danny Coates
4a40c75173 updated dowload page style 2019-02-26 16:03:12 -08:00
Danny Coates
8e104d2a5b added metric target for newest signup button 2019-02-26 15:54:56 -08:00
Danny Coates
1529a86180 updated password ui size 2019-02-26 15:38:55 -08:00
Danny Coates
b6941345a7 updated password input style 2019-02-26 15:06:50 -08:00
Danny Coates
0b8eae11de updated styles 2019-02-26 14:52:37 -08:00
Danny Coates
4cb6646cce updated filelist storage so userid is not used directly 2019-02-26 13:53:11 -08:00
Danny Coates
d55f0247de added padding to android wip screen 2019-02-26 11:11:06 -08:00
Danny Coates
1c44d1d0f9 added /config endpoint, use fewer globals (#1172)
* added /config endpoint, use fewer globals

* fixed integration tests
2019-02-26 10:39:50 -08:00
Danny Coates
8df400a676 found source of double-render, removed old experiment 2019-02-25 14:03:08 -08:00
Danny Coates
cccc1a5383 enabled accounts on Edge 2019-02-25 11:44:44 -08:00
Danny Coates
c6cc5f4ac4 made Inter font-display: optional 2019-02-24 11:10:34 -08:00
Danny Coates
2dce066449 tweaked btn style 2019-02-22 13:59:57 -08:00
Danny Coates
3f4cdd844c updated upload area style. idk how this moved 2019-02-22 13:40:19 -08:00
Danny Coates
2c867e0ae8 fixed modals on other than home page 2019-02-22 13:31:54 -08:00
Danny Coates
c36466d952 updated unsupported page style 2019-02-22 13:16:24 -08:00
Danny Coates
2fd72096ae download page style updates 2019-02-22 12:42:10 -08:00
Danny Coates
08dc5fa23b puffier signin button et al 2019-02-22 12:00:39 -08:00
John Gruen
e19c711548 finish string update (#1167) 2019-02-22 11:13:31 -08:00
John Gruen
c23da8f6b0 Merge pull request #1166 from mozilla/update-strings
update strings
2019-02-22 19:40:55 +01:00
Danny Coates
c8e6e761d0 filled in size placeholder and other malarkey 2019-02-22 10:37:52 -08:00
John Gruen
7449d1c351 update strings 2019-02-22 17:12:30 +01:00
Danny Coates
47d75d8220 adjusted modal background and download preview 2019-02-21 16:43:15 -08:00
Danny Coates
694e05f738 disable accounts on Edge. more crypto errors 2019-02-21 15:38:36 -08:00
Danny Coates
de88885189 replaced cryptofill with webcrypto-liner 2019-02-21 15:20:28 -08:00
Danny Coates
9e919eddb5 beginning to decompose cryptofill to allow dynamic import 2019-02-21 12:22:12 -08:00
Danny Coates
c146c584f6 static require cryptofill for Edge 2019-02-21 11:21:06 -08:00
Danny Coates
6fd3019aba added title to download link 2019-02-21 09:24:43 -08:00
Danny Coates
f0a60d8c8e added control titles 2019-02-20 19:59:29 -08:00
Danny Coates
2169a49d4c made account menu keyboard navible 2019-02-20 16:11:54 -08:00
Danny Coates
b6a703d5de added outline styles for keyboard nav 2019-02-20 15:58:44 -08:00
Danny Coates
060b6835f1 clear password on checkPassword 2019-02-20 11:51:09 -08:00
Danny Coates
fd2b58d96d made main "add files" area keyboard navible 2019-02-20 10:59:05 -08:00
Danny Coates
b1e5073e59 made sign in button keyboard navible 2019-02-20 10:57:32 -08:00
Danny Coates
9d5c6573d9 updated deps 2019-02-19 20:12:12 -08:00
Danny Coates
ec356b703f disable service worker on Edge 2019-02-19 18:53:55 -08:00
Danny Coates
e5f9673521 added window.app for debugging 2019-02-19 14:14:28 -08:00
Danny Coates
2c12b614f0 updated header logo 2019-02-19 13:13:14 -08:00
Danny Coates
2c27665e39 updated favicon 2019-02-19 12:52:09 -08:00
Danny Coates
c1df061669 android style fixes 2019-02-19 11:25:40 -08:00
Danny Coates
41bfe31d61 prefix /api/metrics on android. fixes #1159 2019-02-19 10:46:16 -08:00
Donovan Preston
a42cec97f3 Fix #1145 Fix the back button after logging in. (#1158)
To do so, we clear the webview history once the login process is complete so that the intermediate redirect urls used by the login process are not in the history.

Also, update the versions of some of the libraries we use.
2019-02-19 09:35:37 -08:00
Donovan Preston
fd3caa3cc6 Fix #1150 Make the defaults on android match the defaults on the web. (#1155) 2019-02-19 09:28:25 -08:00
Tim Visée
b76150d4d9 Fix function to calculate encrypted ECE ciphertext length (#1153) 2019-02-18 11:19:15 -08:00
Danny Coates
06c9b126a3 revert puppeteer to 1.11.0 2019-02-18 11:09:37 -08:00
Danny Coates
a2ede30f09 updated password input style 2019-02-15 14:42:09 -08:00
Danny Coates
244fcf5e77 renamed inter beta fonts 2019-02-15 14:41:29 -08:00
Danny Coates
8eaacfea18 use text/plain on /api/metrics 2019-02-15 11:59:39 -08:00
Danny Coates
b30be6e4a2 updated intro image 2019-02-14 16:16:30 -08:00
Danny Coates
5ce35a71ef added missing entrypoint to metrics 2019-02-14 13:00:57 -08:00
Danny Coates
6b6b04e93b a few font adjustments 2019-02-14 12:23:27 -08:00
Danny Coates
21e3095dc9 updated file icon 2019-02-14 12:01:14 -08:00
Danny Coates
2a8a8abfde added Inter font and intro image 2019-02-14 11:39:28 -08:00
Danny Coates
4d8f27e96e adjusted intro layout 2019-02-14 09:33:49 -08:00
Danny Coates
be8e507d25 updated footer links 2019-02-13 13:09:57 -08:00
Danny Coates
26d6606e09 added custom details arrow (needs final svg) 2019-02-13 12:39:53 -08:00
Danny Coates
1c61915b53 styled selectbox 2019-02-13 11:14:53 -08:00
Danny Coates
e9ee7d022c adjusted padding of wip area 2019-02-12 19:14:01 -08:00
Danny Coates
fc37fd1fe3 Work in progress on latest design 2019-02-12 12:27:52 -08:00
Danny Coates
0fa963f1ab implemented amplitude metrics 2019-02-12 12:23:27 -08:00
Danny Coates
d50c0477ea fixed android metrics 2019-02-12 12:21:18 -08:00
Danny Coates
9b37e92a81 implemented amplitude metrics (#1141) 2019-02-12 11:50:06 -08:00
Marwan Mohamad
d6bfb8b1fd Pontoon: Update Gorontalo (gor) localization of Test Pilot: Firefox Send
Localization authors:
- Marwan Mohamad <mar.one818@gmail.com>
2019-02-12 18:52:29 +00:00
pyup.io bot
052f50358e Scheduled weekly dependency update for week 06 (#1148)
* Update flake8 from 3.6.0 to 3.7.5

* Update pytest from 4.1.1 to 4.2.0

* Update pytest-xdist from 1.26.0 to 1.26.1
2019-02-11 19:53:34 -05:00
Danny Coates
1a483cad55 updated deps 2019-02-08 15:58:05 -08:00
Danny Coates
03246532e3 v2.6.3 2019-02-08 14:08:48 -08:00
Jon Buckley
cff91b2189 npm audit fix 2019-02-08 14:06:14 -08:00
Danny Coates
6b33192a55 use default avatar instead of ff logo for users with no avatar 2019-02-08 11:58:42 -08:00
Danny Coates
6ef9b7be92 v2.6.2 2019-02-08 11:10:29 -08:00
Donovan Preston
66f52b8c41 Fix #1110 Sync the file list on android. 2019-02-08 09:45:37 -08:00
Donovan Preston
16224b3c02 Fix #1108 Hide email input on signup page so that it doesn't hide par… (#1140)
* Fix #1108 Hide email input on signup page so that it doesn't hide part of the bottom of the page

* Fix #1115 Prevent clicking on the button more than once in a row.

* Show the email input on desktop
2019-02-08 09:44:21 -08:00
Danny Coates
41eaa668a1 Merge pull request #1138 from jbuck/vnext-update-google-cloud-storage
Update @google-cloud/storage to v2.4.2 to fix timeouts
2019-02-06 12:07:18 -08:00
Danny Coates
5e4ad28f90 Merge pull request #1137 from jbuck/master-update-google-cloud-storage
Update @google-cloud/storage to v2.4.2 to fix timeouts
2019-02-06 12:07:01 -08:00
Jon Buckley
3ea728e4e0 Update @google-cloud/storage to v2.4.2 to fix timeouts 2019-02-06 13:25:18 -05:00
Jon Buckley
bc2a8c6780 Update @google-cloud/storage to v2.4.2 to fix timeouts 2019-02-06 13:21:38 -05:00
Rodrigo
500b34b666 Pontoon: Update Portuguese (Portugal) (pt-PT) localization of Test Pilot: Firefox Send
Localization authors:
- Rodrigo <rodrigo.mcunha@hotmail.com>
2019-02-06 04:12:11 +00:00
Rodrigo
7afe684c3b Pontoon: Update Portuguese (Portugal) (pt-PT) localization of Test Pilot: Firefox Send
Localization authors:
- Rodrigo <rodrigo.mcunha@hotmail.com>
2019-02-05 22:52:13 +00:00
Danny Coates
cd8ab540f2 revert @google-cloud/storage to 2.1.0 2019-01-31 15:28:18 -08:00
Danny Coates
36225e4f92 android: exclude self from share intent (#1132) 2019-01-30 15:46:43 -05:00
Mark Liang (You-Wen)
b55960d743 fix 1112 (#1128) 2019-01-30 10:59:22 -05:00
Danny Coates
9e3bde2cc9 full page download ui (#1126) 2019-01-30 10:50:17 -05:00
Danny Coates
5eb24065b6 added modal to other pages 2019-01-29 13:08:54 -08:00
Danny Coates
87a517a169 exclude text inputs from paste handler 2019-01-29 12:43:09 -08:00
Danny Coates
c0d8300a8e fixed some scrollbars 2019-01-29 12:06:23 -08:00
Danny Coates
d159825b27 added download icon 2019-01-28 15:44:14 -08:00
Cloney 173741
779fe94550 Pontoon: Update Vietnamese (vi) localization of Test Pilot: Firefox Send
Localization authors:
- Cloney 173741 <best.cloney.1301@gmail.com>
- donghoang.nguyen <donghoang.nguyen@gmail.com>
2019-01-27 15:12:07 +00:00
Danny Coates
8794b1d101 npm run format 2019-01-24 12:31:20 -08:00
Danny Coates
8227b1420c Merge pull request #1125 from mozilla/dlink
added download link to tile
2019-01-24 12:20:30 -08:00
Danny Coates
dece0969c2 added download link to tile 2019-01-23 15:10:09 -08:00
Danny Coates
7bf8bab864 revert webpack to 4.28.4 2019-01-23 14:05:11 -08:00
Danny Coates
97bf9fdf69 updated deps 2019-01-23 11:46:17 -08:00
Danny Coates
9afe688c79 Merge pull request #1123 from pdehaan/de-testpilot-badge
Remove TestPilot badge from README
2019-01-23 09:47:22 -08:00
Peter deHaan
9f8233c7e4 Remove TestPilot badge 2019-01-23 09:34:56 -08:00
Danny Coates
d8009a64d4 Merge pull request #1119 from mozilla/android-share-icon
Switch to the Android share icon.
2019-01-23 09:11:19 -08:00
Danny Coates
831e39c113 Merge pull request #1122 from mozilla/fix-back-button-crasher
Fixes #1037: Fix back button crasher
2019-01-23 09:10:54 -08:00
Donovan Preston
d1ea261dea Fixes #1037: Fix back button crasher
Java has nulls, and any object reference in Java can be null, but in Kotlin parameters default to not null unless the type is specified as `Type?`; our override of onActivityResult was specifying the type of the intent parameter as `Intent` instead of `Intent?`, causing an exception before our code was called. Figuring out how to turn on "break on all exceptions" in Android Studio (which is non-trivial for some reason) finally showed me the stack trace.
2019-01-23 10:28:57 -05:00
Donovan Preston
73123a690b Switch to the Android share icon. 2019-01-23 09:42:13 -05:00
pyup.io bot
95ceff5cc6 Scheduled weekly dependency update for week 03 (#1111)
* Update pytest from 4.1.0 to 4.1.1

* Update pytest-html from 1.19.0 to 1.20.0

* Update pytest-xdist from 1.25.0 to 1.26.0
2019-01-22 13:44:04 -05:00
Danny Coates
16ba74e959 Merge pull request #1106 from mozilla/vnext-hover-states
Fix #1103
2019-01-18 10:25:05 -08:00
Mark Liang
de0a1ddcaa #1103 2019-01-18 16:09:17 +08:00
Danny Coates
01105a0a98 Merge pull request #1091 from mozilla/add-new-metrics
add new metrics md
2019-01-17 11:30:37 -08:00
Ian Neal
4cf27030a1 Pontoon: Update English (Great Britain) (en-GB) localization of Test Pilot: Firefox Send
Localization authors:
- Ian Neal <iann_bugzilla@blueyonder.co.uk>
2019-01-17 14:31:28 +00:00
Danny Coates
339755e292 updated deps 2019-01-16 16:18:50 -08:00
Danny Coates
7d051d5eaf restored accidentally deleted style 2019-01-16 16:18:23 -08:00
Danny Coates
d5a1271bbe fixed account menu z-index on android 2019-01-16 14:58:10 -08:00
Danny Coates
e954a6cb62 typo. fixes #1100 2019-01-16 14:19:33 -08:00
Danny Coates
a6a8fa6528 Merge pull request #1099 from mozilla/android-implement-share-card
Fix #888 Implement share card.
2019-01-16 13:26:41 -08:00
Donovan Preston
c90d811087 Switch to using utils.browserName 2019-01-16 16:20:15 -05:00
Danny Coates
6f39d42165 Merge pull request #1102 from mozilla/btn-style
refactored styles to extract btn
2019-01-16 13:00:21 -08:00
Danny Coates
57422d6406 refactored styles to extract btn 2019-01-16 12:49:11 -08:00
Danny Coates
ae256141da Merge pull request #1098 from mozilla/hide-add-files-button-while-uploading
Fix #1089 On Android, hide the add files button when uploading
2019-01-16 11:01:49 -08:00
Donovan Preston
af61434b72 Fix #888 Implement share card. 2019-01-16 12:05:39 -05:00
Donovan Preston
c0382dd327 Fix #1089 On Android, hide the add files button when uploading 2019-01-16 10:26:52 -05:00
Danny Coates
32a77180b0 Merge pull request #1088 from mozilla/vnext-ui-changes
Update UI
2019-01-15 10:40:11 -08:00
Danny Coates
783d7bfa03 save download count changes to localStorage. fixes #1080 2019-01-15 10:11:51 -08:00
Danny Coates
6e175dd5ca Merge pull request #1087 from mozilla/custom-elements
use custom elements instead of adding css classes for selectors
2019-01-14 11:03:23 -08:00
Mark Liang
38f8a68827 update ux 2019-01-14 16:51:50 +08:00
John Gruen
f6640e4822 add new metrics md 2019-01-11 18:37:01 +01:00
Danny Coates
f402011c82 use custom elements instead of adding css classes for selectors 2019-01-10 16:22:40 -08:00
Danny Coates
742b97cb4b Merge pull request #1086 from mozilla/fix-android-equals-1-npm-start
Make ANDROID=1 npm start work again, as it broke at some point
2019-01-10 15:04:27 -08:00
Danny Coates
3df32e2a22 removed /download from android routes in dev.js since it has no ui 2019-01-10 15:00:03 -08:00
Donovan Preston
52b4c382cb Make ANDROID=1 npm start work again, as it broke at some point 2019-01-10 15:08:16 -05:00
Danny Coates
8e8570c357 use blob instead of stream to get file list. fixes #1084 2019-01-10 11:10:51 -08:00
Danny Coates
4a633c8930 initialize dlimit of ownedfile on upload. fixes #1080 2019-01-10 10:52:52 -08:00
Danny Coates
6cc374865e refactored code/tests around download tests 2019-01-09 17:25:43 -08:00
Danny Coates
6fdb5f4f9f Merge pull request #1078 from dhyey35/vnext
[Integration-Test] Add test for number of downloads, fixes #810
2019-01-09 17:13:21 -08:00
Danny Coates
7f1ce41d9c disable validation and resumable for gcs uploads 2019-01-09 13:36:27 -08:00
Dhyey Thakore
e9a9ead762 [Integration-Test] Add test for number of downloads, fixes #810 2019-01-09 19:33:48 +05:30
Danny Coates
1bb1e8123f Merge pull request #1076 from mozilla/i1059
don't make title a link on android
2019-01-08 14:14:45 -08:00
Danny Coates
65be118e82 clicking signin shows cta. fixes #1073 2019-01-08 14:06:15 -08:00
Danny Coates
ffe8045d82 don't make title a link on android. fixes #1059 2019-01-08 13:53:53 -08:00
Danny Coates
39c1bec91a updated android LIMITS. fixes #1040 #1041 #1039 (#1075) 2019-01-08 16:46:48 -05:00
Danny Coates
eb9fba3da6 updated android to work with changes to app/archive.js (#1074) 2019-01-08 15:46:16 -05:00
Danny Coates
4e0425ad7e fixed text overflow on 404 page. fixes #1025 2019-01-08 11:46:14 -08:00
Danny Coates
06b25dcba6 fixed initial page load rendering for expired downloads and when the upload list isn't empty. fixes #1069 and fixes #1021 2019-01-08 11:24:07 -08:00
Danny Coates
e1bbff0047 Merge pull request #1072 from jbuck/vnext-node-10
Upgrade to Node v10
2019-01-07 12:57:26 -08:00
Jon Buckley
c711b7ce42 Upgrade to Node v10 2019-01-07 15:50:01 -05:00
pyup.io bot
f49782c8e3 Scheduled weekly dependency update for week 01 (#1070)
* Update pytest from 4.0.2 to 4.1.0

* Update pytest-selenium from 1.14.0 to 1.15.1
2019-01-07 14:40:09 -05:00
Jarmo
7352e4a1b0 Pontoon: Update Finnish (fi) localization of Test Pilot: Firefox Send
Localization authors:
- Miro Rauhala <miro.rauhala.99@gmail.com>
- Jarmo <jarmo@juslin.me>
2019-01-05 15:13:59 +00:00
Danny Coates
b863b10566 updated deps 2019-01-04 12:05:46 -08:00
Danny Coates
7f8700e612 added post-merge hook for npm install 2019-01-04 11:59:30 -08:00
Miro Rauhala
d5ce677960 Pontoon: Update Finnish (fi) localization of Test Pilot: Firefox Send
Localization authors:
- Miro Rauhala <miro.rauhala.99@gmail.com>
2019-01-04 17:01:05 +00:00
pyup.io bot
7a1de5d651 Scheduled weekly dependency update for week 52 (#1062)
* Update pytest from 4.0.1 to 4.0.2

* Update pytest-xdist from 1.24.1 to 1.25.0
2019-01-04 09:18:55 -05:00
Danny Coates
8c496e3bee don't add zero length files (also directories) 2019-01-03 16:12:40 -08:00
Danny Coates
5e5af03d11 run npm install if needed in buildAssets.sh 2019-01-03 13:56:32 -08:00
Quế Tùng
0338de3de7 Pontoon: Update Vietnamese (vi) localization of Test Pilot: Firefox Send
Localization authors:
- Quế Tùng <best.cloney.1301@gmail.com>
2018-12-29 15:12:57 +00:00
Marwan Mohamad
c71bd26789 Pontoon: Update Gorontalo (gor) localization of Test Pilot: Firefox Send
Localization authors:
- Marwan Mohamad <mar.one818@gmail.com>
2018-12-29 12:53:38 +00:00
Marwan Mohamad
fe3a64941d Pontoon: Update Gorontalo (gor) localization of Test Pilot: Firefox Send
Localization authors:
- Marwan Mohamad <mar.one818@gmail.com>
2018-12-29 12:32:36 +00:00
Marwan Mohamad
ac9e107094 Pontoon: Update Gorontalo (gor) localization of Test Pilot: Firefox Send
Localization authors:
- Marwan Mohamad <mar.one818@gmail.com>
2018-12-29 11:33:53 +00:00
Miro Rauhala
08e0e35041 Pontoon: Update Finnish (fi) localization of Test Pilot: Firefox Send
Localization authors:
- Miro Rauhala <miro.rauhala.99@gmail.com>
2018-12-27 18:14:57 +00:00
yoshimitsu002
a0e3c7c2ec Pontoon: Update Croatian (hr) localization of Test Pilot: Firefox Send
Localization authors:
- yoshimitsu002 <yoshimitsu002@gmail.com>
2018-12-24 13:12:37 +00:00
yoshimitsu002
62ffaafeb7 Pontoon: Update Croatian (hr) localization of Test Pilot: Firefox Send
Localization authors:
- yoshimitsu002 <yoshimitsu002@gmail.com>
2018-12-24 12:52:20 +00:00
Danny Coates
a79400f99f signup dialog changes
- send empty or invalid emails to the standard fxa signup page
- show the signup dialog when file too big and not logged in
2018-12-21 11:40:52 -08:00
Danny Coates
c585c34c01 use one Archive instance for state.archive 2018-12-21 10:54:38 -08:00
Danny Coates
989137342b updated deps 2018-12-19 12:26:26 -08:00
Danny Coates
b71d30fca4 updated puppeteer 2018-12-19 12:25:05 -08:00
Danny Coates
236fcc960f Merge pull request #1042 from jbuck/node-10
Upgrade to Node v10
2018-12-19 09:46:44 -08:00
Jon Buckley
b7d1d6a632 Update to puppeteer@1.11.0 2018-12-19 12:20:37 -05:00
Jon Buckley
a6c78470ea Replace nsp check with npm audit 2018-12-19 12:20:36 -05:00
Danny Coates
6cc12528b3 fixed some old TODOs 2018-12-18 13:55:46 -08:00
Danny Coates
ac87fdff97 style tweak to user avatar image 2018-12-18 12:50:01 -08:00
Danny Coates
b1db7ac312 simplified app/main.js a bit 2018-12-18 12:27:43 -08:00
Danny Coates
4557a352f8 Merge pull request #1050 from mozilla/hide-preferences
Hide the preferences menu for the beta
2018-12-18 10:02:17 -08:00
Donovan Preston
6c4bf8b37a Hide the preferences menu for the beta 2018-12-18 11:14:22 -05:00
Danny Coates
41d0076add Merge pull request #1046 from mozilla/fix-delete-button
Fix #890  Fix delete by initializing the metrics on android; delete w…
2018-12-17 13:49:05 -08:00
Donovan Preston
cbc847b751 Remove debug prints 2018-12-17 16:42:03 -05:00
Donovan Preston
c71ef9ae84 Fix #890 Fix delete by initializing the metrics on android; delete was trying to use metrics and causing an exception because it hadn't been initialized 2018-12-17 16:40:17 -05:00
Jon Buckley
e6f7100bad Upgrade to Node v10 2018-12-14 16:19:50 -05:00
Danny Coates
793dfb4f42 initial state refactor 2018-12-13 11:12:06 -08:00
Danny Coates
8cde99d2a2 Merge pull request #1038 from mozilla/fix-npm-run-android
Fix npm run android by removing the <base href> when running under the dev server
2018-12-13 09:27:53 -08:00
Donovan Preston
d217ac14fc Fix npm run android by removing the <base href> when running under the dev server 2018-12-13 11:44:28 -05:00
Mark Liang (You-Wen)
aa156558b6 Update vnext android ui (#1036)
* refine android ui

* fix layout
2018-12-13 11:36:03 -05:00
Danny Coates
09a4d7b9ee fixed filelist sync on initial login and after upload 2018-12-12 10:14:06 -08:00
G12r
1eba2f09a3 Pontoon: Update Georgian (ka) localization of Test Pilot: Firefox Send
Localization authors:
- G12r <georgianization@outlook.com>
2018-12-12 09:54:16 +00:00
Danny Coates
e58ebc835c changed upload button label 2018-12-11 15:11:38 -08:00
Danny Coates
4fc4421398 updated deps 2018-12-11 09:48:05 -08:00
Danny Coates
61299dd8ea split serviceWorker and streamDownload capabilities 2018-12-10 12:47:23 -08:00
Tomer Cohen
1eae5e8e08 Pontoon: Update Hebrew (he) localization of Test Pilot: Firefox Send
Localization authors:
- Tomer Cohen <tomer.mozilla@tomercohen.com>
2018-12-08 17:35:37 +00:00
robbp
d3f034c4c3 Pontoon: Update Romanian (ro) localization of Test Pilot: Firefox Send
Localization authors:
- robbp <robbpaun@gmail.com>
2018-12-06 11:15:13 +00:00
pyup.io bot
729e0c9f9d Scheduled weekly dependency update for week 48 (#1032)
* Update flake8-isort from 2.5 to 2.6.0

* Update pytest from 4.0.0 to 4.0.1
2018-12-03 15:00:53 -05:00
Danny Coates
81cf84b131 Merge pull request #1031 from mozilla/use-prod-oauth-server
Use the production fxa server and app id
2018-11-27 18:02:01 -08:00
Donovan Preston
e55aa7cb86 Use the production fxa server and app id 2018-11-27 18:17:23 -05:00
Danny Coates
fb782aa147 Merge pull request #1030 from mozilla/rename-to-org-mozilla-sendandroid
Rename package to org.mozilla.sendandroid per https://bugzilla.mozilla.org/show_bug.cgi?id=1494393#c10
2018-11-27 08:35:35 -08:00
Donovan Preston
d1212540a8 Rename package to org.mozilla.sendandroid per Rename package to org.mozilla.sendandroid per https://bugzilla.mozilla.org/show_bug.cgi?id=1494393#c10 2018-11-27 09:34:51 -05:00
Danny Coates
0640902350 moved non-async init earlier in main.js 2018-11-26 16:05:22 -08:00
Danny Coates
7dd20f3c04 removed unused babel-polyfill 2018-11-26 15:41:46 -08:00
Danny Coates
613a70f473 improved serviceworker caching 2018-11-26 13:25:47 -08:00
Danny Coates
b6e7fa5496 updated deps 2018-11-26 12:35:49 -08:00
Danny Coates
bf2399ab88 updated deps 2018-11-26 12:10:10 -08:00
Danny Coates
31ff9aaabe remove cryptofill from layout.js 2018-11-26 11:07:48 -08:00
Danny Coates
87ac8b241b load cryptofill.js async 2018-11-26 10:36:49 -08:00
G12r
f4b6bab5d7 Pontoon: Update Georgian (ka) localization of Test Pilot: Firefox Send
Localization authors:
- G12r <georgianization@outlook.com>
2018-11-25 01:33:40 +00:00
G12r
e55b3f828f Pontoon: Update Georgian (ka) localization of Test Pilot: Firefox Send
Localization authors:
- G12r <georgianization@outlook.com>
2018-11-25 01:13:12 +00:00
Danny Coates
5845fa5c05 replace yo-yoify with nanohtml 2018-11-23 13:25:22 -08:00
Danny Coates
d439dbe168 Merge pull request #1024 from mozilla/ws
implemented websocket flow control to prevent over buffering
2018-11-22 13:24:34 -08:00
Danny Coates
531584dbf1 implemented websocket flow control to prevent over buffering 2018-11-22 13:21:39 -08:00
Danny Coates
015067648e fixed initScript version.json path 2018-11-21 14:40:38 -08:00
Danny Coates
5f8d9cb842 Merge pull request #1009 from pdehaan/issue-1008
Fix a couple potential HTML issues in l10n files
2018-11-21 09:11:16 -08:00
tatalmondmush
81659bce85 Pontoon: Update Shona (sn) localization of Test Pilot: Firefox Send
Localization authors:
- tatalmondmush <tatalmondmush@gmail.com>
2018-11-21 15:16:19 +00:00
Danny Coates
d4528848d9 moved jsconfig code into initScript 2018-11-20 12:23:05 -08:00
Danny Coates
416b9902cb added a webmanifest (#1023) 2018-11-20 15:00:32 -05:00
Danny Coates
5028351e6e Merge pull request #1022 from mozilla/new-fxa-clientid
Switch to a fxa clientId created just for Send Android
2018-11-20 09:30:29 -08:00
Donovan Preston
9806dba408 Switch to a fxa clientId created just for Send Android 2018-11-20 12:27:02 -05:00
Danny Coates
1e62aa976d reimplemented l10n using dynamic import() (#1012)
this should greatly reduce the complexity of the l10n code
and build pipeline and eliminate the most common error
seen in sentry logs (no translate function)
2018-11-20 09:50:59 -05:00
Danny Coates
5afa4e5c9b Merge pull request #1010 from mozilla/totalSize
added total size to wip tile
2018-11-19 21:37:31 -08:00
Danny Coates
eb1536878a Merge pull request #1016 from mozilla/api-prefix
Add setApiUrlPrefix and use it in the android version.
2018-11-19 15:24:14 -08:00
Donovan Preston
ae4b8cf0d3 Add setApiUrlPrefix and use it in the android version. 2018-11-19 15:10:57 -05:00
Danny Coates
74d8a12c07 fixes #1013. dragging page elements 2018-11-19 10:48:52 -08:00
pyup.io bot
f761eb92ee Scheduled weekly dependency update for week 46 (#1014)
* Update pytest from 3.10.0 to 4.0.0

* Update pytest-xdist from 1.24.0 to 1.24.1
2018-11-19 13:41:48 -05:00
Danny Coates
c99697caae fixes #1015. lolwhoops 2018-11-19 10:34:58 -08:00
Danny Coates
b80dd48434 added total size to wip tile 2018-11-16 17:31:37 -08:00
Danny Coates
0dc7398414 removed unused images and testpilot twitter link 2018-11-16 16:23:24 -08:00
Peter deHaan
164f5e7d0e Fix a couple potential HTML issues in l10n files 2018-11-16 16:05:33 -08:00
Danny Coates
291f02855c removed fast-crc32c since we aren't validating gcs payloads 2018-11-16 15:58:22 -08:00
Danny Coates
b6517c5442 port fix for #1005 to vnext 2018-11-16 13:33:40 -08:00
Danny Coates
4ef303a2c9 updated deps 2018-11-16 13:06:36 -08:00
Danny Coates
fbad1ab55a formatting update 2018-11-16 12:39:36 -08:00
Danny Coates
91a8c66e0c Merge pull request #1007 from mozilla/comp
converting some things to choo/component
2018-11-16 12:35:16 -08:00
Danny Coates
6fdc430c4f delete old service worker caches 2018-11-16 12:32:32 -08:00
Danny Coates
32a55d00b2 don't render expired uploads 2018-11-16 12:30:15 -08:00
Danny Coates
9989f944c3 fixed account ui when not enabled 2018-11-16 10:01:53 -08:00
Danny Coates
660a1947cc try out service worker cache 2018-11-16 09:32:29 -08:00
Danny Coates
037c79730d converting some things to choo/component 2018-11-15 15:43:32 -08:00
Danny Coates
a576d54d64 fixed android height in emulator 2018-11-15 12:22:29 -08:00
Danny Coates
1528acde73 Merge pull request #1006 from mozilla/update-android-ui
Update the android ui to work with the new desktop ui components.
2018-11-15 09:40:42 -08:00
Danny Coates
d67716f26b fixed some element heights at md width 2018-11-15 09:27:17 -08:00
Donovan Preston
43c596fb99 Fix rendering problems with the android ui. 2018-11-15 10:06:35 -05:00
Danny Coates
c72e26c192 a couple android ui tweaks 2018-11-14 21:13:38 -08:00
Danny Coates
7013f5cf80 v2.6.1 2018-11-14 16:58:45 -08:00
Danny Coates
6184a70ba4 fixes #1005
The upstream gcp aggressively closes the connection once it has
received Content-Length bytes. However the @google-cloud/storage
module doesn't handle this well and emits no event in this case.
We were setting Content-Length because it's slightly more
efficient and was important for our download progress
bar (not anymore). The download should function fine without
setting the Content-Length, and allows the storage stream to finish
before closing the upstream socket.
2018-11-14 16:38:46 -08:00
Donovan Preston
3dc0ca933b Update the android ui to work with the new desktop ui components. 2018-11-14 14:20:32 -05:00
Danny Coates
f9002df490 updated cryptofill for safari ECDH 2018-11-12 11:15:36 -08:00
Danny Coates
1d09a2e694 fixed double file open on chrome 2018-11-08 16:24:32 -08:00
Danny Coates
e9aa9d60af updated deps 2018-11-08 15:12:20 -08:00
Danny Coates
0631abe653 renamed fileManager.js to controller.js 2018-11-08 15:12:07 -08:00
Rodrigo
e264d0da62 Pontoon: Update Portuguese (Portugal) (pt-PT) localization of Test Pilot: Firefox Send
Localization authors:
- Rodrigo <rodrigo.mcunha@hotmail.com>
2018-11-08 22:54:41 +00:00
Donovan Preston
cab6f1bafb Implement the mechanics of fxa login on android, but don't show ui fo… (#1000)
* Implement the mechanics of fxa login on android, but don't show ui for it yet. Also, scopedKeys are not yet implemented.

* Hopefully fix the package-lock conflict?

* WIP on android scoped keys

* Finish implementing login.

* created android/user.js to handle android logins
2018-11-08 16:35:19 -05:00
Anesu Chiodza
23a6e338e8 Pontoon: Update Shona (sn) localization of Test Pilot: Firefox Send
Localization authors:
- Anesu Chiodza <anesuchiodza@gmail.com>
2018-11-08 18:13:26 +00:00
Anesu Chiodza
2c1dfdbe07 Pontoon: Update Shona (sn) localization of Test Pilot: Firefox Send
Localization authors:
- Anesu Chiodza <anesuchiodza@gmail.com>
2018-11-08 17:53:30 +00:00
pyup.io bot
994e77a38b Scheduled weekly dependency update for week 44 (#996)
* Update selenium from 3.14.1 to 3.141.0

* Update pytest from 3.9.3 to 3.10.0

* Update pytest-xdist from 1.23.2 to 1.24.0
2018-11-07 15:20:00 +01:00
Danny Coates
ffac4ae5b1 Merge pull request #998 from mozilla/i989
Changed sign in area
2018-11-06 21:34:04 -08:00
Danny Coates
e9d5d87691 changed sign in area 2018-11-06 21:30:35 -08:00
Danny Coates
173ca461a9 bump version to v2.6.0 2018-11-06 11:49:27 -08:00
Danny Coates
4eca951a1c fixed syncFileList result when logged out 2018-11-06 11:36:20 -08:00
Danny Coates
064077d706 Merge pull request #984 from mozilla/droid-ui-2
wip on using shared ui in android
2018-11-06 11:33:10 -08:00
Danny Coates
76d2d72fb0 revert puppeteer to 1.9.0 to debug circleci 2018-11-06 11:28:54 -08:00
Danny Coates
99f6f53e40 renamed android's index.html to android.html 2018-11-06 11:21:14 -08:00
Danny Coates
732094a5ba Merge remote-tracking branch 'origin/vnext' into droid-ui-2 2018-11-06 10:54:44 -08:00
Danny Coates
6868af11cd add click handler to whole empty area 2018-11-05 20:55:26 -08:00
Danny Coates
ae89f1964f fixes #994. add new files to top of upload area 2018-11-05 16:43:45 -08:00
Danny Coates
63796c8ccb updated deps 2018-11-05 15:58:35 -08:00
Danny Coates
be38392192 log out when the auth token is expired 2018-11-05 15:56:59 -08:00
Danny Coates
d60eb5e022 Merge pull request #995 from mozilla/ui-fix
fix #985-#988, #990-#993
2018-11-05 15:53:20 -08:00
Danny Coates
1ef80febcb fixed filename word-break 2018-11-05 15:46:49 -08:00
Danny Coates
43748295b0 style updated for chrome 2018-11-05 15:00:35 -08:00
Mark Liang
7394d20cb7 fix #985-#988, #990-#993 2018-11-05 16:12:40 +08:00
Danny Coates
eb79ce1835 wip on using shared ui in android 2018-11-02 16:33:16 -07:00
Danny Coates
77a5a377e3 updated deps 2018-11-02 16:07:26 -07:00
Danny Coates
53426b950a added gcs 2018-11-02 14:24:10 -07:00
Danny Coates
0cf95b30c0 Merge pull request #980 from mozilla/fresh
New UI implementation
2018-11-02 14:10:09 -07:00
Danny Coates
d3a3e241bf Merge pull request #983 from mozilla/fresh-ui-mark-update
Update UI
2018-11-02 14:04:02 -07:00
Danny Coates
1a7510070e fixed footer integration test 2018-11-02 11:57:50 -07:00
Danny Coates
1c063111cc a few style tweaks 2018-11-02 11:28:56 -07:00
Mark Liang
cacb3a898d update ui 2018-11-02 17:42:59 +08:00
Danny Coates
5ebe869c26 fixed intro size on home page 2018-11-01 12:04:14 -07:00
Danny Coates
dee9c0a538 fixed modal placement in responsive view 2018-11-01 11:05:17 -07:00
Danny Coates
90f261a314 moved some styles 2018-11-01 10:44:48 -07:00
Danny Coates
932a2a4576 removed unused code 2018-11-01 10:44:47 -07:00
Danny Coates
6ba3be8a0f updated integration tests for new ui 2018-11-01 10:44:47 -07:00
Danny Coates
891ffc20af added copied text after copy button click 2018-11-01 10:44:47 -07:00
Danny Coates
c359678226 styled dl password input a bit 2018-11-01 10:44:46 -07:00
Danny Coates
26a943939d wip on download page 2018-11-01 10:44:46 -07:00
Danny Coates
12e6eb1666 added password to upload form 2018-11-01 10:44:45 -07:00
Danny Coates
0e5202c470 updated modal 2018-11-01 10:44:45 -07:00
Danny Coates
7ad63ae004 stubbed copy dialog 2018-11-01 10:44:44 -07:00
Danny Coates
d881755814 added purgecss and cssnano 2018-11-01 10:44:16 -07:00
Danny Coates
211404237a added wide layout 2018-11-01 10:43:45 -07:00
Danny Coates
7838ad586d removed old ui 2018-11-01 10:43:44 -07:00
Danny Coates
f0cfc19f8c a new approach for the ui 2018-11-01 10:43:43 -07:00
Danny Coates
cc85486414 wip 2018-11-01 10:43:14 -07:00
Danny Coates
2b81ff1fb3 some wip. still broken 2018-11-01 10:43:14 -07:00
Danny Coates
5b939d2c95 reorged routes/index.js (broken) 2018-11-01 10:43:13 -07:00
John Gruen
8964387331 update ui 2018-11-01 10:43:13 -07:00
Danny Coates
3bf7798323 Merge pull request #963 from mozilla/gcs
WIP: GCS
2018-11-01 10:40:15 -07:00
Danny Coates
9e8e604024 stubbed in gcs (untested) 2018-11-01 10:36:05 -07:00
pyup.io bot
9bb36cd827 Scheduled weekly dependency update for week 43 (#978)
* Update selenium from 3.14.0 to 3.14.1

* Update flake8 from 3.5.0 to 3.6.0

* Update pypom from 2.1.0 to 2.2.0

* Update pytest from 3.8.0 to 3.9.3

* Update pytest-xdist from 1.23.0 to 1.23.2
2018-10-29 14:11:02 -04:00
hi
103aa8a0c8 Pontoon: Update Vietnamese (vi) localization of Test Pilot: Firefox Send
Localization authors:
- hi <hi@duonganhtuan.com>
- Quế Tùng <best.cloney.1301@gmail.com>
- nguyễn việt anh <hatsune141p@gmail.com>
2018-10-28 12:34:28 +00:00
Cristian Silaghi
62d507120c Pontoon: Update Romanian (ro) localization of Test Pilot: Firefox Send
Localization authors:
- Cristian Silaghi <cristian.silaghi@mozilla.ro>
2018-10-22 14:35:32 +00:00
Georgianizator
8ccb1c449a Pontoon: Update Georgian (ka) localization of Test Pilot: Firefox Send
Localization authors:
- Georgianizator <georgianization@outlook.com>
2018-10-21 05:34:07 +00:00
新垣结衣松冈茉优长泽雅美门胁麦上野树里石原里美
a07eb1ad1c Pontoon: Update Chinese (China) (zh-CN) localization of Test Pilot: Firefox Send
Localization authors:
- 新垣结衣松冈茉优长泽雅美门胁麦上野树里石原里美 <eloli@foxmail.com>
2018-10-10 09:34:06 +00:00
Danny Coates
78c6d83462 Merge pull request #965 from mozilla/255
updated deps
2018-10-08 12:13:20 -07:00
Danny Coates
5d41da0e16 bump version & updated deps 2018-10-08 12:06:09 -07:00
Danny Coates
d87fb64390 removed keys_jwe from local storage 2018-10-08 11:16:06 -07:00
新垣结衣松冈茉优长泽雅美门胁麦上野树里石原里美
5afe9ff2af Pontoon: Update Chinese (China) (zh-CN) localization of Test Pilot: Firefox Send
Localization authors:
- 新垣结衣松冈茉优长泽雅美门胁麦上野树里石原里美 <eloli@foxmail.com>
2018-10-05 23:02:22 +00:00
Danny Coates
97d4f1223f reduce log noise in puppeteer test 2018-10-05 09:52:00 -07:00
Danny Coates
c1bbc97514 updated deps 2018-10-05 09:43:21 -07:00
Danny Coates
23932c0d4c Merge pull request #960 from mozilla/vnext-integration-tests
Vnext integration tests
2018-10-04 15:18:30 -07:00
Danny Coates
76de2b29a5 cleaned up integration test flow 2018-10-04 15:06:39 -07:00
Benjamin Forehand Jr
23d629b80b Added webdriverio integration tests 2018-10-03 11:22:30 -07:00
Danny Coates
bd02b7db8e updated deps & bump version 2018-10-02 13:15:02 -07:00
Danny Coates
7166f4e3d6 improved paste to handle text and pasted file's names 2018-10-01 17:46:09 -07:00
Danny Coates
f7f8944e00 stubbed in signup dialog 2018-09-27 15:46:46 -07:00
Danny Coates
d560fc05cf updated deps 2018-09-27 11:52:00 -07:00
Staś Małolepszy
f8964ebb99 Use FluentResource to parse and serialize FTL files server-side (#952) 2018-09-27 11:49:41 -07:00
Myungjae Won
a2eee15a7d Pontoon: Update Korean (ko) localization of Test Pilot: Firefox Send
Localization authors:
- Myungjae Won <breadmj@gmail.com>
2018-09-27 02:13:30 +00:00
Danny Coates
a997a44a23 renamed auth route 2018-09-26 12:22:51 -07:00
Mark Liang (You-Wen)
88db2c1cf4 UI Review German Edition (#950)
* UI changes for longer text

* UI changes for longer text
2018-09-26 10:59:33 -07:00
Danny Coates
307c9d3fa1 tweaked okDialog style 2018-09-26 10:48:37 -07:00
Danny Coates
b0a09ef953 updated .gitignore to exclude xcode userdata 2018-09-26 09:53:30 -07:00
Danny Coates
84657ed149 use firefox logo as logged in default avatar 2018-09-25 13:54:47 -07:00
Danny Coates
3d95848ba3 changed feedback button style 2018-09-25 13:49:46 -07:00
Danny Coates
044138b540 removed background image 2018-09-25 13:39:45 -07:00
Danny Coates
3f098f340e Merge pull request #939 from mozilla/more-android-ui
Add ui for setting max downloads, max time, and password.
2018-09-25 12:15:49 -07:00
Danny Coates
6b9a735bec parameterize download count dropdown on android 2018-09-25 11:36:23 -07:00
Donovan Preston
8b21a54ab4 Add the options route to the dev server 2018-09-25 11:14:17 -07:00
Donovan Preston
a181bb3509 Set the time limit in state so that fileManager can get to it. 2018-09-25 11:14:17 -07:00
Donovan Preston
5ec2486c57 Add ui for setting max downloads, max time, and password. 2018-09-25 11:14:17 -07:00
Danny Coates
fe4eb1d582 updated deps 2018-09-24 16:21:38 -07:00
Danny Coates
294cd0dfa8 reset page expiry options on logout 2018-09-24 15:25:08 -07:00
Danny Coates
e2259ae737 made download count and expiry options server configurable 2018-09-24 15:08:39 -07:00
Danny Coates
b61bf3c867 changed default config to have accounts disabled 2018-09-24 13:04:29 -07:00
Danny Coates
7eb7590f06 fixed getFileList when the response isn't OK 2018-09-24 12:23:46 -07:00
Danny Coates
c8bf3101aa fixed multiple issues with the /signin page. #935 #936 #937 2018-09-24 12:01:39 -07:00
alamanda
603a352595 Pontoon: Update Indonesian (id) localization of Test Pilot: Firefox Send
Localization authors:
- alamanda <dian.ina@gmail.com>
2018-09-24 07:12:00 +00:00
Danny Coates
d34ff79fd7 implemented oauth state parameter 2018-09-21 14:16:56 -07:00
صفا الفليج
7b8655a079 Pontoon: Update Arabic (ar) localization of Test Pilot: Firefox Send
Localization authors:
- صفا الفليج <safa1996alfulaij@gmail.com>
2018-09-21 19:53:21 +00:00
Ruba
d3ba54d05a Pontoon: Update Arabic (ar) localization of Test Pilot: Firefox Send
Localization authors:
- Ruba <ruba.awayes@gmail.com>
2018-09-21 17:52:14 +00:00
صفا الفليج
83e2aec3f5 Pontoon: Update Arabic (ar) localization of Test Pilot: Firefox Send
Localization authors:
- صفا الفليج <safa1996alfulaij@gmail.com>
2018-09-20 22:52:43 +00:00
Danny Coates
135f40f65d set default fxa env for localhost 2018-09-20 14:13:07 -07:00
Danny Coates
fb83b324ab fixed download button multi-click. fixes #927 2018-09-20 09:04:02 -07:00
risger
0abf890fc4 Pontoon: Update Chinese (Taiwan) (zh-TW) localization of Test Pilot: Firefox Send
Localization authors:
- risger <risger@live.com>
2018-09-20 02:32:18 +00:00
Danny Coates
93e82cf953 disable capabilities.account when no FXA_CLIENT_ID is set 2018-09-19 12:54:27 -07:00
Danny Coates
e3087f008c Merge pull request #932 from mozilla/document-android
Add a small blurb describing how to test the android version.
2018-09-19 09:44:21 -07:00
Danny Coates
ec5d301814 set capabilities.account = false on the server to defer rendering those components. fixes #929 2018-09-19 09:01:19 -07:00
Donovan Preston
da9f4d0ce5 Add a small blurb describing how to test the android version. 2018-09-19 10:19:18 -04:00
Danny Coates
99055b1342 fixed leaky app.state on the server-side. fixes #928 2018-09-18 16:23:58 -07:00
Danny Coates
17a0393ce0 disable upload button while uploading. fixes #927 2018-09-18 12:56:42 -07:00
Danny Coates
3d2c8c2ce2 added deploy_vnext to circle.yml 2018-09-18 11:30:43 -07:00
pyup.io bot
38fcd7227d Scheduled weekly dependency update for week 37 (#926)
* Update selenium from 3.13.0 to 3.14.0

* Update pypom from 2.0.0 to 2.1.0

* Update pytest from 3.6.3 to 3.8.0

* Update pytest-selenium from 1.13.0 to 1.14.0

* Update pytest-xdist from 1.22.2 to 1.23.0
2018-09-18 11:05:26 -04:00
Danny Coates
7dcf4bcdb9 fixed capabilities.account when localStorage is disabled 2018-09-17 12:05:03 -07:00
Danny Coates
942457b357 added account to capabilities 2018-09-14 13:58:19 -07:00
Danny Coates
3a162d47c5 updated deps 2018-09-14 11:53:13 -07:00
Danny Coates
dc3cffe63b Merge pull request #925 from mozilla/modal
stubbed in modal dialog
2018-09-14 09:40:33 -07:00
Danny Coates
bf83b43866 Merge branch 'vnext' into modal 2018-09-14 09:20:30 -07:00
Danny Coates
7ccf462bf8 implemented PKCE auth (#921)
* implemented PKCE auth

* removed node-jose

* added PKCE tests
2018-09-14 11:00:33 -04:00
Enol
6d29cebabb Pontoon: Update Asturian (ast) localization of Test Pilot: Firefox Send
Localization authors:
- Enol <enolp@softastur.org>
2018-09-13 22:22:17 +00:00
Danny Coates
cdc15596df stubbed in modal dialog 2018-09-13 10:37:52 -07:00
Danny Coates
20528eb0d1 added ANDROID environment variable to dev server for hosting the android html 2018-09-10 10:56:59 -07:00
Danny Coates
a8b305a84e Merge pull request #920 from mozilla/ignore-non-data-urls
Ignore messages posted to onmessage that aren't data urls
2018-09-07 10:32:22 -07:00
Donovan Preston
76f9d3ee35 Ignore messages posted to onmessage that aren't data urls 2018-09-07 13:21:30 -04:00
Danny Coates
17ee4e0058 load android ui in dev when browsing to /android (#919) 2018-09-07 13:08:01 -04:00
Danny Coates
041c8ffdd2 updated deps 2018-09-06 23:08:32 -07:00
Danny Coates
35a6c7324d updated babel 2018-09-06 22:52:10 -07:00
Donovan Preston
71ea4e74f6 Implement wss preference url in html; Update to work with the tip of vnext branch; allow viewing the android ui from the webpack server (#918)
* Merge branch 'vnext' of https://github.com/mozilla/send into android-preferences

Fix conflicts

* Implement wss preference url in html; Update to work with the tip of vnext branch; allow viewing the android ui from the webpack server

* Use a try/catch in case localStorage isn't available, which it isn't in a ServiceWorker
2018-09-06 18:56:04 -04:00
Danny Coates
690a705be9 Merge pull request #905 from mozilla/mobile-acceptance-doc
add mobile acceptance criteria
2018-09-06 14:37:42 -07:00
Danny Coates
a1fa36b79c minor serviceWorker tweaks to url matching and 302 redirects 2018-09-05 10:35:36 -07:00
Danny Coates
7c6aabc388 updated fluent to 0.8 2018-09-04 13:30:11 -07:00
Danny Coates
59224516b7 updated dependency minors 2018-09-04 13:13:25 -07:00
Danny Coates
025f040388 adjust streamDownload capability to exclude safari but not chrome 2018-09-04 13:05:11 -07:00
Danny Coates
71b24b05d0 added http logging to the console in dev 2018-09-04 12:09:03 -07:00
Danny Coates
df1c4ef913 emit complete for blob downloads 2018-09-04 11:08:44 -07:00
Danny Coates
353fab8486 Merge pull request #916 from mozilla/fxa
Implemented FxA
2018-09-04 11:07:25 -07:00
Danny Coates
976fd61f23 removed unused crypto functions 2018-09-04 10:41:45 -07:00
Danny Coates
00550872d7 hide signup promo when logged in 2018-08-31 15:15:25 -07:00
Danny Coates
85185d048c added fxa auth to /ws 2018-08-31 14:30:50 -07:00
Danny Coates
fb7176d989 added fxa auth to /params 2018-08-31 11:43:56 -07:00
Danny Coates
718d74fa50 Implemented FxA 2018-08-30 22:10:08 -07:00
John Gruen
c7876f6b7f add mobile acceptance criteria 2018-08-27 11:30:42 +02:00
Georgianizator
8305b9bd2f Pontoon: Update Georgian (ka) localization of Test Pilot: Firefox Send
Localization authors:
- Georgianizator <georgianization@outlook.com>
2018-08-24 20:31:40 +00:00
Mozinet
5c542008ab Pontoon: Update French (fr) localization of Test Pilot: Firefox Send
Localization authors:
- Mozinet <mozinet@gmail.com>
2018-08-20 00:12:16 +00:00
Danny Coates
70bc2b7656 Merge pull request #904 from mozilla/android-port-to-choo-2
Fix #896 Port Send Android to choo
2018-08-16 12:48:42 -07:00
Donovan Preston
7a48c5201a Fix #896 Port Send Android to choo 2018-08-16 12:07:12 -04:00
Donovan Preston
071e283f87 Implement section 2.1 and parts of section 4.1 from the Send Android spec (#901)
* Fix #877 Implement Start page (Empty State) Design

* Update some kotlin and android sdk things, and update to the latest code in vnext

* Begin implementing the card ui which shows after uploading.

* Implement a progress bar.
2018-08-15 15:29:29 -04:00
Emily
29bafe1bae prevent uploading duplicate files 2018-08-10 13:11:17 -07:00
Emily
37c2926252 Merge branch 'time' into vnext 2018-08-09 15:58:23 -07:00
Emily
650d30c4bc fix merge conflicts 2018-08-09 15:58:02 -07:00
Emily
b89bef6e89 refactor to single bucket 2018-08-09 14:49:52 -07:00
Emily
452ccd068b fixes comment in locales 2018-08-09 10:15:54 -07:00
Emily
4ee497a83f minor ui fixes 2018-08-08 17:24:58 -07:00
Emily
bf16e5c8a9 integrate with new ui 2018-08-08 11:07:09 -07:00
Emily
49b9a1f452 refresh package-lock.json 2018-08-07 15:52:20 -07:00
Melo46
e1d6467de4 Pontoon: Update Interlingua (ia) localization of Test Pilot: Firefox Send
Localization authors:
- Melo46 <melo@carmu.com>
2018-08-07 07:52:18 +00:00
Danny Coates
13057804ab Merge pull request #876 from mozilla/uitwo
New UI
2018-08-06 08:58:38 -07:00
Rodrigo Guerra
7dc34ba646 Pontoon: Update Interlingua (ia) localization of Test Pilot: Firefox Send
Localization authors:
- Rodrigo Guerra <rodmguerra@gmail.com>
2018-08-05 02:14:14 +00:00
Rodrigo Guerra
d5a30b710d Pontoon: Update Interlingua (ia) localization of Test Pilot: Firefox Send
Localization authors:
- Rodrigo Guerra <rodmguerra@gmail.com>
2018-08-05 01:53:47 +00:00
Emily
894545a6f0 add fxA ui elements 2018-08-03 16:11:13 -07:00
Emily
4c64593262 add cancel buttons 2018-08-03 16:10:00 -07:00
Emily
c9ae76b209 hook multifile to ui 2018-08-03 16:10:00 -07:00
Danny Coates
e42ad175db Merge pull request #870 from mozilla/ios-prototype-3
Implement ios prototype version
2018-08-03 12:03:13 -07:00
Danny Coates
a83e0cfbda fluent_loader no longer needs polyfill with node 10 2018-08-03 10:48:00 -07:00
Danny Coates
e97b8ff42d updated deps & updated node for circleci and docker to 10.x. (8.x should technically still work) 2018-08-02 14:22:11 -07:00
Donovan Preston
3e1f0f1f56 Remove auto-generated copyright lines 2018-08-02 14:24:13 -04:00
Donovan Preston
c13b63ec9c Merge branch 'vnext' of https://github.com/mozilla/send into ios-prototype-3 2018-08-02 14:01:50 -04:00
Danny Coates
a0edff1ead make ece encrypt key extractable for Edge 2018-07-31 15:37:04 -07:00
Danny Coates
4fabd539d1 added exportKey to capabilities check 2018-07-31 15:10:12 -07:00
Danny Coates
9501bf7270 colon in wss url breaks edge when port is not explicit 2018-07-31 12:19:27 -07:00
Danny Coates
9bd96210e5 Merge pull request #875 from mozilla/capabilities
began adding capability flags
2018-07-31 11:42:13 -07:00
Danny Coates
d14aeb29e9 began adding capability flags 2018-07-31 11:29:26 -07:00
Donovan Preston
fd1a3dc251 Merge branch 'vnext' of https://github.com/mozilla/send into ios-prototype-3 2018-07-30 09:44:44 -04:00
Danny Coates
ebbb174c66 Merge pull request #868 from mozilla/multifile
Implemented multi-file upload/download
2018-07-27 16:46:34 -07:00
Danny Coates
7bf104960e Implemented multi-file upload/download 2018-07-27 16:40:52 -07:00
Danny Coates
28131243f9 up default max_file_size to 3gb 2018-07-27 10:39:23 -07:00
Danny Coates
b2aed06328 disable integration tests on vnext 2018-07-27 09:31:22 -07:00
Donovan Preston
ac1c7c2363 Add jpeg 2000 to the list. 2018-07-27 10:50:10 -04:00
Donovan Preston
e3601055fc Implement ios prototype version 2018-07-27 09:20:08 -04:00
Donovan Preston
a80d007e0c Hook up the android kotlin code to the send js code (#860) 2018-07-27 09:11:46 -04:00
Danny Coates
5c7b4ace9a updated deps & re-enabled frontend tests 2018-07-25 12:46:40 -07:00
Danny Coates
5e9e63944b extracted blobSlicer, fixed download cancel tests 2018-07-25 12:30:28 -07:00
Georgianizator
c90310405c Pontoon: Update Georgian (ka) localization of Test Pilot: Firefox Send
Localization authors:
- Georgianizator <georgianization@outlook.com>
2018-07-25 05:32:42 +00:00
Danny Coates
5483dc2506 use actual file size in dl progress. detect cancelled stream 2018-07-23 15:18:38 -07:00
Danny Coates
2afe79c941 Merge pull request #866 from mozilla/sw
Service Worker for streaming
2018-07-23 10:01:47 -07:00
Danny Coates
7673715c65 disabled frontend tests in ci
frontend tests are failing in puppeteer but work in the
browsers.
2018-07-23 09:49:16 -07:00
Arash Mousavi
1bd85ee656 Pontoon: Update Persian (fa) localization of Test Pilot: Firefox Send
Localization authors:
- Arash Mousavi <mousavi.arash@gmail.com>
2018-07-20 14:31:37 +00:00
Danny Coates
38fd349d9b use TransformStream if available 2018-07-19 14:46:12 -07:00
Rodrigo
45452c7153 Pontoon: Update Portuguese (Portugal) (pt-PT) localization of Test Pilot: Firefox Send
Localization authors:
- Rodrigo <rodrigo.mcunha@hotmail.com>
2018-07-19 21:13:18 +00:00
Danny Coates
f32ebd913a send nonce to sw 2018-07-19 13:20:10 -07:00
Danny Coates
86f2a531d4 Merge branch 'vnext' into sw 2018-07-19 12:16:48 -07:00
Danny Coates
f923ff4f87 Merge remote-tracking branch 'origin/master' into vnext 2018-07-19 12:14:57 -07:00
Danny Coates
282cf0b595 use lib for setting content-disposition for more correctness 2018-07-19 12:11:55 -07:00
Danny Coates
f12d3abe79 refactored stream transforms 2018-07-18 16:39:14 -07:00
Danny Coates
f58b6194ce updated streams ponyfill 2018-07-17 11:40:01 -07:00
Emily Hou
59ba89262f fix download count on server (#863) 2018-07-17 09:48:47 -07:00
Danny Coates
f4f8332f96 WIP on shimming streams in firefox 2018-07-13 17:05:19 -07:00
Danny Coates
23c347175a Merge branch 'vnext' into sw 2018-07-13 12:27:39 -07:00
Danny Coates
dd0cb78ea2 Merge remote-tracking branch 'origin/master' into vnext 2018-07-13 12:25:28 -07:00
Danny Coates
3a8172fa63 Merge remote-tracking branch 'origin/vnext' into sw 2018-07-13 12:22:13 -07:00
Danny Coates
2a63a5b103 sourcemaps for prod cuz why not 2018-07-13 11:36:51 -07:00
Danny Coates
787d227761 got webpack production mode running 2018-07-13 11:13:09 -07:00
Danny Coates
d906e927ed Merge pull request #862 from mozilla/i844
fixes #844
2018-07-13 09:01:07 -07:00
Danny Coates
1a78f57515 don't set cache header on serviceWorker.js 2018-07-12 20:48:07 -07:00
Emily
527e9f09c9 add a test 2018-07-12 16:07:18 -07:00
Danny Coates
5677390a45 added content-length to sw response 2018-07-12 15:32:07 -07:00
Danny Coates
ddeaf8076d added wss to csp connect-src 2018-07-12 14:27:49 -07:00
Emily
5ff92c6452 fix cancelled downloads increasing count 2018-07-12 14:02:05 -07:00
Danny Coates
ebf6bda467 updated to webpack 4 2018-07-12 13:16:02 -07:00
Emily
b76899a353 fix download cancel 2018-07-12 11:22:49 -07:00
Emily
05696cffd9 Merge branch 'sw' of github.com:mozilla/send into sw
sw
2018-07-11 16:53:01 -07:00
Emily
ff7969a7ef fix download workflow tests 2018-07-11 16:52:46 -07:00
avelper
dfea1e96fb Pontoon: Update Spanish (Spain) (es-ES) localization of Test Pilot: Firefox Send
Localization authors:
- avelper <avelper@mozilla-hispano.org>
- jesferman1993 <jesferman1993@hotmail.com>
2018-07-10 21:33:30 +00:00
Danny Coates
16d7af843b new dev webpack config for great deving 2018-07-10 10:47:50 -07:00
Emily
6db3009e5f download cancel and progress 2018-07-09 17:00:19 -07:00
Emily
921df9e1aa dupe network request bug 2018-07-09 15:39:06 -07:00
pyup.io bot
7e30fe8d33 Scheduled weekly dependency update for week 27 (#861)
* Update selenium from 3.12.0 to 3.13.0

* Update pytest from 3.6.2 to 3.6.3
2018-07-09 15:55:57 -04:00
Emily
f98bc0878c saves stream to file 2018-07-06 15:49:50 -07:00
Emily
62ed0a411f sw 2018-07-05 12:40:49 -07:00
Donovan Preston
1f13cf2c5f Merge pull request #856 from mozilla/android-use-local-files
Android use local files
2018-07-02 15:25:35 -04:00
Danny Coates
cc7ea73513 updated deps 2018-06-29 15:14:55 -07:00
Emily
38ef52d3ba uses fetch.body 2018-06-29 09:36:08 -07:00
Emily
5f79a9fb6d fixes downloading files as .part 2018-06-28 11:15:16 -07:00
వీవెన్
a74a560f0a Pontoon: Update Telugu (te) localization of Test Pilot: Firefox Send
Localization authors:
- వీవెన్ <veeven@gmail.com>
2018-06-28 10:15:36 +00:00
Danny Coates
9472d5eaa6 added delay when ws.bufferedAmount is high 2018-06-27 09:20:16 -07:00
వీవెన్
93072c0c1e Pontoon: Update Telugu (te) localization of Test Pilot: Firefox Send
Localization authors:
- వీవెన్ <veeven@gmail.com>
2018-06-26 16:12:41 +00:00
Danny Coates
126ea8c7e6 use a Duplex stream for EOF 2018-06-25 14:27:56 -07:00
Emily Hou
beccd80902 small storage fix (#858) 2018-06-25 11:52:29 -07:00
Emily Hou
9bfdf86bec Merge pull request #855 from mozilla/streaming
add streaming upload
2018-06-25 11:37:06 -07:00
Emily Hou
9d04514f8e stream footer 2018-06-25 11:26:48 -07:00
Danny Coates
a4cf46c0eb fixed minor streaming nits 2018-06-25 10:57:52 -07:00
pyup.io bot
b3ad207326 Update pytest from 3.6.1 to 3.6.2 (#857) 2018-06-25 13:19:15 -04:00
Yongmin H
dced61eb30 Pontoon: Update Korean (ko) localization of Test Pilot: Firefox Send
Localization authors:
- Yongmin H. <firefox@kumul.pe.kr>
2018-06-25 01:52:27 +00:00
Donovan Preston
b5d7e99ba5 Serve ui out of local html files; pass text/plain and image/* data to the webview using a data url 2018-06-22 16:48:21 -04:00
Donovan Preston
c103c7fd7a Update dependencies 2018-06-22 16:47:33 -04:00
Danny Coates
c157e4d31c created server/bin/ for server entrypoints
- added server/bin/test.js for the frontend test runner
2018-06-22 13:34:34 -07:00
Emily Hou
dafe4884fc revisions 2018-06-22 13:17:23 -07:00
Selim Şumlu
42574af2cc Pontoon: Update Turkish (tr) localization of Test Pilot: Firefox Send
Localization authors:
- Selim Şumlu <selim@sum.lu>
2018-06-22 11:33:08 +00:00
Kohei Yoshino
ab699ebcc6 Pontoon: Update English (Canada) (en-CA) localization of Test Pilot: Firefox Send
Localization authors:
- Kohei Yoshino <kohei.yoshino@gmail.com>
2018-06-22 07:32:39 +00:00
Emily Hou
12ccce3016 fix checking file early 2018-06-21 16:36:34 -07:00
Emily Hou
e4a0028f5d add streaming 2018-06-21 13:57:53 -07:00
Danny Coates
863a2e9c29 improved background rendering slightly 2018-06-21 11:28:31 -07:00
Danny Coates
ff092d3d84 Merge pull request #854 from mozilla/uitwo
Some progress on new UI
2018-06-21 10:51:48 -07:00
Danny Coates
207179484c added striped box 2018-06-21 10:32:31 -07:00
Emily Hou
1bd7e4d486 add streaming 2018-06-20 17:05:33 -07:00
Tymur Faradzhev
de37804973 Pontoon: Update Ukrainian (uk) localization of Test Pilot: Firefox Send
Localization authors:
- Lobodzets <Lobodzets@meta.ua>
- Artem Polivanchuk <artem@mozilla.org.ua>
- Tymur Faradzhev <faradzhev.timur@gmail.com>
- Vitaliy Krutko <asmforce@ukr.net>
2018-06-20 19:18:49 +00:00
Frederick Villaluna
7654ec3b7c Pontoon: Update Tagalog (tl) localization of Test Pilot: Firefox Send
Localization authors:
- Frederick Villaluna <fv_comscie@yahoo.com>
2018-06-20 19:18:42 +00:00
Andreas Pettersson
fa84c653ea Pontoon: Update Swedish (sv-SE) localization of Test Pilot: Firefox Send
Localization authors:
- Andreas Pettersson <az@kth.se>
- Luna Jernberg <bittin@cafe8bitar.se>
2018-06-20 19:18:39 +00:00
avelper
7f9b43753e Pontoon: Update Spanish (Spain) (es-ES) localization of Test Pilot: Firefox Send
Localization authors:
- RickieES <rpmdisguise-nave@yahoo.es>
- avelper <avelper@mozilla-hispano.org>
- Jon Vadillo <vadillo.jon@gmail.com>
- jlG <jlg.l10n.es@gmail.com>
- Jordi Cuevas <jordicuevas@gmail.com>
- xxx <fxhelp@yahoo.com>
2018-06-20 19:18:35 +00:00
ravmn
a0c221750b Pontoon: Update Spanish (Chile) (es-CL) localization of Test Pilot: Firefox Send
Localization authors:
- josotrix <josotrix@ravmn.cl>
- ravmn <ravmn@ravmn.cl>
2018-06-20 19:18:28 +00:00
Marcelo Poli
bcb3936e08 Pontoon: Update Spanish (Argentina) (es-AR) localization of Test Pilot: Firefox Send
Localization authors:
- Gabriela <gmontagu@gmail.com>
- Marcelo Poli <enzomatrix@gmail.com>
2018-06-20 19:18:25 +00:00
Michael Wolf
66ec29eee9 Pontoon: Update Sorbian, Upper (hsb) localization of Test Pilot: Firefox Send
Localization authors:
- Michael Wolf <milupo@sorbzilla.de>
2018-06-20 19:18:21 +00:00
Michael Wolf
58535c8c2e Pontoon: Update Sorbian, Lower (dsb) localization of Test Pilot: Firefox Send
Localization authors:
- Michael Wolf <milupo@sorbzilla.de>
2018-06-20 19:18:17 +00:00
Rok Žerdin
563686849f Pontoon: Update Slovenian (sl) localization of Test Pilot: Firefox Send
Localization authors:
- Rok Žerdin <rok.zerdin1990@gmail.com>
- Lan Glad <upwinxp@gmail.com>
- Matjaž Horvat <matjaz.horvat@gmail.com>
2018-06-20 19:18:14 +00:00
Juraj Cigáň
5b607af8d1 Pontoon: Update Slovak (sk) localization of Test Pilot: Firefox Send
Localization authors:
- Juraj Cigáň <kusavica@gmail.com>
2018-06-20 19:18:10 +00:00
Марко Костић (Marko Kostić)
c5061ec51e Pontoon: Update Serbian (sr) localization of Test Pilot: Firefox Send
Localization authors:
- Marko Andrejić <marko.andrejic93@gmail.com>
- Марко Костић (Marko Kostić) <marko.m.kostic@gmail.com>
2018-06-20 19:18:06 +00:00
Maykon Chagas
32074a9bab Pontoon: Update Portuguese (Brazil) (pt-BR) localization of Test Pilot: Firefox Send
Localization authors:
- Maykon Chagas <mchagas@riseup.net>
- Luiz Carlos de Morais <lcom_flip@hotmail.com>
- dgadelha <dgadelha@live.com>
- xxx <fxhelp@yahoo.com>
- Cynthia Pereira <cynthiacpereira@gmail.com>
2018-06-20 19:17:55 +00:00
Bjørn I
26478fc444 Pontoon: Update Norwegian Nynorsk (nn-NO) localization of Test Pilot: Firefox Send
Localization authors:
- Bjørn I. <bjorn.svindseth@online.no>
2018-06-20 19:17:49 +00:00
Håvar Henriksen
7c66c07634 Pontoon: Update Norwegian Bokmål (nb-NO) localization of Test Pilot: Firefox Send
Localization authors:
- Håvar Henriksen <havar@firefox.no>
2018-06-20 19:17:45 +00:00
manxmensch
4ef6f8e3bd Pontoon: Update Malay (ms) localization of Test Pilot: Firefox Send
Localization authors:
- manxmensch <manxmensch@gmail.com>
2018-06-20 19:17:42 +00:00
Juan Esteban Ajsivinac Sián
5591fb03f1 Pontoon: Update Kaqchikel (cak) localization of Test Pilot: Firefox Send
Localization authors:
- Juan Esteban Ajsivinac Sián <ajtzibsyan@yahoo.com>
2018-06-20 19:17:37 +00:00
Muḥend Belqasem
fc35acc6e4 Pontoon: Update Kabyle (kab) localization of Test Pilot: Firefox Send
Localization authors:
- Muḥend Belqasem <belkacem77@gmail.com>
- ybouhamam <ybouhamam@gmail.com>
- Uccen Marzuq <merzouk.ouchene@laposte.net>
- Slimane AMIRI <slimane.amiri@gmail.com>
2018-06-20 19:17:33 +00:00
Kohei Yoshino
5c8c6d56a4 Pontoon: Update Japanese (ja) localization of Test Pilot: Firefox Send
Localization authors:
- Kohei Yoshino <kohei.yoshino@gmail.com>
- aefgh39622 <aefgh39622@gmail.com>
2018-06-20 19:17:29 +00:00
Francesco Lodolo
4f9e63beca Pontoon: Update Italian (it) localization of Test Pilot: Firefox Send
Localization authors:
- Francesco Lodolo <francesco.lodolo@mozillaitalia.org>
- Sav22999 <saverio.morelli@outlook.it>
- Sara Todaro <sara.todaro@mozillaitalia.org>
- Sandro <gialloporpora@mozillaitalia.org>
- Winfox <openlib@email.it>
2018-06-20 19:17:25 +00:00
Melo46
6b7f6426a1 Pontoon: Update Interlingua (ia) localization of Test Pilot: Firefox Send
Localization authors:
- Melo46 <melo@carmu.com>
- Rodrigo Guerra <rodmguerra@gmail.com>
2018-06-20 19:17:21 +00:00
Balázs Meskó
1b6fad9d87 Pontoon: Update Hungarian (hu) localization of Test Pilot: Firefox Send
Localization authors:
- siparon <siparon@gmail.com>
- Balázs Meskó <meskobalazs@gmail.com>
2018-06-20 19:17:14 +00:00
hello
016d9bcf91 Pontoon: Update Hebrew (he) localization of Test Pilot: Firefox Send
Localization authors:
- Yaron Shahrabani <sh.yaron@gmail.com>
- hello <hello@ira.abramov.org>
2018-06-20 19:17:11 +00:00
Jim Spentzos
f199c8b96a Pontoon: Update Greek (el) localization of Test Pilot: Firefox Send
Localization authors:
- Jim Spentzos <jim.spentzos@outlook.com>
- Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
- Giorgos S. <giorgos.skafidas@gmx.com>
- Μιχάλης  ĺ ľfb <mikem132@protonmail.com>
2018-06-20 19:17:04 +00:00
Fjoerfoks
06321126e7 Pontoon: Update Frisian (fy-NL) localization of Test Pilot: Firefox Send
Localization authors:
- Fjoerfoks <fryskefirefox@gmail.com>
2018-06-20 19:16:55 +00:00
Sander Lepik
08f9ad5046 Pontoon: Update Estonian (et) localization of Test Pilot: Firefox Send
Localization authors:
- Merike Sell <merikes@gmail.com>
- Sander Lepik <sander.lepik@eesti.ee>
2018-06-20 19:16:49 +00:00
Ton
9aefe7f7c9 Pontoon: Update Dutch (nl) localization of Test Pilot: Firefox Send
Localization authors:
- Mark Heijl <markh@babelzilla.org>
- Ton <tonnes.mb@gmail.com>
2018-06-20 19:16:42 +00:00
Pin-guang Chen
ea2ff28f32 Pontoon: Update Chinese (Taiwan) (zh-TW) localization of Test Pilot: Firefox Send
Localization authors:
- Pin-guang Chen <petercpg@mail.moztw.org>
2018-06-20 19:16:35 +00:00
YFdyh000
339bf12857 Pontoon: Update Chinese (China) (zh-CN) localization of Test Pilot: Firefox Send
Localization authors:
- YFdyh000 <yfdyh000@gmail.com>
- xcffl <xcffl@outlook.com>
2018-06-20 19:16:31 +00:00
Nihad Suljić
7c605ac7af Pontoon: Update Bosnian (bs) localization of Test Pilot: Firefox Send
Localization authors:
- Mirzet Omerović <mirzet.omerovic.1992@gmail.com>
- Kerim Kalamujić <kerim@mozilla.ba>
- Nihad Suljić <nihad.suljic92@gmail.com>
- Adnan Kičin <adnankicin92@gmail.com>
2018-06-20 19:16:23 +00:00
Belayet Hossain
288b878700 Pontoon: Update Bengali (Bangladesh) (bn-BD) localization of Test Pilot: Firefox Send
Localization authors:
- Ashikur Rahman <ashikurrahman068@gmail.com>
- S M Sarwar Nobin <smsarwar1996@gmail.com>
- Belayet Hossain <bellayet@gmail.com>
2018-06-20 19:16:19 +00:00
Emin Mastizada
db84b331c2 Pontoon: Update Azerbaijani (az) localization of Test Pilot: Firefox Send
Localization authors:
- Emin Mastizada <emin@mastizada.com>
2018-06-20 19:16:15 +00:00
Besnik Bleta
2fde21c522 Pontoon: Update Albanian (sq) localization of Test Pilot: Firefox Send
Localization authors:
- Besnik Bleta <besnik@programeshqip.org>
2018-06-20 19:16:03 +00:00
Danny Coates
211b1a8576 added background image 2018-06-19 12:58:42 -07:00
Danny Coates
fb3747785b Merge pull request #846 from pd4d10/patch-1
Fix #843: Upload image on paste
2018-06-18 12:27:58 -07:00
Danny Coates
93d151a29a Merge pull request #852 from Vimal-Raghubir/master
Remove bad role attribute
2018-06-18 10:07:37 -07:00
Vimal Raghubir
e28a92848d Remove bad role attribute 2018-06-15 10:12:34 -04:00
pyup.io bot
f83784e033 Scheduled weekly dependency update for week 23 (#849)
* Update pytest from 3.6.0 to 3.6.1

* Update pytest-html from 1.18.0 to 1.19.0
2018-06-12 15:36:58 -07:00
Rongjian Zhang
11173c520b Add return to prevent multiple uploads 2018-06-07 10:46:55 +08:00
Rongjian Zhang
608112d56c Fix #843: Upload image on paste 2018-06-06 12:39:26 +08:00
Danny Coates
480a06c426 track bytes sent on download 2018-06-05 15:26:24 -07:00
Danny Coates
f0530975ac updated aws-sdk 2018-06-05 13:20:41 -07:00
Emily Hou
34cb970f11 add dependencies 2018-06-04 11:06:27 -07:00
Emily Hou
a8fef2c0a5 add ece transformers 2018-06-04 10:47:55 -07:00
Emily Hou
fdef37287d Merge pull request #837 from mozilla/refactor-upload
refactored upload away from multipart forms to binary data
2018-06-04 10:01:52 -07:00
Danny Coates
6d4973391a Merge pull request #840 from brainlulz/fix/ally-focus-downloadFile
fix: added a tabindex to the CopyUrl and Delete icon
2018-06-04 09:31:02 -07:00
Brainlulz
0edfc8405f fix: added a tabindex to the CopyUrl and Delete icon 2018-06-03 11:36:20 +02:00
eljuno
5274b732b2 Pontoon: Update Indonesian (id) localization of Test Pilot: Firefox Send
Localization authors:
- eljuno <eljunotrie_anggoro@yahoo.co.id>
2018-06-02 19:11:16 +00:00
Michal Stanke
0a71c8c724 Pontoon: Update Czech (cs) localization of Test Pilot: Firefox Send
Localization authors:
- Michal Stanke <mstanke@mozilla.cz>
2018-06-02 11:12:06 +00:00
Danny Coates
af7a262ef0 refactored upload away from multipart forms to binary data 2018-05-31 14:10:02 -07:00
Arash Mousavi
9feb6866ee Pontoon: Update Persian (fa) localization of Test Pilot: Firefox Send
Localization authors:
- Arash Mousavi <mousavi.arash@gmail.com>
2018-05-31 14:14:28 +00:00
Danny Coates
f95d6d062c Merge remote-tracking branch 'origin/master' into vnext 2018-05-29 15:12:46 -07:00
Danny Coates
196d4211b6 an additional tweak to the position of the selectbox arrow 2018-05-29 15:12:00 -07:00
Danny Coates
a50762ebd7 Merge pull request #833 from dashokkumar93/master
changes related to arrow positioning
2018-05-29 14:56:06 -07:00
Danny Coates
a81c795627 Merge remote-tracking branch 'origin/master' into vnext 2018-05-29 14:41:31 -07:00
Danny Coates
3e65f3a906 only include js files in frontend tests. fixes #834 2018-05-29 14:39:54 -07:00
pyup.io bot
bea7d30836 Scheduled weekly dependency update for week 21 (#832)
* Update pytest from 3.5.1 to 3.6.0
* Update pytest-html from 1.17.0 to 1.18.0
* Update pytest-selenium from 1.12.0 to 1.13.0
2018-05-29 09:05:23 -04:00
Ashok kumar
6acf58f9e9 changes related to arrow positioning
Issue fixes related to https://github.com/mozilla/send/issues/820.
2018-05-29 16:42:34 +05:30
Théo Chevalier
33993eda88 Pontoon: Update French (fr) localization of Test Pilot: Firefox Send
Localization authors:
- Théo Chevalier <theo.chevalier11@gmail.com>
2018-05-28 20:12:06 +00:00
Danny Coates
cbe3c819fb Merge pull request #822 from fzzzy/send-android
Initial working proof-of-concept for android.
2018-05-24 12:42:28 -07:00
Donovan Preston
6baf385058 Add a readme 2018-05-24 11:47:13 -04:00
Donovan Preston
82bd1b2adf For some reason build clean produced this diff. 2018-05-23 21:43:38 -04:00
Donovan Preston
b269712c32 Initial working proof-of-concept for android. 2018-05-23 21:37:31 -04:00
Danny Coates
d50a3d4a1f added some links for streaming 2018-05-23 12:17:23 -07:00
Danny Coates
8242e2088d bump version 2018-05-21 13:59:46 -07:00
emily-hou1
48457f7ac1 Merge pull request #817 from mozilla/i798
fixes #798
2018-05-21 13:28:52 -07:00
Emily Hou
8a496022f4 fixes #798 2018-05-21 13:20:33 -07:00
pyup.io bot
9c398ad98b Update selenium from 3.11.0 to 3.12.0 (#816) 2018-05-14 12:05:18 -04:00
pyup.io bot
dc1b754692 Scheduled weekly dependency update for week 18 (#815)
* Update pypom from 1.3.0 to 2.0.0

* Update pytest from 3.5.0 to 3.5.1

* Update pytest-html from 1.16.1 to 1.17.0
2018-05-07 13:22:08 -04:00
Joergen
dc7203ea59 Pontoon: Update Danish (da) localization of Test Pilot: Firefox Send
Localization authors:
- Joergen <joergenr@stofanet.dk>
- Kim Ludvigsen <kim@kimsside.dk>
2018-05-07 08:51:26 +00:00
chilledfrogs
af9973e35b Pontoon: Update Danish (da) localization of Test Pilot: Firefox Send
Localization authors:
- Joergen <joergenr@stofanet.dk>
- chilledfrogs <chilledfrogs@gmail.com>
2018-05-07 08:31:49 +00:00
Danny Coates
aeb44379c8 Merge pull request #813 from mozilla/docker-int
moved integration text execution to docker
2018-05-04 12:18:54 -07:00
Danny Coates
7841dec5d8 more docker integration test tweaks 2018-05-04 09:18:43 -07:00
Danny Coates
7d62a23b36 moved integration text execution to docker 2018-05-03 16:41:50 -07:00
Cristian Silaghi
f36ac24ac5 Pontoon: Update Romanian (ro) localization of Test Pilot: Firefox Send
Localization authors:
- Cristian Silaghi <cristian.silaghi@mozilla.ro>
2018-05-01 20:50:43 +00:00
Cristian Silaghi
e6c2736f1f Pontoon: Update Romanian (ro) localization of Test Pilot: Firefox Send
Localization authors:
- Cristian Silaghi <cristian.silaghi@mozilla.ro>
2018-05-01 20:30:53 +00:00
Selim Şumlu
0d46997ab3 Pontoon: Update Turkish (tr) localization of Test Pilot: Firefox Send
Localization authors:
- Selim Şumlu <selim@sum.lu>
2018-05-01 00:31:26 +00:00
Georgianizator
896a0f035b Pontoon: Update Georgian (ka) localization of Test Pilot: Firefox Send
Localization authors:
- Georgianizator <georgianization@outlook.com>
2018-04-30 17:31:32 +00:00
Georgianizator
fdd07a06be Pontoon: Update Georgian (ka) localization of Test Pilot: Firefox Send
Localization authors:
- Georgianizator <georgianization@outlook.com>
2018-04-30 17:11:21 +00:00
Rhoslyn Prys
8f8595e750 Pontoon: Update Welsh (cy) localization of Test Pilot: Firefox Send
Localization authors:
- Rhoslyn Prys <rprys@posteo.net>
2018-04-30 10:31:55 +00:00
Mozilla Pontoon
7a83fc6d8f Pontoon: Update Welsh (cy) localization of Test Pilot: Firefox Send 2018-04-30 07:34:31 +00:00
Mozilla Pontoon
30df33e189 Pontoon: Update Turkish (tr) localization of Test Pilot: Firefox Send 2018-04-30 07:34:23 +00:00
Mozilla Pontoon
7aac0426e0 Pontoon: Update Persian (fa) localization of Test Pilot: Firefox Send 2018-04-30 07:34:18 +00:00
Mozilla Pontoon
bc423d4d78 Pontoon: Update Georgian (ka) localization of Test Pilot: Firefox Send 2018-04-30 07:34:13 +00:00
hi
3ddfc822d1 Pontoon: Update Vietnamese (vi) localization of Test Pilot: Firefox Send
Localization authors:
- hi <hi@duonganhtuan.com>
- Trung Backup <backup.36a91519+tech@gmail.com>
2018-04-30 01:31:08 +00:00
Benjamin Forehand Jr
f99e4db25f Added footer link tests. (#811) 2018-04-27 15:44:03 -04:00
pyup.io bot
fd71e7f957 Config file for pyup.io (#809)
* create pyup.io config file

* Updated requirements directory.
2018-04-26 15:03:57 -04:00
paul.trevor
2bfeb75380 Pontoon: Update German (de) localization of Test Pilot: Firefox Send
Localization authors:
- paul.trevor <paul.trevor@gmx.de>
2018-04-25 07:11:48 +00:00
Danny Coates
21f7fd7dbc Merge pull request #800 from jrbenny35/add_initial_ui_tests
Initial user integration tests.
2018-04-24 13:34:34 -07:00
Benjamin Forehand Jr
3e08c35740 Updated strings and descriptions. 2018-04-24 11:07:11 -04:00
Benjamin Forehand Jr
54e78b6274 This adds some user integration tests to aide the SoftVision team a bit. Right now I have 3 tests.
test_upload: This will create a file and make sure it uploads by verifying a file uploads and is assigned a URL.

    test_download: This will create a file, upload it and then download it making sure it is the same filename that was uploaded. We can expand this later to maybe check the sizes and such.

    test_progress: This will create a file and make sure the progress bar shows up after it begins uploading.

    These are python tests and use Pipenv to manage dependencies as well as tox as the virtualenv manager, and finally pytest as the test runner.
2018-04-24 11:00:19 -04:00
Victor Bychek
f1499abbe8 Pontoon: Update Russian (ru) localization of Test Pilot: Firefox Send
Localization authors:
- Victor Bychek <a@bychek.ru>
- mail <mail@janitorrb.com>
2018-04-20 18:11:05 +00:00
Yongmin H
1ad78e2844 Pontoon: Update Korean (ko) localization of Test Pilot: Firefox Send
Localization authors:
- Yongmin H. <firefox@kumul.pe.kr>
2018-04-19 01:51:11 +00:00
eljuno
af436f9506 Pontoon: Update Indonesian (id) localization of Test Pilot: Firefox Send
Localization authors:
- eljuno <eljunotrie_anggoro@yahoo.co.id>
2018-04-16 20:11:06 +00:00
eljuno
4dfdc8b0c7 Pontoon: Update Indonesian (id) localization of Test Pilot: Firefox Send
Localization authors:
- eljuno <eljunotrie_anggoro@yahoo.co.id>
2018-04-15 18:31:25 +00:00
eljuno
b4c0c36f3a Pontoon: Update Indonesian (id) localization of Test Pilot: Firefox Send
Localization authors:
- eljuno <eljunotrie_anggoro@yahoo.co.id>
2018-04-12 19:32:37 +00:00
Sahithi
d52ca850cb Pontoon: Update Telugu (te) localization of Test Pilot: Firefox Send
Localization authors:
- Sahithi <sahithi.thinker@gmail.com>
2018-04-10 09:50:44 +00:00
Jordi Serratosa
c3e0787d12 Pontoon: Update Catalan (ca) localization of Test Pilot: Firefox Send
Localization authors:
- Jordi Serratosa <jordis@softcatala.cat>
2018-04-09 00:11:02 +00:00
Danny Coates
3f65e55f86 Merge pull request #801 from robtec/patch-2
Update faq.md
2018-04-07 19:07:59 -08:00
Rob Powell
2db56fac3a Update faq.md
Updated information around download limits
2018-04-07 23:21:55 +01:00
Cristian Silaghi
464c0c4c47 Pontoon: Update Romanian (ro) localization of Test Pilot: Firefox Send
Localization authors:
- Cristian Silaghi <cristian.silaghi@mozilla.ro>
2018-04-03 12:11:31 +00:00
Danny Coates
71ed7d71fb added browserstack badge to readme 2018-03-31 19:50:45 -07:00
Danny Coates
cda38f9bcf v2.5.3 2018-03-29 00:03:04 -07:00
Danny Coates
cc9b622bde fixed cryptofill on edge 2018-03-28 22:03:46 -07:00
Danny Coates
fb91fd03cc adjusted selectbox styles 2018-03-27 23:19:07 -07:00
rcmainak
77e3b5a3e6 Replaced the selectbox with native HTML <select> 2018-03-27 21:40:59 -07:00
صفا الفليج
0ed5c7f1e7 Pontoon: Update Arabic (ar) localization of Test Pilot: Firefox Send
Localization authors:
- صفا الفليج <safa1996alfulaij@gmail.com>
2018-03-26 01:32:08 +00:00
Alberto Castro
5afadd4ff1 Pontoon: Update Portuguese (Portugal) (pt-PT) localization of Test Pilot: Firefox Send
Localization authors:
- Alberto Castro <albertdcastro@gmail.com>
- Rodrigo <rodrigo.mcunha@hotmail.com>
2018-03-22 17:10:58 +00:00
వీవెన్
0f53c718a2 Pontoon: Update Telugu (te) localization of Test Pilot: Firefox Send
Localization authors:
- వీవెన్ <veeven@gmail.com>
2018-03-22 16:31:46 +00:00
Gonçalo Matos
ad4e6c8dec Pontoon: Update Portuguese (Portugal) (pt-PT) localization of Test Pilot: Firefox Send
Localization authors:
- Alberto Castro <albertdcastro@gmail.com>
- Gonçalo Matos <goncalo.matos@me.com>
- Rodrigo <rodrigo.mcunha@hotmail.com>
2018-03-22 02:31:41 +00:00
Rodrigo
9e0195deaa Pontoon: Update Portuguese (Portugal) (pt-PT) localization of Test Pilot: Firefox Send
Localization authors:
- Rodrigo <rodrigo.mcunha@hotmail.com>
2018-03-22 02:12:00 +00:00
Rodrigo
253216e6fc Pontoon: Update Portuguese (Portugal) (pt-PT) localization of Test Pilot: Firefox Send
Localization authors:
- Rodrigo <rodrigo.mcunha@hotmail.com>
2018-03-21 20:10:48 +00:00
Roberto Alvarado
78eab6335d Pontoon: Update Spanish (Mexico) (es-MX) localization of Test Pilot: Firefox Send
Localization authors:
- Roberto Alvarado <ralv888@gmail.com>
2018-03-19 22:11:09 +00:00
Enol
1d20b5ba11 Pontoon: Update Asturian (ast) localization of Test Pilot: Firefox Send
Localization authors:
- Enol <enolp@softastur.org>
2018-03-15 15:11:13 +00:00
Danny Coates
1edc571b36 v2.5.2 2018-03-14 09:12:26 -07:00
Danny Coates
e3556aa7e1 updated cryptofill to support Android Firefox. fixes #790 2018-03-13 21:11:27 -07:00
Jobava
aa94a75da9 Pontoon: Update Romanian (ro) localization of Test Pilot: Firefox Send
Localization authors:
- Jobava <jobaval10n@gmail.com>
2018-03-13 20:51:11 +00:00
Danny Coates
ecd61830aa v2.5.1 2018-03-12 12:26:37 -07:00
Danny Coates
da82ef814b MS Edge hacks 2018-03-12 12:24:43 -07:00
Danny Coates
b840173429 Merge pull request #789 from RCMainak/issue_775
Fixed #775 : Made text not-selectable
2018-03-12 10:43:53 -07:00
rcmainak
e1dc1687fc Fixed #775 : Made text not-selectable 2018-03-12 23:09:00 +05:30
Danny Coates
3e6a88d31d render header and footer only once. fixes #788 2018-03-12 10:15:11 -07:00
Melo46
94714ecb62 Pontoon: Update Interlingua (ia) localization of Test Pilot: Firefox Send
Localization authors:
- Melo46 <melo@carmu.com>
2018-03-09 00:50:44 +00:00
Danny Coates
07a817266c v2.5.0 2018-03-08 11:31:35 -08:00
Vitaliy Krutko
706708876c Pontoon: Update Ukrainian (uk) localization of Test Pilot: Firefox Send
Localization authors:
- Vitaliy Krutko <asmforce@ukr.net>
2018-03-08 17:52:01 +00:00
Frederick Villaluna
fc4cbe4b74 Pontoon: Update Tagalog (tl) localization of Test Pilot: Firefox Send
Localization authors:
- Frederick Villaluna <fv_comscie@yahoo.com>
2018-03-08 17:51:57 +00:00
ravmn
9e8429cff3 Pontoon: Update Spanish (Chile) (es-CL) localization of Test Pilot: Firefox Send
Localization authors:
- ravmn <ravmn@ravmn.cl>
2018-03-08 17:51:54 +00:00
Gabriela
f8db7ca923 Pontoon: Update Spanish (Argentina) (es-AR) localization of Test Pilot: Firefox Send
Localization authors:
- Gabriela <gmontagu@gmail.com>
2018-03-08 17:51:51 +00:00
Rok Žerdin
70e4d9eeb0 Pontoon: Update Slovenian (sl) localization of Test Pilot: Firefox Send
Localization authors:
- Rok Žerdin <rok.zerdin1990@gmail.com>
2018-03-08 17:51:48 +00:00
Jobava
410ec72fff Pontoon: Update Romanian (ro) localization of Test Pilot: Firefox Send
Localization authors:
- Jobava <jobaval10n@gmail.com>
2018-03-08 17:51:45 +00:00
Arash Mousavi
a42a517896 Pontoon: Update Persian (fa) localization of Test Pilot: Firefox Send
Localization authors:
- Arash Mousavi <mousavi.arash@gmail.com>
2018-03-08 17:51:42 +00:00
Håvar Henriksen
d9c9d95b89 Pontoon: Update Norwegian Bokmål (nb-NO) localization of Test Pilot: Firefox Send
Localization authors:
- Håvar Henriksen <havar@firefox.no>
2018-03-08 17:51:39 +00:00
Alfredos-Panagiotis Damkalis
0ed10649ef Pontoon: Update Greek (el) localization of Test Pilot: Firefox Send
Localization authors:
- Alfredos-Panagiotis Damkalis <fredy@fredy.gr>
2018-03-08 17:51:36 +00:00
Fjoerfoks
4edf82cc21 Pontoon: Update Frisian (fy-NL) localization of Test Pilot: Firefox Send
Localization authors:
- Fjoerfoks <fryskefirefox@gmail.com>
2018-03-08 17:51:33 +00:00
Merike Sell
775726ae6d Pontoon: Update Estonian (et) localization of Test Pilot: Firefox Send
Localization authors:
- Merike Sell <merikes@gmail.com>
2018-03-08 17:51:30 +00:00
Michal Vašíček
5aeaf2e987 Pontoon: Update Czech (cs) localization of Test Pilot: Firefox Send
Localization authors:
- Michal Vašíček <michalvasicek@icloud.com>
- Michal Stanke <mstanke@mozilla.cz>
2018-03-08 17:51:27 +00:00
Emin Mastizada
773244f320 Pontoon: Update Azerbaijani (az) localization of Test Pilot: Firefox Send
Localization authors:
- Emin Mastizada <emin@mastizada.com>
2018-03-08 17:51:23 +00:00
Danny Coates
5079d9a317 Merge pull request #782 from mozilla/docs
updated docs
2018-03-07 15:20:11 -08:00
Danny Coates
18e1609cb3 updated docs 2018-03-07 15:01:08 -08:00
Danny Coates
41796840c4 Merge pull request #781 from timvisee/master
Don't translate URL-safe chars, b64 is doing it for us
2018-03-06 08:44:53 -08:00
timvisee
171b64bc98 Don't translate URL-safe chars, b64 is doing it for us 2018-03-06 14:38:29 +01:00
Danny Coates
cfc94fd9af built assets are webpack cacheable 2018-03-02 13:58:05 -08:00
Danny Coates
914394054e encapsulate translate function creation 2018-03-02 13:40:29 -08:00
Danny Coates
7a237b9b68 reduced the size of cryptofill 2018-03-02 12:21:59 -08:00
Danny Coates
80e9f129d8 ignore some lint warnings 2018-03-01 21:36:45 -08:00
Danny Coates
fddf1c40dc fixed password input style on small screens 2018-03-01 21:33:59 -08:00
Danny Coates
557db53d39 updated browserlist 2018-03-01 14:52:00 -08:00
Danny Coates
c16e00e5af Merge pull request #779 from mozilla/edgy
implemented crypto polyfills for ms edge
2018-03-01 13:21:45 -08:00
Danny Coates
cd7da20024 implemented crypto polyfills for ms edge 2018-03-01 13:10:57 -08:00
433 changed files with 29496 additions and 20533 deletions

View File

@@ -1,10 +1,10 @@
node_modules
.git
.tox
.DS_Store
firefox
assets
docs
public
test
coverage
.nyc_output
.nyc_output

View File

@@ -2,3 +2,5 @@ dist
assets
firefox
coverage
app/locale.js
app/capabilities.js

View File

@@ -14,6 +14,9 @@ plugins:
root: true
rules:
node/no-deprecated-api: off
node/no-unsupported-features/es-syntax: off
node/no-unsupported-features/node-builtins: off
node/no-unpublished-require: off
security/detect-non-literal-fs-filename: off

11
.gitignore vendored
View File

@@ -3,4 +3,13 @@ coverage
dist
.idea
.DS_Store
.nyc_output
.nyc_output
.tox
.pytest_cache
*.iml
android/app/src/main/assets
ios/send-ios/assets/ios.js
ios/send-ios/assets/vendor.js
ios/send-ios.xcodeproj/project.xcworkspace/xcuserdata/*
ios/send-ios.xcodeproj/xcuserdata/*
test/integration/downloads

View File

@@ -1,3 +1,4 @@
dist
assets/*.js
android/app/src/main/assets
android/app/build
coverage

View File

@@ -10,3 +10,4 @@ rules:
declaration-colon-newline-after: null
selector-list-comma-newline-after: null
value-list-comma-newline-after: null
at-rule-no-unknown: null

2
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,2 @@
{
}

View File

@@ -1,6 +1,17 @@
## Change Log
### upcoming (2018/02/27 01:52 +00:00)
### v2.5.1 (2018/03/12 19:26 +00:00)
- [#789](https://github.com/mozilla/send/pull/789) Fixed #775 : Made text not-selectable (@RCMainak)
### v2.5.0 (2018/03/08 19:31 +00:00)
- [#782](https://github.com/mozilla/send/pull/782) updated docs (@dannycoates)
- [#781](https://github.com/mozilla/send/pull/781) Don't translate URL-safe chars, b64 is doing it for us (@timvisee)
- [#779](https://github.com/mozilla/send/pull/779) implemented crypto polyfills for ms edge (@dannycoates)
### v2.4.1 (2018/02/28 17:05 +00:00)
- [#777](https://github.com/mozilla/send/pull/777) use a separate circle in the progress svg for indefinite progress (@dannycoates)
### v2.4.0 (2018/02/27 01:55 +00:00)
- [#769](https://github.com/mozilla/send/pull/769) removed unsafe-inline styles via svgo-loader (@dannycoates)
- [#767](https://github.com/mozilla/send/pull/767) added coverage artifact to circleci (@dannycoates)
- [#766](https://github.com/mozilla/send/pull/766) Some frontend unit tests [WIP] (@dannycoates)

View File

@@ -3,18 +3,28 @@ Abhinav Adduri
Adnan Kičin
Alberto Castro
Alexander Slovesnik
Alfredos-Panagiotis Damkalis
Amin Mahmudian
Ander Elortondo
Andreas Pettersson
Anesu Chiodza
Anika Dorn
Arash Mousavi
Artem Polivanchuk
Ashikur Rahman
Ashok kumar
Balázs Meskó
Belayet Hossain
Benjamin Forehand Jr
Besnik Bleta
Björn I
Bjørn I
Boopesh Mahendran
Brainlulz
Breana Gonzales
Christopher Ramírez
Chuck Harmston
Cloney 173741
Cláudio Esperança
Cristian Silaghi
Cynthia Pereira
@@ -22,36 +32,53 @@ Daniel Thorn
Daniela Arcese
Danny Coates
Derek Tamsen
Dhyey Thakore
Donovan Preston
Edi Santoso
Edmund Huggett
Elisa X
Emily
Emily Hou
Emin Mastizada
Enol
Erica
Erica Wright
Fauzan Alfi
Filip Hruška
Fjoerfoks
Francesco Lodolo
Francesco Lodolo [:flod]
Frederick Villaluna
G12r
Gabriela
Gautam krishna.R
Georgianizator
Gonçalo Matos
Hyeonseok Shin
Håvar Henriksen
Ian Neal
Jae Hyeon Park
Jakob Kappel
Jakub Rychlý
Jamie
Jarmo
Jim Spentzos
Jiri Grönroos
Jobava
Joergen
Johann-S
John Gruen
Jon Buckley
Jon Vadillo
Jonathan Claudius
Jordi Cuevas
Jordi Serratosa
Juan Esteban Ajsivinac Sián
Juan Sián
Juraj Cigáň
Kerim Kalamujić
Khaled Hosny
Kim Ludvigsen
Kohei Yoshino
Lan Glad
Laurent Jouanneau
@@ -59,11 +86,15 @@ Lobodzets
LuFlo
Luiz Carlos de Morais
Luna Jernberg
Mahay Alam Khan
Marcelo Ghelman
Marcelo Poli
Marco Aurélio
Mark Heijl
Mark Liang
Mark Liang (You-Wen)
Marko Andrejić
Marwan Mohamad
Matjaž Horvat
Maykon Chagas
Melo46
@@ -72,9 +103,13 @@ Michael Köhler
Michael Wolf
Michal Stanke
Michal Vašíček
Mikeyy
Miro Rauhala
Mozilla Pontoon
Mozinet
Moḥend Belqasem
Muḥend Belqasem
Myungjae Won
Nicholas Skinsacos
Nihad
Nihad Suljić
@@ -82,14 +117,20 @@ Oscar
Peter deHaan
Pierre Neter
Pin-guang Chen
Piotr Drąg
Quế Tùng
Radu Popescu
Rhoslyn Prys
RickieES
Rimas Kudelis
Rizky Ariestiyansyah
Rob Powell
Roberto Alvarado
Rodrigo
Rodrigo Guerra
Rok Žerdin
Rongjian Zhang
Ruba
Sahithi
Sairam Raavi
Sander Lepik
@@ -105,24 +146,34 @@ Tema
Thomas Dalichow
Théo Chevalier
Tiago Morais Morgado
Tim Visée
Tomer Cohen
Tomáš Zelina
Ton
Tymur Faradzhev
Uccen Marzuq
Varghese Thomas
Victor Bychek
Vimal Raghubir
Vitaliy Krutko
Weihang Lo
Wil Clouser
YFdyh000
Yongmin H
You-Wen Liang (Mark)
aaaaalbert
aefgh39622
alamanda
albertdcastro
alex_mayorga
ariestiyansyah
avelper
chilledfrogs
dgadelha
dskmori
ehuggett
eljuno
emily-hou1
erdem cobanoglu
gautamkrishnar
gmontagu
@@ -133,18 +184,36 @@ jesferman1993
jlG
josotrix
jspam
julenx
kenrick95
manxmensch
marigalicer
mirzet.omerovic.1992
passionforlife
paul.trevor
pyup.io bot
ravmn
rcmainak
reza.habibi2008
risger
robbp
ruikunai
savemore99.sm
shikhar-scs
siparon
skystar-p
stripTM
tatalmondmush
tiagomoraismorgado
timvisee
victor.gonzalezro
xcffl
ybouhamam
yoshimitsu002
Μιχάλης
Марко Костић (Marko Kostić)
صفا الفليج
వీవెన్
张无忌
新垣结衣松冈茉优长泽雅美门胁麦上野树里石原里美
莫非前世那一眼

View File

@@ -1,15 +1,17 @@
FROM node:8-alpine
FROM node:10 AS builder
RUN addgroup --gid 10001 app && adduser --disabled-password --gecos '' --gid 10001 --home /app --uid 10001 app
COPY package*.json /app/
WORKDIR /app
RUN npm install --production
RUN apk add --no-cache git
RUN addgroup -S -g 10001 app && adduser -S -D -G app -u 10001 app
COPY . /app
RUN chown -R app /app
FROM node:10-slim
RUN addgroup --gid 10001 app && adduser --disabled-password --gecos '' --gid 10001 --home /app --uid 10001 app
USER app
WORKDIR /app
RUN mkdir static
RUN npm install --production && npm cache clean --force
COPY --chown=app:app --from=builder /app .
COPY --chown=app:app . .
ENV PORT=1443
EXPOSE $PORT
CMD ["npm", "run", "prod"]
CMD ["node", "server/bin/prod.js"]

View File

@@ -1,9 +1,8 @@
# Firefox Send
[![CircleCI](https://img.shields.io/circleci/project/github/mozilla/send.svg)](https://circleci.com/gh/mozilla/send)
[![Available on Test Pilot](https://img.shields.io/badge/available_on-Test_Pilot-0996F8.svg)](https://testpilot.firefox.com/experiments/send)
**Docs:** [Docker](docs/docker.md), [Metrics](docs/metrics.md)
**Docs:** [FAQ](docs/faq.md), [Encryption](docs/encryption.md), [Build](docs/build.md), [Docker](docs/docker.md), [Metrics](docs/metrics.md), [More](docs/)
---
@@ -17,6 +16,7 @@
* [Localization](#localization)
* [Contributing](#contributing)
* [Testing](#testing)
* [Android](#android)
* [License](#license)
---
@@ -29,7 +29,7 @@ A file sharing experiment which allows you to send encrypted files to other user
## Requirements
- [Node.js 8.2+](https://nodejs.org/)
- [Node.js 10.0+](https://nodejs.org/)
- [Redis server](https://redis.io/) (optional for development)
- [AWS S3](https://aws.amazon.com/s3/) or compatible service. (optional)
@@ -71,6 +71,8 @@ The server is configured with environment variables. See [server/config.js](serv
Firefox Send localization is managed via [Pontoon](https://pontoon.mozilla.org/projects/test-pilot-firefox-send/), not direct pull requests to the repository. If you want to fix a typo, add a new language, or simply know more about localization, please get in touch with the [existing localization team](https://pontoon.mozilla.org/teams/) for your language or Mozillas [l10n-drivers](https://wiki.mozilla.org/L10n:Mozilla_Team#Mozilla_Corporation) for guidance.
see also [docs/localization.md](docs/localization.md)
---
## Contributing
@@ -84,8 +86,14 @@ Pull requests are always welcome! Feel free to check out the list of ["good firs
| ENVIRONMENT | URL
|-------------|-----
| Production | <https://send.firefox.com/>
| Stage | <https://send.stage.mozaws.net/>
| Development | <https://send.dev.mozaws.net/>
| Stage | <https://stage.send.nonprod.cloudops.mozgcp.net/>
| Development | <https://send2.dev.lcip.org/>
---
## Android
The android implementation is contained in the `android` directory, and can be viewed locally for easy testing and editing by running `ANDROID=1 npm start` and then visiting <http://localhost:8080>. CSS and image files are located in the `android/app/src/main/assets` directory.
---

6
android/.eslintrc.yaml Normal file
View File

@@ -0,0 +1,6 @@
env:
browser: true
parserOptions:
sourceType: module

4
android/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
local.properties
.gradle
build

9
android/README.md Normal file
View File

@@ -0,0 +1,9 @@
Readme
=====
The Send Android app allows you to choose any file from your android device, encrypt it with a password, and get a URL which will allow secure download of the file. By default, this URL will expire after one download or 24 hours.
Building the Send Android app.
=====
First, install Android Studio. Open the `android` directory in Android Studio, plug in your android phone, and press the run button.

19
android/SendAndroid.iml Normal file
View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="SendAndroid" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="java-gradle" name="Java-Gradle">
<configuration>
<option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
<option name="BUILDABLE" value="false" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

96
android/android.js Normal file
View File

@@ -0,0 +1,96 @@
/* global window, navigator */
import 'fluent-intl-polyfill';
import choo from 'choo';
import html from 'choo/html';
import Raven from 'raven-js';
import { setApiUrlPrefix, getConstants } from '../app/api';
import metrics from '../app/metrics';
//import assets from '../common/assets';
import Archive from '../app/archive';
import Header from '../app/ui/header';
import storage from '../app/storage';
import controller from '../app/controller';
import User from './user';
import intents from './stores/intents';
import home from './pages/home';
import upload from './pages/upload';
import share from './pages/share';
import preferences from './pages/preferences';
import error from './pages/error';
import { getTranslator } from '../app/locale';
import { delay } from '../app/utils';
if (navigator.userAgent === 'Send Android') {
setApiUrlPrefix('https://send.firefox.com');
}
const app = choo();
//app.use(state);
app.use(controller);
app.use(intents);
window.finishLogin = async function(accountInfo) {
while (!(app.state && app.state.user)) {
await delay();
}
await app.state.user.finishLogin(accountInfo);
await app.state.user.syncFileList();
app.emitter.emit('replaceState', '/');
};
function body(main) {
return function(state, emit) {
/*
Disable the preferences menu for now since it is ugly and isn't
relevant to the beta
function clickPreferences(event) {
event.preventDefault();
emit('pushState', '/preferences');
}
const menu = html`<a
id="hamburger"
class="absolute pin-t pin-r z-50"
href="#"
onclick="${clickPreferences}"
>
<img src="${assets.get('preferences.png')}" />
</a>`;
*/
return html`
<body
class="flex flex-col items-center font-sans bg-grey-lightest h-screen"
>
${state.cache(Header, 'header').render()} ${main(state, emit)}
</body>
`;
};
}
(async function start() {
const translate = await getTranslator('en-US');
const { LIMITS, DEFAULTS } = await getConstants();
app.use(state => {
state.LIMITS = LIMITS;
state.DEFAULTS = DEFAULTS;
state.translate = translate;
state.capabilities = {
account: true
}; //TODO
state.archive = new Archive([], DEFAULTS.EXPIRE_SECONDS);
state.storage = storage;
state.user = new User(storage, LIMITS);
state.raven = Raven;
});
app.use(metrics);
app.route('/', body(home));
app.route('/upload', upload);
app.route('/share/:id', share);
app.route('/preferences', preferences);
app.route('/error', error);
//app.route('/debugging', require('./pages/debugging').default);
// add /api/filelist
app.mount('body');
})();
window.app = app;

1
android/app/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/build

43
android/app/build.gradle Normal file
View File

@@ -0,0 +1,43 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 27
defaultConfig {
applicationId "org.mozilla.firefoxsend"
minSdkVersion 26
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.github.delight-im:Android-AdvancedWebView:v3.0.0'
implementation "org.mozilla.components:service-firefox-accounts:${rootProject.ext.android_components_version}"
}
task generateAndLinkBundle(type: Exec, description: 'Generate the android.js bundle and link it into the assets directory') {
commandLine './buildAssets.sh'
}
tasks.withType(JavaCompile) {
compileTask -> compileTask.dependsOn generateAndLinkBundle
}

12
android/app/buildAssets.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
if [ -d "../../node_modules" ]
then
echo "node_modules already present."
else
echo "node_modules not present, running npm install."
npm install
fi
npm run build
rm -rf src/main/assets
mkdir -p src/main/assets
cp -R ../../dist/* src/main/assets

21
android/app/proguard-rules.pro vendored Normal file
View File

@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.mozilla.firefoxsend">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<meta-data android:name="android.webkit.WebView.EnableSafeBrowsing" android:value="false" />
<activity android:name="org.mozilla.firefoxsend.MainActivity" android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>
</application>
</manifest>

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@@ -0,0 +1,218 @@
package org.mozilla.firefoxsend
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import im.delight.android.webview.AdvancedWebView
import android.graphics.Bitmap
import android.content.Intent
import android.annotation.SuppressLint
import android.content.ComponentName
import android.net.Uri
import android.webkit.WebView
import android.webkit.WebMessage
import android.util.Log
import android.util.Base64
import android.view.View
import android.webkit.ConsoleMessage
import android.webkit.JavascriptInterface
import android.webkit.WebChromeClient
import mozilla.components.service.fxa.Config
import mozilla.components.service.fxa.FirefoxAccount
import mozilla.components.service.fxa.Profile
import mozilla.components.service.fxa.FxaResult
internal class LoggingWebChromeClient : WebChromeClient() {
override fun onConsoleMessage(cm: ConsoleMessage): Boolean {
Log.w("CONTENT", String.format("%s @ %d: %s",
cm.message(), cm.lineNumber(), cm.sourceId()))
return true
}
}
class WebAppInterface(private val mContext: MainActivity) {
@JavascriptInterface
fun beginOAuthFlow() {
mContext.beginOAuthFlow();
}
@JavascriptInterface
fun shareUrl(url: String) {
mContext.shareUrl(url)
}
}
class MainActivity : AppCompatActivity(), AdvancedWebView.Listener {
private var mWebView: AdvancedWebView? = null
private var mToShare: String? = null
private var mToCall: String? = null
private var mAccount: FirefoxAccount? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
// https://developers.google.com/web/tools/chrome-devtools/remote-debugging/webviews
// WebView.setWebContentsDebuggingEnabled(true); // TODO only dev builds
mWebView = findViewById<WebView>(R.id.webview) as AdvancedWebView
mWebView!!.setListener(this, this)
mWebView!!.setWebChromeClient(LoggingWebChromeClient())
mWebView!!.addJavascriptInterface(WebAppInterface(this), "Android")
mWebView!!.setLayerType(View.LAYER_TYPE_HARDWARE, null);
val webSettings = mWebView!!.getSettings()
webSettings.setUserAgentString("Send Android")
webSettings.setAllowUniversalAccessFromFileURLs(true)
webSettings.setJavaScriptEnabled(true)
val intent = getIntent()
val action = intent.getAction()
val type = intent.getType()
if (Intent.ACTION_SEND.equals(action) && type != null) {
if (type.equals("text/plain")) {
val sharedText = intent.getStringExtra(Intent.EXTRA_TEXT)
Log.w("INTENT", "text/plain " + sharedText)
mToShare = "data:text/plain;base64," + Base64.encodeToString(sharedText.toByteArray(), 16).trim()
} else if (type.startsWith("image/")) {
val imageUri = intent.getParcelableExtra(Intent.EXTRA_STREAM) as Uri
Log.w("INTENT", "image/ " + imageUri)
mToShare = "data:text/plain;base64," + Base64.encodeToString(imageUri.path.toByteArray(), 16).trim()
}
}
mWebView!!.loadUrl("file:///android_asset/android.html")
}
fun beginOAuthFlow() {
Config.release().then(fun (value: Config): FxaResult<Unit> {
mAccount = FirefoxAccount(value, "20f7931c9054d833", "https://send.firefox.com/fxa/android-redirect.html")
mAccount?.beginOAuthFlow(arrayOf("profile", "https://identity.mozilla.com/apps/send"), true)?.then(fun (url: String): FxaResult<Unit> {
Log.w("CONFIG", "GOT A URL " + url)
this@MainActivity.runOnUiThread({
mWebView!!.loadUrl(url)
})
return FxaResult.fromValue(Unit)
})
Log.w("CONFIG", "CREATED FIREFOXACCOUNT")
return FxaResult.fromValue(Unit)
})
}
fun shareUrl(url: String) {
val shareIntent = Intent()
shareIntent.action = Intent.ACTION_SEND
shareIntent.type = "text/plain"
shareIntent.putExtra(Intent.EXTRA_TEXT, url)
val chooser = Intent.createChooser(shareIntent, "")
chooser.putExtra(Intent.EXTRA_EXCLUDE_COMPONENTS, arrayOf(ComponentName(applicationContext, MainActivity::class.java)))
startActivity(chooser)
}
@SuppressLint("NewApi")
override fun onResume() {
super.onResume()
mWebView!!.onResume()
// ...
}
@SuppressLint("NewApi")
override fun onPause() {
mWebView!!.onPause()
// ...
super.onPause()
}
override fun onDestroy() {
mWebView!!.onDestroy()
// ...
super.onDestroy()
}
override fun onActivityResult(requestCode: Int, resultCode: Int, intent: Intent?) {
super.onActivityResult(requestCode, resultCode, intent)
mWebView!!.onActivityResult(requestCode, resultCode, intent)
// ...
}
override fun onBackPressed() {
if (!mWebView!!.onBackPressed()) {
return
}
// ...
super.onBackPressed()
}
override fun onPageStarted(url: String, favicon: Bitmap?) {
if (url.startsWith("https://send.firefox.com/fxa/android-redirect.html")) {
// We load this here so the user doesn't see the android-redirect.html page
mWebView!!.loadUrl("file:///android_asset/android.html")
val parsed = Uri.parse(url)
val code = parsed.getQueryParameter("code")
val state = parsed.getQueryParameter("state")
code?.let { code ->
state?.let { state ->
mAccount?.completeOAuthFlow(code, state)?.whenComplete { info ->
//displayAndPersistProfile(code, state)
val profile = mAccount?.getProfile(false)?.then(fun (profile: Profile): FxaResult<Unit> {
val accessToken = info.accessToken
val keys = info.keys
val avatar = profile.avatar
val displayName = profile.displayName
val email = profile.email
val uid = profile.uid
val toPass = "{\"accessToken\": \"${accessToken}\", \"keys\": '${keys}', \"avatar\": \"${avatar}\", \"displayName\": \"${displayName}\", \"email\": \"${email}\", \"uid\": \"${uid}\"}"
mToCall = "finishLogin(${toPass})"
this@MainActivity.runOnUiThread({
// Clear the history so that the user can't use the back button to see broken pages
// that were inserted into the history by the login process.
mWebView!!.clearHistory()
// We also reload this here because we need to make sure onPageFinished runs after mToCall has been set.
// We can't guarantee that onPageFinished wasn't already called at this point.
mWebView!!.loadUrl("file:///android_asset/android.html")
})
return FxaResult.fromValue(Unit)
})
}
}
}
}
Log.w("MAIN", "onPageStarted");
}
override fun onPageFinished(url: String) {
Log.w("MAIN", "onPageFinished")
if (mToShare != null) {
Log.w("INTENT", mToShare)
mWebView?.postWebMessage(WebMessage(mToShare), Uri.EMPTY)
mToShare = null
}
if (mToCall != null) {
this@MainActivity.runOnUiThread({
mWebView?.evaluateJavascript(mToCall, fun (value: String) {
mToCall = null
})
})
}
}
override fun onPageError(errorCode: Int, description: String, failingUrl: String) {
Log.w("MAIN", "onPageError " + description)
}
override fun onDownloadRequested(url: String, suggestedFilename: String, mimeType: String, contentLength: Long, contentDisposition: String, userAgent: String) {
Log.w("MAIN", "onDownloadRequested")
}
override fun onExternalPageRequest(url: String) {
Log.w("MAIN", "onExternalPageRequest")
}
}

View File

@@ -0,0 +1,97 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="92.5"
android:viewportHeight="92.5">
<group android:translateX="27.75"
android:translateY="28.25">
<path
android:pathData="M18.1313,0.0003C8.1363,0.0003 0.0003,7.9743 0.0003,17.7673C0.0003,18.8133 0.8523,19.6643 1.8983,19.6643L16.2333,19.6643L16.2333,29.1093L11.7773,24.6963C11.0413,23.9613 9.8403,23.9613 9.0653,24.6963C8.3293,25.4323 8.3293,26.6323 9.0653,27.4063L16.7753,35.1093C16.8143,35.1483 16.8533,35.1873 16.9303,35.2253L16.9693,35.2253C17.0083,35.2643 17.0463,35.3033 17.0853,35.3033L17.1243,35.3033C17.1633,35.3423 17.2013,35.3423 17.2403,35.3803L17.2793,35.3803C17.3183,35.4193 17.3953,35.4193 17.4343,35.4583C17.4733,35.4963 17.5503,35.4963 17.5893,35.4963C17.6283,35.4963 17.7053,35.5353 17.7443,35.5353L17.7823,35.5353C17.8213,35.5353 17.8603,35.5353 17.9373,35.5743L18.3253,35.5743C18.3643,35.5743 18.4023,35.5743 18.4803,35.5353L18.5193,35.5353C18.5573,35.5353 18.6353,35.4963 18.6743,35.4963C18.7123,35.4963 18.7903,35.4583 18.8293,35.4193C18.8673,35.3803 18.9453,35.3803 18.9843,35.3423C19.0223,35.3033 19.0613,35.3033 19.1003,35.2643L19.1383,35.2643C19.1773,35.2253 19.2163,35.1873 19.2553,35.1873L19.2933,35.1873C19.3323,35.1483 19.3713,35.1093 19.4483,35.0713L27.1583,27.3673C27.8943,26.6323 27.8943,25.4323 27.1583,24.6583C26.4223,23.9223 25.2213,23.9223 24.4463,24.6583L20.0303,29.1093L20.0303,19.7033L34.3643,19.7033C35.4103,19.7033 36.2633,18.8513 36.2633,17.8063C36.2633,7.9743 28.1273,0.0003 18.1313,0.0003ZM3.9133,15.8713C4.8813,9.0963 10.8863,3.8323 18.1313,3.8323C25.3763,3.8323 31.3423,9.0963 32.3113,15.8713L3.9133,15.8713Z"
android:fillType="nonZero">
<aapt:attr name="android:fillColor">
<gradient
android:startY="2.9809632"
android:startX="25.805717"
android:endY="31.687763"
android:endX="8.569217"
android:type="linear">
<item android:offset="0" android:color="#FFFF980E"/>
<item android:offset="0.21" android:color="#FFFF7139"/>
<item android:offset="0.36" android:color="#FFFF5854"/>
<item android:offset="0.46" android:color="#FFFF4F5E"/>
<item android:offset="0.69" android:color="#FFFF3750"/>
<item android:offset="0.86" android:color="#FFF92261"/>
<item android:offset="1" android:color="#FFF5156C"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M18.1313,0.0003C8.1363,0.0003 0.0003,7.9743 0.0003,17.7673C0.0003,18.8133 0.8523,19.6643 1.8983,19.6643L16.2333,19.6643L16.2333,29.1093L11.7773,24.6963C11.0413,23.9613 9.8403,23.9613 9.0653,24.6963C8.3293,25.4323 8.3293,26.6323 9.0653,27.4063L16.7753,35.1093C16.8143,35.1483 16.8533,35.1873 16.9303,35.2253L16.9693,35.2253C17.0083,35.2643 17.0463,35.3033 17.0853,35.3033L17.1243,35.3033C17.1633,35.3423 17.2013,35.3423 17.2403,35.3803L17.2793,35.3803C17.3183,35.4193 17.3953,35.4193 17.4343,35.4583C17.4733,35.4963 17.5503,35.4963 17.5893,35.4963C17.6283,35.4963 17.7053,35.5353 17.7443,35.5353L17.7823,35.5353C17.8213,35.5353 17.8603,35.5353 17.9373,35.5743L18.3253,35.5743C18.3643,35.5743 18.4023,35.5743 18.4803,35.5353L18.5193,35.5353C18.5573,35.5353 18.6353,35.4963 18.6743,35.4963C18.7123,35.4963 18.7903,35.4583 18.8293,35.4193C18.8673,35.3803 18.9453,35.3803 18.9843,35.3423C19.0223,35.3033 19.0613,35.3033 19.1003,35.2643L19.1383,35.2643C19.1773,35.2253 19.2163,35.1873 19.2553,35.1873L19.2933,35.1873C19.3323,35.1483 19.3713,35.1093 19.4483,35.0713L27.1583,27.3673C27.8943,26.6323 27.8943,25.4323 27.1583,24.6583C26.4223,23.9223 25.2213,23.9223 24.4463,24.6583L20.0303,29.1093L20.0303,19.7033L34.3643,19.7033C35.4103,19.7033 36.2633,18.8513 36.2633,17.8063C36.2633,7.9743 28.1273,0.0003 18.1313,0.0003ZM3.9133,15.8713C4.8813,9.0963 10.8863,3.8323 18.1313,3.8323C25.3763,3.8323 31.3423,9.0963 32.3113,15.8713L3.9133,15.8713Z"
android:fillType="nonZero">
<aapt:attr name="android:fillColor">
<gradient
android:startY="2.9809632"
android:startX="25.805717"
android:endY="31.687763"
android:endX="8.569217"
android:type="linear">
<item android:offset="0" android:color="#CCFFF44F"/>
<item android:offset="0.75" android:color="#00FFF44F"/>
<item android:offset="1" android:color="#00FFF44F"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M20.0303,3.9483C26.3833,4.8003 31.4203,9.6773 32.3113,15.8713L23.8653,15.8713C21.7733,15.8713 20.0683,17.5743 20.0683,19.6643L34.3643,19.6643C35.4103,19.6643 36.2633,18.8133 36.2633,17.7673C36.2633,10.9933 31.4593,7.6643 27.3913,5.7673C23.6333,4.0253 20.0303,3.9483 20.0303,3.9483Z">
<aapt:attr name="android:fillColor">
<gradient
android:startY="20.534323"
android:startX="22.366518"
android:endY="7.772023"
android:endX="30.234228"
android:type="linear">
<item android:offset="0" android:color="#FF3A8EE6"/>
<item android:offset="0.24" android:color="#FF5C79F0"/>
<item android:offset="0.63" android:color="#FF9059FF"/>
<item android:offset="1" android:color="#FFC139E6"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M32.2333,15.4453C33.5123,16.4903 34.8293,17.4963 36.0693,18.5803C36.1853,18.3483 36.2633,18.0773 36.2633,17.7673C36.2633,10.9933 31.4593,7.6643 27.3913,5.7673C23.6333,4.0253 20.0303,3.9483 20.0303,3.9483C26.2283,4.7613 31.1873,9.4843 32.2333,15.4453Z">
<aapt:attr name="android:fillColor">
<gradient
android:startY="8.195093"
android:startX="30.235817"
android:endY="12.836453"
android:endX="26.934916"
android:type="linear">
<item android:offset="0" android:color="#7E6E008B"/>
<item android:offset="0.5" android:color="#00C846CB"/>
<item android:offset="1" android:color="#00C846CB"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M32.0013,15.8713L23.8653,15.8713C21.7733,15.8713 20.0683,17.5743 20.0683,19.6643L34.3643,19.6643C34.9453,19.6643 35.4883,19.3933 35.8373,18.9673C34.5583,17.9223 33.2793,16.9163 32.0013,15.8713Z">
<aapt:attr name="android:fillColor">
<gradient
android:startY="18.076923"
android:startX="31.69962"
android:endY="17.594997"
android:endX="23.366179"
android:type="linear">
<item android:offset="0" android:color="#006A2BEA"/>
<item android:offset="0.14" android:color="#006A2BEA"/>
<item android:offset="0.3" android:color="#15662CE6"/>
<item android:offset="0.47" android:color="#2C592FDB"/>
<item android:offset="0.64" android:color="#424534C9"/>
<item android:offset="0.82" android:color="#59283BAF"/>
<item android:offset="0.99" android:color="#7003448D"/>
<item android:offset="1" android:color="#7200458B"/>
</gradient>
</aapt:attr>
</path>
</group>
</vector>

View File

@@ -0,0 +1,97 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="92.5"
android:viewportHeight="92.5">
<group android:translateX="27.75"
android:translateY="28.25">
<path
android:pathData="M18.1313,0.0003C8.1363,0.0003 0.0003,7.9743 0.0003,17.7673C0.0003,18.8133 0.8523,19.6643 1.8983,19.6643L16.2333,19.6643L16.2333,29.1093L11.7773,24.6963C11.0413,23.9613 9.8403,23.9613 9.0653,24.6963C8.3293,25.4323 8.3293,26.6323 9.0653,27.4063L16.7753,35.1093C16.8143,35.1483 16.8533,35.1873 16.9303,35.2253L16.9693,35.2253C17.0083,35.2643 17.0463,35.3033 17.0853,35.3033L17.1243,35.3033C17.1633,35.3423 17.2013,35.3423 17.2403,35.3803L17.2793,35.3803C17.3183,35.4193 17.3953,35.4193 17.4343,35.4583C17.4733,35.4963 17.5503,35.4963 17.5893,35.4963C17.6283,35.4963 17.7053,35.5353 17.7443,35.5353L17.7823,35.5353C17.8213,35.5353 17.8603,35.5353 17.9373,35.5743L18.3253,35.5743C18.3643,35.5743 18.4023,35.5743 18.4803,35.5353L18.5193,35.5353C18.5573,35.5353 18.6353,35.4963 18.6743,35.4963C18.7123,35.4963 18.7903,35.4583 18.8293,35.4193C18.8673,35.3803 18.9453,35.3803 18.9843,35.3423C19.0223,35.3033 19.0613,35.3033 19.1003,35.2643L19.1383,35.2643C19.1773,35.2253 19.2163,35.1873 19.2553,35.1873L19.2933,35.1873C19.3323,35.1483 19.3713,35.1093 19.4483,35.0713L27.1583,27.3673C27.8943,26.6323 27.8943,25.4323 27.1583,24.6583C26.4223,23.9223 25.2213,23.9223 24.4463,24.6583L20.0303,29.1093L20.0303,19.7033L34.3643,19.7033C35.4103,19.7033 36.2633,18.8513 36.2633,17.8063C36.2633,7.9743 28.1273,0.0003 18.1313,0.0003ZM3.9133,15.8713C4.8813,9.0963 10.8863,3.8323 18.1313,3.8323C25.3763,3.8323 31.3423,9.0963 32.3113,15.8713L3.9133,15.8713Z"
android:fillType="nonZero">
<aapt:attr name="android:fillColor">
<gradient
android:startY="2.9809632"
android:startX="25.805717"
android:endY="31.687763"
android:endX="8.569217"
android:type="linear">
<item android:offset="0" android:color="#FFFF980E"/>
<item android:offset="0.21" android:color="#FFFF7139"/>
<item android:offset="0.36" android:color="#FFFF5854"/>
<item android:offset="0.46" android:color="#FFFF4F5E"/>
<item android:offset="0.69" android:color="#FFFF3750"/>
<item android:offset="0.86" android:color="#FFF92261"/>
<item android:offset="1" android:color="#FFF5156C"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M18.1313,0.0003C8.1363,0.0003 0.0003,7.9743 0.0003,17.7673C0.0003,18.8133 0.8523,19.6643 1.8983,19.6643L16.2333,19.6643L16.2333,29.1093L11.7773,24.6963C11.0413,23.9613 9.8403,23.9613 9.0653,24.6963C8.3293,25.4323 8.3293,26.6323 9.0653,27.4063L16.7753,35.1093C16.8143,35.1483 16.8533,35.1873 16.9303,35.2253L16.9693,35.2253C17.0083,35.2643 17.0463,35.3033 17.0853,35.3033L17.1243,35.3033C17.1633,35.3423 17.2013,35.3423 17.2403,35.3803L17.2793,35.3803C17.3183,35.4193 17.3953,35.4193 17.4343,35.4583C17.4733,35.4963 17.5503,35.4963 17.5893,35.4963C17.6283,35.4963 17.7053,35.5353 17.7443,35.5353L17.7823,35.5353C17.8213,35.5353 17.8603,35.5353 17.9373,35.5743L18.3253,35.5743C18.3643,35.5743 18.4023,35.5743 18.4803,35.5353L18.5193,35.5353C18.5573,35.5353 18.6353,35.4963 18.6743,35.4963C18.7123,35.4963 18.7903,35.4583 18.8293,35.4193C18.8673,35.3803 18.9453,35.3803 18.9843,35.3423C19.0223,35.3033 19.0613,35.3033 19.1003,35.2643L19.1383,35.2643C19.1773,35.2253 19.2163,35.1873 19.2553,35.1873L19.2933,35.1873C19.3323,35.1483 19.3713,35.1093 19.4483,35.0713L27.1583,27.3673C27.8943,26.6323 27.8943,25.4323 27.1583,24.6583C26.4223,23.9223 25.2213,23.9223 24.4463,24.6583L20.0303,29.1093L20.0303,19.7033L34.3643,19.7033C35.4103,19.7033 36.2633,18.8513 36.2633,17.8063C36.2633,7.9743 28.1273,0.0003 18.1313,0.0003ZM3.9133,15.8713C4.8813,9.0963 10.8863,3.8323 18.1313,3.8323C25.3763,3.8323 31.3423,9.0963 32.3113,15.8713L3.9133,15.8713Z"
android:fillType="nonZero">
<aapt:attr name="android:fillColor">
<gradient
android:startY="2.9809632"
android:startX="25.805717"
android:endY="31.687763"
android:endX="8.569217"
android:type="linear">
<item android:offset="0" android:color="#CCFFF44F"/>
<item android:offset="0.75" android:color="#00FFF44F"/>
<item android:offset="1" android:color="#00FFF44F"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M20.0303,3.9483C26.3833,4.8003 31.4203,9.6773 32.3113,15.8713L23.8653,15.8713C21.7733,15.8713 20.0683,17.5743 20.0683,19.6643L34.3643,19.6643C35.4103,19.6643 36.2633,18.8133 36.2633,17.7673C36.2633,10.9933 31.4593,7.6643 27.3913,5.7673C23.6333,4.0253 20.0303,3.9483 20.0303,3.9483Z">
<aapt:attr name="android:fillColor">
<gradient
android:startY="20.534323"
android:startX="22.366518"
android:endY="7.772023"
android:endX="30.234228"
android:type="linear">
<item android:offset="0" android:color="#FF3A8EE6"/>
<item android:offset="0.24" android:color="#FF5C79F0"/>
<item android:offset="0.63" android:color="#FF9059FF"/>
<item android:offset="1" android:color="#FFC139E6"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M32.2333,15.4453C33.5123,16.4903 34.8293,17.4963 36.0693,18.5803C36.1853,18.3483 36.2633,18.0773 36.2633,17.7673C36.2633,10.9933 31.4593,7.6643 27.3913,5.7673C23.6333,4.0253 20.0303,3.9483 20.0303,3.9483C26.2283,4.7613 31.1873,9.4843 32.2333,15.4453Z">
<aapt:attr name="android:fillColor">
<gradient
android:startY="8.195093"
android:startX="30.235817"
android:endY="12.836453"
android:endX="26.934916"
android:type="linear">
<item android:offset="0" android:color="#7E6E008B"/>
<item android:offset="0.5" android:color="#00C846CB"/>
<item android:offset="1" android:color="#00C846CB"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M32.0013,15.8713L23.8653,15.8713C21.7733,15.8713 20.0683,17.5743 20.0683,19.6643L34.3643,19.6643C34.9453,19.6643 35.4883,19.3933 35.8373,18.9673C34.5583,17.9223 33.2793,16.9163 32.0013,15.8713Z">
<aapt:attr name="android:fillColor">
<gradient
android:startY="18.076923"
android:startX="31.69962"
android:endY="17.594997"
android:endX="23.366179"
android:type="linear">
<item android:offset="0" android:color="#006A2BEA"/>
<item android:offset="0.14" android:color="#006A2BEA"/>
<item android:offset="0.3" android:color="#15662CE6"/>
<item android:offset="0.47" android:color="#2C592FDB"/>
<item android:offset="0.64" android:color="#424534C9"/>
<item android:offset="0.82" android:color="#59283BAF"/>
<item android:offset="0.99" android:color="#7003448D"/>
<item android:offset="1" android:color="#7200458B"/>
</gradient>
</aapt:attr>
</path>
</group>
</vector>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<im.delight.android.webview.AdvancedWebView
android:id="@+id/webview"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</android.support.constraint.ConstraintLayout>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
</resources>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#220033</color>
</resources>

View File

@@ -0,0 +1,3 @@
<resources>
<string name="app_name">Send</string>
</resources>

View File

@@ -0,0 +1,11 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>

32
android/build.gradle Normal file
View File

@@ -0,0 +1,32 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.21'
ext.android_components_version = '0.26.0'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.20"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
maven {
url "https://maven.mozilla.org/maven2"
}
jcenter()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

13
android/gradle.properties Normal file
View File

@@ -0,0 +1,13 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

Binary file not shown.

View File

@@ -0,0 +1,6 @@
#Tue Feb 19 08:34:25 EST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip

172
android/gradlew vendored Executable file
View File

@@ -0,0 +1,172 @@
#!/usr/bin/env sh
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"

84
android/gradlew.bat vendored Normal file
View File

@@ -0,0 +1,84 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

View File

@@ -0,0 +1,6 @@
env:
browser: true
parserOptions:
sourceType: module

12
android/pages/error.js Normal file
View File

@@ -0,0 +1,12 @@
const html = require('choo/html');
export default function error(_state, _emit) {
return html`
<body>
<div id="white">
<h1>Error</h1>
<p>Sorry, an error occurred.</p>
</div>
</body>
`;
}

73
android/pages/home.js Normal file
View File

@@ -0,0 +1,73 @@
const html = require('choo/html');
const { list } = require('../../app/utils');
const archiveTile = require('../../app/ui/archiveTile');
const modal = require('../../app/ui/modal');
const intro = require('../../app/ui/intro');
const assets = require('../../common/assets');
module.exports = function(state, emit) {
function onchange(event) {
event.preventDefault();
const newFiles = Array.from(event.target.files);
emit('addFiles', { files: newFiles });
}
function onclick() {
document.getElementById('file-upload').click();
}
const archives = state.storage.files
.filter(archive => !archive.expired)
.map(archive => archiveTile(state, emit, archive))
.reverse();
let content = '';
let button = html`
<div
class="bg-blue rounded-full m-4 flex items-center justify-center shadow-lg"
style="width: 56px; height: 56px"
onclick="${onclick}"
>
<img src="${assets.get('add.svg')}" />
</div>
`;
if (state.uploading) {
content = archiveTile.uploading(state, emit);
button = '';
} else if (state.archive.numFiles > 0) {
content = archiveTile.wip(state, emit);
button = '';
} else {
content =
archives.length < 1
? intro(state)
: list(
archives,
'list-reset h-full overflow-y-auto w-full',
'mb-3 w-full'
);
}
return html`
<main class="main">
${state.modal && modal(state, emit)}
<section
class="h-full w-full p-6 z-10 overflow-hidden md:flex md:flex-row md:rounded-lg md:shadow-big"
>
${content}
</section>
<div class="fixed pin-r pin-b z-20">
${button}
<input
id="file-upload"
class="hidden"
type="file"
multiple
onchange="${onchange}"
onclick="${e => e.stopPropagation()}"
/>
</div>
</main>
`;
};

View File

@@ -0,0 +1,34 @@
const html = require('choo/html');
import { setFileProtocolWssUrl, getFileProtocolWssUrl } from '../../app/api';
export default function preferences(state, emit) {
const wssURL = getFileProtocolWssUrl();
function updateWssUrl(event) {
state.wssURL = event.target.value;
setFileProtocolWssUrl(state.wssURL);
emit('render');
}
function clickDone(event) {
event.preventDefault();
emit('pushState', '/');
}
return html`
<body>
<div id="white">
<div id="preferences">
<a onclick="${clickDone}" href="#"> done </a>
<dl>
<dt>wss url:</dt>
<dd>
<input type="text" onchange="${updateWssUrl}" value="${wssURL}" />
</dd>
</dl>
</div>
</div>
</body>
`;
}

51
android/pages/share.js Normal file
View File

@@ -0,0 +1,51 @@
const html = require('choo/html');
export default function uploadComplete(state, emit) {
const file = state.storage.files[state.storage.files.length - 1];
function onclick(e) {
e.preventDefault();
input.select();
document.execCommand('copy');
input.selectionEnd = input.selectionStart;
copyText.textContent = 'Copied!';
setTimeout(function() {
copyText.textContent = 'Copy link';
}, 2000);
}
function uploadFile(event) {
event.preventDefault();
const target = event.target;
const file = target.files[0];
if (file.size === 0) {
return;
}
emit('pushState', '/upload');
emit('addFiles', { files: [file] });
emit('upload', {});
}
const input = html`
<input id="url" value="${file.url}" readonly="true" />
`;
const copyText = html`
<span>Copy link</span>
`;
return html`<body>
<div id="white">
<div class="card">
<div>The card contents will be here.</div>
<div>Expires after: <span class="expires-after">exp</span></div>
${input}
<div id="copy-link" onclick=${onclick}>
<img id="copy-image" src=${state.getAsset('copy-link.png')} />
${copyText}
</div>
<label id="label" for="input">
<img src=${state.getAsset('cloud-upload.png')} />
</label>
<input id="input" name="input" type="file" onchange=${uploadFile} />
</div>
</body>`;
}

26
android/pages/upload.js Normal file
View File

@@ -0,0 +1,26 @@
const html = require('choo/html');
export default function progressBar(state, emit) {
let percent = 0;
if (state.transfer && state.transfer.progress) {
percent = Math.floor(state.transfer.progressRatio * 100);
}
function onclick(e) {
e.preventDefault();
if (state.uploading) {
emit('cancel');
}
emit('pushState', '/');
}
return html`
<body>
<div id="white">
<div class="card">
<div>${percent}%</div>
<span class="progress" style="width: ${percent}%">.</span>
<div class="cancel" onclick="${onclick}">CANCEL</div>
</div>
</div>
</body>
`;
}

1
android/settings.gradle Normal file
View File

@@ -0,0 +1 @@
include ':app'

20
android/stores/intents.js Normal file
View File

@@ -0,0 +1,20 @@
/* eslint-disable no-console */
export default function intentHandler(state, emitter) {
window.addEventListener(
'message',
event => {
if (typeof event.data !== 'string' || !event.data.startsWith('data:')) {
return;
}
fetch(event.data)
.then(res => res.blob())
.then(blob => {
emitter.emit('addFiles', { files: [blob] });
emitter.emit('upload', {});
})
.catch(e => console.error('ERROR ' + e + ' ' + e.stack));
},
false
);
}

41
android/stores/state.js Normal file
View File

@@ -0,0 +1,41 @@
/* eslint-disable no-console */
import User from '../user';
import storage from '../../app/storage';
export default function initialState(state, emitter) {
const files = [];
Object.assign(state, {
prefix: '/android_asset',
user: new User(storage),
getAsset(name) {
return `${state.prefix}/${name}`;
},
raven: {
captureException: e => {
console.error('ERROR ' + e + ' ' + e.stack);
}
},
storage: {
files,
remove: function(fileId) {
console.log('REMOVE FILEID', fileId);
},
writeFile: function(file) {
console.log('WRITEFILE', file);
},
addFile: function(file) {
console.log('addfile' + JSON.stringify(file));
files.push(file);
emitter.emit('pushState', `/share/${file.id}`);
},
totalUploads: 0
},
transfer: null,
uploading: false,
settingPassword: false,
passwordSetError: null,
route: '/'
});
}

30
android/user.js Normal file
View File

@@ -0,0 +1,30 @@
/* global Android */
import User from '../app/user';
import { deriveFileListKey } from '../app/fxa';
export default class AndroidUser extends User {
constructor(storage, limits) {
super(storage, limits);
}
async login() {
Android.beginOAuthFlow();
}
startAuthFlow() {
return Promise.resolve();
}
async finishLogin(accountInfo) {
const jwks = JSON.parse(accountInfo.keys);
const ikm = jwks['https://identity.mozilla.com/apps/send'].k;
const profile = {
displayName: accountInfo.displayName,
email: accountInfo.email,
avatar: accountInfo.avatar,
access_token: accountInfo.accessToken
};
profile.fileListKey = await deriveFileListKey(ikm);
this.info = profile;
}
}

View File

@@ -1,16 +1,49 @@
import { arrayToB64, b64ToArray } from './utils';
import { arrayToB64, b64ToArray, delay } from './utils';
import { ECE_RECORD_SIZE } from './ece';
function post(obj) {
let fileProtocolWssUrl = null;
try {
fileProtocolWssUrl = localStorage.getItem('wssURL');
} catch (e) {
// NOOP
}
if (!fileProtocolWssUrl) {
fileProtocolWssUrl = 'wss://send.firefox.com/api/ws';
}
export function setFileProtocolWssUrl(url) {
localStorage && localStorage.setItem('wssURL', url);
fileProtocolWssUrl = url;
}
export function getFileProtocolWssUrl() {
return fileProtocolWssUrl;
}
let apiUrlPrefix = '';
export function getApiUrl(path) {
return apiUrlPrefix + path;
}
export function setApiUrlPrefix(prefix) {
apiUrlPrefix = prefix;
}
function post(obj, bearerToken) {
const h = {
'Content-Type': 'application/json'
};
if (bearerToken) {
h['Authentication'] = `Bearer ${bearerToken}`;
}
return {
method: 'POST',
headers: new Headers({
'Content-Type': 'application/json'
}),
headers: new Headers(h),
body: JSON.stringify(obj)
};
}
function parseNonce(header) {
export function parseNonce(header) {
header = header || '';
return header.split(' ')[1];
}
@@ -38,33 +71,44 @@ async function fetchWithAuthAndRetry(url, params, keychain) {
}
export async function del(id, owner_token) {
const response = await fetch(`/api/delete/${id}`, post({ owner_token }));
const response = await fetch(
getApiUrl(`/api/delete/${id}`),
post({ owner_token })
);
return response.ok;
}
export async function setParams(id, owner_token, params) {
export async function setParams(id, owner_token, bearerToken, params) {
const response = await fetch(
`/api/params/${id}`,
post({
owner_token,
dlimit: params.dlimit
})
getApiUrl(`/api/params/${id}`),
post(
{
owner_token,
dlimit: params.dlimit
},
bearerToken
)
);
return response.ok;
}
export async function fileInfo(id, owner_token) {
const response = await fetch(`/api/info/${id}`, post({ owner_token }));
const response = await fetch(
getApiUrl(`/api/info/${id}`),
post({ owner_token })
);
if (response.ok) {
const obj = await response.json();
return obj;
}
throw new Error(response.status);
}
export async function metadata(id, keychain) {
const result = await fetchWithAuthAndRetry(
`/api/metadata/${id}`,
getApiUrl(`/api/metadata/${id}`),
{ method: 'GET' },
keychain
);
@@ -72,11 +116,12 @@ export async function metadata(id, keychain) {
const data = await result.response.json();
const meta = await keychain.decryptMetadata(b64ToArray(data.metadata));
return {
size: data.size,
size: meta.size,
ttl: data.ttl,
iv: meta.iv,
name: meta.name,
type: meta.type
type: meta.type,
manifest: meta.manifest
};
}
throw new Error(result.response.status);
@@ -85,58 +130,188 @@ export async function metadata(id, keychain) {
export async function setPassword(id, owner_token, keychain) {
const auth = await keychain.authKeyB64();
const response = await fetch(
`/api/password/${id}`,
getApiUrl(`/api/password/${id}`),
post({ owner_token, auth })
);
return response.ok;
}
export function uploadFile(
function asyncInitWebSocket(server) {
return new Promise(resolve => {
const ws = new WebSocket(server);
ws.onopen = () => {
resolve(ws);
};
});
}
function listenForResponse(ws, canceller) {
return new Promise((resolve, reject) => {
function handleMessage(msg) {
try {
const response = JSON.parse(msg.data);
if (response.error) {
throw new Error(response.error);
} else {
resolve(response);
}
} catch (e) {
ws.close();
canceller.cancelled = true;
canceller.error = e;
reject(e);
}
}
ws.addEventListener('message', handleMessage, { once: true });
});
}
async function upload(
stream,
metadata,
verifierB64,
timeLimit,
dlimit,
bearerToken,
onprogress,
canceller
) {
const host = window.location.hostname;
const port = window.location.port;
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
const endpoint =
window.location.protocol === 'file:'
? fileProtocolWssUrl
: `${protocol}//${host}${port ? ':' : ''}${port}/api/ws`;
const ws = await asyncInitWebSocket(endpoint);
try {
const metadataHeader = arrayToB64(new Uint8Array(metadata));
const fileMeta = {
fileMetadata: metadataHeader,
authorization: `send-v1 ${verifierB64}`,
bearer: bearerToken,
timeLimit,
dlimit
};
const uploadInfoResponse = listenForResponse(ws, canceller);
ws.send(JSON.stringify(fileMeta));
const uploadInfo = await uploadInfoResponse;
const completedResponse = listenForResponse(ws, canceller);
const reader = stream.getReader();
let state = await reader.read();
let size = 0;
while (!state.done) {
const buf = state.value;
if (canceller.cancelled) {
throw canceller.error;
}
ws.send(buf);
onprogress(size);
size += buf.length;
state = await reader.read();
while (ws.bufferedAmount > ECE_RECORD_SIZE * 2) {
await delay();
}
}
const footer = new Uint8Array([0]);
ws.send(footer);
await completedResponse;
ws.close();
return uploadInfo;
} catch (e) {
ws.close(4000);
throw e;
}
}
export function uploadWs(
encrypted,
metadata,
verifierB64,
keychain,
timeLimit,
dlimit,
bearerToken,
onprogress
) {
const xhr = new XMLHttpRequest();
const upload = {
const canceller = { cancelled: false };
return {
cancel: function() {
xhr.abort();
canceller.error = new Error(0);
canceller.cancelled = true;
},
result: new Promise(function(resolve, reject) {
xhr.addEventListener('loadend', function() {
const authHeader = xhr.getResponseHeader('WWW-Authenticate');
if (authHeader) {
keychain.nonce = parseNonce(authHeader);
}
if (xhr.status === 200) {
const responseObj = JSON.parse(xhr.responseText);
return resolve({
url: responseObj.url,
id: responseObj.id,
ownerToken: responseObj.owner
});
}
reject(new Error(xhr.status));
});
})
result: upload(
encrypted,
metadata,
verifierB64,
timeLimit,
dlimit,
bearerToken,
onprogress,
canceller
)
};
const dataView = new DataView(encrypted);
const blob = new Blob([dataView], { type: 'application/octet-stream' });
const fd = new FormData();
fd.append('data', blob);
xhr.upload.addEventListener('progress', function(event) {
if (event.lengthComputable) {
onprogress([event.loaded, event.total]);
}
});
xhr.open('post', '/api/upload', true);
xhr.setRequestHeader('X-File-Metadata', arrayToB64(new Uint8Array(metadata)));
xhr.setRequestHeader('Authorization', `send-v1 ${verifierB64}`);
xhr.send(fd);
return upload;
}
////////////////////////
async function downloadS(id, keychain, signal) {
const auth = await keychain.authHeader();
const response = await fetch(getApiUrl(`/api/download/${id}`), {
signal: signal,
method: 'GET',
headers: { Authorization: auth }
});
const authHeader = response.headers.get('WWW-Authenticate');
if (authHeader) {
keychain.nonce = parseNonce(authHeader);
}
if (response.status !== 200) {
throw new Error(response.status);
}
return response.body;
}
async function tryDownloadStream(id, keychain, signal, tries = 1) {
try {
const result = await downloadS(id, keychain, signal);
return result;
} catch (e) {
if (e.message === '401' && --tries > 0) {
return tryDownloadStream(id, keychain, signal, tries);
}
if (e.name === 'AbortError') {
throw new Error('0');
}
throw e;
}
}
export function downloadStream(id, keychain) {
const controller = new AbortController();
function cancel() {
controller.abort();
}
return {
cancel,
result: tryDownloadStream(id, keychain, controller.signal, 2)
};
}
//////////////////
function download(id, keychain, onprogress, canceller) {
const xhr = new XMLHttpRequest();
canceller.oncancel = function() {
@@ -154,22 +329,20 @@ function download(id, keychain, onprogress, canceller) {
}
const blob = new Blob([xhr.response]);
const fileReader = new FileReader();
fileReader.readAsArrayBuffer(blob);
fileReader.onload = function() {
resolve(this.result);
};
resolve(blob);
});
xhr.addEventListener('progress', function(event) {
if (event.lengthComputable && event.target.status === 200) {
onprogress([event.loaded, event.total]);
if (event.target.status === 200) {
onprogress(event.loaded);
}
});
const auth = await keychain.authHeader();
xhr.open('get', `/api/download/${id}`);
xhr.open('get', getApiUrl(`/api/download/blob/${id}`));
xhr.setRequestHeader('Authorization', auth);
xhr.responseType = 'blob';
xhr.send();
onprogress(0);
});
}
@@ -197,3 +370,45 @@ export function downloadFile(id, keychain, onprogress) {
result: tryDownload(id, keychain, onprogress, canceller, 2)
};
}
export async function getFileList(bearerToken, kid) {
const headers = new Headers({ Authorization: `Bearer ${bearerToken}` });
const response = await fetch(getApiUrl(`/api/filelist/${kid}`), { headers });
if (response.ok) {
const encrypted = await response.blob();
return encrypted;
}
throw new Error(response.status);
}
export async function setFileList(bearerToken, kid, data) {
const headers = new Headers({ Authorization: `Bearer ${bearerToken}` });
const response = await fetch(getApiUrl(`/api/filelist/${kid}`), {
headers,
method: 'POST',
body: data
});
return response.ok;
}
export function sendMetrics(blob) {
if (!navigator.sendBeacon) {
return;
}
try {
navigator.sendBeacon(getApiUrl('/api/metrics'), blob);
} catch (e) {
console.error(e);
}
}
export async function getConstants() {
const response = await fetch(getApiUrl('/config'));
if (response.ok) {
const obj = await response.json();
return obj;
}
throw new Error(response.status);
}

83
app/archive.js Normal file
View File

@@ -0,0 +1,83 @@
import { blobStream, concatStream } from './streams';
function isDupe(newFile, array) {
for (const file of array) {
if (
newFile.name === file.name &&
newFile.size === file.size &&
newFile.lastModified === file.lastModified
) {
return true;
}
}
return false;
}
export default class Archive {
constructor(files = [], defaultTimeLimit = 86400) {
this.files = Array.from(files);
this.defaultTimeLimit = defaultTimeLimit;
this.timeLimit = defaultTimeLimit;
this.dlimit = 1;
this.password = null;
}
get name() {
return this.files.length > 1 ? 'Send-Archive.zip' : this.files[0].name;
}
get type() {
return this.files.length > 1 ? 'send-archive' : this.files[0].type;
}
get size() {
return this.files.reduce((total, file) => total + file.size, 0);
}
get numFiles() {
return this.files.length;
}
get manifest() {
return {
files: this.files.map(file => ({
name: file.name,
size: file.size,
type: file.type
}))
};
}
get stream() {
return concatStream(this.files.map(file => blobStream(file)));
}
addFiles(files, maxSize, maxFiles) {
if (this.files.length + files.length > maxFiles) {
throw new Error('tooManyFiles');
}
const newFiles = files.filter(
file => file.size > 0 && !isDupe(file, this.files)
);
const newSize = newFiles.reduce((total, file) => total + file.size, 0);
if (this.size + newSize > maxSize) {
throw new Error('fileTooBig');
}
this.files = this.files.concat(newFiles);
return true;
}
remove(file) {
const index = this.files.indexOf(file);
if (index > -1) {
this.files.splice(index, 1);
}
}
clear() {
this.files = [];
this.dlimit = 1;
this.timeLimit = this.defaultTimeLimit;
this.password = null;
}
}

View File

@@ -1,267 +0,0 @@
:root {
--pageBGColor: #fff;
--primaryControlBGColor: #0297f8;
--primaryControlFGColor: #fff;
--primaryControlHoverColor: #0287e8;
--inputTextColor: #737373;
--errorColor: #d70022;
--linkColor: #0094fb;
--textColor: #0c0c0d;
--lightTextColor: #737373;
--successControlBGColor: #05a700;
--successControlFGColor: #fff;
}
html {
background: url('../assets/send_bg.svg');
font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'segoe ui',
'helvetica neue', helvetica, ubuntu, roboto, noto, arial, sans-serif;
font-weight: 200;
background-size: 110%;
background-repeat: no-repeat;
background-position: center top;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'segoe ui',
'helvetica neue', helvetica, ubuntu, roboto, noto, arial, sans-serif;
display: flex;
flex-direction: column;
margin: 0;
min-height: 100vh;
}
input,
select,
textarea,
button {
font-family: inherit;
margin: 0;
}
a {
text-decoration: none;
}
.main {
flex: auto;
max-width: 650px;
margin: 0 auto;
padding: 0 20px;
box-sizing: border-box;
width: 96%;
}
.noscript {
text-align: center;
border: 3px solid var(--errorColor);
border-radius: 6px;
}
.btn {
font-size: 15px;
font-weight: 500;
color: var(--primaryControlFGColor);
cursor: pointer;
text-align: center;
background: var(--primaryControlBGColor);
border: 1px solid var(--primaryControlBGColor);
border-radius: 5px;
}
.btn:hover {
background-color: var(--primaryControlHoverColor);
}
.btn--cancel {
color: var(--errorColor);
background: var(--pageBGColor);
font-size: 15px;
border: 0;
cursor: pointer;
text-decoration: underline;
}
.btn--cancel:disabled {
text-decoration: none;
cursor: auto;
}
.btn--cancel:hover {
background-color: var(--pageBGColor);
}
.input {
flex: 2 0 auto;
border: 1px solid var(--primaryControlBGColor);
border-radius: 6px 0 0 6px;
font-size: 20px;
color: var(--inputTextColor);
font-family: 'SF Pro Text', sans-serif;
letter-spacing: 0;
line-height: 23px;
font-weight: 300;
height: 46px;
padding-left: 10px;
padding-right: 10px;
}
.input--error {
border-color: var(--errorColor);
}
.input--noBtn {
border-radius: 6px;
}
.inputBtn {
flex: auto;
background: var(--primaryControlBGColor);
border-radius: 0 6px 6px 0;
border: 1px solid var(--primaryControlBGColor);
color: var(--primaryControlFGColor);
cursor: pointer;
/* Force flat button look */
appearance: none;
font-size: 15px;
padding-bottom: 3px;
padding-left: 10px;
padding-right: 10px;
white-space: nowrap;
}
.inputBtn:disabled {
cursor: auto;
}
.inputBtn:hover {
background-color: var(--primaryControlHoverColor);
}
.inputBtn--hidden {
display: none;
}
.cursor--pointer {
cursor: pointer;
}
.link {
color: var(--linkColor);
text-decoration: none;
}
.link:focus,
.link:active,
.link:hover {
color: var(--primaryControlHoverColor);
}
.link--action {
text-decoration: underline;
text-align: center;
}
.page {
margin: 0 auto 30px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
text-align: center;
}
.progressSection {
margin: 0 auto;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
text-align: center;
font-size: 15px;
}
.progressSection__text {
color: var(--lightTextColor);
letter-spacing: -0.4px;
margin-top: 24px;
margin-bottom: 74px;
}
.effect--fadeOut {
opacity: 0;
animation: fadeout 200ms linear;
}
@keyframes fadeout {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
.effect--fadeIn {
opacity: 1;
animation: fadein 200ms linear;
}
@keyframes fadein {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.error {
color: var(--errorColor);
}
.title {
font-size: 33px;
line-height: 40px;
margin: 20px auto;
text-align: center;
max-width: 520px;
font-family: 'SF Pro Text', sans-serif;
word-wrap: break-word;
}
.description {
font-size: 15px;
line-height: 23px;
max-width: 630px;
text-align: center;
margin: 0 auto 60px;
color: var(--textColor);
width: 92%;
}
@media (max-device-width: 768px), (max-width: 768px) {
.description {
margin: 0 auto 25px;
}
}
@media (max-device-width: 520px), (max-width: 520px) {
.input {
font-size: 22px;
padding: 10px 10px;
border-radius: 6px 6px 0 0;
}
.inputBtn {
border-radius: 0 0 6px 6px;
flex: 0 1 65px;
}
.input--noBtn {
border-radius: 6px;
}
}

111
app/capabilities.js Normal file
View File

@@ -0,0 +1,111 @@
/* global AUTH_CONFIG LOCALE */
import { browserName } from './utils';
async function checkCrypto() {
try {
const key = await crypto.subtle.generateKey(
{
name: 'AES-GCM',
length: 128
},
true,
['encrypt', 'decrypt']
);
await crypto.subtle.exportKey('raw', key);
await crypto.subtle.encrypt(
{
name: 'AES-GCM',
iv: crypto.getRandomValues(new Uint8Array(12)),
tagLength: 128
},
key,
new ArrayBuffer(8)
);
await crypto.subtle.importKey(
'raw',
crypto.getRandomValues(new Uint8Array(16)),
'PBKDF2',
false,
['deriveKey']
);
await crypto.subtle.importKey(
'raw',
crypto.getRandomValues(new Uint8Array(16)),
'HKDF',
false,
['deriveKey']
);
await crypto.subtle.generateKey(
{
name: 'ECDH',
namedCurve: 'P-256'
},
true,
['deriveBits']
);
return true;
} catch (err) {
try {
window.asmCrypto = await import('asmcrypto.js');
await import('@dannycoates/webcrypto-liner/build/shim');
return true;
} catch (e) {
return false;
}
}
}
function checkStreams() {
try {
new ReadableStream({
pull() {}
});
return true;
} catch (e) {
return false;
}
}
async function polyfillStreams() {
try {
await import('@mattiasbuelens/web-streams-polyfill');
return true;
} catch (e) {
return false;
}
}
export default async function getCapabilities() {
const serviceWorker =
'serviceWorker' in navigator && browserName() !== 'edge';
let crypto = await checkCrypto();
const nativeStreams = checkStreams();
let polyStreams = false;
if (!nativeStreams) {
polyStreams = await polyfillStreams();
}
let account = typeof AUTH_CONFIG !== 'undefined';
try {
account = account && !!localStorage;
} catch (e) {
account = false;
}
const share =
typeof navigator.share === 'function' && LOCALE.startsWith('en'); // en until strings merge
const standalone =
window.matchMedia('(display-mode: standalone)').matches ||
navigator.standalone;
return {
account,
crypto,
serviceWorker,
streamUpload: nativeStreams || polyStreams,
streamDownload:
nativeStreams && serviceWorker && browserName() !== 'safari',
multifile: nativeStreams || polyStreams,
share,
standalone
};
}

302
app/controller.js Normal file
View File

@@ -0,0 +1,302 @@
import FileSender from './fileSender';
import FileReceiver from './fileReceiver';
import { copyToClipboard, delay, openLinksInNewTab, percent } from './utils';
import * as metrics from './metrics';
import { bytes } from './utils';
import okDialog from './ui/okDialog';
import copyDialog from './ui/copyDialog';
import shareDialog from './ui/shareDialog';
import signupDialog from './ui/signupDialog';
export default function(state, emitter) {
let lastRender = 0;
let updateTitle = false;
function render() {
emitter.emit('render');
}
async function checkFiles() {
const changes = await state.user.syncFileList();
const rerender = changes.incoming || changes.downloadCount;
if (rerender) {
render();
}
}
function updateProgress() {
if (updateTitle) {
emitter.emit('DOMTitleChange', percent(state.transfer.progressRatio));
}
render();
}
emitter.on('DOMContentLoaded', () => {
document.addEventListener('blur', () => (updateTitle = true));
document.addEventListener('focus', () => {
updateTitle = false;
emitter.emit('DOMTitleChange', 'Firefox Send');
});
checkFiles();
});
emitter.on('render', () => {
lastRender = Date.now();
});
emitter.on('login', email => {
state.user.login(email);
});
emitter.on('logout', () => {
state.user.logout();
metrics.loggedOut({ trigger: 'button' });
emitter.emit('pushState', '/');
});
emitter.on('removeUpload', file => {
state.archive.remove(file);
if (state.archive.numFiles === 0) {
state.archive.clear();
}
render();
});
emitter.on('delete', async ownedFile => {
try {
metrics.deletedUpload({
size: ownedFile.size,
time: ownedFile.time,
speed: ownedFile.speed,
type: ownedFile.type,
ttl: ownedFile.expiresAt - Date.now(),
location
});
state.storage.remove(ownedFile.id);
await ownedFile.del();
} catch (e) {
state.raven.captureException(e);
}
render();
});
emitter.on('cancel', () => {
state.transfer.cancel();
});
emitter.on('addFiles', async ({ files }) => {
if (files.length < 1) {
return;
}
const maxSize = state.user.maxSize;
try {
state.archive.addFiles(
files,
maxSize,
state.LIMITS.MAX_FILES_PER_ARCHIVE
);
} catch (e) {
if (e.message === 'fileTooBig' && maxSize < state.LIMITS.MAX_FILE_SIZE) {
return emitter.emit('signup-cta', 'size');
}
state.modal = okDialog(
state.translate(e.message, {
size: bytes(maxSize),
count: state.LIMITS.MAX_FILES_PER_ARCHIVE
})
);
}
render();
});
emitter.on('signup-cta', source => {
const query = state.query;
state.user.startAuthFlow(source, {
campaign: query.utm_campaign,
content: query.utm_content,
medium: query.utm_medium,
source: query.utm_source,
term: query.utm_term
});
state.modal = signupDialog(source);
render();
});
emitter.on('authenticate', async (code, oauthState) => {
try {
await state.user.finishLogin(code, oauthState);
await state.user.syncFileList();
emitter.emit('replaceState', '/');
} catch (e) {
emitter.emit('replaceState', '/error');
setTimeout(render);
}
});
emitter.on('upload', async () => {
if (state.storage.files.length >= state.LIMITS.MAX_ARCHIVES_PER_USER) {
state.modal = okDialog(
state.translate('tooManyArchives', {
count: state.LIMITS.MAX_ARCHIVES_PER_USER
})
);
return render();
}
const archive = state.archive;
const sender = new FileSender();
sender.on('progress', updateProgress);
sender.on('encrypting', render);
sender.on('complete', render);
state.transfer = sender;
state.uploading = true;
render();
const links = openLinksInNewTab();
await delay(200);
const start = Date.now();
try {
const ownedFile = await sender.upload(archive, state.user.bearerToken);
state.storage.totalUploads += 1;
const duration = Date.now() - start;
metrics.completedUpload(archive, duration);
state.storage.addFile(ownedFile);
// TODO integrate password into /upload request
if (archive.password) {
emitter.emit('password', {
password: archive.password,
file: ownedFile
});
}
state.modal = state.capabilities.share
? shareDialog(ownedFile.name, ownedFile.url)
: copyDialog(ownedFile.name, ownedFile.url);
} catch (err) {
if (err.message === '0') {
//cancelled. do nothing
const duration = Date.now() - start;
metrics.cancelledUpload(archive, duration);
render();
} else {
// eslint-disable-next-line no-console
console.error(err);
state.raven.captureException(err);
metrics.stoppedUpload(archive);
emitter.emit('pushState', '/error');
}
} finally {
openLinksInNewTab(links, false);
archive.clear();
state.uploading = false;
state.transfer = null;
await state.user.syncFileList();
render();
}
});
emitter.on('password', async ({ password, file }) => {
try {
state.settingPassword = true;
render();
await file.setPassword(password);
state.storage.writeFile(file);
await delay(1000);
} catch (err) {
// eslint-disable-next-line no-console
console.error(err);
state.passwordSetError = err;
} finally {
state.settingPassword = false;
}
render();
});
emitter.on('getMetadata', async () => {
const file = state.fileInfo;
const receiver = new FileReceiver(file);
try {
await receiver.getMetadata();
state.transfer = receiver;
} catch (e) {
if (e.message === '401' || e.message === '404') {
file.password = null;
if (!file.requiresPassword) {
return emitter.emit('pushState', '/404');
}
}
}
render();
});
emitter.on('download', async file => {
state.transfer.on('progress', updateProgress);
state.transfer.on('decrypting', render);
state.transfer.on('complete', render);
const links = openLinksInNewTab();
const size = file.size;
const start = Date.now();
try {
const dl = state.transfer.download({
stream: state.capabilities.streamDownload
});
render();
await dl;
state.storage.totalDownloads += 1;
const duration = Date.now() - start;
metrics.completedDownload({
size,
duration,
password_protected: file.requiresPassword
});
} catch (err) {
if (err.message === '0') {
// download cancelled
state.transfer.reset();
render();
} else {
// eslint-disable-next-line no-console
state.transfer = null;
const location = err.message === '404' ? '/404' : '/error';
if (location === '/error') {
state.raven.captureException(err);
const duration = Date.now() - start;
metrics.stoppedDownload({
size,
duration,
password_protected: file.requiresPassword
});
}
emitter.emit('pushState', location);
}
} finally {
openLinksInNewTab(links, false);
}
});
emitter.on('copy', ({ url }) => {
copyToClipboard(url);
// metrics.copiedLink({ location });
});
setInterval(() => {
// poll for updates of the upload list
if (!state.modal && state.route === '/') {
checkFiles();
}
}, 2 * 60 * 1000);
setInterval(() => {
// poll for rerendering the file list countdown timers
if (
!state.modal &&
state.route === '/' &&
state.storage.files.length > 0 &&
Date.now() - lastRender > 30000
) {
render();
}
}, 60000);
}

View File

@@ -1,6 +1,3 @@
/* global MAXFILESIZE */
const { bytes } = require('./utils');
export default function(state, emitter) {
emitter.on('DOMContentLoaded', () => {
document.body.addEventListener('dragover', event => {
@@ -9,29 +6,16 @@ export default function(state, emitter) {
}
});
document.body.addEventListener('drop', event => {
if (state.route === '/' && !state.uploading) {
if (
state.route === '/' &&
!state.uploading &&
event.dataTransfer &&
event.dataTransfer.files
) {
event.preventDefault();
document
.querySelector('.uploadArea')
.classList.remove('uploadArea--dragging');
const target = event.dataTransfer;
if (target.files.length === 0) {
return;
}
if (target.files.length > 1) {
return alert(state.translate('uploadPageMultipleFilesAlert'));
}
const file = target.files[0];
if (file.size === 0) {
return;
}
if (file.size > MAXFILESIZE) {
window.alert(
state.translate('fileTooBig', { size: bytes(MAXFILESIZE) })
);
return;
}
emitter.emit('upload', { file, type: 'drop' });
emitter.emit('addFiles', {
files: Array.from(event.dataTransfer.files)
});
}
});
});

310
app/ece.js Normal file
View File

@@ -0,0 +1,310 @@
import 'buffer';
import { transformStream } from './streams';
const NONCE_LENGTH = 12;
const TAG_LENGTH = 16;
const KEY_LENGTH = 16;
const MODE_ENCRYPT = 'encrypt';
const MODE_DECRYPT = 'decrypt';
export const ECE_RECORD_SIZE = 1024 * 64;
const encoder = new TextEncoder();
function generateSalt(len) {
const randSalt = new Uint8Array(len);
crypto.getRandomValues(randSalt);
return randSalt.buffer;
}
class ECETransformer {
constructor(mode, ikm, rs, salt) {
this.mode = mode;
this.prevChunk;
this.seq = 0;
this.firstchunk = true;
this.rs = rs;
this.ikm = ikm.buffer;
this.salt = salt;
}
async generateKey() {
const inputKey = await crypto.subtle.importKey(
'raw',
this.ikm,
'HKDF',
false,
['deriveKey']
);
return crypto.subtle.deriveKey(
{
name: 'HKDF',
salt: this.salt,
info: encoder.encode('Content-Encoding: aes128gcm\0'),
hash: 'SHA-256'
},
inputKey,
{
name: 'AES-GCM',
length: 128
},
true, // Edge polyfill requires key to be extractable to encrypt :/
['encrypt', 'decrypt']
);
}
async generateNonceBase() {
const inputKey = await crypto.subtle.importKey(
'raw',
this.ikm,
'HKDF',
false,
['deriveKey']
);
const base = await crypto.subtle.exportKey(
'raw',
await crypto.subtle.deriveKey(
{
name: 'HKDF',
salt: this.salt,
info: encoder.encode('Content-Encoding: nonce\0'),
hash: 'SHA-256'
},
inputKey,
{
name: 'AES-GCM',
length: 128
},
true,
['encrypt', 'decrypt']
)
);
return Buffer.from(base.slice(0, NONCE_LENGTH));
}
generateNonce(seq) {
if (seq > 0xffffffff) {
throw new Error('record sequence number exceeds limit');
}
const nonce = Buffer.from(this.nonceBase);
const m = nonce.readUIntBE(nonce.length - 4, 4);
const xor = (m ^ seq) >>> 0; //forces unsigned int xor
nonce.writeUIntBE(xor, nonce.length - 4, 4);
return nonce;
}
pad(data, isLast) {
const len = data.length;
if (len + TAG_LENGTH >= this.rs) {
throw new Error('data too large for record size');
}
if (isLast) {
const padding = Buffer.alloc(1);
padding.writeUInt8(2, 0);
return Buffer.concat([data, padding]);
} else {
const padding = Buffer.alloc(this.rs - len - TAG_LENGTH);
padding.fill(0);
padding.writeUInt8(1, 0);
return Buffer.concat([data, padding]);
}
}
unpad(data, isLast) {
for (let i = data.length - 1; i >= 0; i--) {
if (data[i]) {
if (isLast) {
if (data[i] !== 2) {
throw new Error('delimiter of final record is not 2');
}
} else {
if (data[i] !== 1) {
throw new Error('delimiter of not final record is not 1');
}
}
return data.slice(0, i);
}
}
throw new Error('no delimiter found');
}
createHeader() {
const nums = Buffer.alloc(5);
nums.writeUIntBE(this.rs, 0, 4);
nums.writeUIntBE(0, 4, 1);
return Buffer.concat([Buffer.from(this.salt), nums]);
}
readHeader(buffer) {
if (buffer.length < 21) {
throw new Error('chunk too small for reading header');
}
const header = {};
header.salt = buffer.buffer.slice(0, KEY_LENGTH);
header.rs = buffer.readUIntBE(KEY_LENGTH, 4);
const idlen = buffer.readUInt8(KEY_LENGTH + 4);
header.length = idlen + KEY_LENGTH + 5;
return header;
}
async encryptRecord(buffer, seq, isLast) {
const nonce = this.generateNonce(seq);
const encrypted = await crypto.subtle.encrypt(
{ name: 'AES-GCM', iv: nonce },
this.key,
this.pad(buffer, isLast)
);
return Buffer.from(encrypted);
}
async decryptRecord(buffer, seq, isLast) {
const nonce = this.generateNonce(seq);
const data = await crypto.subtle.decrypt(
{
name: 'AES-GCM',
iv: nonce,
tagLength: 128
},
this.key,
buffer
);
return this.unpad(Buffer.from(data), isLast);
}
async start(controller) {
if (this.mode === MODE_ENCRYPT) {
this.key = await this.generateKey();
this.nonceBase = await this.generateNonceBase();
controller.enqueue(this.createHeader());
} else if (this.mode !== MODE_DECRYPT) {
throw new Error('mode must be either encrypt or decrypt');
}
}
async transformPrevChunk(isLast, controller) {
if (this.mode === MODE_ENCRYPT) {
controller.enqueue(
await this.encryptRecord(this.prevChunk, this.seq, isLast)
);
this.seq++;
} else {
if (this.seq === 0) {
//the first chunk during decryption contains only the header
const header = this.readHeader(this.prevChunk);
this.salt = header.salt;
this.rs = header.rs;
this.key = await this.generateKey();
this.nonceBase = await this.generateNonceBase();
} else {
controller.enqueue(
await this.decryptRecord(this.prevChunk, this.seq - 1, isLast)
);
}
this.seq++;
}
}
async transform(chunk, controller) {
if (!this.firstchunk) {
await this.transformPrevChunk(false, controller);
}
this.firstchunk = false;
this.prevChunk = Buffer.from(chunk.buffer);
}
async flush(controller) {
//console.log('ece stream ends')
if (this.prevChunk) {
await this.transformPrevChunk(true, controller);
}
}
}
class StreamSlicer {
constructor(rs, mode) {
this.mode = mode;
this.rs = rs;
this.chunkSize = mode === MODE_ENCRYPT ? rs - 17 : 21;
this.partialChunk = new Uint8Array(this.chunkSize); //where partial chunks are saved
this.offset = 0;
}
send(buf, controller) {
controller.enqueue(buf);
if (this.chunkSize === 21 && this.mode === MODE_DECRYPT) {
this.chunkSize = this.rs;
}
this.partialChunk = new Uint8Array(this.chunkSize);
this.offset = 0;
}
//reslice input into record sized chunks
transform(chunk, controller) {
//console.log('Received chunk with %d bytes.', chunk.byteLength)
let i = 0;
if (this.offset > 0) {
const len = Math.min(chunk.byteLength, this.chunkSize - this.offset);
this.partialChunk.set(chunk.slice(0, len), this.offset);
this.offset += len;
i += len;
if (this.offset === this.chunkSize) {
this.send(this.partialChunk, controller);
}
}
while (i < chunk.byteLength) {
const remainingBytes = chunk.byteLength - i;
if (remainingBytes >= this.chunkSize) {
const record = chunk.slice(i, i + this.chunkSize);
i += this.chunkSize;
this.send(record, controller);
} else {
const end = chunk.slice(i, i + remainingBytes);
i += end.byteLength;
this.partialChunk.set(end);
this.offset = end.byteLength;
}
}
}
flush(controller) {
if (this.offset > 0) {
controller.enqueue(this.partialChunk.slice(0, this.offset));
}
}
}
/*
input: a ReadableStream containing data to be transformed
key: Uint8Array containing key of size KEY_LENGTH
rs: int containing record size, optional
salt: ArrayBuffer containing salt of KEY_LENGTH length, optional
*/
export function encryptStream(
input,
key,
rs = ECE_RECORD_SIZE,
salt = generateSalt(KEY_LENGTH)
) {
const mode = 'encrypt';
const inputStream = transformStream(input, new StreamSlicer(rs, mode));
return transformStream(inputStream, new ECETransformer(mode, key, rs, salt));
}
/*
input: a ReadableStream containing data to be transformed
key: Uint8Array containing key of size KEY_LENGTH
rs: int containing record size, optional
*/
export function decryptStream(input, key, rs = ECE_RECORD_SIZE) {
const mode = 'decrypt';
const inputStream = transformStream(input, new StreamSlicer(rs, mode));
return transformStream(inputStream, new ECETransformer(mode, key, rs));
}

View File

@@ -1,41 +1,6 @@
import hash from 'string-hash';
const experiments = {
S9wqVl2SQ4ab2yZtqDI3Dw: {
id: 'S9wqVl2SQ4ab2yZtqDI3Dw',
run: function(variant, state, emitter) {
switch (variant) {
case 1:
state.promo = 'blue';
break;
case 2:
state.promo = 'pink';
break;
default:
state.promo = 'grey';
}
emitter.emit('render');
},
eligible: function() {
return (
!/firefox|fxios/i.test(navigator.userAgent) &&
document.querySelector('html').lang === 'en-US'
);
},
variant: function(state) {
const n = this.luckyNumber(state);
if (n < 0.33) {
return 0;
}
return n < 0.66 ? 1 : 2;
},
luckyNumber: function(state) {
return luckyNumber(
`${this.id}:${state.storage.get('testpilot_ga__cid')}`
);
}
}
};
const experiments = {};
//Returns a number between 0 and 1
// eslint-disable-next-line no-unused-vars

View File

@@ -1,225 +0,0 @@
import FileSender from './fileSender';
import FileReceiver from './fileReceiver';
import {
copyToClipboard,
delay,
fadeOut,
openLinksInNewTab,
percent
} from './utils';
import * as metrics from './metrics';
export default function(state, emitter) {
let lastRender = 0;
let updateTitle = false;
function render() {
emitter.emit('render');
}
async function checkFiles() {
const files = state.storage.files.slice();
let rerender = false;
for (const file of files) {
const oldLimit = file.dlimit;
const oldTotal = file.dtotal;
await file.updateDownloadCount();
if (file.dtotal === file.dlimit) {
state.storage.remove(file.id);
rerender = true;
} else if (oldLimit !== file.dlimit || oldTotal !== file.dtotal) {
rerender = true;
}
}
if (rerender) {
render();
}
}
function updateProgress() {
if (updateTitle) {
emitter.emit('DOMTitleChange', percent(state.transfer.progressRatio));
}
render();
}
emitter.on('DOMContentLoaded', () => {
document.addEventListener('blur', () => (updateTitle = true));
document.addEventListener('focus', () => {
updateTitle = false;
emitter.emit('DOMTitleChange', 'Firefox Send');
});
checkFiles();
});
emitter.on('navigate', checkFiles);
emitter.on('render', () => {
lastRender = Date.now();
});
emitter.on('changeLimit', async ({ file, value }) => {
await file.changeLimit(value);
state.storage.writeFile(file);
metrics.changedDownloadLimit(file);
});
emitter.on('delete', async ({ file, location }) => {
try {
metrics.deletedUpload({
size: file.size,
time: file.time,
speed: file.speed,
type: file.type,
ttl: file.expiresAt - Date.now(),
location
});
state.storage.remove(file.id);
await file.del();
} catch (e) {
state.raven.captureException(e);
}
});
emitter.on('cancel', () => {
state.transfer.cancel();
});
emitter.on('upload', async ({ file, type }) => {
const size = file.size;
const sender = new FileSender(file);
sender.on('progress', updateProgress);
sender.on('encrypting', render);
state.transfer = sender;
state.uploading = true;
render();
const links = openLinksInNewTab();
await delay(200);
try {
metrics.startedUpload({ size, type });
const ownedFile = await sender.upload();
ownedFile.type = type;
state.storage.totalUploads += 1;
metrics.completedUpload(ownedFile);
state.storage.addFile(ownedFile);
document.getElementById('cancel-upload').hidden = 'hidden';
await delay(1000);
await fadeOut('.page');
openLinksInNewTab(links, false);
emitter.emit('pushState', `/share/${ownedFile.id}`);
} catch (err) {
console.error(err);
if (err.message === '0') {
//cancelled. do nothing
metrics.cancelledUpload({ size, type });
return render();
}
state.raven.captureException(err);
metrics.stoppedUpload({ size, type, err });
emitter.emit('pushState', '/error');
} finally {
state.uploading = false;
state.transfer = null;
}
});
emitter.on('password', async ({ password, file }) => {
try {
state.settingPassword = true;
render();
await file.setPassword(password);
state.storage.writeFile(file);
metrics.addedPassword({ size: file.size });
await delay(1000);
} catch (err) {
console.error(err);
state.passwordSetError = err;
} finally {
state.settingPassword = false;
}
render();
});
emitter.on('getMetadata', async () => {
const file = state.fileInfo;
const receiver = new FileReceiver(file);
try {
await receiver.getMetadata();
state.transfer = receiver;
} catch (e) {
if (e.message === '401') {
file.password = null;
if (!file.requiresPassword) {
return emitter.emit('pushState', '/404');
}
}
}
render();
});
emitter.on('download', async file => {
state.transfer.on('progress', updateProgress);
state.transfer.on('decrypting', render);
const links = openLinksInNewTab();
const size = file.size;
try {
const start = Date.now();
metrics.startedDownload({ size: file.size, ttl: file.ttl });
const dl = state.transfer.download();
render();
await dl;
const time = Date.now() - start;
const speed = size / (time / 1000);
await delay(1000);
await fadeOut('.page');
state.storage.totalDownloads += 1;
state.transfer.reset();
metrics.completedDownload({ size, time, speed });
emitter.emit('pushState', '/completed');
} catch (err) {
if (err.message === '0') {
// download cancelled
state.transfer.reset();
return render();
}
console.error(err);
state.transfer = null;
const location = err.message === '404' ? '/404' : '/error';
if (location === '/error') {
state.raven.captureException(err);
metrics.stoppedDownload({ size, err });
}
emitter.emit('pushState', location);
} finally {
openLinksInNewTab(links, false);
}
});
emitter.on('copy', ({ url, location }) => {
copyToClipboard(url);
metrics.copiedLink({ location });
});
setInterval(() => {
// poll for updates of the download counts
// TODO something for the share page: || state.route === '/share/:id'
if (state.route === '/') {
checkFiles();
}
}, 2 * 60 * 1000);
setInterval(() => {
// poll for rerendering the file list countdown timers
if (
state.route === '/' &&
state.storage.files.length > 0 &&
Date.now() - lastRender > 30000
) {
render();
}
}, 60000);
}

View File

@@ -1,7 +1,9 @@
import Nanobus from 'nanobus';
import Keychain from './keychain';
import { bytes } from './utils';
import { metadata, downloadFile } from './api';
import { delay, bytes, streamToArrayBuffer } from './utils';
import { downloadFile, metadata, getApiUrl } from './api';
import { blobStream } from './streams';
import Zip from './zip';
export default class FileReceiver extends Nanobus {
constructor(fileInfo) {
@@ -43,21 +45,39 @@ export default class FileReceiver extends Nanobus {
async getMetadata() {
const meta = await metadata(this.fileInfo.id, this.keychain);
this.keychain.setIV(meta.iv);
this.fileInfo.name = meta.name;
this.fileInfo.type = meta.type;
this.fileInfo.iv = meta.iv;
this.fileInfo.size = meta.size;
this.fileInfo.size = +meta.size;
this.fileInfo.manifest = meta.manifest;
this.state = 'ready';
}
async download(noSave = false) {
sendMessageToSw(msg) {
return new Promise((resolve, reject) => {
const channel = new MessageChannel();
channel.port1.onmessage = function(event) {
if (event.data === undefined) {
reject('bad response from serviceWorker');
} else if (event.data.error !== undefined) {
reject(event.data.error);
} else {
resolve(event.data);
}
};
navigator.serviceWorker.controller.postMessage(msg, [channel.port2]);
});
}
async downloadBlob(noSave = false) {
this.state = 'downloading';
this.downloadRequest = await downloadFile(
this.fileInfo.id,
this.keychain,
p => {
this.progress = p;
this.progress = [p, this.fileInfo.size];
this.emit('progress');
}
);
@@ -67,7 +87,14 @@ export default class FileReceiver extends Nanobus {
this.msg = 'decryptingFile';
this.state = 'decrypting';
this.emit('decrypting');
const plaintext = await this.keychain.decryptFile(ciphertext);
let size = this.fileInfo.size;
let plainStream = this.keychain.decryptStream(blobStream(ciphertext));
if (this.fileInfo.type === 'send-archive') {
const zip = new Zip(this.fileInfo.manifest, plainStream);
plainStream = zip.stream;
size = zip.size;
}
const plaintext = await streamToArrayBuffer(plainStream, size);
if (!noSave) {
await saveFile({
plaintext,
@@ -76,12 +103,96 @@ export default class FileReceiver extends Nanobus {
});
}
this.msg = 'downloadFinish';
this.emit('complete');
this.state = 'complete';
} catch (e) {
this.downloadRequest = null;
throw e;
}
}
async downloadStream(noSave = false) {
const onprogress = p => {
this.progress = [p, this.fileInfo.size];
this.emit('progress');
};
this.downloadRequest = {
cancel: () => {
this.sendMessageToSw({ request: 'cancel', id: this.fileInfo.id });
}
};
try {
this.state = 'downloading';
const info = {
request: 'init',
id: this.fileInfo.id,
filename: this.fileInfo.name,
type: this.fileInfo.type,
manifest: this.fileInfo.manifest,
key: this.fileInfo.secretKey,
requiresPassword: this.fileInfo.requiresPassword,
password: this.fileInfo.password,
url: this.fileInfo.url,
size: this.fileInfo.size,
nonce: this.keychain.nonce,
noSave
};
await this.sendMessageToSw(info);
onprogress(0);
if (noSave) {
const res = await fetch(getApiUrl(`/api/download/${this.fileInfo.id}`));
if (res.status !== 200) {
throw new Error(res.status);
}
} else {
const downloadPath = `/api/download/${this.fileInfo.id}`;
let downloadUrl = getApiUrl(downloadPath);
if (downloadUrl === downloadPath) {
downloadUrl = `${location.protocol}//${location.host}/api/download/${
this.fileInfo.id
}`;
}
const a = document.createElement('a');
a.href = downloadUrl;
document.body.appendChild(a);
a.click();
}
let prog = 0;
while (prog < this.fileInfo.size) {
const msg = await this.sendMessageToSw({
request: 'progress',
id: this.fileInfo.id
});
prog = msg.progress;
onprogress(prog);
await delay(1000);
}
this.downloadRequest = null;
this.msg = 'downloadFinish';
this.emit('complete');
this.state = 'complete';
} catch (e) {
this.downloadRequest = null;
if (e === 'cancelled' || e.message === '400') {
throw new Error(0);
}
throw e;
}
}
download(options) {
if (options.stream) {
return this.downloadStream(options.noSave);
}
return this.downloadBlob(options.noSave);
}
}
async function saveFile(file) {

View File

@@ -1,14 +1,13 @@
/* global EXPIRE_SECONDS */
import Nanobus from 'nanobus';
import OwnedFile from './ownedFile';
import Keychain from './keychain';
import { arrayToB64, bytes } from './utils';
import { uploadFile } from './api';
import { uploadWs } from './api';
import { encryptedSize } from './utils';
export default class FileSender extends Nanobus {
constructor(file) {
constructor() {
super('FileSender');
this.file = file;
this.keychain = new Keychain();
this.reset();
}
@@ -18,7 +17,9 @@ export default class FileSender extends Nanobus {
}
get progressIndefinite() {
return ['fileSizeProgress', 'notifyUploadDone'].indexOf(this.msg) === -1;
return (
['fileSizeProgress', 'notifyUploadEncryptDone'].indexOf(this.msg) === -1
);
}
get sizes() {
@@ -42,66 +43,61 @@ export default class FileSender extends Nanobus {
}
}
readFile() {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.readAsArrayBuffer(this.file);
// TODO: progress?
reader.onload = function(event) {
const plaintext = new Uint8Array(this.result);
resolve(plaintext);
};
reader.onerror = function(err) {
reject(err);
};
});
}
async upload() {
async upload(archive, bearerToken) {
const start = Date.now();
const plaintext = await this.readFile();
if (this.cancelled) {
throw new Error(0);
}
this.msg = 'encryptingFile';
this.emit('encrypting');
const encrypted = await this.keychain.encryptFile(plaintext);
const metadata = await this.keychain.encryptMetadata(this.file);
const totalSize = encryptedSize(archive.size);
const encStream = await this.keychain.encryptStream(archive.stream);
const metadata = await this.keychain.encryptMetadata(archive);
const authKeyB64 = await this.keychain.authKeyB64();
this.uploadRequest = uploadWs(
encStream,
metadata,
authKeyB64,
archive.timeLimit,
archive.dlimit,
bearerToken,
p => {
this.progress = [p, totalSize];
this.emit('progress');
}
);
if (this.cancelled) {
throw new Error(0);
}
this.uploadRequest = uploadFile(
encrypted,
metadata,
authKeyB64,
this.keychain,
p => {
this.progress = p;
this.emit('progress', p);
}
);
this.msg = 'fileSizeProgress';
this.emit('progress'); // HACK to kick MS Edge
try {
const result = await this.uploadRequest.result;
const time = Date.now() - start;
this.msg = 'notifyUploadDone';
this.msg = 'notifyUploadEncryptDone';
this.uploadRequest = null;
this.progress = [1, 1];
const secretKey = arrayToB64(this.keychain.rawSecret);
const ownedFile = new OwnedFile({
id: result.id,
url: `${result.url}#${secretKey}`,
name: this.file.name,
size: this.file.size,
name: archive.name,
size: archive.size,
manifest: archive.manifest,
time: time,
speed: this.file.size / (time / 1000),
speed: archive.size / (time / 1000),
createdAt: Date.now(),
expiresAt: Date.now() + EXPIRE_SECONDS * 1000,
expiresAt: Date.now() + archive.timeLimit * 1000,
secretKey: secretKey,
nonce: this.keychain.nonce,
ownerToken: result.ownerToken
ownerToken: result.ownerToken,
dlimit: archive.dlimit,
timeLimit: archive.timeLimit
});
return ownedFile;
} catch (e) {
this.msg = 'errorPageHeader';

181
app/fxa.js Normal file
View File

@@ -0,0 +1,181 @@
/* global AUTH_CONFIG */
import { arrayToB64, b64ToArray } from './utils';
const encoder = new TextEncoder();
const decoder = new TextDecoder();
function getOtherInfo(enc) {
const name = encoder.encode(enc);
const length = 256;
const buffer = new ArrayBuffer(name.length + 16);
const dv = new DataView(buffer);
const result = new Uint8Array(buffer);
let i = 0;
dv.setUint32(i, name.length);
i += 4;
result.set(name, i);
i += name.length;
dv.setUint32(i, 0);
i += 4;
dv.setUint32(i, 0);
i += 4;
dv.setUint32(i, length);
return result;
}
function concat(b1, b2) {
const result = new Uint8Array(b1.length + b2.length);
result.set(b1, 0);
result.set(b2, b1.length);
return result;
}
async function concatKdf(key, enc) {
if (key.length !== 32) {
throw new Error('unsupported key length');
}
const otherInfo = getOtherInfo(enc);
const buffer = new ArrayBuffer(4 + key.length + otherInfo.length);
const dv = new DataView(buffer);
const concat = new Uint8Array(buffer);
dv.setUint32(0, 1);
concat.set(key, 4);
concat.set(otherInfo, key.length + 4);
const result = await crypto.subtle.digest('SHA-256', concat);
return new Uint8Array(result);
}
export async function prepareScopedBundleKey(storage) {
const keys = await crypto.subtle.generateKey(
{
name: 'ECDH',
namedCurve: 'P-256'
},
true,
['deriveBits']
);
const privateJwk = await crypto.subtle.exportKey('jwk', keys.privateKey);
const publicJwk = await crypto.subtle.exportKey('jwk', keys.publicKey);
const kid = await crypto.subtle.digest(
'SHA-256',
encoder.encode(JSON.stringify(publicJwk))
);
privateJwk.kid = kid;
publicJwk.kid = kid;
storage.set('scopedBundlePrivateKey', JSON.stringify(privateJwk));
return arrayToB64(encoder.encode(JSON.stringify(publicJwk)));
}
export async function decryptBundle(storage, bundle) {
const privateJwk = JSON.parse(storage.get('scopedBundlePrivateKey'));
storage.remove('scopedBundlePrivateKey');
const privateKey = await crypto.subtle.importKey(
'jwk',
privateJwk,
{
name: 'ECDH',
namedCurve: 'P-256'
},
false,
['deriveBits']
);
const jweParts = bundle.split('.');
if (jweParts.length !== 5) {
throw new Error('invalid jwe');
}
const header = JSON.parse(decoder.decode(b64ToArray(jweParts[0])));
const additionalData = encoder.encode(jweParts[0]);
const iv = b64ToArray(jweParts[2]);
const ciphertext = b64ToArray(jweParts[3]);
const tag = b64ToArray(jweParts[4]);
if (header.alg !== 'ECDH-ES' || header.enc !== 'A256GCM') {
throw new Error('unsupported jwe type');
}
const publicKey = await crypto.subtle.importKey(
'jwk',
header.epk,
{
name: 'ECDH',
namedCurve: 'P-256'
},
false,
[]
);
const sharedBits = await crypto.subtle.deriveBits(
{
name: 'ECDH',
public: publicKey
},
privateKey,
256
);
const rawSharedKey = await concatKdf(new Uint8Array(sharedBits), header.enc);
const sharedKey = await crypto.subtle.importKey(
'raw',
rawSharedKey,
{
name: 'AES-GCM'
},
false,
['decrypt']
);
const plaintext = await crypto.subtle.decrypt(
{
name: 'AES-GCM',
iv: iv,
additionalData: additionalData,
tagLength: tag.length * 8
},
sharedKey,
concat(ciphertext, tag)
);
return JSON.parse(decoder.decode(plaintext));
}
export async function preparePkce(storage) {
const verifier = arrayToB64(crypto.getRandomValues(new Uint8Array(64)));
storage.set('pkceVerifier', verifier);
const challenge = await crypto.subtle.digest(
'SHA-256',
encoder.encode(verifier)
);
return arrayToB64(new Uint8Array(challenge));
}
export async function deriveFileListKey(ikm) {
const baseKey = await crypto.subtle.importKey(
'raw',
b64ToArray(ikm),
{ name: 'HKDF' },
false,
['deriveKey']
);
const fileListKey = await crypto.subtle.deriveKey(
{
name: 'HKDF',
salt: new Uint8Array(),
info: encoder.encode('fileList'),
hash: 'SHA-256'
},
baseKey,
{
name: 'AES-GCM',
length: 128
},
true,
['encrypt', 'decrypt']
);
const rawFileListKey = await crypto.subtle.exportKey('raw', fileListKey);
return arrayToB64(new Uint8Array(rawFileListKey));
}
export async function getFileListKey(storage, bundle) {
const jwks = await decryptBundle(storage, bundle);
const jwk = jwks[AUTH_CONFIG.key_scope];
return deriveFileListKey(jwk.k);
}

View File

@@ -1,22 +1,17 @@
import { arrayToB64, b64ToArray } from './utils';
import { decryptStream, encryptStream } from './ece.js';
const encoder = new TextEncoder();
const decoder = new TextDecoder();
export default class Keychain {
constructor(secretKeyB64, nonce, ivB64) {
constructor(secretKeyB64, nonce) {
this._nonce = nonce || 'yRCdyQ1EMSA3mo4rqSkuNQ==';
if (ivB64) {
this.iv = b64ToArray(ivB64);
} else {
this.iv = window.crypto.getRandomValues(new Uint8Array(12));
}
if (secretKeyB64) {
this.rawSecret = b64ToArray(secretKeyB64);
} else {
this.rawSecret = window.crypto.getRandomValues(new Uint8Array(16));
this.rawSecret = crypto.getRandomValues(new Uint8Array(16));
}
this.secretKeyPromise = window.crypto.subtle.importKey(
this.secretKeyPromise = crypto.subtle.importKey(
'raw',
this.rawSecret,
'HKDF',
@@ -24,7 +19,7 @@ export default class Keychain {
['deriveKey']
);
this.encryptKeyPromise = this.secretKeyPromise.then(function(secretKey) {
return window.crypto.subtle.deriveKey(
return crypto.subtle.deriveKey(
{
name: 'HKDF',
salt: new Uint8Array(),
@@ -41,7 +36,7 @@ export default class Keychain {
);
});
this.metaKeyPromise = this.secretKeyPromise.then(function(secretKey) {
return window.crypto.subtle.deriveKey(
return crypto.subtle.deriveKey(
{
name: 'HKDF',
salt: new Uint8Array(),
@@ -58,7 +53,7 @@ export default class Keychain {
);
});
this.authKeyPromise = this.secretKeyPromise.then(function(secretKey) {
return window.crypto.subtle.deriveKey(
return crypto.subtle.deriveKey(
{
name: 'HKDF',
salt: new Uint8Array(),
@@ -86,17 +81,13 @@ export default class Keychain {
}
}
setIV(ivB64) {
this.iv = b64ToArray(ivB64);
}
setPassword(password, shareUrl) {
this.authKeyPromise = window.crypto.subtle
this.authKeyPromise = crypto.subtle
.importKey('raw', encoder.encode(password), { name: 'PBKDF2' }, false, [
'deriveKey'
])
.then(passwordKey =>
window.crypto.subtle.deriveKey(
crypto.subtle.deriveKey(
{
name: 'PBKDF2',
salt: encoder.encode(shareUrl),
@@ -115,7 +106,7 @@ export default class Keychain {
}
setAuthKey(authKeyB64) {
this.authKeyPromise = window.crypto.subtle.importKey(
this.authKeyPromise = crypto.subtle.importKey(
'raw',
b64ToArray(authKeyB64),
{
@@ -129,13 +120,13 @@ export default class Keychain {
async authKeyB64() {
const authKey = await this.authKeyPromise;
const rawAuth = await window.crypto.subtle.exportKey('raw', authKey);
const rawAuth = await crypto.subtle.exportKey('raw', authKey);
return arrayToB64(new Uint8Array(rawAuth));
}
async authHeader() {
const authKey = await this.authKeyPromise;
const sig = await window.crypto.subtle.sign(
const sig = await crypto.subtle.sign(
{
name: 'HMAC'
},
@@ -145,23 +136,9 @@ export default class Keychain {
return `send-v1 ${arrayToB64(new Uint8Array(sig))}`;
}
async encryptFile(plaintext) {
const encryptKey = await this.encryptKeyPromise;
const ciphertext = await window.crypto.subtle.encrypt(
{
name: 'AES-GCM',
iv: this.iv,
tagLength: 128
},
encryptKey,
plaintext
);
return ciphertext;
}
async encryptMetadata(metadata) {
const metaKey = await this.metaKeyPromise;
const ciphertext = await window.crypto.subtle.encrypt(
const ciphertext = await crypto.subtle.encrypt(
{
name: 'AES-GCM',
iv: new Uint8Array(12),
@@ -170,32 +147,27 @@ export default class Keychain {
metaKey,
encoder.encode(
JSON.stringify({
iv: arrayToB64(this.iv),
name: metadata.name,
type: metadata.type || 'application/octet-stream'
size: metadata.size,
type: metadata.type || 'application/octet-stream',
manifest: metadata.manifest || {}
})
)
);
return ciphertext;
}
async decryptFile(ciphertext) {
const encryptKey = await this.encryptKeyPromise;
const plaintext = await window.crypto.subtle.decrypt(
{
name: 'AES-GCM',
iv: this.iv,
tagLength: 128
},
encryptKey,
ciphertext
);
return plaintext;
encryptStream(plainStream) {
return encryptStream(plainStream, this.rawSecret);
}
decryptStream(cryptotext) {
return decryptStream(cryptotext, this.rawSecret);
}
async decryptMetadata(ciphertext) {
const metaKey = await this.metaKeyPromise;
const plaintext = await window.crypto.subtle.decrypt(
const plaintext = await crypto.subtle.decrypt(
{
name: 'AES-GCM',
iv: new Uint8Array(12),

26
app/locale.js Normal file
View File

@@ -0,0 +1,26 @@
import { FluentBundle } from 'fluent';
function makeBundle(locale, ftl) {
const bundle = new FluentBundle(locale, { useIsolating: false });
bundle.addMessages(ftl);
return bundle;
}
export async function getTranslator(locale) {
const bundles = [];
const { default: en } = await import('../public/locales/en-US/send.ftl');
if (locale !== 'en-US') {
const {
default: ftl
} = await import(`../public/locales/${locale}/send.ftl`);
bundles.push(makeBundle(locale, ftl));
}
bundles.push(makeBundle('en-US', en));
return function(id, data) {
for (let bundle of bundles) {
if (bundle.hasMessage(id)) {
return bundle.format(bundle.getMessage(id), data);
}
}
};
}

View File

@@ -1,16 +1,290 @@
@import './base.css';
@import './templates/header/header.css';
@import './templates/downloadButton/downloadButton.css';
@import './templates/progress/progress.css';
@import './templates/passwordInput/passwordInput.css';
@import './templates/downloadPassword/downloadPassword.css';
@import './templates/setPasswordSection/setPasswordSection.css';
@import './templates/footer/footer.css';
@import './templates/fxPromo/fxPromo.css';
@import './templates/selectbox/selectbox.css';
@import './templates/fileList/fileList.css';
@import './templates/file/file.css';
@import './templates/popup/popup.css';
@import './pages/welcome/welcome.css';
@import './pages/share/share.css';
@import './pages/unsupported/unsupported.css';
@tailwind preflight;
@tailwind components;
:not(input) {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
a {
color: inherit;
text-decoration: none;
}
a:focus {
outline: 1px dotted grey;
}
body {
background-image: url('../assets/bg.svg');
background-position: center;
background-repeat: no-repeat;
background-size: cover;
overflow-x: hidden;
}
.btn {
@apply bg-blue-dark;
@apply text-white;
@apply cursor-pointer;
@apply py-4;
@apply px-6;
}
.btn:hover {
@apply bg-blue-darker;
}
.btn:focus {
@apply bg-blue-darker;
}
.checkbox {
@apply leading-normal;
@apply select-none;
}
.checkbox > input[type='checkbox'] {
@apply absolute;
@apply opacity-0;
}
.checkbox > label {
@apply cursor-pointer;
}
.checkbox > label::before {
/* @apply bg-grey-lightest; */
@apply border;
@apply rounded-sm;
content: '';
height: 1.5rem;
width: 1.5rem;
margin-right: 0.5rem;
float: left;
}
.checkbox > label:hover::before {
@apply border-blue-dark;
}
.checkbox > input:focus + label::before {
@apply border-blue-dark;
}
.checkbox > input:checked + label::before {
@apply bg-blue-dark;
@apply border-blue-dark;
background-image: url('../assets/lock.svg');
background-position: center;
background-size: 1.25rem;
background-repeat: no-repeat;
}
.checkbox > input:disabled + label {
cursor: auto;
}
.checkbox > input:disabled + label::before {
@apply bg-blue-dark;
@apply border-blue-dark;
background-image: url('../assets/lock.svg');
background-position: center;
background-size: 1.25rem;
background-repeat: no-repeat;
cursor: auto;
}
details {
overflow: hidden;
}
details > summary::-webkit-details-marker {
display: none;
}
details > summary > svg {
transition: all 0.25s cubic-bezier(0.07, 0.95, 0, 1);
}
details[open] {
overflow-y: auto;
}
details[open] > summary > svg {
transform: rotate(90deg);
}
footer li:hover {
text-decoration: underline;
}
.feedback-link {
background-color: #000;
background-image: url('../assets/feedback.svg');
background-position: 0.125rem 0.25rem;
background-repeat: no-repeat;
background-size: 1.125rem;
color: #fff;
display: block;
font-size: 0.75rem;
line-height: 0.75rem;
padding: 0.375rem 0.375rem 0.375rem 1.25rem;
text-indent: 0.125rem;
white-space: nowrap;
}
.intro {
max-width: 100%;
height: unset;
}
.main {
display: flex;
position: relative;
max-width: 64rem;
width: 100%;
height: 100%;
}
.main > section {
@apply bg-white;
}
.mozilla-logo {
background-image: url('../assets/mozilla-logo.svg');
background-repeat: no-repeat;
background-size: 100px, 32px;
overflow: hidden;
text-indent: 120%;
white-space: nowrap;
display: inline-block;
height: 32px;
width: 100px;
flex-shrink: 0;
}
#password-msg::after {
content: '\200b';
}
progress {
@apply bg-grey-light;
@apply rounded-sm;
@apply w-full;
@apply h-1;
}
progress::-webkit-progress-bar {
@apply bg-grey-light;
@apply rounded-sm;
@apply w-full;
@apply h-1;
}
progress::-webkit-progress-value {
/* stylelint-disable */
background-image: -webkit-linear-gradient(
-45deg,
transparent 20%,
rgba(255, 255, 255, 0.4) 20%,
rgba(255, 255, 255, 0.4) 40%,
transparent 40%,
transparent 60%,
rgba(255, 255, 255, 0.4) 60%,
rgba(255, 255, 255, 0.4) 80%,
transparent 80%
),
-webkit-linear-gradient(left, #0a84ff, #0a84ff);
/* stylelint-enable */
border-radius: 2px;
background-size: 21px 20px, 100% 100%, 100% 100%;
-webkit-animation: animate-stripes 1s linear infinite;
}
progress::-moz-progress-bar {
/* stylelint-disable */
background-image: -moz-linear-gradient(
135deg,
transparent 20%,
rgba(255, 255, 255, 0.4) 20%,
rgba(255, 255, 255, 0.4) 40%,
transparent 40%,
transparent 60%,
rgba(255, 255, 255, 0.4) 60%,
rgba(255, 255, 255, 0.4) 80%,
transparent 80%
),
-moz-linear-gradient(left, #0a84ff, #0a84ff);
/* stylelint-enable */
border-radius: 2px;
background-size: 21px 20px, 100% 100%, 100% 100%;
animation: animate-stripes 1s linear infinite;
}
@-webkit-keyframes animate-stripes {
100% {
background-position: -21px 0;
}
}
@keyframes animate-stripes {
100% {
background-position: -21px 0;
}
}
select {
background-image: url('../assets/select-arrow.svg');
background-position: calc(100% - 0.75rem);
background-repeat: no-repeat;
}
@screen md {
.intro {
max-width: unset;
height: unset;
margin-bottom: -3rem;
margin-right: -7rem;
}
.main {
@apply flex-1;
@apply self-center;
@apply items-center;
@apply m-auto;
@apply py-8;
min-height: 36rem;
max-height: 40rem;
width: calc(100% - 3rem);
}
}
@tailwind utilities;
@responsive {
.shadow-light {
box-shadow: 0 0 8px 0 rgba(12, 12, 13, 0.1);
}
.shadow-big {
box-shadow: 0 0 32px 0 rgba(12, 12, 13, 0.1),
0 2px 16px 0 rgba(12, 12, 13, 0.05);
}
}
@variants focus {
.outline {
outline: 1px dotted grey;
}
}
.word-break-all {
word-break: break-all;
}

View File

@@ -1,55 +1,71 @@
/* global DEFAULTS LIMITS LOCALE */
import 'core-js';
import 'fast-text-encoding'; // MS Edge support
import 'fluent-intl-polyfill';
import app from './routes';
import locale from '../common/locales';
import fileManager from './fileManager';
import choo from 'choo';
import nanotiming from 'nanotiming';
import routes from './routes';
import getCapabilities from './capabilities';
import controller from './controller';
import dragManager from './dragManager';
import { canHasSend } from './utils';
import assets from '../common/assets';
import pasteManager from './pasteManager';
import storage from './storage';
import metrics from './metrics';
import experiments from './experiments';
import Raven from 'raven-js';
import './main.css';
import User from './user';
import { getTranslator } from './locale';
import Archive from './archive';
import { setTranslate } from './utils';
if (navigator.doNotTrack !== '1' && window.RAVEN_CONFIG) {
Raven.config(window.SENTRY_ID, window.RAVEN_CONFIG).install();
}
app.use((state, emitter) => {
state.transfer = null;
state.fileInfo = null;
state.translate = locale.getTranslator();
state.storage = storage;
state.raven = Raven;
window.appState = state;
emitter.on('DOMContentLoaded', async function checkSupport() {
let unsupportedReason = null;
if (
// Firefox < 50
/firefox/i.test(navigator.userAgent) &&
parseInt(navigator.userAgent.match(/firefox\/*([^\n\r]*)\./i)[1], 10) < 50
) {
unsupportedReason = 'outdated';
}
if (/edge\/\d+/i.test(navigator.userAgent)) {
unsupportedReason = 'edge';
}
const ok = await canHasSend(assets.get('cryptofill.js'));
if (!ok) {
unsupportedReason = /firefox/i.test(navigator.userAgent)
? 'outdated'
: 'gcm';
}
if (unsupportedReason) {
setTimeout(() =>
emitter.emit('replaceState', `/unsupported/${unsupportedReason}`)
);
}
});
});
if (process.env.NODE_ENV === 'production') {
nanotiming.disabled = true;
}
app.use(metrics);
app.use(fileManager);
app.use(dragManager);
app.use(experiments);
(async function start() {
const capabilities = await getCapabilities();
if (
!capabilities.crypto &&
window.location.pathname !== '/unsupported/crypto'
) {
return window.location.assign('/unsupported/crypto');
}
if (capabilities.serviceWorker) {
try {
await navigator.serviceWorker.register('/serviceWorker.js');
await navigator.serviceWorker.ready;
} catch (e) {
// continue but disable streaming downloads
capabilities.streamDownload = false;
}
}
app.mount('body');
const translate = await getTranslator(LOCALE);
setTranslate(translate);
window.initialState = {
LIMITS,
DEFAULTS,
archive: new Archive([], DEFAULTS.EXPIRE_SECONDS),
capabilities,
translate,
storage,
raven: Raven,
user: new User(storage, LIMITS, window.AUTH_CONFIG),
transfer: null,
fileInfo: null
};
const app = routes(choo());
window.app = app;
app.use(metrics);
app.use(controller);
app.use(dragManager);
app.use(experiments);
app.use(pasteManager);
app.mount('body');
})();

View File

@@ -1,297 +1,178 @@
import testPilotGA from 'testpilot-ga/src/TestPilotGA';
import storage from './storage';
let hasLocalStorage = false;
try {
hasLocalStorage = typeof localStorage !== 'undefined';
} catch (e) {
// when disabled, any mention of localStorage throws an error
}
const analytics = new testPilotGA({
an: 'Firefox Send',
ds: 'web',
tid: window.GOOGLE_ANALYTICS_ID
});
import { platform } from './utils';
import { sendMetrics } from './api';
let appState = null;
let experiment = null;
// let experiment = null;
const HOUR = 1000 * 60 * 60;
const events = [];
let session_id = Date.now();
const lang = document.querySelector('html').lang;
export default function initialize(state, emitter) {
appState = state;
if (!appState.user.firstAction) {
appState.user.firstAction = appState.route === '/' ? 'upload' : 'download';
}
emitter.on('DOMContentLoaded', () => {
addExitHandlers();
experiment = storage.enrolled[0];
sendEvent(category(), 'visit', {
cm5: storage.totalUploads,
cm6: storage.files.length,
cm7: storage.totalDownloads
// experiment = storage.enrolled[0];
const query = appState.query;
addEvent('client_visit', {
entrypoint: appState.route === '/' ? 'upload' : 'download',
referrer: document.referrer,
utm_campaign: query.utm_campaign,
utm_content: query.utm_content,
utm_medium: query.utm_medium,
utm_source: query.utm_source,
utm_term: query.utm_term
});
//TODO restart handlers... somewhere
});
emitter.on('exit', exitEvent);
emitter.on('experiment', experimentEvent);
window.addEventListener('unload', submitEvents);
}
function category() {
switch (appState.route) {
case '/':
case '/share/:id':
return 'sender';
case '/download/:id/:key':
case '/download/:id':
case '/completed':
return 'recipient';
default:
return 'other';
}
function sizeOrder(n) {
return Math.floor(Math.log10(n));
}
function sendEvent() {
const args = Array.from(arguments);
if (experiment && args[2]) {
args[2].xid = experiment[0];
args[2].xvar = experiment[1];
function submitEvents() {
if (navigator.doNotTrack === '1') {
return;
}
return (
hasLocalStorage && analytics.sendEvent.apply(analytics, args).catch(() => 0)
sendMetrics(
new Blob(
[
JSON.stringify({
now: Date.now(),
session_id,
lang,
platform: platform(),
events
})
],
{ type: 'text/plain' } // see http://crbug.com/490015
)
);
events.splice(0);
}
function urlToMetric(url) {
switch (url) {
case 'https://www.mozilla.org/':
return 'mozilla';
case 'https://www.mozilla.org/about/legal':
return 'legal';
case 'https://testpilot.firefox.com/about':
return 'about';
case 'https://testpilot.firefox.com/privacy':
return 'privacy';
case 'https://testpilot.firefox.com/terms':
return 'terms';
case 'https://www.mozilla.org/privacy/websites/#cookies':
return 'cookies';
case 'https://github.com/mozilla/send':
return 'github';
case 'https://twitter.com/FxTestPilot':
return 'twitter';
case 'https://www.mozilla.org/firefox/new/?scene=2':
return 'download-firefox';
case 'https://qsurvey.mozilla.com/s3/txp-firefox-send':
return 'survey';
case 'https://testpilot.firefox.com/':
case 'https://testpilot.firefox.com/experiments/send':
return 'testpilot';
case 'https://www.mozilla.org/firefox/new/?utm_campaign=send-acquisition&utm_medium=referral&utm_source=send.firefox.com':
return 'promo';
default:
return 'other';
}
}
function setReferrer(state) {
if (category() === 'sender') {
if (state) {
storage.referrer = `${state}-upload`;
}
} else if (category() === 'recipient') {
if (state) {
storage.referrer = `${state}-download`;
async function addEvent(event_type, event_properties) {
const user_id = await appState.user.metricId();
const device_id = await appState.user.deviceId();
events.push({
device_id,
event_properties,
event_type,
time: Date.now(),
user_id,
user_properties: {
anonymous: !appState.user.loggedIn,
first_action: appState.user.firstAction,
active_count: storage.files.length
}
});
if (events.length === 25) {
submitEvents();
}
}
function externalReferrer() {
if (/^https:\/\/testpilot\.firefox\.com/.test(document.referrer)) {
return 'testpilot';
}
return 'external';
}
function takeReferrer() {
const referrer = storage.referrer || externalReferrer();
storage.referrer = null;
return referrer;
}
function startedUpload(params) {
return sendEvent('sender', 'upload-started', {
cm1: params.size,
cm5: storage.totalUploads,
cm6: storage.files.length + 1,
cm7: storage.totalDownloads,
cd1: params.type,
cd5: takeReferrer()
function cancelledUpload(archive, duration) {
return addEvent('client_upload', {
download_limit: archive.dlimit,
duration: sizeOrder(duration),
file_count: archive.numFiles,
password_protected: !!archive.password,
size: sizeOrder(archive.size),
status: 'cancel',
time_limit: archive.timeLimit
});
}
function cancelledUpload(params) {
setReferrer('cancelled');
return sendEvent('sender', 'upload-stopped', {
cm1: params.size,
cm5: storage.totalUploads,
cm6: storage.files.length,
cm7: storage.totalDownloads,
cd1: params.type,
cd2: 'cancelled'
function completedUpload(archive, duration) {
return addEvent('client_upload', {
download_limit: archive.dlimit,
duration: sizeOrder(duration),
file_count: archive.numFiles,
password_protected: !!archive.password,
size: sizeOrder(archive.size),
status: 'ok',
time_limit: archive.timeLimit
});
}
function completedUpload(params) {
return sendEvent('sender', 'upload-stopped', {
cm1: params.size,
cm2: params.time,
cm3: params.speed,
cm5: storage.totalUploads,
cm6: storage.files.length,
cm7: storage.totalDownloads,
cd1: params.type,
cd2: 'completed'
});
}
function addedPassword(params) {
return sendEvent('sender', 'password-added', {
cm1: params.size,
cm5: storage.totalUploads,
cm6: storage.files.length,
cm7: storage.totalDownloads
});
}
function startedDownload(params) {
return sendEvent('recipient', 'download-started', {
cm1: params.size,
cm4: params.ttl,
cm5: storage.totalUploads,
cm6: storage.files.length,
cm7: storage.totalDownloads
function stoppedUpload(archive) {
return addEvent('client_upload', {
download_limit: archive.dlimit,
file_count: archive.numFiles,
password_protected: !!archive.password,
size: sizeOrder(archive.size),
status: 'error',
time_limit: archive.timeLimit
});
}
function stoppedDownload(params) {
return sendEvent('recipient', 'download-stopped', {
cm1: params.size,
cm5: storage.totalUploads,
cm6: storage.files.length,
cm7: storage.totalDownloads,
cd2: 'errored',
cd6: params.err
});
}
function cancelledDownload(params) {
setReferrer('cancelled');
return sendEvent('recipient', 'download-stopped', {
cm1: params.size,
cm5: storage.totalUploads,
cm6: storage.files.length,
cm7: storage.totalDownloads,
cd2: 'cancelled'
});
}
function stoppedUpload(params) {
return sendEvent('sender', 'upload-stopped', {
cm1: params.size,
cm5: storage.totalUploads,
cm6: storage.files.length,
cm7: storage.totalDownloads,
cd1: params.type,
cd2: 'errored',
cd6: params.err
});
}
function changedDownloadLimit(params) {
return sendEvent('sender', 'download-limit-changed', {
cm1: params.size,
cm5: storage.totalUploads,
cm6: storage.files.length,
cm7: storage.totalDownloads,
cm8: params.dlimit
return addEvent('client_download', {
duration: sizeOrder(params.duration),
password_protected: params.password_protected,
size: sizeOrder(params.size),
status: 'error'
});
}
function completedDownload(params) {
return sendEvent('recipient', 'download-stopped', {
cm1: params.size,
cm2: params.time,
cm3: params.speed,
cm5: storage.totalUploads,
cm6: storage.files.length,
cm7: storage.totalDownloads,
cd2: 'completed'
return addEvent('client_download', {
duration: sizeOrder(params.duration),
password_protected: params.password_protected,
size: sizeOrder(params.size),
status: 'ok'
});
}
function deletedUpload(params) {
return sendEvent(category(), 'upload-deleted', {
cm1: params.size,
cm2: params.time,
cm3: params.speed,
cm4: params.ttl,
cm5: storage.totalUploads,
cm6: storage.files.length,
cm7: storage.totalDownloads,
cd1: params.type,
cd4: params.location
});
}
function unsupported(params) {
return sendEvent(category(), 'unsupported', {
cd6: params.err
});
}
function copiedLink(params) {
return sendEvent('sender', 'copied', {
cd4: params.location
});
}
function exitEvent(target) {
return sendEvent(category(), 'exited', {
cd3: urlToMetric(target.currentTarget.href)
function deletedUpload(ownedFile) {
return addEvent('client_delete', {
age: Math.floor((Date.now() - ownedFile.createdAt) / HOUR),
downloaded: ownedFile.dtotal > 0,
status: 'ok'
});
}
function experimentEvent(params) {
return sendEvent(category(), 'experiment', params);
return addEvent('client_experiment', params);
}
// eslint-disable-next-line no-unused-vars
function addExitHandlers() {
const links = Array.from(document.querySelectorAll('a'));
links.forEach(l => {
if (/^http/.test(l.getAttribute('href'))) {
l.addEventListener('click', exitEvent);
}
function submittedSignup(params) {
return addEvent('client_login', {
status: 'ok',
trigger: params.trigger
});
}
function restart(state) {
setReferrer(state);
return sendEvent(category(), 'restarted', {
cd2: state
function canceledSignup(params) {
return addEvent('client_login', {
status: 'cancel',
trigger: params.trigger
});
}
function loggedOut(params) {
addEvent('client_logout', {
status: 'ok',
trigger: params.trigger
});
// flush events and start new anon session
submitEvents();
session_id = Date.now();
}
export {
copiedLink,
startedUpload,
cancelledUpload,
stoppedUpload,
completedUpload,
changedDownloadLimit,
deletedUpload,
startedDownload,
cancelledDownload,
stoppedDownload,
completedDownload,
addedPassword,
restart,
unsupported
submittedSignup,
canceledSignup,
loggedOut
};

View File

@@ -4,11 +4,14 @@ import { del, fileInfo, setParams, setPassword } from './api';
export default class OwnedFile {
constructor(obj) {
if (!obj.manifest) {
throw new Error('invalid file object');
}
this.id = obj.id;
this.url = obj.url;
this.name = obj.name;
this.size = obj.size;
this.type = obj.type;
this.manifest = obj.manifest;
this.time = obj.time;
this.speed = obj.speed;
this.createdAt = obj.createdAt;
@@ -18,6 +21,15 @@ export default class OwnedFile {
this.dtotal = obj.dtotal || 0;
this.keychain = new Keychain(obj.secretKey, obj.nonce);
this._hasPassword = !!obj.hasPassword;
this.timeLimit = obj.timeLimit;
}
get hasPassword() {
return !!this._hasPassword;
}
get expired() {
return this.dlimit === this.dtotal || Date.now() > this.expiresAt;
}
async setPassword(password) {
@@ -38,19 +50,17 @@ export default class OwnedFile {
return del(this.id, this.ownerToken);
}
changeLimit(dlimit) {
changeLimit(dlimit, user = {}) {
if (this.dlimit !== dlimit) {
this.dlimit = dlimit;
return setParams(this.id, this.ownerToken, { dlimit });
return setParams(this.id, this.ownerToken, user.bearerToken, { dlimit });
}
return Promise.resolve(true);
}
get hasPassword() {
return !!this._hasPassword;
}
async updateDownloadCount() {
const oldTotal = this.dtotal;
const oldLimit = this.dlimit;
try {
const result = await fileInfo(this.id, this.ownerToken);
this.dtotal = result.dtotal;
@@ -61,6 +71,7 @@ export default class OwnedFile {
}
// ignore other errors
}
return oldTotal !== this.dtotal || oldLimit !== this.dlimit;
}
toJSON() {
@@ -69,7 +80,7 @@ export default class OwnedFile {
url: this.url,
name: this.name,
size: this.size,
type: this.type,
manifest: this.manifest,
time: this.time,
speed: this.speed,
createdAt: this.createdAt,
@@ -78,7 +89,8 @@ export default class OwnedFile {
ownerToken: this.ownerToken,
dlimit: this.dlimit,
dtotal: this.dtotal,
hasPassword: this.hasPassword
hasPassword: this.hasPassword,
timeLimit: this.timeLimit
};
}
}

View File

@@ -1,5 +0,0 @@
const html = require('choo/html');
module.exports = function() {
return html`<div></div>`;
};

View File

@@ -1,26 +0,0 @@
const html = require('choo/html');
const progress = require('../../templates/progress');
const { fadeOut } = require('../../utils');
module.exports = function(state, emit) {
return html`
<div class="page effect--fadeIn">
<div class="title">
${state.translate('downloadFinish')}
</div>
<div class="description"></div>
${progress(1)}
<div class="progressSection">
<div class="progressSection__text"></div>
</div>
<a class="link link--action"
href="/"
onclick=${sendNew}>${state.translate('sendYourFilesLink')}</a>
</div>`;
async function sendNew(e) {
e.preventDefault();
await fadeOut('.page');
emit('pushState', '/');
}
};

View File

@@ -1,42 +0,0 @@
const html = require('choo/html');
const progress = require('../../templates/progress');
const { bytes } = require('../../utils');
module.exports = function(state, emit) {
const transfer = state.transfer;
const cancelBtn = html`
<button
id="cancel"
class="btn btn--cancel"
title="${state.translate('deletePopupCancel')}"
onclick=${cancel}>
${state.translate('deletePopupCancel')}
</button>`;
return html`
<div class="page effect--fadeIn">
<div class="title">
${state.translate('downloadingPageProgress', {
filename: state.fileInfo.name,
size: bytes(state.fileInfo.size)
})}
</div>
<div class="description">
${state.translate('downloadingPageMessage')}
</div>
${progress(transfer.progressRatio, transfer.progressIndefinite)}
<div class="progressSection">
<div class="progressSection__text">
${state.translate(transfer.msg, transfer.sizes)}
</div>
${transfer.state === 'downloading' ? cancelBtn : null}
</div>
</div>
`;
function cancel() {
const btn = document.getElementById('cancel');
btn.remove();
emit('cancel');
}
};

View File

@@ -1,10 +0,0 @@
const html = require('choo/html');
const assets = require('../../../common/assets');
module.exports = function(state) {
return html`
<div class="page">
<div class="title">${state.translate('errorPageHeader')}</div>
<img src="${assets.get('illustration_error.svg')}"/>
</div>`;
};

View File

@@ -1,32 +0,0 @@
const html = require('choo/html');
const raw = require('choo/html/raw');
module.exports = function(state) {
return html`
<div>
<div class="title">${state.translate('legalHeader')}</div>
${raw(
replaceLinks(state.translate('legalNoticeTestPilot'), [
'https://testpilot.firefox.com/terms',
'https://testpilot.firefox.com/privacy',
'https://testpilot.firefox.com/experiments/send'
])
)}
${raw(
replaceLinks(state.translate('legalNoticeMozilla'), [
'https://www.mozilla.org/privacy/websites/',
'https://www.mozilla.org/about/legal/terms/mozilla/'
])
)}
</div>
`;
};
function replaceLinks(str, urls) {
let i = 0;
const s = str.replace(
/<a>([^<]+)<\/a>/g,
(m, v) => `<a href="${urls[i++]}">${v}</a>`
);
return `<div class="description">${s}</div>`;
}

View File

@@ -1,16 +0,0 @@
const html = require('choo/html');
const assets = require('../../../common/assets');
module.exports = function(state) {
return html`
<div class="page">
<div class="title">${state.translate('expiredPageHeader')}</div>
<img src="${assets.get('illustration_expired.svg')}" id="expired-img">
<div class="description">
${state.translate('uploadPageExplainer')}
</div>
<a class="link link--action" href="/">
${state.translate('sendYourFilesLink')}
</a>
</div>`;
};

View File

@@ -1,40 +0,0 @@
const html = require('choo/html');
const assets = require('../../../common/assets');
const { bytes } = require('../../utils');
module.exports = function(state, pageAction) {
const fileInfo = state.fileInfo;
const size = fileInfo.size
? state.translate('downloadFileSize', { size: bytes(fileInfo.size) })
: '';
const title = fileInfo.name
? state.translate('downloadFileName', { filename: fileInfo.name })
: state.translate('downloadFileTitle');
const info = html`
<div id="dl-file"
data-nonce="${fileInfo.nonce}"
data-requires-password="${fileInfo.requiresPassword}"></div>`;
if (!pageAction) {
return info;
}
return html`
<div class="page">
<div class="title">
<span>${title}</span>
<span>${' ' + size}</span>
</div>
<div class="description">${state.translate('downloadMessage')}</div>
<img
src="${assets.get('illustration_download.svg')}"
title="${state.translate('downloadAltText')}"/>
${pageAction}
<a class="link link--action" href="/">
${state.translate('sendYourFilesLink')}
</a>
${info}
</div>
`;
};

View File

@@ -1,115 +0,0 @@
/* global EXPIRE_SECONDS */
const html = require('choo/html');
const raw = require('choo/html/raw');
const assets = require('../../../common/assets');
const notFound = require('../notFound');
const setPasswordSection = require('../../templates/setPasswordSection');
const selectbox = require('../../templates/selectbox');
const deletePopup = require('../../templates/popup');
const { allowedCopy, delay, fadeOut } = require('../../utils');
module.exports = function(state, emit) {
const file = state.storage.getFileById(state.params.id);
if (!file) {
return notFound(state, emit);
}
return html`
<div id="shareWrapper" class="effect--fadeIn">
<div class="title">${expireInfo(file, state.translate, emit)}</div>
<div class="sharePage">
<div class="sharePage__copyText">
${state.translate('copyUrlFormLabelWithName', { filename: file.name })}
</div>
<div class="copySection">
<input
id="fileUrl"
class="copySection__url"
type="url"
value="${file.url}"
readonly="true"/>
<button id="copyBtn"
class="inputBtn inputBtn--copy"
title="${state.translate('copyUrlFormButton')}"
onclick=${copyLink}>${state.translate('copyUrlFormButton')}</button>
</div>
${setPasswordSection(state, emit)}
<button
class="btn btn--delete"
title="${state.translate('deleteFileButton')}"
onclick=${showPopup}>${state.translate('deleteFileButton')}
</button>
<div class="sharePage__deletePopup">
${deletePopup(
state.translate('deletePopupText'),
state.translate('deletePopupYes'),
state.translate('deletePopupCancel'),
deleteFile
)}
</div>
<a class="link link--action"
href="/"
onclick=${sendNew}>${state.translate('sendAnotherFileLink')}</a>
</div>
</div>
`;
function showPopup() {
const popup = document.querySelector('.popup');
popup.classList.add('popup--show');
popup.focus();
}
async function sendNew(e) {
e.preventDefault();
await fadeOut('#shareWrapper');
emit('pushState', '/');
}
async function copyLink() {
if (allowedCopy()) {
emit('copy', { url: file.url, location: 'success-screen' });
const input = document.getElementById('fileUrl');
input.disabled = true;
input.classList.add('input--copied');
const copyBtn = document.getElementById('copyBtn');
copyBtn.disabled = true;
copyBtn.classList.add('inputBtn--copied');
copyBtn.replaceChild(
html`<img src="${assets.get('check-16.svg')}" class="cursor--pointer">`,
copyBtn.firstChild
);
await delay(2000);
input.disabled = false;
input.classList.remove('input--copied');
copyBtn.disabled = false;
copyBtn.classList.remove('inputBtn--copied');
copyBtn.textContent = state.translate('copyUrlFormButton');
}
}
async function deleteFile() {
emit('delete', { file, location: 'success-screen' });
await fadeOut('#shareWrapper');
emit('pushState', '/');
}
};
function expireInfo(file, translate, emit) {
const hours = Math.floor(EXPIRE_SECONDS / 60 / 60);
const el = html`<div>${raw(
translate('expireInfo', {
downloadCount: '<select></select>',
timespan: translate('timespanHours', { num: hours })
})
)}</div>`;
const select = el.querySelector('select');
const options = [1, 2, 3, 4, 5, 20].filter(i => i > (file.dtotal || 0));
const t = num => translate('downloadCount', { num });
const changed = value => emit('changeLimit', { file, value });
select.parentNode.replaceChild(
selectbox(file.dlimit || 1, options, t, changed),
select
);
return el;
}

View File

@@ -1,112 +0,0 @@
.sharePage {
margin: 0 auto;
display: flex;
justify-content: center;
flex-direction: column;
width: 100%;
max-width: 640px;
}
.sharePage__copyText {
align-self: flex-start;
margin-top: 60px;
margin-bottom: 10px;
color: var(--textColor);
max-width: 614px;
word-wrap: break-word;
}
.sharePage__deletePopup {
position: relative;
align-self: center;
bottom: 50px;
}
.copySection {
display: flex;
flex-wrap: nowrap;
width: 100%;
}
.copySection__url {
flex: 1;
height: 56px;
border: 1px solid var(--primaryControlBGColor);
border-radius: 6px 0 0 6px;
font-size: 20px;
color: var(--inputTextColor);
font-family: 'SF Pro Text', sans-serif;
letter-spacing: 0;
line-height: 23px;
font-weight: 300;
padding-left: 10px;
}
.copySection__url:disabled {
border: 1px solid var(--successControlBGColor);
background: var(--successControlFGColor);
}
.inputBtn--copy {
flex: 0 1 165px;
padding-bottom: 4px;
}
.input--copied {
border-color: var(--successControlBGColor);
}
.inputBtn--copied,
.inputBtn--copied:hover {
background: var(--successControlBGColor);
border: 1px solid var(--successControlBGColor);
color: var(--successControlFGColor);
}
.btn--delete {
align-self: center;
width: 176px;
height: 44px;
background: #fff;
border-color: rgba(12, 12, 13, 0.3);
margin-top: 50px;
margin-bottom: 12px;
color: #313131;
}
.btn--delete:hover {
background: #efeff1;
}
@media (max-device-width: 768px), (max-width: 768px) {
.copySection {
width: 100%;
}
.copySection__url {
font-size: 18px;
}
}
@media (max-device-width: 520px), (max-width: 520px) {
.copySection {
width: 100%;
flex-direction: column;
padding-left: 0;
}
.copySection__url {
font-size: 22px;
padding: 15px 10px;
border-radius: 6px 6px 0 0;
}
.sharePage__copyText {
text-align: center;
}
.inputBtn--copy {
border-radius: 0 0 6px 6px;
flex: 0 1 65px;
}
}

View File

@@ -1,67 +0,0 @@
const html = require('choo/html');
const assets = require('../../../common/assets');
module.exports = function(state) {
let strings = {};
let why = '';
let url = '';
let buttonAction = '';
if (state.params.reason !== 'outdated') {
strings = unsupportedStrings(state);
why = html`
<div class="description">
<a href="https://github.com/mozilla/send/blob/master/docs/faq.md#why-is-my-browser-not-supported">
${state.translate('notSupportedLink')}
</a>
</div>`;
url =
'https://www.mozilla.org/firefox/new/?utm_campaign=send-acquisition&utm_medium=referral&utm_source=send.firefox.com';
buttonAction = html`
<div class="firefoxDownload__action">
Firefox<br><span class="firefoxDownload__text">${strings.button}</span>
</div>`;
} else {
strings = outdatedStrings(state);
url = 'https://support.mozilla.org/kb/update-firefox-latest-version';
buttonAction = html`
<div class="firefoxDownload__action">
${strings.button}
</div>`;
}
return html`
<div class="unsupportedPage">
<div class="title">${strings.title}</div>
<div class="description">
${strings.description}
</div>
${why}
<a href="${url}" class="firefoxDownload">
<img
src="${assets.get('firefox_logo-only.svg')}"
class="firefoxDownload__logo"
alt="Firefox"/>
${buttonAction}
</a>
<div class="unsupportedPage__info">
${strings.explainer}
</div>
</div>`;
};
function outdatedStrings(state) {
return {
title: state.translate('notSupportedHeader'),
description: state.translate('notSupportedOutdatedDetail'),
button: state.translate('updateFirefox'),
explainer: state.translate('uploadPageExplainer')
};
}
function unsupportedStrings(state) {
return {
title: state.translate('notSupportedHeader'),
description: state.translate('notSupportedDetail'),
button: state.translate('downloadFirefoxButtonSub'),
explainer: state.translate('uploadPageExplainer')
};
}

View File

@@ -1,49 +0,0 @@
.unsupportedPage {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.unsupportedPage__info {
font-size: 13px;
line-height: 23px;
text-align: center;
color: var(--lightTextColor);
margin: 0 auto 23px;
}
.firefoxDownload {
margin-bottom: 181px;
height: 80px;
background: #98e02b;
border-radius: 3px;
cursor: pointer;
border: 0;
box-shadow: 0 5px 3px rgb(234, 234, 234);
font-family: 'Fira Sans', 'segoe ui', sans-serif;
font-weight: 500;
color: var(--primaryControlFGColor);
font-size: 26px;
display: flex;
justify-content: center;
align-items: center;
line-height: 1;
padding: 0 25px;
}
.firefoxDownload__logo {
width: 70px;
}
.firefoxDownload__action {
text-align: left;
margin-left: 20.4px;
}
.firefoxDownload__text {
font-family: 'Fira Sans', 'segoe ui', sans-serif;
font-weight: 300;
font-size: 18px;
letter-spacing: -0.69px;
}

View File

@@ -1,39 +0,0 @@
const html = require('choo/html');
const progress = require('../../templates/progress');
const { bytes } = require('../../utils');
module.exports = function(state, emit) {
const transfer = state.transfer;
return html`
<div class="page effect--fadeIn">
<div class="title">
${state.translate('uploadingPageProgress', {
filename: transfer.file.name,
size: bytes(transfer.file.size)
})}
</div>
<div class="description"></div>
${progress(transfer.progressRatio, transfer.progressIndefinite)}
<div class="progressSection">
<div class="progressSection__text">
${state.translate(transfer.msg, transfer.sizes)}
</div>
<button
id="cancel-upload"
class="btn btn--cancel"
title="${state.translate('uploadingPageCancel')}"
onclick=${cancel}>
${state.translate('uploadingPageCancel')}
</button>
</div>
</div>
`;
function cancel() {
const btn = document.getElementById('cancel-upload');
btn.disabled = true;
btn.textContent = state.translate('uploadCancelNotification');
emit('cancel');
}
};

View File

@@ -1,83 +0,0 @@
/* global MAXFILESIZE */
const html = require('choo/html');
const assets = require('../../../common/assets');
const fileList = require('../../templates/fileList');
const { bytes, fadeOut } = require('../../utils');
module.exports = function(state, emit) {
// the page flickers if both the server and browser set 'effect--fadeIn'
const fade = state.layout ? '' : 'effect--fadeIn';
return html`
<div id="page-one" class="${fade}">
<div class="title">${state.translate('uploadPageHeader')}</div>
<div class="description">
<div>${state.translate('uploadPageExplainer')}</div>
<a
href="https://testpilot.firefox.com/experiments/send"
class="link">
${state.translate('uploadPageLearnMore')}
</a>
</div>
<div class="uploadArea"
ondragover=${dragover}
ondragleave=${dragleave}>
<img
src="${assets.get('upload.svg')}"
title="${state.translate('uploadSvgAlt')}"/>
<div class="uploadArea__msg">
${state.translate('uploadPageDropMessage')}
</div>
<span class="uploadArea__sizeMsg">
${state.translate('uploadPageSizeMessage')}
</span>
<input id="file-upload"
class="inputFile"
type="file"
name="fileUploaded"
onfocus=${onfocus}
onblur=${onblur}
onchange=${upload} />
<label for="file-upload"
class="btn btn--file"
title="${state.translate('uploadPageBrowseButton1')}">
${state.translate('uploadPageBrowseButton1')}
</label>
</div>
${fileList(state, emit)}
</div>
`;
function dragover(event) {
const div = document.querySelector('.uploadArea');
div.classList.add('uploadArea--dragging');
}
function dragleave(event) {
const div = document.querySelector('.uploadArea');
div.classList.remove('uploadArea--dragging');
}
function onfocus(event) {
event.target.classList.add('inputFile--focused');
}
function onblur(event) {
event.target.classList.remove('inputFile--focused');
}
async function upload(event) {
event.preventDefault();
const target = event.target;
const file = target.files[0];
if (file.size === 0) {
return;
}
if (file.size > MAXFILESIZE) {
window.alert(state.translate('fileTooBig', { size: bytes(MAXFILESIZE) }));
return;
}
await fadeOut('#page-one');
emit('upload', { file, type: 'click' });
}
};

View File

@@ -1,65 +0,0 @@
.uploadArea {
border: 3px dashed rgba(0, 148, 251, 0.5);
margin: 0 auto 10px;
height: 255px;
border-radius: 4px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
text-align: center;
transition: transform 150ms;
padding: 15px;
}
.uploadArea__msg {
font-size: 22px;
color: var(--lightTextColor);
margin: 20px 0 10px;
font-family: 'SF Pro Text', sans-serif;
}
.uploadArea__sizeMsg {
font-style: italic;
font-size: 12px;
line-height: 16px;
color: var(--lightTextColor);
margin-bottom: 22px;
}
.uploadArea--dragging {
border: 5px dashed rgba(0, 148, 251, 0.5);
height: 251px;
transform: scale(1.04);
border-radius: 4.2px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
text-align: center;
}
.uploadArea--dragging * {
pointer-events: none;
}
.btn--file {
font-size: 20px;
min-width: 240px;
height: 60px;
display: flex;
justify-content: center;
align-items: center;
padding: 0 10px;
}
.inputFile {
opacity: 0;
position: absolute;
}
.inputFile--focused + .btn--file {
background-color: var(--primaryControlHoverColor);
outline: 1px dotted #000;
outline: -webkit-focus-ring-color auto 5px;
}

36
app/pasteManager.js Normal file
View File

@@ -0,0 +1,36 @@
function getString(item) {
return new Promise(resolve => {
item.getAsString(resolve);
});
}
export default function(state, emitter) {
window.addEventListener('paste', async event => {
if (state.route !== '/' || state.uploading) return;
if (['password', 'text', 'email'].includes(event.target.type)) return;
const items = Array.from(event.clipboardData.items);
const transferFiles = items.filter(item => item.kind === 'file');
const strings = items.filter(item => item.kind === 'string');
if (transferFiles.length) {
const promises = transferFiles.map(async (f, i) => {
const blob = f.getAsFile();
if (!blob) {
return null;
}
const name = await getString(strings[i]);
const file = new File([blob], name, { type: blob.type });
return file;
});
const files = (await Promise.all(promises)).filter(f => !!f);
if (files.length) {
emitter.emit('addFiles', { files });
}
} else if (strings.length) {
strings[0].getAsString(s => {
const file = new File([s], 'pasted.txt', { type: 'text/plain' });
emitter.emit('addFiles', { files: [file] });
});
}
});
}

9
app/readme.md Normal file
View File

@@ -0,0 +1,9 @@
# Application Code
`app/` contains the browser code that gets bundled into `app.[hash].js`. It's got all the logic, crypto, and UI. All of it gets used in the browser, and some of it by the server for server side rendering.
The main entrypoint for the browser is [main.js](./main.js) and on the server [routes/index.js](./routes/index.js) gets imported by [/server/routes/pages.js](../server/routes/pages.js)
- `pages` contains display logic an markup for pages
- `routes` contains route definitions and logic
- `templates` contains ui elements smaller than pages

18
app/routes.js Normal file
View File

@@ -0,0 +1,18 @@
const choo = require('choo');
const download = require('./ui/download');
const body = require('./ui/body');
module.exports = function(app = choo()) {
app.route('/', body(require('./ui/home')));
app.route('/download/:id', body(download));
app.route('/download/:id/:key', body(download));
app.route('/unsupported/:reason', body(require('./ui/unsupported')));
app.route('/legal', body(require('./ui/legal')));
app.route('/error', body(require('./ui/error')));
app.route('/blank', body(require('./ui/blank')));
app.route('/oauth', function(state, emit) {
emit('authenticate', state.query.code, state.query.state);
});
app.route('*', body(require('./ui/notFound')));
return app;
};

View File

@@ -1,60 +0,0 @@
const preview = require('../pages/preview');
const download = require('../pages/download');
const notFound = require('../pages/notFound');
const downloadPassword = require('../templates/downloadPassword');
const downloadButton = require('../templates/downloadButton');
function hasFileInfo() {
return !!document.getElementById('dl-file');
}
function getFileInfoFromDOM() {
const el = document.getElementById('dl-file');
if (!el) {
return null;
}
return {
nonce: el.getAttribute('data-nonce'),
requiresPassword: !!+el.getAttribute('data-requires-password')
};
}
function createFileInfo(state) {
const metadata = getFileInfoFromDOM();
return {
id: state.params.id,
secretKey: state.params.key,
nonce: metadata.nonce,
requiresPassword: metadata.requiresPassword
};
}
module.exports = function(state, emit) {
if (!state.fileInfo) {
// This is a fresh page load
// We need to parse the file info from the server's html
if (!hasFileInfo()) {
return notFound(state, emit);
}
state.fileInfo = createFileInfo(state);
if (!state.fileInfo.requiresPassword) {
emit('getMetadata');
}
}
let pageAction = null; //default state: we don't have file metadata
if (state.transfer) {
const s = state.transfer.state;
if (['downloading', 'decrypting', 'complete'].indexOf(s) > -1) {
// Downloading is in progress
return download(state, emit);
}
// we have file metadata
pageAction = downloadButton(state, emit);
} else if (state.fileInfo.requiresPassword && !state.fileInfo.password) {
// we're waiting on the user for a valid password
pageAction = downloadPassword(state, emit);
}
return preview(state, pageAction);
};

View File

@@ -1,9 +0,0 @@
const welcome = require('../pages/welcome');
const upload = require('../pages/upload');
module.exports = function(state, emit) {
if (state.uploading) {
return upload(state, emit);
}
return welcome(state, emit);
};

View File

@@ -1,58 +0,0 @@
const choo = require('choo');
const html = require('choo/html');
const nanotiming = require('nanotiming');
const download = require('./download');
const header = require('../templates/header');
const footer = require('../templates/footer');
const fxPromo = require('../templates/fxPromo');
nanotiming.disabled = true;
const app = choo();
function banner(state, emit) {
if (state.promo && !state.route.startsWith('/unsupported/')) {
return fxPromo(state, emit);
}
}
function body(template) {
return function(state, emit) {
const b = html`<body>
${banner(state, emit)}
${header(state)}
<main class="main">
<noscript>
<div class="noscript">
<h2>${state.translate('javascriptRequired')}</h2>
<p>
<a class="link" href="https://github.com/mozilla/send/blob/master/docs/faq.md#why-does-firefox-send-require-javascript">
${state.translate('whyJavascript')}
</a>
</p>
<p>${state.translate('enableJavascript')}</p>
</div>
</noscript>
${template(state, emit)}
</main>
${footer(state)}
</body>`;
if (state.layout) {
// server side only
return state.layout(state, b);
}
return b;
};
}
app.route('/', body(require('./home')));
app.route('/share/:id', body(require('../pages/share')));
app.route('/download/:id', body(download));
app.route('/download/:id/:key', body(download));
app.route('/completed', body(require('../pages/completed')));
app.route('/unsupported/:reason', body(require('../pages/unsupported')));
app.route('/legal', body(require('../pages/legal')));
app.route('/error', body(require('../pages/error')));
app.route('/blank', body(require('../pages/blank')));
app.route('*', body(require('../pages/notFound')));
module.exports = app;

161
app/serviceWorker.js Normal file
View File

@@ -0,0 +1,161 @@
import assets from '../common/assets';
import { version } from '../package.json';
import Keychain from './keychain';
import { downloadStream } from './api';
import { transformStream } from './streams';
import Zip from './zip';
import contentDisposition from 'content-disposition';
let noSave = false;
const map = new Map();
const IMAGES = /.*\.(png|svg|jpg)$/;
const VERSIONED_ASSET = /\.[A-Fa-f0-9]{8}\.(js|css|png|svg|jpg)$/;
const DOWNLOAD_URL = /\/api\/download\/([A-Fa-f0-9]{4,})/;
self.addEventListener('install', event => {
event.waitUntil(precache());
});
self.addEventListener('activate', event => {
event.waitUntil(self.clients.claim());
});
async function decryptStream(id) {
const file = map.get(id);
if (!file) {
return new Response(null, { status: 400 });
}
try {
let size = file.size;
let type = file.type;
const keychain = new Keychain(file.key, file.nonce);
if (file.requiresPassword) {
keychain.setPassword(file.password, file.url);
}
file.download = downloadStream(id, keychain);
const body = await file.download.result;
const decrypted = keychain.decryptStream(body);
let zipStream = null;
if (file.type === 'send-archive') {
const zip = new Zip(file.manifest, decrypted);
zipStream = zip.stream;
type = 'application/zip';
size = zip.size;
}
const responseStream = transformStream(
zipStream || decrypted,
{
transform(chunk, controller) {
file.progress += chunk.length;
controller.enqueue(chunk);
}
},
function oncancel() {
// NOTE: cancel doesn't currently fire on chrome
// https://bugs.chromium.org/p/chromium/issues/detail?id=638494
file.download.cancel();
map.delete(id);
}
);
const headers = {
'Content-Disposition': contentDisposition(file.filename),
'Content-Type': type,
'Content-Length': size
};
return new Response(responseStream, { headers });
} catch (e) {
if (noSave) {
return new Response(null, { status: e.message });
}
return new Response(null, {
status: 302,
headers: {
Location: `/download/${id}/#${file.key}`
}
});
}
}
async function precache() {
const oldCaches = await caches.keys();
for (const c of oldCaches) {
if (c !== version) {
await caches.delete(c);
}
}
const cache = await caches.open(version);
const images = assets.match(IMAGES);
await cache.addAll(images);
return self.skipWaiting();
}
async function cachedOrFetched(req) {
const cache = await caches.open(version);
const cached = await cache.match(req);
if (cached) {
return cached;
}
const fetched = await fetch(req);
if (fetched.ok && VERSIONED_ASSET.test(req.url)) {
cache.put(req, fetched.clone());
}
return fetched;
}
self.onfetch = event => {
const req = event.request;
if (req.method !== 'GET') return;
const url = new URL(req.url);
const dlmatch = DOWNLOAD_URL.exec(url.pathname);
if (dlmatch) {
event.respondWith(decryptStream(dlmatch[1]));
} else if (VERSIONED_ASSET.test(url.pathname)) {
event.respondWith(cachedOrFetched(req));
}
};
self.onmessage = event => {
if (event.data.request === 'init') {
noSave = event.data.noSave;
const info = {
key: event.data.key,
nonce: event.data.nonce,
filename: event.data.filename,
requiresPassword: event.data.requiresPassword,
password: event.data.password,
url: event.data.url,
type: event.data.type,
manifest: event.data.manifest,
size: event.data.size,
progress: 0
};
map.set(event.data.id, info);
event.ports[0].postMessage('file info received');
} else if (event.data.request === 'progress') {
const file = map.get(event.data.id);
if (!file) {
event.ports[0].postMessage({ error: 'cancelled' });
} else {
if (file.progress === file.size) {
map.delete(event.data.id);
}
event.ports[0].postMessage({ progress: file.progress });
}
} else if (event.data.request === 'cancel') {
const file = map.get(event.data.id);
if (file) {
if (file.download) {
file.download.cancel();
}
map.delete(event.data.id);
}
event.ports[0].postMessage('download cancelled');
}
};

View File

@@ -1,4 +1,4 @@
import { isFile } from './utils';
import { arrayToB64, isFile } from './utils';
import OwnedFile from './ownedFile';
class Mem {
@@ -38,7 +38,7 @@ class Storage {
}
loadFiles() {
const fs = [];
const fs = new Map();
for (let i = 0; i < this.engine.length; i++) {
const k = this.engine.key(i);
if (isFile(k)) {
@@ -47,14 +47,24 @@ class Storage {
if (!f.id) {
f.id = f.fileId;
}
fs.push(f);
fs.set(f.id, f);
} catch (err) {
// obviously you're not a golfer
this.engine.removeItem(k);
}
}
}
return fs.sort((a, b) => a.createdAt - b.createdAt);
return fs;
}
get id() {
let id = this.engine.getItem('device_id');
if (!id) {
id = arrayToB64(crypto.getRandomValues(new Uint8Array(16)));
this.engine.setItem('device_id', id);
}
return id;
}
get totalDownloads() {
@@ -89,26 +99,44 @@ class Storage {
}
get files() {
return this._files;
return Array.from(this._files.values()).sort(
(a, b) => a.createdAt - b.createdAt
);
}
get user() {
try {
return JSON.parse(this.engine.getItem('user'));
} catch (e) {
return null;
}
}
set user(info) {
return this.engine.setItem('user', JSON.stringify(info));
}
getFileById(id) {
return this._files.find(f => f.id === id);
return this._files.get(id);
}
get(id) {
return this.engine.getItem(id);
}
set(id, value) {
return this.engine.setItem(id, value);
}
remove(property) {
if (isFile(property)) {
this._files.splice(this._files.findIndex(f => f.id === property), 1);
this._files.delete(property);
}
this.engine.removeItem(property);
}
addFile(file) {
this._files.push(file);
this._files.set(file.id, file);
this.writeFile(file);
}
@@ -119,6 +147,42 @@ class Storage {
writeFiles() {
this._files.forEach(f => this.writeFile(f));
}
clearLocalFiles() {
this._files.forEach(f => this.engine.removeItem(f.id));
this._files = new Map();
}
async merge(files = []) {
let incoming = false;
let outgoing = false;
let downloadCount = false;
for (const f of files) {
if (!this.getFileById(f.id)) {
this.addFile(new OwnedFile(f));
incoming = true;
}
}
const workingFiles = this.files.slice();
for (const f of workingFiles) {
const cc = await f.updateDownloadCount();
if (cc) {
await this.writeFile(f);
}
downloadCount = downloadCount || cc;
outgoing = outgoing || f.expired;
if (f.expired) {
this.remove(f.id);
} else if (!files.find(x => x.id === f.id)) {
outgoing = true;
}
}
return {
incoming,
outgoing,
downloadCount
};
}
}
export default new Storage();

103
app/streams.js Normal file
View File

@@ -0,0 +1,103 @@
/* global ReadableStream TransformStream */
export function transformStream(readable, transformer, oncancel) {
try {
return readable.pipeThrough(new TransformStream(transformer));
} catch (e) {
const reader = readable.getReader();
return new ReadableStream({
start(controller) {
if (transformer.start) {
return transformer.start(controller);
}
},
async pull(controller) {
let enqueued = false;
const wrappedController = {
enqueue(d) {
enqueued = true;
controller.enqueue(d);
}
};
while (!enqueued) {
const data = await reader.read();
if (data.done) {
if (transformer.flush) {
await transformer.flush(controller);
}
return controller.close();
}
await transformer.transform(data.value, wrappedController);
}
},
cancel(reason) {
readable.cancel(reason);
if (oncancel) {
oncancel(reason);
}
}
});
}
}
class BlobStreamController {
constructor(blob, size) {
this.blob = blob;
this.index = 0;
this.chunkSize = size || 1024 * 64;
}
pull(controller) {
return new Promise((resolve, reject) => {
const bytesLeft = this.blob.size - this.index;
if (bytesLeft <= 0) {
controller.close();
return resolve();
}
const size = Math.min(this.chunkSize, bytesLeft);
const slice = this.blob.slice(this.index, this.index + size);
const reader = new FileReader();
reader.onload = () => {
controller.enqueue(new Uint8Array(reader.result));
resolve();
};
reader.onerror = reject;
reader.readAsArrayBuffer(slice);
this.index += size;
});
}
}
export function blobStream(blob, size) {
return new ReadableStream(new BlobStreamController(blob, size));
}
class ConcatStreamController {
constructor(streams) {
this.streams = streams;
this.index = 0;
this.reader = null;
this.nextReader();
}
nextReader() {
const next = this.streams[this.index++];
this.reader = next && next.getReader();
}
async pull(controller) {
if (!this.reader) {
return controller.close();
}
const data = await this.reader.read();
if (data.done) {
this.nextReader();
return this.pull(controller);
}
controller.enqueue(data.value);
}
}
export function concatStream(streams) {
return new ReadableStream(new ConcatStreamController(streams));
}

View File

@@ -1,6 +0,0 @@
.btn--download {
width: 180px;
height: 44px;
margin-top: 20px;
margin-bottom: 30px;
}

Some files were not shown because too many files have changed in this diff Show More