Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23cf8b15bc | ||
|
|
76cc8eaea1 | ||
|
|
f372b33f42 | ||
|
|
a26fb3e06b | ||
|
|
8bd3bd21e8 | ||
|
|
0115025b86 | ||
|
|
34fa24ffd0 | ||
|
|
9e8ba95fec | ||
|
|
d63253cc30 | ||
|
|
6ce143b145 | ||
|
|
c7ce7ea284 | ||
|
|
076122def4 |
No files matched your search
Generated
+156
-82
@@ -4160,22 +4160,26 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"abbrev": {
|
"abbrev": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"ansi-regex": {
|
"ansi-regex": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"aproba": {
|
"aproba": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"are-we-there-yet": {
|
"are-we-there-yet": {
|
||||||
"version": "1.1.5",
|
"version": "1.1.5",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"delegates": "^1.0.0",
|
"delegates": "^1.0.0",
|
||||||
@@ -4184,12 +4188,14 @@
|
|||||||
},
|
},
|
||||||
"balanced-match": {
|
"balanced-match": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"brace-expansion": {
|
"brace-expansion": {
|
||||||
"version": "1.1.11",
|
"version": "1.1.11",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"balanced-match": "^1.0.0",
|
"balanced-match": "^1.0.0",
|
||||||
@@ -4198,32 +4204,38 @@
|
|||||||
},
|
},
|
||||||
"chownr": {
|
"chownr": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"code-point-at": {
|
"code-point-at": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"concat-map": {
|
"concat-map": {
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"console-control-strings": {
|
"console-control-strings": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"core-util-is": {
|
"core-util-is": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"debug": {
|
"debug": {
|
||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"ms": "^2.1.1"
|
"ms": "^2.1.1"
|
||||||
@@ -4231,22 +4243,26 @@
|
|||||||
},
|
},
|
||||||
"deep-extend": {
|
"deep-extend": {
|
||||||
"version": "0.6.0",
|
"version": "0.6.0",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"delegates": {
|
"delegates": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"detect-libc": {
|
"detect-libc": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"fs-minipass": {
|
"fs-minipass": {
|
||||||
"version": "1.2.5",
|
"version": "1.2.5",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"minipass": "^2.2.1"
|
"minipass": "^2.2.1"
|
||||||
@@ -4254,12 +4270,14 @@
|
|||||||
},
|
},
|
||||||
"fs.realpath": {
|
"fs.realpath": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"gauge": {
|
"gauge": {
|
||||||
"version": "2.7.4",
|
"version": "2.7.4",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"aproba": "^1.0.3",
|
"aproba": "^1.0.3",
|
||||||
@@ -4274,7 +4292,8 @@
|
|||||||
},
|
},
|
||||||
"glob": {
|
"glob": {
|
||||||
"version": "7.1.3",
|
"version": "7.1.3",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"fs.realpath": "^1.0.0",
|
"fs.realpath": "^1.0.0",
|
||||||
@@ -4287,12 +4306,14 @@
|
|||||||
},
|
},
|
||||||
"has-unicode": {
|
"has-unicode": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"iconv-lite": {
|
"iconv-lite": {
|
||||||
"version": "0.4.24",
|
"version": "0.4.24",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"safer-buffer": ">= 2.1.2 < 3"
|
"safer-buffer": ">= 2.1.2 < 3"
|
||||||
@@ -4300,7 +4321,8 @@
|
|||||||
},
|
},
|
||||||
"ignore-walk": {
|
"ignore-walk": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"minimatch": "^3.0.4"
|
"minimatch": "^3.0.4"
|
||||||
@@ -4308,7 +4330,8 @@
|
|||||||
},
|
},
|
||||||
"inflight": {
|
"inflight": {
|
||||||
"version": "1.0.6",
|
"version": "1.0.6",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"once": "^1.3.0",
|
"once": "^1.3.0",
|
||||||
@@ -4317,17 +4340,20 @@
|
|||||||
},
|
},
|
||||||
"inherits": {
|
"inherits": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"ini": {
|
"ini": {
|
||||||
"version": "1.3.5",
|
"version": "1.3.5",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"is-fullwidth-code-point": {
|
"is-fullwidth-code-point": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"number-is-nan": "^1.0.0"
|
"number-is-nan": "^1.0.0"
|
||||||
@@ -4335,12 +4361,14 @@
|
|||||||
},
|
},
|
||||||
"isarray": {
|
"isarray": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"minimatch": {
|
"minimatch": {
|
||||||
"version": "3.0.4",
|
"version": "3.0.4",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"brace-expansion": "^1.1.7"
|
"brace-expansion": "^1.1.7"
|
||||||
@@ -4348,12 +4376,14 @@
|
|||||||
},
|
},
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "0.0.8",
|
"version": "0.0.8",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"minipass": {
|
"minipass": {
|
||||||
"version": "2.3.5",
|
"version": "2.3.5",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"safe-buffer": "^5.1.2",
|
"safe-buffer": "^5.1.2",
|
||||||
@@ -4362,7 +4392,8 @@
|
|||||||
},
|
},
|
||||||
"minizlib": {
|
"minizlib": {
|
||||||
"version": "1.2.1",
|
"version": "1.2.1",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"minipass": "^2.2.1"
|
"minipass": "^2.2.1"
|
||||||
@@ -4370,7 +4401,8 @@
|
|||||||
},
|
},
|
||||||
"mkdirp": {
|
"mkdirp": {
|
||||||
"version": "0.5.1",
|
"version": "0.5.1",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"minimist": "0.0.8"
|
"minimist": "0.0.8"
|
||||||
@@ -4378,12 +4410,14 @@
|
|||||||
},
|
},
|
||||||
"ms": {
|
"ms": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"needle": {
|
"needle": {
|
||||||
"version": "2.3.0",
|
"version": "2.3.0",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-QBZu7aAFR0522EyaXZM0FZ9GLpq6lvQ3uq8gteiDUp7wKdy0lSd2hPlgFwVuW1CBkfEs9PfDQsQzZghLs/psdg==",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"debug": "^4.1.0",
|
"debug": "^4.1.0",
|
||||||
@@ -4393,7 +4427,8 @@
|
|||||||
},
|
},
|
||||||
"node-pre-gyp": {
|
"node-pre-gyp": {
|
||||||
"version": "0.12.0",
|
"version": "0.12.0",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A==",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"detect-libc": "^1.0.2",
|
"detect-libc": "^1.0.2",
|
||||||
@@ -4410,7 +4445,8 @@
|
|||||||
},
|
},
|
||||||
"nopt": {
|
"nopt": {
|
||||||
"version": "4.0.1",
|
"version": "4.0.1",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"abbrev": "1",
|
"abbrev": "1",
|
||||||
@@ -4419,12 +4455,14 @@
|
|||||||
},
|
},
|
||||||
"npm-bundled": {
|
"npm-bundled": {
|
||||||
"version": "1.0.6",
|
"version": "1.0.6",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"npm-packlist": {
|
"npm-packlist": {
|
||||||
"version": "1.4.1",
|
"version": "1.4.1",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"ignore-walk": "^3.0.1",
|
"ignore-walk": "^3.0.1",
|
||||||
@@ -4433,7 +4471,8 @@
|
|||||||
},
|
},
|
||||||
"npmlog": {
|
"npmlog": {
|
||||||
"version": "4.1.2",
|
"version": "4.1.2",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"are-we-there-yet": "~1.1.2",
|
"are-we-there-yet": "~1.1.2",
|
||||||
@@ -4444,17 +4483,20 @@
|
|||||||
},
|
},
|
||||||
"number-is-nan": {
|
"number-is-nan": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"object-assign": {
|
"object-assign": {
|
||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"once": {
|
"once": {
|
||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"wrappy": "1"
|
"wrappy": "1"
|
||||||
@@ -4462,17 +4504,20 @@
|
|||||||
},
|
},
|
||||||
"os-homedir": {
|
"os-homedir": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"os-tmpdir": {
|
"os-tmpdir": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"osenv": {
|
"osenv": {
|
||||||
"version": "0.1.5",
|
"version": "0.1.5",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"os-homedir": "^1.0.0",
|
"os-homedir": "^1.0.0",
|
||||||
@@ -4481,17 +4526,20 @@
|
|||||||
},
|
},
|
||||||
"path-is-absolute": {
|
"path-is-absolute": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"process-nextick-args": {
|
"process-nextick-args": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"rc": {
|
"rc": {
|
||||||
"version": "1.2.8",
|
"version": "1.2.8",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"deep-extend": "^0.6.0",
|
"deep-extend": "^0.6.0",
|
||||||
@@ -4502,14 +4550,16 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
||||||
"optional": true
|
"optional": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"readable-stream": {
|
"readable-stream": {
|
||||||
"version": "2.3.6",
|
"version": "2.3.6",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"core-util-is": "~1.0.0",
|
"core-util-is": "~1.0.0",
|
||||||
@@ -4523,7 +4573,8 @@
|
|||||||
},
|
},
|
||||||
"rimraf": {
|
"rimraf": {
|
||||||
"version": "2.6.3",
|
"version": "2.6.3",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"glob": "^7.1.3"
|
"glob": "^7.1.3"
|
||||||
@@ -4531,37 +4582,44 @@
|
|||||||
},
|
},
|
||||||
"safe-buffer": {
|
"safe-buffer": {
|
||||||
"version": "5.1.2",
|
"version": "5.1.2",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"safer-buffer": {
|
"safer-buffer": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"sax": {
|
"sax": {
|
||||||
"version": "1.2.4",
|
"version": "1.2.4",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"semver": {
|
"semver": {
|
||||||
"version": "5.7.0",
|
"version": "5.7.0",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"set-blocking": {
|
"set-blocking": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"signal-exit": {
|
"signal-exit": {
|
||||||
"version": "3.0.2",
|
"version": "3.0.2",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"string-width": {
|
"string-width": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"code-point-at": "^1.0.0",
|
"code-point-at": "^1.0.0",
|
||||||
@@ -4571,7 +4629,8 @@
|
|||||||
},
|
},
|
||||||
"string_decoder": {
|
"string_decoder": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"safe-buffer": "~5.1.0"
|
"safe-buffer": "~5.1.0"
|
||||||
@@ -4579,7 +4638,8 @@
|
|||||||
},
|
},
|
||||||
"strip-ansi": {
|
"strip-ansi": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"ansi-regex": "^2.0.0"
|
"ansi-regex": "^2.0.0"
|
||||||
@@ -4587,12 +4647,14 @@
|
|||||||
},
|
},
|
||||||
"strip-json-comments": {
|
"strip-json-comments": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"tar": {
|
"tar": {
|
||||||
"version": "4.4.8",
|
"version": "4.4.8",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"chownr": "^1.1.1",
|
"chownr": "^1.1.1",
|
||||||
@@ -4606,12 +4668,14 @@
|
|||||||
},
|
},
|
||||||
"util-deprecate": {
|
"util-deprecate": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"wide-align": {
|
"wide-align": {
|
||||||
"version": "1.1.3",
|
"version": "1.1.3",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"string-width": "^1.0.2 || 2"
|
"string-width": "^1.0.2 || 2"
|
||||||
@@ -4619,12 +4683,14 @@
|
|||||||
},
|
},
|
||||||
"wrappy": {
|
"wrappy": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"yallist": {
|
"yallist": {
|
||||||
"version": "3.0.3",
|
"version": "3.0.3",
|
||||||
"bundled": true,
|
"resolved": false,
|
||||||
|
"integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==",
|
||||||
"optional": true
|
"optional": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5574,8 +5640,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lbry-redux": {
|
"lbry-redux": {
|
||||||
"version": "github:lbryio/lbry-redux#362d764c4c0de23032b6871b4d54207dc548028c",
|
"version": "github:lbryio/lbry-redux#123efacf4d45289ebda9dc291976d475de227a55",
|
||||||
"from": "github:lbryio/lbry-redux#362d764c4c0de23032b6871b4d54207dc548028c",
|
"from": "github:lbryio/lbry-redux#123efacf4d45289ebda9dc291976d475de227a55",
|
||||||
"requires": {
|
"requires": {
|
||||||
"proxy-polyfill": "0.1.6",
|
"proxy-polyfill": "0.1.6",
|
||||||
"reselect": "^3.0.0",
|
"reselect": "^3.0.0",
|
||||||
@@ -8039,11 +8105,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-native-document-picker": {
|
|
||||||
"version": "3.2.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/react-native-document-picker/-/react-native-document-picker-3.2.4.tgz",
|
|
||||||
"integrity": "sha512-5l0/fkgasUZdIk9jUUkReDtNCQn2yg1+BrMPHMt45c/NVmE15ThnhIuDj8/n8h1F1RlhUb3SzF86ANK4OdZAiQ=="
|
|
||||||
},
|
|
||||||
"react-native-exception-handler": {
|
"react-native-exception-handler": {
|
||||||
"version": "2.9.0",
|
"version": "2.9.0",
|
||||||
"resolved": "https://registry.npmjs.org/react-native-exception-handler/-/react-native-exception-handler-2.9.0.tgz",
|
"resolved": "https://registry.npmjs.org/react-native-exception-handler/-/react-native-exception-handler-2.9.0.tgz",
|
||||||
@@ -8064,9 +8125,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-native-gesture-handler": {
|
"react-native-gesture-handler": {
|
||||||
"version": "1.1.0",
|
"version": "1.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-1.3.0.tgz",
|
||||||
"integrity": "sha512-E9IKHpmL+sz/iCYkUriTUjBaQBORWV+oheYPQleADkxjo2sYsQfnlyTz4EQYFONkUwJ6WmfTNkYt2/yc5U4Ziw==",
|
"integrity": "sha512-ASRFIXBuKRvqlmwkWJhV8yP2dTpvcqVrLNpd7FKVBFHYWr6SAxjGyO9Ik8w1lAxDhMlRP2IcJ9p9eq5X2WWeLQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"hoist-non-react-statics": "^2.3.1",
|
"hoist-non-react-statics": "^2.3.1",
|
||||||
"invariant": "^2.2.2",
|
"invariant": "^2.2.2",
|
||||||
@@ -8329,13 +8390,21 @@
|
|||||||
"requires": {
|
"requires": {
|
||||||
"react-native-tab-view": "^1.2.0"
|
"react-native-tab-view": "^1.2.0"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"react-navigation-stack": {
|
||||||
|
"version": "1.5.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/react-navigation-stack/-/react-navigation-stack-1.5.5.tgz",
|
||||||
|
"integrity": "sha512-qMhOhmUmyPNfFGWMbwv5flrNVsFU4JZSBWnONSgVGK4KWGW8DbobXBi4i4sBAC9Kg8EqJK0qyWcxnkMJJtfMWA==",
|
||||||
|
"requires": {
|
||||||
|
"prop-types": "^15.7.2"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-navigation-drawer": {
|
"react-navigation-drawer": {
|
||||||
"version": "2.0.0",
|
"version": "2.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/react-navigation-drawer/-/react-navigation-drawer-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/react-navigation-drawer/-/react-navigation-drawer-2.2.2.tgz",
|
||||||
"integrity": "sha512-M9Ov4kOj0nh9HDMYoYJtd6ZaIKYLlC3y2LmGr4kNIPZ1zj4fIXi8ibaolZOe28xmZakWFZzN7bbUf2f+Rbc8Og=="
|
"integrity": "sha512-KcFH7RRzT1XuREkTbNMCqfy7nK7yenzpGKvqp1dTvAE+DIyHHpf+Po959lsmITlt/njQBn+QxvdX1FZ9we3lNA=="
|
||||||
},
|
},
|
||||||
"react-navigation-redux-helpers": {
|
"react-navigation-redux-helpers": {
|
||||||
"version": "3.0.2",
|
"version": "3.0.2",
|
||||||
@@ -8346,9 +8415,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-navigation-stack": {
|
"react-navigation-stack": {
|
||||||
"version": "1.5.0",
|
"version": "1.8.1",
|
||||||
"resolved": "https://registry.npmjs.org/react-navigation-stack/-/react-navigation-stack-1.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/react-navigation-stack/-/react-navigation-stack-1.8.1.tgz",
|
||||||
"integrity": "sha512-XwgdQY8c7PguPw/cx6GCRMnYMe6P/izzOpeOfE8g6sWrWW2vs/vwodRb9a820QePhX0I7dkgxdnTSq+o7/R49Q==",
|
"integrity": "sha512-XOkHuYlQjZKnD4jTU0Ml847sKjpwsJpQ6JX4ZfOq8D0e6fPWXbpYNhvUnzHMHMm+tnbhTqkqP1Umu40Hmx748Q==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"prop-types": "^15.7.2"
|
"prop-types": "^15.7.2"
|
||||||
}
|
}
|
||||||
@@ -9124,6 +9193,11 @@
|
|||||||
"object-assign": "^4.1.1"
|
"object-assign": "^4.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"seedrandom": {
|
||||||
|
"version": "3.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.3.tgz",
|
||||||
|
"integrity": "sha512-PJLhhxIMjlMJaiIRtqiVW061EZn3cS+waZkbFe7eCa2R3g88HbNdWmw4NTFG1w5unxd0GeNaUUxZJP7gPAzSDQ=="
|
||||||
|
},
|
||||||
"semver": {
|
"semver": {
|
||||||
"version": "5.7.1",
|
"version": "5.7.1",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||||
|
|||||||
+6
-5
@@ -12,7 +12,7 @@
|
|||||||
"base-64": "^0.1.0",
|
"base-64": "^0.1.0",
|
||||||
"@expo/vector-icons": "^8.1.0",
|
"@expo/vector-icons": "^8.1.0",
|
||||||
"gfycat-style-urls": "^1.0.3",
|
"gfycat-style-urls": "^1.0.3",
|
||||||
"lbry-redux": "lbryio/lbry-redux#362d764c4c0de23032b6871b4d54207dc548028c",
|
"lbry-redux": "lbryio/lbry-redux#123efacf4d45289ebda9dc291976d475de227a55",
|
||||||
"lbryinc": "lbryio/lbryinc#b9f354ae50bd57691765a7d042c5054167878bf4",
|
"lbryinc": "lbryio/lbryinc#b9f354ae50bd57691765a7d042c5054167878bf4",
|
||||||
"lodash": ">=4.17.11",
|
"lodash": ">=4.17.11",
|
||||||
"merge": ">=1.2.1",
|
"merge": ">=1.2.1",
|
||||||
@@ -22,11 +22,10 @@
|
|||||||
"@react-native-community/async-storage": "^1.5.1",
|
"@react-native-community/async-storage": "^1.5.1",
|
||||||
"react-native-camera": "^2.11.1",
|
"react-native-camera": "^2.11.1",
|
||||||
"react-native-country-picker-modal": "^0.6.2",
|
"react-native-country-picker-modal": "^0.6.2",
|
||||||
"react-native-document-picker": "^3.2.4",
|
|
||||||
"react-native-exception-handler": "2.9.0",
|
"react-native-exception-handler": "2.9.0",
|
||||||
"react-native-fast-image": "^6.1.1",
|
"react-native-fast-image": "^6.1.1",
|
||||||
"react-native-fs": "^2.13.3",
|
"react-native-fs": "^2.13.3",
|
||||||
"react-native-gesture-handler": "1.1.0",
|
"react-native-gesture-handler": "1.3.0",
|
||||||
"react-native-image-zoom-viewer": "^2.2.5",
|
"react-native-image-zoom-viewer": "^2.2.5",
|
||||||
"react-native-password-strength-meter": "^0.0.2",
|
"react-native-password-strength-meter": "^0.0.2",
|
||||||
"react-native-phone-input": "lbryio/react-native-phone-input",
|
"react-native-phone-input": "lbryio/react-native-phone-input",
|
||||||
@@ -35,8 +34,9 @@
|
|||||||
"react-native-vector-icons": "^6.6.0",
|
"react-native-vector-icons": "^6.6.0",
|
||||||
"react-native-video": "lbryio/react-native-video#exoplayer-lbry-android",
|
"react-native-video": "lbryio/react-native-video#exoplayer-lbry-android",
|
||||||
"react-navigation": "^3.11.0",
|
"react-navigation": "^3.11.0",
|
||||||
"react-navigation-drawer": "^2.0.0",
|
"react-navigation-drawer": "^2.2.2",
|
||||||
"react-navigation-redux-helpers": "^3.0.2",
|
"react-navigation-redux-helpers": "^3.0.2",
|
||||||
|
"react-navigation-stack": "^1.8.1",
|
||||||
"react-redux": "^5.0.3",
|
"react-redux": "^5.0.3",
|
||||||
"redux": "^4.0.4",
|
"redux": "^4.0.4",
|
||||||
"redux-persist": "^5.10.0",
|
"redux-persist": "^5.10.0",
|
||||||
@@ -44,7 +44,8 @@
|
|||||||
"redux-persist-transform-compress": "^4.2.0",
|
"redux-persist-transform-compress": "^4.2.0",
|
||||||
"redux-persist-transform-filter": "0.0.18",
|
"redux-persist-transform-filter": "0.0.18",
|
||||||
"redux-thunk": "^2.3.0",
|
"redux-thunk": "^2.3.0",
|
||||||
"rn-fetch-blob": "0.10.15"
|
"rn-fetch-blob": "0.10.15",
|
||||||
|
"seedrandom": "3.0.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.5.4",
|
"@babel/core": "^7.5.4",
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import AboutPage from 'page/about';
|
import AboutPage from 'page/about';
|
||||||
|
import ChannelCreatorPage from 'page/channelCreator';
|
||||||
import DiscoverPage from 'page/discover';
|
import DiscoverPage from 'page/discover';
|
||||||
import DownloadsPage from 'page/downloads';
|
import DownloadsPage from 'page/downloads';
|
||||||
import DrawerContent from 'component/drawerContent';
|
import DrawerContent from 'component/drawerContent';
|
||||||
@@ -17,8 +18,9 @@ import SubscriptionsPage from 'page/subscriptions';
|
|||||||
import TransactionHistoryPage from 'page/transactionHistory';
|
import TransactionHistoryPage from 'page/transactionHistory';
|
||||||
import VerificationScreen from 'page/verification';
|
import VerificationScreen from 'page/verification';
|
||||||
import WalletPage from 'page/wallet';
|
import WalletPage from 'page/wallet';
|
||||||
import { createStackNavigator, NavigationActions } from 'react-navigation';
|
import { NavigationActions } from 'react-navigation';
|
||||||
import { createDrawerNavigator } from 'react-navigation-drawer';
|
import { createDrawerNavigator } from 'react-navigation-drawer';
|
||||||
|
import { createStackNavigator } from 'react-navigation-stack';
|
||||||
import {
|
import {
|
||||||
createReduxContainer,
|
createReduxContainer,
|
||||||
createReactNavigationReduxMiddleware,
|
createReactNavigationReduxMiddleware,
|
||||||
@@ -159,6 +161,12 @@ const drawer = createDrawerNavigator(
|
|||||||
drawerIcon: ({ tintColor }) => <Icon name="wallet" size={drawerIconSize} style={{ color: tintColor }} />,
|
drawerIcon: ({ tintColor }) => <Icon name="wallet" size={drawerIconSize} style={{ color: tintColor }} />,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
ChannelCreator: {
|
||||||
|
screen: ChannelCreatorPage,
|
||||||
|
navigationOptions: {
|
||||||
|
drawerIcon: ({ tintColor }) => <Icon name="at" size={drawerIconSize} style={{ color: tintColor }} />,
|
||||||
|
},
|
||||||
|
},
|
||||||
Publish: {
|
Publish: {
|
||||||
screen: PublishPage,
|
screen: PublishPage,
|
||||||
navigationOptions: {
|
navigationOptions: {
|
||||||
@@ -203,6 +211,7 @@ const drawer = createDrawerNavigator(
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
drawerWidth: 300,
|
drawerWidth: 300,
|
||||||
|
drawerBackgroundColor: 'transparent',
|
||||||
headerMode: 'none',
|
headerMode: 'none',
|
||||||
backBehavior: 'none',
|
backBehavior: 'none',
|
||||||
unmountInactiveRoutes: true,
|
unmountInactiveRoutes: true,
|
||||||
|
|||||||
@@ -13,10 +13,15 @@ export default class ChannelIconItem extends React.PureComponent {
|
|||||||
autothumbStyle.autothumbBlue,
|
autothumbStyle.autothumbBlue,
|
||||||
autothumbStyle.autothumbLightBlue,
|
autothumbStyle.autothumbLightBlue,
|
||||||
autothumbStyle.autothumbCyan,
|
autothumbStyle.autothumbCyan,
|
||||||
autothumbStyle.autothumbTeal,
|
|
||||||
autothumbStyle.autothumbGreen,
|
autothumbStyle.autothumbGreen,
|
||||||
autothumbStyle.autothumbYellow,
|
autothumbStyle.autothumbYellow,
|
||||||
autothumbStyle.autothumbOrange,
|
autothumbStyle.autothumbOrange,
|
||||||
|
autothumbStyle.autothumbDeepPurple,
|
||||||
|
autothumbStyle.autothumbAmber,
|
||||||
|
autothumbStyle.autothumbLime,
|
||||||
|
autothumbStyle.autothumbLightGreen,
|
||||||
|
autothumbStyle.autothumbDeepOrange,
|
||||||
|
autothumbStyle.autothumbBrown,
|
||||||
];
|
];
|
||||||
|
|
||||||
state = {
|
state = {
|
||||||
|
|||||||
@@ -30,11 +30,14 @@ export default class ChannelSelector extends React.PureComponent {
|
|||||||
if (!channels.length && !fetchingChannels) {
|
if (!channels.length && !fetchingChannels) {
|
||||||
fetchChannelListMine();
|
fetchChannelListMine();
|
||||||
}
|
}
|
||||||
|
this.setState({ currentSelectedValue: channelName });
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate() {
|
componentWillReceiveProps(nextProps) {
|
||||||
const { channelName } = this.props;
|
const { channels: prevChannels = [], channelName } = this.props;
|
||||||
if (this.state.currentSelectedValue !== channelName) {
|
const { channels = [] } = nextProps;
|
||||||
|
|
||||||
|
if (channels.length !== prevChannels.length && channelName !== this.state.currentSelectedValue) {
|
||||||
this.setState({ currentSelectedValue: channelName });
|
this.setState({ currentSelectedValue: channelName });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -204,7 +204,11 @@ class ClaimList extends React.PureComponent {
|
|||||||
|
|
||||||
const options = this.buildClaimSearchOptions();
|
const options = this.buildClaimSearchOptions();
|
||||||
const claimSearchKey = createNormalizedClaimSearchKey(options);
|
const claimSearchKey = createNormalizedClaimSearchKey(options);
|
||||||
const uris = claimSearchByQuery[claimSearchKey];
|
let uris = claimSearchByQuery[claimSearchKey];
|
||||||
|
|
||||||
|
if (uris) {
|
||||||
|
uris = uris.filter(uri => uri && uri.length > 0);
|
||||||
|
}
|
||||||
|
|
||||||
if (Constants.ORIENTATION_VERTICAL === orientation) {
|
if (Constants.ORIENTATION_VERTICAL === orientation) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ const groupedMenuItems = {
|
|||||||
{ icon: 'globe-americas', label: 'All content', route: Constants.DRAWER_ROUTE_TRENDING },
|
{ icon: 'globe-americas', label: 'All content', route: Constants.DRAWER_ROUTE_TRENDING },
|
||||||
],
|
],
|
||||||
'Your content': [
|
'Your content': [
|
||||||
|
{ icon: 'at', label: 'Channels', route: Constants.DRAWER_ROUTE_CHANNEL_CREATOR },
|
||||||
{ icon: 'download', label: 'Library', route: Constants.DRAWER_ROUTE_MY_LBRY },
|
{ icon: 'download', label: 'Library', route: Constants.DRAWER_ROUTE_MY_LBRY },
|
||||||
{ icon: 'cloud-upload-alt', label: 'Publishes', route: Constants.DRAWER_ROUTE_PUBLISHES },
|
{ icon: 'cloud-upload-alt', label: 'Publishes', route: Constants.DRAWER_ROUTE_PUBLISHES },
|
||||||
{ icon: 'upload', label: 'New publish', route: Constants.DRAWER_ROUTE_PUBLISH },
|
{ icon: 'upload', label: 'New publish', route: Constants.DRAWER_ROUTE_PUBLISH },
|
||||||
@@ -36,48 +37,61 @@ class DrawerContent extends React.PureComponent {
|
|||||||
const activeItemKey = state.routes[state.index] ? state.routes[state.index].key : null;
|
const activeItemKey = state.routes[state.index] ? state.routes[state.index].key : null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ScrollView contentContainerStyle={discoverStyle.menuScrollContent}>
|
<View style={discoverStyle.drawerContentArea}>
|
||||||
<SafeAreaView style={discoverStyle.drawerContentContainer} forceInset={{ top: 'always', horizontal: 'never' }}>
|
<ScrollView contentContainerStyle={discoverStyle.menuScrollContent}>
|
||||||
{groupNames.map(groupName => {
|
<SafeAreaView
|
||||||
const menuItems = groupedMenuItems[groupName];
|
style={discoverStyle.drawerContentContainer}
|
||||||
|
forceInset={{ top: 'always', horizontal: 'never' }}
|
||||||
|
>
|
||||||
|
{groupNames.map(groupName => {
|
||||||
|
const menuItems = groupedMenuItems[groupName];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View key={groupName} style={discoverStyle.menuGroup}>
|
<View key={groupName} style={discoverStyle.menuGroup}>
|
||||||
{groupNames[3] !== groupName && (
|
{groupNames[3] !== groupName && (
|
||||||
<Text key={`${groupName}-title`} style={discoverStyle.menuGroupName}>
|
<Text key={`${groupName}-title`} style={discoverStyle.menuGroupName}>
|
||||||
{groupName}
|
{groupName}
|
||||||
</Text>
|
</Text>
|
||||||
)}
|
)}
|
||||||
{menuItems.map(item => {
|
{menuItems.map(item => {
|
||||||
const focused =
|
const focused =
|
||||||
activeItemKey === item.route ||
|
activeItemKey === item.route ||
|
||||||
(activeItemKey === Constants.FULL_ROUTE_NAME_DISCOVER &&
|
(activeItemKey === Constants.FULL_ROUTE_NAME_DISCOVER &&
|
||||||
item.route === Constants.DRAWER_ROUTE_DISCOVER) ||
|
item.route === Constants.DRAWER_ROUTE_DISCOVER) ||
|
||||||
(activeItemKey === Constants.FULL_ROUTE_NAME_WALLET &&
|
(activeItemKey === Constants.FULL_ROUTE_NAME_WALLET &&
|
||||||
item.route === Constants.DRAWER_ROUTE_WALLET);
|
item.route === Constants.DRAWER_ROUTE_WALLET);
|
||||||
return (
|
return (
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
accessible
|
accessible
|
||||||
accessibilityLabel={item.label}
|
accessibilityLabel={item.label}
|
||||||
style={[discoverStyle.menuItemTouchArea, focused ? discoverStyle.menuItemTouchAreaFocused : null]}
|
style={[
|
||||||
key={item.label}
|
discoverStyle.menuItemTouchArea,
|
||||||
onPress={() => navigation.navigate({ routeName: item.route })}
|
focused ? discoverStyle.menuItemTouchAreaFocused : null,
|
||||||
delayPressIn={0}
|
]}
|
||||||
>
|
key={item.label}
|
||||||
<View style={discoverStyle.menuItemIcon}>
|
onPress={() => navigation.navigate({ routeName: item.route })}
|
||||||
<Icon name={item.icon} size={16} solid={item.solid} color={focused ? activeTintColor : null} />
|
delayPressIn={0}
|
||||||
</View>
|
>
|
||||||
<Text style={[discoverStyle.menuItem, focused ? discoverStyle.menuItemFocused : null]}>
|
<View style={discoverStyle.menuItemIcon}>
|
||||||
{item.label}
|
<Icon
|
||||||
</Text>
|
name={item.icon}
|
||||||
</TouchableOpacity>
|
size={16}
|
||||||
);
|
solid={item.solid}
|
||||||
})}
|
color={focused ? activeTintColor : null}
|
||||||
</View>
|
/>
|
||||||
);
|
</View>
|
||||||
})}
|
<Text style={[discoverStyle.menuItem, focused ? discoverStyle.menuItemFocused : null]}>
|
||||||
</SafeAreaView>
|
{item.label}
|
||||||
</ScrollView>
|
</Text>
|
||||||
|
</TouchableOpacity>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</SafeAreaView>
|
||||||
|
</ScrollView>
|
||||||
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ type Props = {
|
|||||||
id: string,
|
id: string,
|
||||||
reward_title: string,
|
reward_title: string,
|
||||||
reward_amount: number,
|
reward_amount: number,
|
||||||
|
reward_range?: string,
|
||||||
transaction_id: string,
|
transaction_id: string,
|
||||||
created_at: string,
|
created_at: string,
|
||||||
reward_description: string,
|
reward_description: string,
|
||||||
@@ -55,6 +56,20 @@ class RewardCard extends React.PureComponent<Props> {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
getDisplayAmount = () => {
|
||||||
|
const { reward } = this.props;
|
||||||
|
if (reward) {
|
||||||
|
if (reward.reward_range && reward.reward_range.includes('-')) {
|
||||||
|
return reward.reward_range.split('-')[0] + '+'; // ex: 5+
|
||||||
|
} else if (reward.reward_amount > 0) {
|
||||||
|
return reward.reward_amount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// unknown amount which normally shouldn't happen
|
||||||
|
return '?';
|
||||||
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { canClaim, isPending, onClaimPress, reward } = this.props;
|
const { canClaim, isPending, onClaimPress, reward } = this.props;
|
||||||
const claimed = !!reward.transaction_id;
|
const claimed = !!reward.transaction_id;
|
||||||
@@ -101,7 +116,7 @@ class RewardCard extends React.PureComponent<Props> {
|
|||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
<View style={rewardStyle.rightCol}>
|
<View style={rewardStyle.rightCol}>
|
||||||
<Text style={rewardStyle.rewardAmount}>{reward.reward_amount}</Text>
|
<Text style={rewardStyle.rewardAmount}>{this.getDisplayAmount()}</Text>
|
||||||
<Text style={rewardStyle.rewardCurrency}>LBC</Text>
|
<Text style={rewardStyle.rewardCurrency}>LBC</Text>
|
||||||
</View>
|
</View>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|||||||
@@ -67,11 +67,12 @@ export default class TagSearch extends React.PureComponent {
|
|||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { name, style, type, selectedTags = [], showNsfwTags } = this.props;
|
const { editable, name, style, type, selectedTags = [], showNsfwTags } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View>
|
<View>
|
||||||
<TextInput
|
<TextInput
|
||||||
|
editable={editable}
|
||||||
style={tagStyle.searchInput}
|
style={tagStyle.searchInput}
|
||||||
placeholder={'Search for more tags'}
|
placeholder={'Search for more tags'}
|
||||||
underlineColorAndroid={Colors.NextLbryGreen}
|
underlineColorAndroid={Colors.NextLbryGreen}
|
||||||
|
|||||||
@@ -25,6 +25,9 @@ const Constants = {
|
|||||||
PHASE_DETAILS: 'details',
|
PHASE_DETAILS: 'details',
|
||||||
PHASE_PUBLISH: 'publish',
|
PHASE_PUBLISH: 'publish',
|
||||||
|
|
||||||
|
PHASE_LIST: 'list',
|
||||||
|
PHASE_NEW: 'create',
|
||||||
|
|
||||||
CONTENT_TAB: 'content',
|
CONTENT_TAB: 'content',
|
||||||
ABOUT_TAB: 'about',
|
ABOUT_TAB: 'about',
|
||||||
|
|
||||||
@@ -56,6 +59,11 @@ const Constants = {
|
|||||||
ACTION_SORT_BY_ITEM_CHANGED: 'SORT_BY_ITEM_CHANGED',
|
ACTION_SORT_BY_ITEM_CHANGED: 'SORT_BY_ITEM_CHANGED',
|
||||||
ACTION_TIME_ITEM_CHANGED: 'TIME_ITEM_CHANGED',
|
ACTION_TIME_ITEM_CHANGED: 'TIME_ITEM_CHANGED',
|
||||||
|
|
||||||
|
ACTION_UPDATE_PUBLISH_FORM_STATE: 'UPDATE_PUBLISH_FORM_STATE',
|
||||||
|
ACTION_UPDATE_CHANNEL_FORM_STATE: 'UPDATE_CHANNEL_FORM_STATE',
|
||||||
|
ACTION_CLEAR_PUBLISH_FORM_STATE: 'CLEAR_PUBLISH_FORM_STATE',
|
||||||
|
ACTION_CLEAR_CHANNEL_FORM_STATE: 'CLEAR_CHANNEL_FORM_STATE',
|
||||||
|
|
||||||
ORIENTATION_HORIZONTAL: 'horizontal',
|
ORIENTATION_HORIZONTAL: 'horizontal',
|
||||||
ORIENTATION_VERTICAL: 'vertical',
|
ORIENTATION_VERTICAL: 'vertical',
|
||||||
|
|
||||||
@@ -69,6 +77,7 @@ const Constants = {
|
|||||||
DRAWER_ROUTE_SUBSCRIPTIONS: 'Subscriptions',
|
DRAWER_ROUTE_SUBSCRIPTIONS: 'Subscriptions',
|
||||||
DRAWER_ROUTE_MY_LBRY: 'Downloads',
|
DRAWER_ROUTE_MY_LBRY: 'Downloads',
|
||||||
DRAWER_ROUTE_PUBLISH: 'Publish',
|
DRAWER_ROUTE_PUBLISH: 'Publish',
|
||||||
|
DRAWER_ROUTE_PUBLISH_FORM: 'PublishForm',
|
||||||
DRAWER_ROUTE_PUBLISHES: 'Publishes',
|
DRAWER_ROUTE_PUBLISHES: 'Publishes',
|
||||||
DRAWER_ROUTE_REWARDS: 'Rewards',
|
DRAWER_ROUTE_REWARDS: 'Rewards',
|
||||||
DRAWER_ROUTE_WALLET: 'Wallet',
|
DRAWER_ROUTE_WALLET: 'Wallet',
|
||||||
@@ -77,6 +86,8 @@ const Constants = {
|
|||||||
DRAWER_ROUTE_SEARCH: 'Search',
|
DRAWER_ROUTE_SEARCH: 'Search',
|
||||||
DRAWER_ROUTE_TRANSACTION_HISTORY: 'TransactionHistory',
|
DRAWER_ROUTE_TRANSACTION_HISTORY: 'TransactionHistory',
|
||||||
DRAWER_ROUTE_TAG: 'Tag',
|
DRAWER_ROUTE_TAG: 'Tag',
|
||||||
|
DRAWER_ROUTE_CHANNEL_CREATOR: 'ChannelCreator',
|
||||||
|
DRAWER_ROUTE_CHANNEL_CREATOR_FORM: 'ChannnelCreatorForm',
|
||||||
|
|
||||||
FULL_ROUTE_NAME_DISCOVER: 'DiscoverStack',
|
FULL_ROUTE_NAME_DISCOVER: 'DiscoverStack',
|
||||||
FULL_ROUTE_NAME_WALLET: 'WalletStack',
|
FULL_ROUTE_NAME_WALLET: 'WalletStack',
|
||||||
@@ -146,4 +157,8 @@ export const DrawerRoutes = [
|
|||||||
Constants.DRAWER_ROUTE_ABOUT,
|
Constants.DRAWER_ROUTE_ABOUT,
|
||||||
Constants.DRAWER_ROUTE_SEARCH,
|
Constants.DRAWER_ROUTE_SEARCH,
|
||||||
Constants.DRAWER_ROUTE_TRANSACTION_HISTORY,
|
Constants.DRAWER_ROUTE_TRANSACTION_HISTORY,
|
||||||
|
Constants.DRAWER_ROUTE_CHANNEL_CREATOR,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// sub-pages for main routes
|
||||||
|
export const InnerDrawerRoutes = [Constants.DRAWER_ROUTE_CHANNEL_CREATOR_FORM, Constants.DRAWER_ROUTE_PUBLISH_FORM];
|
||||||
@@ -37,6 +37,7 @@ import FilesystemStorage from 'redux-persist-filesystem-storage';
|
|||||||
import createCompressor from 'redux-persist-transform-compress';
|
import createCompressor from 'redux-persist-transform-compress';
|
||||||
import createFilter from 'redux-persist-transform-filter';
|
import createFilter from 'redux-persist-transform-filter';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
import formReducer from 'redux/reducers/form';
|
||||||
import drawerReducer from 'redux/reducers/drawer';
|
import drawerReducer from 'redux/reducers/drawer';
|
||||||
import settingsReducer from 'redux/reducers/settings';
|
import settingsReducer from 'redux/reducers/settings';
|
||||||
import thunk from 'redux-thunk';
|
import thunk from 'redux-thunk';
|
||||||
@@ -109,6 +110,7 @@ const reducers = persistCombineReducers(persistOptions, {
|
|||||||
file: fileReducer,
|
file: fileReducer,
|
||||||
fileInfo: fileInfoReducer,
|
fileInfo: fileInfoReducer,
|
||||||
filtered: filteredReducer,
|
filtered: filteredReducer,
|
||||||
|
form: formReducer,
|
||||||
homepage: homepageReducer,
|
homepage: homepageReducer,
|
||||||
nav: navigatorReducer,
|
nav: navigatorReducer,
|
||||||
notifications: notificationsReducer,
|
notifications: notificationsReducer,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { doFetchClaimsByChannel, makeSelectClaimForUri } from 'lbry-redux';
|
import { makeSelectClaimForUri, selectMyChannelClaims } from 'lbry-redux';
|
||||||
import { doPopDrawerStack } from 'redux/actions/drawer';
|
import { doPopDrawerStack } from 'redux/actions/drawer';
|
||||||
import { doSetSortByItem, doSetTimeItem } from 'redux/actions/settings';
|
import { doSetSortByItem, doSetTimeItem } from 'redux/actions/settings';
|
||||||
import { selectDrawerStack } from 'redux/selectors/drawer';
|
import { selectDrawerStack } from 'redux/selectors/drawer';
|
||||||
@@ -7,6 +7,7 @@ import { selectSortByItem, selectTimeItem } from 'redux/selectors/settings';
|
|||||||
import ChannelPage from './view';
|
import ChannelPage from './view';
|
||||||
|
|
||||||
const select = (state, props) => ({
|
const select = (state, props) => ({
|
||||||
|
channels: selectMyChannelClaims(state),
|
||||||
claim: makeSelectClaimForUri(props.uri)(state),
|
claim: makeSelectClaimForUri(props.uri)(state),
|
||||||
drawerStack: selectDrawerStack(state),
|
drawerStack: selectDrawerStack(state),
|
||||||
sortByItem: selectSortByItem(state),
|
sortByItem: selectSortByItem(state),
|
||||||
@@ -14,7 +15,6 @@ const select = (state, props) => ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
fetchClaims: (uri, page) => dispatch(doFetchClaimsByChannel(uri, page)),
|
|
||||||
popDrawerStack: () => dispatch(doPopDrawerStack()),
|
popDrawerStack: () => dispatch(doPopDrawerStack()),
|
||||||
setSortByItem: item => dispatch(doSetSortByItem(item)),
|
setSortByItem: item => dispatch(doSetSortByItem(item)),
|
||||||
setTimeItem: item => dispatch(doSetTimeItem(item)),
|
setTimeItem: item => dispatch(doSetTimeItem(item)),
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {
|
import {
|
||||||
ActivityIndicator,
|
ActivityIndicator,
|
||||||
|
Alert,
|
||||||
Dimensions,
|
Dimensions,
|
||||||
Image,
|
Image,
|
||||||
NativeModules,
|
NativeModules,
|
||||||
@@ -159,10 +160,46 @@ class ChannelPage extends React.PureComponent {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
onEditPressed = () => {
|
||||||
|
const { claim, navigation } = this.props;
|
||||||
|
if (claim) {
|
||||||
|
const { permanent_url: permanentUrl } = claim;
|
||||||
|
navigation.navigate({
|
||||||
|
routeName: Constants.DRAWER_ROUTE_CHANNEL_CREATOR,
|
||||||
|
params: { editChannelUrl: permanentUrl },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
onDeletePressed = () => {
|
||||||
|
const { abandonClaim, claim, navigation } = this.props;
|
||||||
|
if (claim) {
|
||||||
|
const { txid, nout } = claim;
|
||||||
|
|
||||||
|
// show confirm alert
|
||||||
|
Alert.alert(
|
||||||
|
__('Delete channel'),
|
||||||
|
__('Are you sure you want to delete this channel?'),
|
||||||
|
[
|
||||||
|
{ text: __('No') },
|
||||||
|
{
|
||||||
|
text: __('Yes'),
|
||||||
|
onPress: () => {
|
||||||
|
abandonClaim(txid, nout);
|
||||||
|
navigation.navigate({ routeName: Constants.DRAWER_ROUTE_CHANNEL_CREATOR });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
{ cancelable: true }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { claim, navigation, uri, drawerStack, popDrawerStack, sortByItem, timeItem } = this.props;
|
const { channels, claim, navigation, uri, drawerStack, popDrawerStack, sortByItem, timeItem } = this.props;
|
||||||
const { name, permanent_url: permanentUrl } = claim;
|
const { name, permanent_url: permanentUrl } = claim;
|
||||||
const { autoStyle, showSortPicker, showTimePicker } = this.state;
|
const { autoStyle, showSortPicker, showTimePicker } = this.state;
|
||||||
|
const ownedChannel = channels ? channels.map(channel => channel.permanent_url).includes(permanentUrl) : false;
|
||||||
|
|
||||||
let thumbnailUrl,
|
let thumbnailUrl,
|
||||||
coverUrl,
|
coverUrl,
|
||||||
@@ -218,12 +255,32 @@ class ChannelPage extends React.PureComponent {
|
|||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View style={channelPageStyle.subscribeButtonContainer}>
|
<View style={channelPageStyle.subscribeButtonContainer}>
|
||||||
<SubscribeButton style={channelPageStyle.subscribeButton} uri={fullUri} name={name} />
|
{ownedChannel && (
|
||||||
<SubscribeNotificationButton
|
<Button
|
||||||
style={[channelPageStyle.subscribeButton, channelPageStyle.bellButton]}
|
style={channelPageStyle.actionButton}
|
||||||
uri={fullUri}
|
theme={'light'}
|
||||||
name={name}
|
icon={'edit'}
|
||||||
/>
|
text={'Edit'}
|
||||||
|
onPress={this.onEditPressed}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{ownedChannel && (
|
||||||
|
<Button
|
||||||
|
style={channelPageStyle.deleteButton}
|
||||||
|
theme={'light'}
|
||||||
|
icon={'trash-alt'}
|
||||||
|
text={'Delete'}
|
||||||
|
onPress={this.onDeletePressed}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{!ownedChannel && <SubscribeButton style={channelPageStyle.subscribeButton} uri={fullUri} name={name} />}
|
||||||
|
{!ownedChannel && (
|
||||||
|
<SubscribeNotificationButton
|
||||||
|
style={[channelPageStyle.subscribeButton, channelPageStyle.bellButton]}
|
||||||
|
uri={fullUri}
|
||||||
|
name={name}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
import { connect } from 'react-redux';
|
||||||
|
import {
|
||||||
|
selectAbandoningIds,
|
||||||
|
selectBalance,
|
||||||
|
selectMyChannelClaims,
|
||||||
|
selectFetchingMyChannels,
|
||||||
|
selectUpdatingChannel,
|
||||||
|
selectUpdateChannelError,
|
||||||
|
doAbandonClaim,
|
||||||
|
doFetchChannelListMine,
|
||||||
|
doCreateChannel,
|
||||||
|
doUpdateChannel,
|
||||||
|
doToast,
|
||||||
|
} from 'lbry-redux';
|
||||||
|
import { doPushDrawerStack, doPopDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
|
||||||
|
import { doUpdateChannelFormState, doClearChannelFormState } from 'redux/actions/form';
|
||||||
|
import { selectDrawerStack } from 'redux/selectors/drawer';
|
||||||
|
import { selectChannelFormState, selectHasChannelFormState } from 'redux/selectors/form';
|
||||||
|
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||||
|
import ChannelCreator from './view';
|
||||||
|
|
||||||
|
const select = state => ({
|
||||||
|
abandoningClaimIds: selectAbandoningIds(state),
|
||||||
|
channels: selectMyChannelClaims(state),
|
||||||
|
channelFormState: selectChannelFormState(state),
|
||||||
|
drawerStack: selectDrawerStack(state),
|
||||||
|
fetchingChannels: selectFetchingMyChannels(state),
|
||||||
|
balance: selectBalance(state),
|
||||||
|
hasFormState: selectHasChannelFormState(state),
|
||||||
|
updatingChannel: selectUpdatingChannel(state),
|
||||||
|
updateChannelError: selectUpdateChannelError(state),
|
||||||
|
});
|
||||||
|
|
||||||
|
const perform = dispatch => ({
|
||||||
|
abandonClaim: (txid, nout) => dispatch(doAbandonClaim(txid, nout)),
|
||||||
|
notify: data => dispatch(doToast(data)),
|
||||||
|
clearChannelFormState: () => dispatch(doClearChannelFormState()),
|
||||||
|
createChannel: (name, amount, optionalParams) => dispatch(doCreateChannel(name, amount, optionalParams)),
|
||||||
|
fetchChannelListMine: () => dispatch(doFetchChannelListMine()),
|
||||||
|
updateChannel: params => dispatch(doUpdateChannel(params)),
|
||||||
|
updateChannelFormState: data => dispatch(doUpdateChannelFormState(data)),
|
||||||
|
pushDrawerStack: (routeName, params) => dispatch(doPushDrawerStack(routeName, params)),
|
||||||
|
popDrawerStack: () => dispatch(doPopDrawerStack()),
|
||||||
|
setPlayerVisible: () => dispatch(doSetPlayerVisible(false)),
|
||||||
|
});
|
||||||
|
|
||||||
|
export default connect(
|
||||||
|
select,
|
||||||
|
perform
|
||||||
|
)(ChannelCreator);
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -1,6 +1,7 @@
|
|||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import {
|
import {
|
||||||
doFetchFileInfo,
|
doFetchFileInfo,
|
||||||
|
doFetchChannelListMine,
|
||||||
doFetchClaimListMine,
|
doFetchClaimListMine,
|
||||||
doFileGet,
|
doFileGet,
|
||||||
doPurchaseUri,
|
doPurchaseUri,
|
||||||
@@ -19,12 +20,14 @@ import {
|
|||||||
makeSelectThumbnailForUri,
|
makeSelectThumbnailForUri,
|
||||||
makeSelectTitleForUri,
|
makeSelectTitleForUri,
|
||||||
selectBalance,
|
selectBalance,
|
||||||
|
selectMyChannelClaims,
|
||||||
selectMyClaimUrisWithoutChannels,
|
selectMyClaimUrisWithoutChannels,
|
||||||
selectPurchasedUris,
|
selectPurchasedUris,
|
||||||
selectFailedPurchaseUris,
|
selectFailedPurchaseUris,
|
||||||
selectPurchaseUriErrorMessage,
|
selectPurchaseUriErrorMessage,
|
||||||
} from 'lbry-redux';
|
} from 'lbry-redux';
|
||||||
import {
|
import {
|
||||||
|
doClaimEligiblePurchaseRewards,
|
||||||
doFetchCostInfoForUri,
|
doFetchCostInfoForUri,
|
||||||
makeSelectCostInfoForUri,
|
makeSelectCostInfoForUri,
|
||||||
selectRewardContentClaimIds,
|
selectRewardContentClaimIds,
|
||||||
@@ -46,6 +49,7 @@ const select = (state, props) => {
|
|||||||
return {
|
return {
|
||||||
balance: selectBalance(state),
|
balance: selectBalance(state),
|
||||||
blackListedOutpoints: selectBlackListedOutpoints(state),
|
blackListedOutpoints: selectBlackListedOutpoints(state),
|
||||||
|
channels: selectMyChannelClaims(state),
|
||||||
claim: makeSelectClaimForUri(selectProps.uri)(state),
|
claim: makeSelectClaimForUri(selectProps.uri)(state),
|
||||||
drawerStack: selectDrawerStack(state),
|
drawerStack: selectDrawerStack(state),
|
||||||
isResolvingUri: makeSelectIsUriResolving(selectProps.uri)(state),
|
isResolvingUri: makeSelectIsUriResolving(selectProps.uri)(state),
|
||||||
@@ -69,12 +73,14 @@ const select = (state, props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
|
claimEligibleRewards: () => dispatch(doClaimEligiblePurchaseRewards()),
|
||||||
deleteFile: (fileInfo, deleteFromDevice, abandonClaim) => {
|
deleteFile: (fileInfo, deleteFromDevice, abandonClaim) => {
|
||||||
dispatch(doDeleteFile(fileInfo, deleteFromDevice, abandonClaim));
|
dispatch(doDeleteFile(fileInfo, deleteFromDevice, abandonClaim));
|
||||||
},
|
},
|
||||||
fetchFileInfo: uri => dispatch(doFetchFileInfo(uri)),
|
fetchFileInfo: uri => dispatch(doFetchFileInfo(uri)),
|
||||||
fetchCostInfo: uri => dispatch(doFetchCostInfoForUri(uri)),
|
fetchCostInfo: uri => dispatch(doFetchCostInfoForUri(uri)),
|
||||||
fetchMyClaims: () => dispatch(doFetchClaimListMine()),
|
fetchMyClaims: () => dispatch(doFetchClaimListMine()),
|
||||||
|
fetchChannelListMine: () => dispatch(doFetchChannelListMine()),
|
||||||
fileGet: (uri, saveFile) => dispatch(doFileGet(uri, saveFile)),
|
fileGet: (uri, saveFile) => dispatch(doFileGet(uri, saveFile)),
|
||||||
notify: data => dispatch(doToast(data)),
|
notify: data => dispatch(doToast(data)),
|
||||||
popDrawerStack: () => dispatch(doPopDrawerStack()),
|
popDrawerStack: () => dispatch(doPopDrawerStack()),
|
||||||
|
|||||||
+21
-5
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Lbry, normalizeURI } from 'lbry-redux';
|
import { Lbry, normalizeURI, parseURI } from 'lbry-redux';
|
||||||
import { Lbryio } from 'lbryinc';
|
import { Lbryio } from 'lbryinc';
|
||||||
import {
|
import {
|
||||||
ActivityIndicator,
|
ActivityIndicator,
|
||||||
@@ -100,7 +100,7 @@ class FilePage extends React.PureComponent {
|
|||||||
DeviceEventEmitter.addListener('onDownloadUpdated', this.handleDownloadUpdated);
|
DeviceEventEmitter.addListener('onDownloadUpdated', this.handleDownloadUpdated);
|
||||||
DeviceEventEmitter.addListener('onDownloadCompleted', this.handleDownloadCompleted);
|
DeviceEventEmitter.addListener('onDownloadCompleted', this.handleDownloadCompleted);
|
||||||
|
|
||||||
const { fileInfo, isResolvingUri, resolveUri, navigation } = this.props;
|
const { fetchChannelListMine, fileInfo, isResolvingUri, resolveUri, navigation } = this.props;
|
||||||
const { uri, uriVars } = navigation.state.params;
|
const { uri, uriVars } = navigation.state.params;
|
||||||
this.setState({ uri, uriVars });
|
this.setState({ uri, uriVars });
|
||||||
|
|
||||||
@@ -108,6 +108,7 @@ class FilePage extends React.PureComponent {
|
|||||||
|
|
||||||
this.fetchFileInfo(this.props);
|
this.fetchFileInfo(this.props);
|
||||||
this.fetchCostInfo(this.props);
|
this.fetchCostInfo(this.props);
|
||||||
|
fetchChannelListMine();
|
||||||
|
|
||||||
if (NativeModules.Firebase) {
|
if (NativeModules.Firebase) {
|
||||||
NativeModules.Firebase.track('open_file_page', { uri: uri });
|
NativeModules.Firebase.track('open_file_page', { uri: uri });
|
||||||
@@ -477,6 +478,7 @@ class FilePage extends React.PureComponent {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const { claimEligibleRewards } = this.props;
|
||||||
const { nout, claim_id: claimId, txid } = claim;
|
const { nout, claim_id: claimId, txid } = claim;
|
||||||
const outpoint = `${txid}:${nout}`;
|
const outpoint = `${txid}:${nout}`;
|
||||||
const params = {
|
const params = {
|
||||||
@@ -488,7 +490,9 @@ class FilePage extends React.PureComponent {
|
|||||||
params.time_to_start = timeToStart;
|
params.time_to_start = timeToStart;
|
||||||
}
|
}
|
||||||
|
|
||||||
Lbryio.call('file', 'view', params).catch(() => {});
|
Lbryio.call('file', 'view', params)
|
||||||
|
.then(() => claimEligibleRewards())
|
||||||
|
.catch(() => {});
|
||||||
this.setState({ fileViewLogged: true });
|
this.setState({ fileViewLogged: true });
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -567,6 +571,7 @@ class FilePage extends React.PureComponent {
|
|||||||
const {
|
const {
|
||||||
balance,
|
balance,
|
||||||
claim,
|
claim,
|
||||||
|
channels,
|
||||||
channelUri,
|
channelUri,
|
||||||
costInfo,
|
costInfo,
|
||||||
fileInfo,
|
fileInfo,
|
||||||
@@ -585,6 +590,10 @@ class FilePage extends React.PureComponent {
|
|||||||
} = this.props;
|
} = this.props;
|
||||||
const { uri, autoplay } = navigation.state.params;
|
const { uri, autoplay } = navigation.state.params;
|
||||||
|
|
||||||
|
const myChannelUris = channels ? channels.map(channel => channel.permanent_url) : [];
|
||||||
|
const ownedClaim = myClaimUris.includes(uri) || myChannelUris.includes(uri);
|
||||||
|
const { isChannel } = parseURI(uri);
|
||||||
|
|
||||||
let innerContent = null;
|
let innerContent = null;
|
||||||
if ((isResolvingUri && !claim) || !claim) {
|
if ((isResolvingUri && !claim) || !claim) {
|
||||||
return (
|
return (
|
||||||
@@ -597,7 +606,14 @@ class FilePage extends React.PureComponent {
|
|||||||
)}
|
)}
|
||||||
{claim === null && !isResolvingUri && (
|
{claim === null && !isResolvingUri && (
|
||||||
<View style={filePageStyle.container}>
|
<View style={filePageStyle.container}>
|
||||||
<Text style={filePageStyle.emptyClaimText}>There's nothing at this location.</Text>
|
{ownedClaim && (
|
||||||
|
<Text style={filePageStyle.emptyClaimText}>
|
||||||
|
{isChannel
|
||||||
|
? 'It looks like you just created this channel. It will appear in a few minutes.'
|
||||||
|
: 'It looks you just published this content. It will appear in a few minutes.'}
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
|
{!ownedClaim && <Text style={filePageStyle.emptyClaimText}>There's nothing at this location.</Text>}
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
<UriBar value={uri} navigation={navigation} />
|
<UriBar value={uri} navigation={navigation} />
|
||||||
@@ -606,7 +622,7 @@ class FilePage extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (claim) {
|
if (claim) {
|
||||||
if (claim && claim.name.length && claim.name[0] === '@') {
|
if (isChannel) {
|
||||||
return <ChannelPage uri={uri} navigation={navigation} />;
|
return <ChannelPage uri={uri} navigation={navigation} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,22 +8,31 @@ import {
|
|||||||
selectBalance,
|
selectBalance,
|
||||||
selectPublishFormValues,
|
selectPublishFormValues,
|
||||||
} from 'lbry-redux';
|
} from 'lbry-redux';
|
||||||
import { doPushDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
|
import { selectDrawerStack } from 'redux/selectors/drawer';
|
||||||
|
import { doUpdatePublishFormState, doClearPublishFormState } from 'redux/actions/form';
|
||||||
|
import { doPushDrawerStack, doPopDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
|
||||||
|
import { selectPublishFormState, selectHasPublishFormState } from 'redux/selectors/form';
|
||||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||||
import PublishPage from './view';
|
import PublishPage from './view';
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
balance: selectBalance(state),
|
balance: selectBalance(state),
|
||||||
|
drawerStack: selectDrawerStack(state),
|
||||||
|
hasFormState: selectHasPublishFormState(state),
|
||||||
|
publishFormState: selectPublishFormState(state),
|
||||||
publishFormValues: selectPublishFormValues(state),
|
publishFormValues: selectPublishFormValues(state),
|
||||||
});
|
});
|
||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
notify: data => dispatch(doToast(data)),
|
notify: data => dispatch(doToast(data)),
|
||||||
|
clearPublishFormState: () => dispatch(doClearPublishFormState()),
|
||||||
updatePublishForm: value => dispatch(doUpdatePublishForm(value)),
|
updatePublishForm: value => dispatch(doUpdatePublishForm(value)),
|
||||||
|
updatePublishFormState: data => dispatch(doUpdatePublishFormState(data)),
|
||||||
uploadThumbnail: (filePath, fsAdapter) => dispatch(doUploadThumbnail(filePath, null, fsAdapter)),
|
uploadThumbnail: (filePath, fsAdapter) => dispatch(doUploadThumbnail(filePath, null, fsAdapter)),
|
||||||
publish: (success, fail) => dispatch(doPublish(success, fail)),
|
publish: (success, fail) => dispatch(doPublish(success, fail)),
|
||||||
resolveUri: uri => dispatch(doResolveUri(uri)),
|
resolveUri: uri => dispatch(doResolveUri(uri)),
|
||||||
pushDrawerStack: () => dispatch(doPushDrawerStack(Constants.DRAWER_ROUTE_PUBLISH)),
|
pushDrawerStack: (routeName, params) => dispatch(doPushDrawerStack(routeName, params)),
|
||||||
|
popDrawerStack: () => dispatch(doPopDrawerStack()),
|
||||||
setPlayerVisible: () => dispatch(doSetPlayerVisible(false)),
|
setPlayerVisible: () => dispatch(doSetPlayerVisible(false)),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
+144
-63
@@ -84,6 +84,7 @@ class PublishPage extends React.PureComponent {
|
|||||||
titleFocused: false,
|
titleFocused: false,
|
||||||
descriptionFocused: false,
|
descriptionFocused: false,
|
||||||
loadingVideos: false,
|
loadingVideos: false,
|
||||||
|
vanityUrl: null,
|
||||||
|
|
||||||
// gallery videos
|
// gallery videos
|
||||||
videos: null,
|
videos: null,
|
||||||
@@ -102,7 +103,7 @@ class PublishPage extends React.PureComponent {
|
|||||||
currentMedia: null,
|
currentMedia: null,
|
||||||
currentThumbnailUri: null,
|
currentThumbnailUri: null,
|
||||||
updatingThumbnailUri: false,
|
updatingThumbnailUri: false,
|
||||||
currentPhase: Constants.PHASE_SELECTOR,
|
currentPhase: null,
|
||||||
|
|
||||||
// publish
|
// publish
|
||||||
advancedMode: false,
|
advancedMode: false,
|
||||||
@@ -121,6 +122,7 @@ class PublishPage extends React.PureComponent {
|
|||||||
otherLicenseDescription: '',
|
otherLicenseDescription: '',
|
||||||
name: null,
|
name: null,
|
||||||
price: 0,
|
price: 0,
|
||||||
|
currency: 'LBC',
|
||||||
uri: null,
|
uri: null,
|
||||||
tags: [],
|
tags: [],
|
||||||
selectedChannel: null,
|
selectedChannel: null,
|
||||||
@@ -166,12 +168,18 @@ class PublishPage extends React.PureComponent {
|
|||||||
this.setState({ allThumbnailsChecked: true });
|
this.setState({ allThumbnailsChecked: true });
|
||||||
};
|
};
|
||||||
|
|
||||||
onComponentFocused = () => {
|
loadPendingFormState = () => {
|
||||||
const { balance, pushDrawerStack, setPlayerVisible, navigation } = this.props;
|
const { publishFormState } = this.props;
|
||||||
pushDrawerStack();
|
const advancedMode = publishFormState.license !== null;
|
||||||
setPlayerVisible();
|
this.setState({ ...publishFormState, advancedMode });
|
||||||
|
};
|
||||||
|
|
||||||
|
onComponentFocused = () => {
|
||||||
|
const { balance, hasFormState, pushDrawerStack, setPlayerVisible, navigation } = this.props;
|
||||||
NativeModules.Firebase.setCurrentScreen('Publish').then(result => {
|
NativeModules.Firebase.setCurrentScreen('Publish').then(result => {
|
||||||
|
pushDrawerStack(Constants.DRAWER_ROUTE_PUBLISH, navigation.state.params ? navigation.state.params : null);
|
||||||
|
setPlayerVisible();
|
||||||
|
|
||||||
NativeModules.Gallery.canUseCamera().then(canUseCamera => this.setState({ canUseCamera }));
|
NativeModules.Gallery.canUseCamera().then(canUseCamera => this.setState({ canUseCamera }));
|
||||||
NativeModules.Gallery.getThumbnailPath().then(thumbnailPath => this.setState({ thumbnailPath }));
|
NativeModules.Gallery.getThumbnailPath().then(thumbnailPath => this.setState({ thumbnailPath }));
|
||||||
this.setState(
|
this.setState(
|
||||||
@@ -185,26 +193,44 @@ class PublishPage extends React.PureComponent {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Check if this is an edit action
|
// Check if this is an edit action
|
||||||
|
let isEditMode = false,
|
||||||
|
vanityUrlSet = false;
|
||||||
if (navigation.state.params) {
|
if (navigation.state.params) {
|
||||||
const { editMode, claimToEdit, vanityUrl } = navigation.state.params;
|
const { displayForm, editMode, claimToEdit, vanityUrl } = navigation.state.params;
|
||||||
if (editMode) {
|
if (editMode) {
|
||||||
this.prepareEdit(claimToEdit);
|
this.prepareEdit(claimToEdit);
|
||||||
|
isEditMode = true;
|
||||||
} else if (vanityUrl) {
|
} else if (vanityUrl) {
|
||||||
const { claimName } = parseURI(vanityUrl);
|
const { claimName } = parseURI(vanityUrl);
|
||||||
|
vanityUrlSet = true;
|
||||||
this.setState({
|
this.setState({
|
||||||
name: claimName,
|
name: claimName,
|
||||||
hasEditedContentAddress: true,
|
hasEditedContentAddress: true,
|
||||||
vanityUrlSet: true,
|
vanityUrlSet,
|
||||||
|
vanityUrl: claimName,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isEditMode && hasFormState) {
|
||||||
|
this.loadPendingFormState();
|
||||||
|
if (vanityUrlSet) {
|
||||||
|
// replace name with the specified vanity URL if there was one in the pending state
|
||||||
|
this.setState({ name: this.state.vanityUrl });
|
||||||
|
}
|
||||||
|
this.setState({ currentPhase: Constants.PHASE_DETAILS });
|
||||||
|
} else {
|
||||||
|
this.setState({ currentPhase: Constants.PHASE_SELECTOR });
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
prepareEdit = claim => {
|
prepareEdit = claim => {
|
||||||
let channelName;
|
const { pushDrawerStack } = this.props;
|
||||||
const { amount, name, signing_channel: signingChannel, value } = claim;
|
const { amount, name, signing_channel: signingChannel, value } = claim;
|
||||||
const { description, fee, languages, license, license_url: licenseUrl, tags, thumbnail, title } = value;
|
const { description, fee, languages, license, license_url: licenseUrl, tags, thumbnail, title } = value;
|
||||||
|
|
||||||
|
let channelName;
|
||||||
if (signingChannel) {
|
if (signingChannel) {
|
||||||
channelName = signingChannel.name;
|
channelName = signingChannel.name;
|
||||||
}
|
}
|
||||||
@@ -241,6 +267,7 @@ class PublishPage extends React.PureComponent {
|
|||||||
licenseUrl,
|
licenseUrl,
|
||||||
otherLicenseDescription,
|
otherLicenseDescription,
|
||||||
name,
|
name,
|
||||||
|
currency: fee && fee.currency ? fee.currency : 'LBC',
|
||||||
price: fee && fee.amount ? fee.amount : 0,
|
price: fee && fee.amount ? fee.amount : 0,
|
||||||
priceSet: fee && fee.amount > 0,
|
priceSet: fee && fee.amount > 0,
|
||||||
tags: tags && tags.length > 0 ? tags : [],
|
tags: tags && tags.length > 0 ? tags : [],
|
||||||
@@ -254,6 +281,7 @@ class PublishPage extends React.PureComponent {
|
|||||||
if (channelName) {
|
if (channelName) {
|
||||||
this.handleChannelChange(channelName);
|
this.handleChannelChange(channelName);
|
||||||
}
|
}
|
||||||
|
pushDrawerStack(Constants.DRAWER_ROUTE_PUBLISH_FORM);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -296,6 +324,7 @@ class PublishPage extends React.PureComponent {
|
|||||||
bid,
|
bid,
|
||||||
channelName,
|
channelName,
|
||||||
currentMedia,
|
currentMedia,
|
||||||
|
currency,
|
||||||
description,
|
description,
|
||||||
language,
|
language,
|
||||||
license,
|
license,
|
||||||
@@ -339,7 +368,7 @@ class PublishPage extends React.PureComponent {
|
|||||||
otherLicenseDescription,
|
otherLicenseDescription,
|
||||||
name: name || undefined,
|
name: name || undefined,
|
||||||
contentIsFree: !priceSet,
|
contentIsFree: !priceSet,
|
||||||
fee: { currency: 'LBC', amount: price },
|
fee: { currency, amount: price },
|
||||||
uri: uri || undefined,
|
uri: uri || undefined,
|
||||||
channel: CLAIM_VALUES.CHANNEL_ANONYMOUS === channelName ? null : channelName,
|
channel: CLAIM_VALUES.CHANNEL_ANONYMOUS === channelName ? null : channelName,
|
||||||
isStillEditing: false,
|
isStillEditing: false,
|
||||||
@@ -371,8 +400,8 @@ class PublishPage extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
componentWillReceiveProps(nextProps) {
|
||||||
const { currentRoute, publishFormValues } = nextProps;
|
const { currentRoute: prevRoute, drawerStack: prevDrawerStack, notify, updatePublishFormState } = this.props;
|
||||||
const { currentRoute: prevRoute, notify } = this.props;
|
const { currentRoute, drawerStack, publishFormValues } = nextProps;
|
||||||
|
|
||||||
if (Constants.DRAWER_ROUTE_PUBLISH === currentRoute && currentRoute !== prevRoute) {
|
if (Constants.DRAWER_ROUTE_PUBLISH === currentRoute && currentRoute !== prevRoute) {
|
||||||
this.onComponentFocused();
|
this.onComponentFocused();
|
||||||
@@ -380,24 +409,38 @@ class PublishPage extends React.PureComponent {
|
|||||||
|
|
||||||
if (publishFormValues) {
|
if (publishFormValues) {
|
||||||
if (publishFormValues.thumbnail && !this.state.uploadedThumbnailUri) {
|
if (publishFormValues.thumbnail && !this.state.uploadedThumbnailUri) {
|
||||||
this.setState({
|
const { thumbnail } = publishFormValues;
|
||||||
currentThumbnailUri: publishFormValues.thumbnail,
|
updatePublishFormState({ currentThumbnailUri: thumbnail, uploadedThumbnailUri: thumbnail });
|
||||||
uploadedThumbnailUri: publishFormValues.thumbnail,
|
this.setState({ currentThumbnailUri: thumbnail, uploadedThumbnailUri: thumbnail });
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
this.state.currentPhase === Constants.PHASE_DETAILS &&
|
||||||
|
prevDrawerStack[prevDrawerStack.length - 1].route === Constants.DRAWER_ROUTE_PUBLISH_FORM &&
|
||||||
|
drawerStack[drawerStack.length - 1].route === Constants.DRAWER_ROUTE_PUBLISH
|
||||||
|
) {
|
||||||
|
// navigated back from the form
|
||||||
|
this.showSelector();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setCurrentMedia(media) {
|
setCurrentMedia(media) {
|
||||||
|
const { pushDrawerStack, updatePublishFormState } = this.props;
|
||||||
const name = generateCombination(2, ' ', true);
|
const name = generateCombination(2, ' ', true);
|
||||||
|
const newName = this.state.hasEditedContentAddress ? this.state.name : this.formatNameForTitle(name);
|
||||||
|
updatePublishFormState({ currentMedia: media, name: newName });
|
||||||
this.setState(
|
this.setState(
|
||||||
{
|
{
|
||||||
currentMedia: media,
|
currentMedia: media,
|
||||||
title: null, // no title autogeneration (user will fill this in)
|
title: null, // no title autogeneration (user will fill this in)
|
||||||
name: this.state.hasEditedContentAddress ? this.state.name : this.formatNameForTitle(name),
|
name: newName,
|
||||||
currentPhase: Constants.PHASE_DETAILS,
|
currentPhase: Constants.PHASE_DETAILS,
|
||||||
},
|
},
|
||||||
() => this.handleNameChange(this.state.name)
|
() => {
|
||||||
|
this.handleNameChange(this.state.name);
|
||||||
|
pushDrawerStack(Constants.DRAWER_ROUTE_PUBLISH_FORM);
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -413,6 +456,7 @@ class PublishPage extends React.PureComponent {
|
|||||||
publishStarted: false,
|
publishStarted: false,
|
||||||
documentPickerOpen: false,
|
documentPickerOpen: false,
|
||||||
editMode: false,
|
editMode: false,
|
||||||
|
vanityUrl: null,
|
||||||
|
|
||||||
currentMedia: null,
|
currentMedia: null,
|
||||||
currentThumbnailUri: null,
|
currentThumbnailUri: null,
|
||||||
@@ -502,6 +546,8 @@ class PublishPage extends React.PureComponent {
|
|||||||
};
|
};
|
||||||
|
|
||||||
handleCameraActionPressed = () => {
|
handleCameraActionPressed = () => {
|
||||||
|
const { pushDrawerStack } = this.props;
|
||||||
|
|
||||||
// check if it's video or photo mode
|
// check if it's video or photo mode
|
||||||
if (this.state.videoRecordingMode) {
|
if (this.state.videoRecordingMode) {
|
||||||
if (this.state.recordingVideo) {
|
if (this.state.recordingVideo) {
|
||||||
@@ -519,14 +565,17 @@ class PublishPage extends React.PureComponent {
|
|||||||
duration: 0,
|
duration: 0,
|
||||||
};
|
};
|
||||||
this.setCurrentMedia(currentMedia);
|
this.setCurrentMedia(currentMedia);
|
||||||
this.setState({
|
this.setState(
|
||||||
currentThumbnailUri: null,
|
{
|
||||||
updatingThumbnailUri: false,
|
currentThumbnailUri: null,
|
||||||
currentPhase: Constants.PHASE_DETAILS,
|
updatingThumbnailUri: false,
|
||||||
showCameraOverlay: false,
|
currentPhase: Constants.PHASE_DETAILS,
|
||||||
videoRecordingMode: false,
|
showCameraOverlay: false,
|
||||||
recordingVideo: false,
|
videoRecordingMode: false,
|
||||||
});
|
recordingVideo: false,
|
||||||
|
},
|
||||||
|
() => pushDrawerStack(Constants.DRAWER_ROUTE_PUBLISH_FORM)
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -540,13 +589,16 @@ class PublishPage extends React.PureComponent {
|
|||||||
duration: 0,
|
duration: 0,
|
||||||
};
|
};
|
||||||
this.setCurrentMedia(currentMedia);
|
this.setCurrentMedia(currentMedia);
|
||||||
this.setState({
|
this.setState(
|
||||||
currentPhase: Constants.PHASE_DETAILS,
|
{
|
||||||
currentThumbnailUri: null,
|
currentPhase: Constants.PHASE_DETAILS,
|
||||||
updatingThumbnailUri: false,
|
currentThumbnailUri: null,
|
||||||
showCameraOverlay: false,
|
updatingThumbnailUri: false,
|
||||||
videoRecordingMode: false,
|
showCameraOverlay: false,
|
||||||
});
|
videoRecordingMode: false,
|
||||||
|
},
|
||||||
|
() => pushDrawerStack(Constants.DRAWER_ROUTE_PUBLISH)
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -559,6 +611,8 @@ class PublishPage extends React.PureComponent {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
handleUploadPressed = () => {};
|
||||||
|
|
||||||
getRandomFileId = () => {
|
getRandomFileId = () => {
|
||||||
// generate a random id for a photo or recorded video between 1 and 20 (for creating thumbnails)
|
// generate a random id for a photo or recorded video between 1 and 20 (for creating thumbnails)
|
||||||
const id = Math.floor(Math.random() * (20 - 2)) + 1;
|
const id = Math.floor(Math.random() * (20 - 2)) + 1;
|
||||||
@@ -570,15 +624,20 @@ class PublishPage extends React.PureComponent {
|
|||||||
};
|
};
|
||||||
|
|
||||||
handleBidChange = bid => {
|
handleBidChange = bid => {
|
||||||
|
const { updatePublishFormState } = this.props;
|
||||||
|
updatePublishFormState({ bid });
|
||||||
this.setState({ bid });
|
this.setState({ bid });
|
||||||
};
|
};
|
||||||
|
|
||||||
handlePriceChange = price => {
|
handlePriceChange = price => {
|
||||||
|
const { updatePublishFormState } = this.props;
|
||||||
|
updatePublishFormState({ price });
|
||||||
this.setState({ price });
|
this.setState({ price });
|
||||||
};
|
};
|
||||||
|
|
||||||
handleNameChange = (name, userInput) => {
|
handleNameChange = (name, userInput) => {
|
||||||
const { notify } = this.props;
|
const { notify, updatePublishFormState } = this.props;
|
||||||
|
updatePublishFormState({ name });
|
||||||
this.setState({ name });
|
this.setState({ name });
|
||||||
if (userInput) {
|
if (userInput) {
|
||||||
this.setState({ hasEditedContentAddress: true });
|
this.setState({ hasEditedContentAddress: true });
|
||||||
@@ -594,8 +653,10 @@ class PublishPage extends React.PureComponent {
|
|||||||
};
|
};
|
||||||
|
|
||||||
handleChannelChange = channel => {
|
handleChannelChange = channel => {
|
||||||
|
const { updatePublishFormState } = this.props;
|
||||||
const { name } = this.state;
|
const { name } = this.state;
|
||||||
const uri = this.getNewUri(name, channel);
|
const uri = this.getNewUri(name, channel);
|
||||||
|
updatePublishFormState({ uri, channelName: channel, selectedChannel: channel });
|
||||||
this.setState({ uri, channelName: channel, selectedChannel: channel });
|
this.setState({ uri, channelName: channel, selectedChannel: channel });
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -604,12 +665,13 @@ class PublishPage extends React.PureComponent {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { notify } = this.props;
|
const { notify, updatePublishFormState } = this.props;
|
||||||
const { tags } = this.state;
|
const { tags } = this.state;
|
||||||
const index = tags.indexOf(tag.toLowerCase());
|
const index = tags.indexOf(tag.toLowerCase());
|
||||||
if (index === -1) {
|
if (index === -1) {
|
||||||
const newTags = tags.slice();
|
const newTags = tags.slice();
|
||||||
newTags.push(tag);
|
newTags.push(tag);
|
||||||
|
updatePublishFormState({ tags: newTags });
|
||||||
this.setState({ tags: newTags });
|
this.setState({ tags: newTags });
|
||||||
} else {
|
} else {
|
||||||
notify({ message: __(`You already added the "${tag}" tag.`) });
|
notify({ message: __(`You already added the "${tag}" tag.`) });
|
||||||
@@ -621,11 +683,13 @@ class PublishPage extends React.PureComponent {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const { updatePublishFormState } = this.props;
|
||||||
const newTags = this.state.tags.slice();
|
const newTags = this.state.tags.slice();
|
||||||
const index = newTags.indexOf(tag.toLowerCase());
|
const index = newTags.indexOf(tag.toLowerCase());
|
||||||
|
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
newTags.splice(index, 1);
|
newTags.splice(index, 1);
|
||||||
|
updatePublishFormState({ tags: newTags });
|
||||||
this.setState({ tags: newTags });
|
this.setState({ tags: newTags });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -673,6 +737,8 @@ class PublishPage extends React.PureComponent {
|
|||||||
};
|
};
|
||||||
|
|
||||||
handleTitleChange = title => {
|
handleTitleChange = title => {
|
||||||
|
const { updatePublishFormState } = this.props;
|
||||||
|
updatePublishFormState({ title });
|
||||||
this.setState({ title });
|
this.setState({ title });
|
||||||
|
|
||||||
if (!this.state.editMode && !this.state.hasEditedContentAddress) {
|
if (!this.state.editMode && !this.state.hasEditedContentAddress) {
|
||||||
@@ -689,35 +755,47 @@ class PublishPage extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
handleCurrencyValueChange = currency => {
|
||||||
|
const { updatePublishFormState } = this.props;
|
||||||
|
updatePublishFormState({ currency });
|
||||||
|
this.setState({ currency });
|
||||||
|
};
|
||||||
|
|
||||||
handleDescriptionChange = description => {
|
handleDescriptionChange = description => {
|
||||||
|
const { updatePublishFormState } = this.props;
|
||||||
|
updatePublishFormState({ description });
|
||||||
this.setState({ description });
|
this.setState({ description });
|
||||||
};
|
};
|
||||||
|
|
||||||
handleLanguageValueChange = language => {
|
handleLanguageValueChange = language => {
|
||||||
|
const { updatePublishFormState } = this.props;
|
||||||
|
updatePublishFormState({ language });
|
||||||
this.setState({ language });
|
this.setState({ language });
|
||||||
};
|
};
|
||||||
|
|
||||||
handleLicenseValueChange = license => {
|
handleLicenseValueChange = license => {
|
||||||
|
const { updatePublishFormState } = this.props;
|
||||||
|
|
||||||
const otherLicenseDescription = [LICENSES.COPYRIGHT, LICENSES.OTHER].includes(license)
|
const otherLicenseDescription = [LICENSES.COPYRIGHT, LICENSES.OTHER].includes(license)
|
||||||
? this.state.otherLicenseDescription
|
? this.state.otherLicenseDescription
|
||||||
: '';
|
: '';
|
||||||
|
const licenseUrl = LICENSES.CC_LICENSES.reduce((value, item) => {
|
||||||
this.setState({
|
if (typeof value === 'object') {
|
||||||
otherLicenseDescription,
|
value = '';
|
||||||
license,
|
}
|
||||||
licenseUrl: LICENSES.CC_LICENSES.reduce((value, item) => {
|
if (license === item.value) {
|
||||||
if (typeof value === 'object') {
|
value = item.url;
|
||||||
value = '';
|
}
|
||||||
}
|
return value;
|
||||||
if (license === item.value) {
|
|
||||||
value = item.url;
|
|
||||||
}
|
|
||||||
return value;
|
|
||||||
}),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
updatePublishFormState({ otherLicenseDescription, license, licenseUrl });
|
||||||
|
this.setState({ otherLicenseDescription, license, licenseUrl });
|
||||||
};
|
};
|
||||||
|
|
||||||
handleChangeLicenseDescription = otherLicenseDescription => {
|
handleChangeLicenseDescription = otherLicenseDescription => {
|
||||||
|
const { updatePublishFormState } = this.props;
|
||||||
|
updatePublishFormState({ otherLicenseDescription });
|
||||||
this.setState({ otherLicenseDescription });
|
this.setState({ otherLicenseDescription });
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -822,17 +900,17 @@ class PublishPage extends React.PureComponent {
|
|||||||
resizeMode={FastImage.resizeMode.contain}
|
resizeMode={FastImage.resizeMode.contain}
|
||||||
source={{ uri: currentThumbnailUri }}
|
source={{ uri: currentThumbnailUri }}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
{this.state.uploadThumbnailStarted && !this.state.uploadedThumbnailUri && (
|
||||||
|
<View style={publishStyle.thumbnailUploadContainer}>
|
||||||
|
<ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />
|
||||||
|
<Text style={publishStyle.thumbnailUploadText}>Uploading thumbnail...</Text>
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
{!this.state.canPublish && <PublishRewardsDriver navigation={navigation} />}
|
{!this.state.canPublish && <PublishRewardsDriver navigation={navigation} />}
|
||||||
|
|
||||||
{this.state.uploadThumbnailStarted && !this.state.uploadedThumbnailUri && (
|
|
||||||
<View style={publishStyle.thumbnailUploadContainer}>
|
|
||||||
<ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />
|
|
||||||
<Text style={publishStyle.thumbnailUploadText}>Uploading thumbnail...</Text>
|
|
||||||
</View>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<View style={publishStyle.card}>
|
<View style={publishStyle.card}>
|
||||||
<View style={publishStyle.textInputLayout}>
|
<View style={publishStyle.textInputLayout}>
|
||||||
{(this.state.titleFocused || (this.state.title != null && this.state.title.trim().length > 0)) && (
|
{(this.state.titleFocused || (this.state.title != null && this.state.title.trim().length > 0)) && (
|
||||||
@@ -858,6 +936,7 @@ class PublishPage extends React.PureComponent {
|
|||||||
)}
|
)}
|
||||||
<TextInput
|
<TextInput
|
||||||
editable={this.state.canPublish && !this.state.publishStarted}
|
editable={this.state.canPublish && !this.state.publishStarted}
|
||||||
|
multiline
|
||||||
placeholder={this.state.descriptionFocused ? '' : 'Description'}
|
placeholder={this.state.descriptionFocused ? '' : 'Description'}
|
||||||
style={publishStyle.inputText}
|
style={publishStyle.inputText}
|
||||||
value={this.state.description}
|
value={this.state.description}
|
||||||
@@ -920,7 +999,16 @@ class PublishPage extends React.PureComponent {
|
|||||||
value={String(this.state.price)}
|
value={String(this.state.price)}
|
||||||
onChangeText={this.handlePriceChange}
|
onChangeText={this.handlePriceChange}
|
||||||
/>
|
/>
|
||||||
<Text style={publishStyle.currency}>LBC</Text>
|
<Picker
|
||||||
|
style={publishStyle.currencyPicker}
|
||||||
|
enabled={this.state.canPublish && !this.state.publishStarted}
|
||||||
|
selectedValue={this.state.currency}
|
||||||
|
itemStyle={publishStyle.pickerItem}
|
||||||
|
onValueChange={this.handleCurrencyValueChange}
|
||||||
|
>
|
||||||
|
<Picker.Item label={'LBC'} value={'LBC'} />
|
||||||
|
<Picker.Item label={'USD'} value={'USD'} />
|
||||||
|
</Picker>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
@@ -1016,17 +1104,10 @@ class PublishPage extends React.PureComponent {
|
|||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View style={publishStyle.warning}>
|
|
||||||
<Text style={publishStyle.warningText}>
|
|
||||||
Please ensure that you have filled everything correctly as you cannot edit published content in this
|
|
||||||
release. This feature will be available in a future release.
|
|
||||||
</Text>
|
|
||||||
</View>
|
|
||||||
|
|
||||||
<View style={publishStyle.actionButtons}>
|
<View style={publishStyle.actionButtons}>
|
||||||
{(this.state.publishStarted || publishFormValues.publishing) && (
|
{(this.state.publishStarted || publishFormValues.publishing) && (
|
||||||
<View style={publishStyle.progress}>
|
<View style={publishStyle.progress}>
|
||||||
<ActivityIndicator size={'small'} color={Colors.LbryGreen} />
|
<ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,15 @@ class PublishesPage extends React.PureComponent {
|
|||||||
this.onComponentFocused();
|
this.onComponentFocused();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
const { currentRoute } = nextProps;
|
||||||
|
const { currentRoute: prevRoute } = this.props;
|
||||||
|
|
||||||
|
if (Constants.DRAWER_ROUTE_PUBLISHES === currentRoute && currentRoute !== prevRoute) {
|
||||||
|
this.onComponentFocused();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onComponentFocused = () => {
|
onComponentFocused = () => {
|
||||||
const { checkPendingPublishes, fetchMyClaims, pushDrawerStack, setPlayerVisible } = this.props;
|
const { checkPendingPublishes, fetchMyClaims, pushDrawerStack, setPlayerVisible } = this.props;
|
||||||
pushDrawerStack();
|
pushDrawerStack();
|
||||||
@@ -148,6 +157,15 @@ class PublishesPage extends React.PureComponent {
|
|||||||
initialNumToRender={8}
|
initialNumToRender={8}
|
||||||
maxToRenderPerBatch={24}
|
maxToRenderPerBatch={24}
|
||||||
removeClippedSubviews
|
removeClippedSubviews
|
||||||
|
ListFooterComponent={
|
||||||
|
<View style={publishStyle.publishesFooter}>
|
||||||
|
<Button
|
||||||
|
style={publishStyle.publishesFooterButton}
|
||||||
|
text={__('Publish something new')}
|
||||||
|
onPress={() => navigation.navigate({ routeName: Constants.DRAWER_ROUTE_PUBLISH })}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
}
|
||||||
renderItem={({ item }) => (
|
renderItem={({ item }) => (
|
||||||
<FileListItem
|
<FileListItem
|
||||||
key={item}
|
key={item}
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||||
|
|
||||||
|
export const doUpdatePublishFormState = publishFormValue => dispatch =>
|
||||||
|
dispatch({
|
||||||
|
type: Constants.ACTION_UPDATE_PUBLISH_FORM_STATE,
|
||||||
|
data: { ...publishFormValue },
|
||||||
|
});
|
||||||
|
|
||||||
|
export const doUpdateChannelFormState = channelFormValue => dispatch =>
|
||||||
|
dispatch({
|
||||||
|
type: Constants.ACTION_UPDATE_CHANNEL_FORM_STATE,
|
||||||
|
data: { ...channelFormValue },
|
||||||
|
});
|
||||||
|
|
||||||
|
export const doClearPublishFormState = () => dispatch =>
|
||||||
|
dispatch({
|
||||||
|
type: Constants.ACTION_CLEAR_PUBLISH_FORM_STATE,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const doClearChannelFormState = () => dispatch =>
|
||||||
|
dispatch({
|
||||||
|
type: Constants.ACTION_CLEAR_CHANNEL_FORM_STATE,
|
||||||
|
});
|
||||||
@@ -16,7 +16,19 @@ reducers[Constants.ACTION_PUSH_DRAWER_STACK] = (state, action) => {
|
|||||||
const { routeName, params } = action.data;
|
const { routeName, params } = action.data;
|
||||||
const newStack = state.stack.slice();
|
const newStack = state.stack.slice();
|
||||||
|
|
||||||
if (routeName !== newStack[newStack.length - 1].route) {
|
const lastRoute = newStack[newStack.length - 1].route;
|
||||||
|
let canPushStack = routeName !== lastRoute;
|
||||||
|
if (
|
||||||
|
lastRoute === Constants.DRAWER_ROUTE_CHANNEL_CREATOR_FORM &&
|
||||||
|
routeName === Constants.DRAWER_ROUTE_CHANNEL_CREATOR
|
||||||
|
) {
|
||||||
|
canPushStack = false;
|
||||||
|
}
|
||||||
|
if (lastRoute === Constants.DRAWER_ROUTE_PUBLISH_FORM && routeName === Constants.DRAWER_ROUTE_PUBLISH) {
|
||||||
|
canPushStack = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canPushStack) {
|
||||||
newStack.push({ route: routeName, params });
|
newStack.push({ route: routeName, params });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||||
|
|
||||||
|
const reducers = {};
|
||||||
|
const defaultState = {
|
||||||
|
channelFormValues: {},
|
||||||
|
publishFormValues: {},
|
||||||
|
};
|
||||||
|
|
||||||
|
reducers[Constants.ACTION_UPDATE_PUBLISH_FORM_STATE] = (state, action) => {
|
||||||
|
const { data } = action;
|
||||||
|
const publishFormValues = Object.assign({}, state.publishFormValues);
|
||||||
|
const newPublishFormValues = Object.assign(publishFormValues, data);
|
||||||
|
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
publishFormValues: newPublishFormValues,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
reducers[Constants.ACTION_UPDATE_CHANNEL_FORM_STATE] = (state, action) => {
|
||||||
|
const { data } = action;
|
||||||
|
const channelFormValues = Object.assign({}, state.channelFormValues);
|
||||||
|
const newChannelFormValues = Object.assign(channelFormValues, data);
|
||||||
|
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
channelFormValues: newChannelFormValues,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
reducers[Constants.ACTION_CLEAR_PUBLISH_FORM_STATE] = state => {
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
publishFormValues: {},
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
reducers[Constants.ACTION_CLEAR_CHANNEL_FORM_STATE] = state => {
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
channelFormValues: {},
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export default function reducer(state = defaultState, action) {
|
||||||
|
const handler = reducers[action.type];
|
||||||
|
if (handler) return handler(state, action);
|
||||||
|
return state;
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
import { createSelector } from 'reselect';
|
||||||
|
|
||||||
|
export const selectState = state => state.form || {};
|
||||||
|
|
||||||
|
export const selectPublishFormState = createSelector(
|
||||||
|
selectState,
|
||||||
|
state => state.publishFormValues || {}
|
||||||
|
);
|
||||||
|
|
||||||
|
export const selectChannelFormState = createSelector(
|
||||||
|
selectState,
|
||||||
|
state => state.channelFormValues || {}
|
||||||
|
);
|
||||||
|
|
||||||
|
export const selectHasPublishFormState = createSelector(
|
||||||
|
selectPublishFormState,
|
||||||
|
values => Object.keys(values).length > 0
|
||||||
|
);
|
||||||
|
|
||||||
|
export const selectHasChannelFormState = createSelector(
|
||||||
|
selectChannelFormState,
|
||||||
|
values => Object.keys(values).length > 0
|
||||||
|
);
|
||||||
@@ -4,6 +4,9 @@ const autothumbStyle = StyleSheet.create({
|
|||||||
autothumbPurple: {
|
autothumbPurple: {
|
||||||
backgroundColor: '#9c27b0',
|
backgroundColor: '#9c27b0',
|
||||||
},
|
},
|
||||||
|
autothumbDeepPurple: {
|
||||||
|
backgroundColor: '#5e35b1',
|
||||||
|
},
|
||||||
autothumbRed: {
|
autothumbRed: {
|
||||||
backgroundColor: '#e53935',
|
backgroundColor: '#e53935',
|
||||||
},
|
},
|
||||||
@@ -34,6 +37,21 @@ const autothumbStyle = StyleSheet.create({
|
|||||||
autothumbOrange: {
|
autothumbOrange: {
|
||||||
backgroundColor: '#ffa726',
|
backgroundColor: '#ffa726',
|
||||||
},
|
},
|
||||||
|
autothumbAmber: {
|
||||||
|
backgroundColor: '#ffb300',
|
||||||
|
},
|
||||||
|
autothumbLime: {
|
||||||
|
backgroundColor: '#c0ca33',
|
||||||
|
},
|
||||||
|
autothumbLightGreen: {
|
||||||
|
backgroundColor: '#7cb342',
|
||||||
|
},
|
||||||
|
autothumbDeepOrange: {
|
||||||
|
backgroundColor: '#f4511e',
|
||||||
|
},
|
||||||
|
autothumbBrown: {
|
||||||
|
backgroundColor: '#6d4c41',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export default autothumbStyle;
|
export default autothumbStyle;
|
||||||
@@ -0,0 +1,259 @@
|
|||||||
|
import { Dimensions, StyleSheet } from 'react-native';
|
||||||
|
import Colors from './colors';
|
||||||
|
|
||||||
|
const screenDimension = Dimensions.get('window');
|
||||||
|
const screenWidth = screenDimension.width;
|
||||||
|
|
||||||
|
const channelCreatorStyle = StyleSheet.create({
|
||||||
|
card: {
|
||||||
|
backgroundColor: Colors.White,
|
||||||
|
marginTop: 16,
|
||||||
|
marginLeft: 16,
|
||||||
|
marginRight: 16,
|
||||||
|
padding: 16,
|
||||||
|
},
|
||||||
|
container: {
|
||||||
|
flex: 1,
|
||||||
|
backgroundColor: Colors.PageBackground,
|
||||||
|
},
|
||||||
|
channelPicker: {
|
||||||
|
fontFamily: 'Inter-UI-Regular',
|
||||||
|
fontSize: 16,
|
||||||
|
height: 52,
|
||||||
|
width: '100%',
|
||||||
|
},
|
||||||
|
bidRow: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
alignItems: 'center',
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
fontFamily: 'Inter-UI-Regular',
|
||||||
|
fontSize: 16,
|
||||||
|
},
|
||||||
|
channelNameInput: {
|
||||||
|
fontFamily: 'Inter-UI-Regular',
|
||||||
|
fontSize: 16,
|
||||||
|
paddingLeft: 20,
|
||||||
|
},
|
||||||
|
bidAmountInput: {
|
||||||
|
fontFamily: 'Inter-UI-Regular',
|
||||||
|
fontSize: 16,
|
||||||
|
marginLeft: 16,
|
||||||
|
textAlign: 'right',
|
||||||
|
width: 80,
|
||||||
|
},
|
||||||
|
helpText: {
|
||||||
|
fontFamily: 'Inter-UI-Regular',
|
||||||
|
fontSize: 12,
|
||||||
|
},
|
||||||
|
channelTitleInput: {
|
||||||
|
marginBottom: 4,
|
||||||
|
},
|
||||||
|
createChannelContainer: {
|
||||||
|
marginTop: 60,
|
||||||
|
flex: 1,
|
||||||
|
},
|
||||||
|
channelAt: {
|
||||||
|
position: 'absolute',
|
||||||
|
left: 4,
|
||||||
|
top: 13,
|
||||||
|
fontFamily: 'Inter-UI-Regular',
|
||||||
|
fontSize: 16,
|
||||||
|
},
|
||||||
|
buttonContainer: {
|
||||||
|
marginTop: 24,
|
||||||
|
marginBottom: 16,
|
||||||
|
},
|
||||||
|
buttons: {
|
||||||
|
marginLeft: 16,
|
||||||
|
marginRight: 16,
|
||||||
|
flexDirection: 'row',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
},
|
||||||
|
cancelLink: {
|
||||||
|
marginRight: 16,
|
||||||
|
},
|
||||||
|
createButton: {
|
||||||
|
backgroundColor: Colors.LbryGreen,
|
||||||
|
alignSelf: 'flex-end',
|
||||||
|
},
|
||||||
|
inlineError: {
|
||||||
|
fontFamily: 'Inter-UI-Regular',
|
||||||
|
fontSize: 12,
|
||||||
|
color: Colors.Red,
|
||||||
|
marginTop: 2,
|
||||||
|
},
|
||||||
|
imageSelectors: {
|
||||||
|
width: '100%',
|
||||||
|
height: 160,
|
||||||
|
},
|
||||||
|
coverImageTouchArea: {
|
||||||
|
position: 'absolute',
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
top: 0,
|
||||||
|
bottom: 0,
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
},
|
||||||
|
coverImage: {
|
||||||
|
width: '100%',
|
||||||
|
height: '100%',
|
||||||
|
},
|
||||||
|
avatarImageContainer: {
|
||||||
|
position: 'absolute',
|
||||||
|
left: screenWidth / 2 - 80 / 2,
|
||||||
|
bottom: -16,
|
||||||
|
width: 80,
|
||||||
|
height: 80,
|
||||||
|
borderRadius: 160,
|
||||||
|
overflow: 'hidden',
|
||||||
|
},
|
||||||
|
avatarTouchArea: {
|
||||||
|
width: 80,
|
||||||
|
height: 80,
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
},
|
||||||
|
avatarImage: {
|
||||||
|
width: '100%',
|
||||||
|
height: '100%',
|
||||||
|
},
|
||||||
|
listFooter: {
|
||||||
|
marginTop: 24,
|
||||||
|
},
|
||||||
|
createChannelButton: {
|
||||||
|
backgroundColor: Colors.LbryGreen,
|
||||||
|
alignSelf: 'flex-start',
|
||||||
|
},
|
||||||
|
scrollContainer: {
|
||||||
|
marginTop: 60,
|
||||||
|
},
|
||||||
|
scrollPadding: {
|
||||||
|
padding: 16,
|
||||||
|
},
|
||||||
|
channelListItem: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
marginBottom: 16,
|
||||||
|
alignItems: 'center',
|
||||||
|
},
|
||||||
|
channelListTitle: {
|
||||||
|
fontFamily: 'Inter-UI-Regular',
|
||||||
|
fontSize: 18,
|
||||||
|
marginBottom: 4,
|
||||||
|
},
|
||||||
|
channelListName: {
|
||||||
|
fontFamily: 'Inter-UI-Regular',
|
||||||
|
fontSize: 14,
|
||||||
|
},
|
||||||
|
channelListAvatar: {
|
||||||
|
marginRight: 16,
|
||||||
|
width: 80,
|
||||||
|
height: 80,
|
||||||
|
borderRadius: 160,
|
||||||
|
overflow: 'hidden',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
},
|
||||||
|
selectedOverlay: {
|
||||||
|
position: 'absolute',
|
||||||
|
left: 0,
|
||||||
|
top: 0,
|
||||||
|
width: 80,
|
||||||
|
height: 80,
|
||||||
|
borderRadius: 160,
|
||||||
|
overflow: 'hidden',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
backgroundColor: '#000000aa',
|
||||||
|
},
|
||||||
|
listHeader: {
|
||||||
|
alignItems: 'center',
|
||||||
|
marginTop: 16,
|
||||||
|
marginBottom: 16,
|
||||||
|
},
|
||||||
|
textInputLayout: {
|
||||||
|
marginBottom: 4,
|
||||||
|
},
|
||||||
|
textInputTitle: {
|
||||||
|
fontFamily: 'Inter-UI-Regular',
|
||||||
|
fontSize: 12,
|
||||||
|
marginBottom: -10,
|
||||||
|
marginLeft: 4,
|
||||||
|
},
|
||||||
|
inputText: {
|
||||||
|
fontFamily: 'Inter-UI-Regular',
|
||||||
|
fontSize: 16,
|
||||||
|
},
|
||||||
|
toggleContainer: {
|
||||||
|
marginTop: 24,
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'flex-end',
|
||||||
|
},
|
||||||
|
modeLink: {
|
||||||
|
color: Colors.LbryGreen,
|
||||||
|
alignSelf: 'flex-end',
|
||||||
|
marginRight: 16,
|
||||||
|
},
|
||||||
|
cardTitle: {
|
||||||
|
fontFamily: 'Inter-UI-Regular',
|
||||||
|
fontSize: 20,
|
||||||
|
marginBottom: 8,
|
||||||
|
},
|
||||||
|
tag: {
|
||||||
|
marginRight: 4,
|
||||||
|
marginBottom: 4,
|
||||||
|
},
|
||||||
|
tagList: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
flexWrap: 'wrap',
|
||||||
|
},
|
||||||
|
editOverlay: {
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
borderRadius: 24,
|
||||||
|
position: 'absolute',
|
||||||
|
padding: 8,
|
||||||
|
left: 4,
|
||||||
|
bottom: 4,
|
||||||
|
backgroundColor: '#00000077',
|
||||||
|
},
|
||||||
|
thumbnailEditOverlay: {
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
borderRadius: 24,
|
||||||
|
position: 'absolute',
|
||||||
|
padding: 8,
|
||||||
|
left: 80 / 2 - 32 / 2,
|
||||||
|
bottom: 4,
|
||||||
|
backgroundColor: '#00000077',
|
||||||
|
},
|
||||||
|
editIcon: {
|
||||||
|
color: Colors.White,
|
||||||
|
fontFamily: 'Inter-UI-SemiBold',
|
||||||
|
fontSize: 12,
|
||||||
|
},
|
||||||
|
uploadProgress: {
|
||||||
|
alignItems: 'center',
|
||||||
|
borderRadius: 16,
|
||||||
|
flexDirection: 'row',
|
||||||
|
position: 'absolute',
|
||||||
|
top: 8,
|
||||||
|
right: 8,
|
||||||
|
backgroundColor: '#00000077',
|
||||||
|
paddingLeft: 8,
|
||||||
|
paddingRight: 8,
|
||||||
|
paddingTop: 4,
|
||||||
|
paddingBottom: 4,
|
||||||
|
justifyContent: 'center',
|
||||||
|
},
|
||||||
|
uploadText: {
|
||||||
|
color: Colors.White,
|
||||||
|
fontFamily: 'Inter-UI-SemiBold',
|
||||||
|
fontSize: 12,
|
||||||
|
marginLeft: 4,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export default channelCreatorStyle;
|
||||||
@@ -31,6 +31,7 @@ const channelPageStyle = StyleSheet.create({
|
|||||||
flex: 1,
|
flex: 1,
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
padding: 24,
|
||||||
},
|
},
|
||||||
infoText: {
|
infoText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-UI-Regular',
|
||||||
@@ -165,6 +166,9 @@ const channelPageStyle = StyleSheet.create({
|
|||||||
claimListContent: {
|
claimListContent: {
|
||||||
paddingTop: 16,
|
paddingTop: 16,
|
||||||
},
|
},
|
||||||
|
actionButton: {
|
||||||
|
backgroundColor: Colors.White,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export default channelPageStyle;
|
export default channelPageStyle;
|
||||||
@@ -22,6 +22,10 @@ const discoverStyle = StyleSheet.create({
|
|||||||
flex: 1,
|
flex: 1,
|
||||||
backgroundColor: Colors.PageBackground,
|
backgroundColor: Colors.PageBackground,
|
||||||
},
|
},
|
||||||
|
drawerContentArea: {
|
||||||
|
flex: 1,
|
||||||
|
backgroundColor: Colors.White,
|
||||||
|
},
|
||||||
drawerContentContainer: {
|
drawerContentContainer: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ const filePageStyle = StyleSheet.create({
|
|||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-UI-Regular',
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
marginLeft: 16,
|
marginLeft: 24,
|
||||||
marginRight: 16,
|
marginRight: 24,
|
||||||
},
|
},
|
||||||
scrollContainer: {
|
scrollContainer: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
|
|||||||
+32
-9
@@ -156,6 +156,10 @@ const publishStyle = StyleSheet.create({
|
|||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
marginLeft: 8,
|
marginLeft: 8,
|
||||||
},
|
},
|
||||||
|
listEmptyText: {
|
||||||
|
fontFamily: 'Inter-UI-Regular',
|
||||||
|
fontSize: 14,
|
||||||
|
},
|
||||||
titleRow: {
|
titleRow: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
@@ -324,18 +328,24 @@ const publishStyle = StyleSheet.create({
|
|||||||
marginLeft: 4,
|
marginLeft: 4,
|
||||||
},
|
},
|
||||||
thumbnailUploadContainer: {
|
thumbnailUploadContainer: {
|
||||||
marginTop: 16,
|
|
||||||
marginLeft: 16,
|
|
||||||
marginRight: 16,
|
|
||||||
paddingLeft: 2,
|
|
||||||
paddingRight: 2,
|
|
||||||
flexDirection: 'row',
|
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
borderRadius: 16,
|
||||||
|
flexDirection: 'row',
|
||||||
|
position: 'absolute',
|
||||||
|
top: 8,
|
||||||
|
right: 8,
|
||||||
|
backgroundColor: '#00000077',
|
||||||
|
paddingLeft: 8,
|
||||||
|
paddingRight: 8,
|
||||||
|
paddingTop: 4,
|
||||||
|
paddingBottom: 4,
|
||||||
|
justifyContent: 'center',
|
||||||
},
|
},
|
||||||
thumbnailUploadText: {
|
thumbnailUploadText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
color: Colors.White,
|
||||||
fontSize: 14,
|
fontFamily: 'Inter-UI-SemiBold',
|
||||||
marginLeft: 8,
|
fontSize: 12,
|
||||||
|
marginLeft: 4,
|
||||||
},
|
},
|
||||||
toggleField: {
|
toggleField: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
@@ -362,6 +372,9 @@ const publishStyle = StyleSheet.create({
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
},
|
},
|
||||||
|
currencyPicker: {
|
||||||
|
width: 100,
|
||||||
|
},
|
||||||
fullCentered: {
|
fullCentered: {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
left: 0,
|
left: 0,
|
||||||
@@ -420,6 +433,16 @@ const publishStyle = StyleSheet.create({
|
|||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: Colors.DescriptionGrey,
|
color: Colors.DescriptionGrey,
|
||||||
},
|
},
|
||||||
|
publishesFooter: {
|
||||||
|
marginTop: 16,
|
||||||
|
marginLeft: 16,
|
||||||
|
marginRight: 16,
|
||||||
|
},
|
||||||
|
publishesFooterButton: {
|
||||||
|
alignSelf: 'flex-start',
|
||||||
|
backgroundColor: Colors.LbryGreen,
|
||||||
|
marginTop: 16,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export default publishStyle;
|
export default publishStyle;
|
||||||
+78
-6
@@ -1,7 +1,7 @@
|
|||||||
import { NavigationActions, StackActions } from 'react-navigation';
|
import { NavigationActions, StackActions } from 'react-navigation';
|
||||||
import { buildURI, isURIValid, normalizeURI } from 'lbry-redux';
|
import { buildURI, isURIValid, normalizeURI } from 'lbry-redux';
|
||||||
import { doPopDrawerStack, doPushDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
|
import { doPopDrawerStack, doPushDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
|
||||||
import Constants, { DrawerRoutes } from 'constants'; // eslint-disable-line node/no-deprecated-api
|
import Constants, { DrawerRoutes, InnerDrawerRoutes } from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||||
|
|
||||||
const tagNameLength = 10;
|
const tagNameLength = 10;
|
||||||
|
|
||||||
@@ -156,10 +156,26 @@ export function navigateBack(navigation, drawerStack, popDrawerStack) {
|
|||||||
const target = drawerStack[drawerStack.length > 1 ? drawerStack.length - 2 : 0];
|
const target = drawerStack[drawerStack.length > 1 ? drawerStack.length - 2 : 0];
|
||||||
const { route, params } = target;
|
const { route, params } = target;
|
||||||
navigation.goBack(navigation.state.key);
|
navigation.goBack(navigation.state.key);
|
||||||
if (DrawerRoutes.indexOf(route) === -1 && isURIValid(route)) {
|
if (!DrawerRoutes.includes(route) && !InnerDrawerRoutes.includes(route) && isURIValid(route)) {
|
||||||
navigateToUri(navigation, route, null, true);
|
navigateToUri(navigation, route, null, true);
|
||||||
} else {
|
} else {
|
||||||
navigation.navigate({ routeName: route, params });
|
let targetRoute = route;
|
||||||
|
let targetParams = params;
|
||||||
|
if (InnerDrawerRoutes.includes(route)) {
|
||||||
|
if (Constants.DRAWER_ROUTE_CHANNEL_CREATOR_FORM === route) {
|
||||||
|
targetRoute = Constants.DRAWER_ROUTE_CHANNEL_CREATOR;
|
||||||
|
} else if (Constants.DRAWER_ROUTE_PUBLISH_FORM === route) {
|
||||||
|
targetRoute = Constants.DRAWER_ROUTE_PUBLISH_FORM;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (targetParams) {
|
||||||
|
targetParams.displayForm = true;
|
||||||
|
} else {
|
||||||
|
targetParams = { displayForm: true };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
navigation.navigate({ routeName: targetRoute, targetParams });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,14 +185,31 @@ export function dispatchNavigateBack(dispatch, nav, drawerStack) {
|
|||||||
const target = drawerStack[drawerStack.length > 1 ? drawerStack.length - 2 : 0];
|
const target = drawerStack[drawerStack.length > 1 ? drawerStack.length - 2 : 0];
|
||||||
const { route } = target;
|
const { route } = target;
|
||||||
dispatch(NavigationActions.back());
|
dispatch(NavigationActions.back());
|
||||||
if (DrawerRoutes.indexOf(route) === -1 && isURIValid(route)) {
|
if (!DrawerRoutes.includes(route) && !InnerDrawerRoutes.includes(route) && isURIValid(route)) {
|
||||||
dispatchNavigateToUri(dispatch, nav, route, true);
|
dispatchNavigateToUri(dispatch, nav, route, true);
|
||||||
} else {
|
} else {
|
||||||
const newTarget = drawerStack[drawerStack.length > 1 ? drawerStack.length - 2 : 0];
|
const newTarget = drawerStack[drawerStack.length > 1 ? drawerStack.length - 2 : 0];
|
||||||
|
let targetRoute = newTarget.route;
|
||||||
|
let targetParams = newTarget.params;
|
||||||
|
if (InnerDrawerRoutes.includes(targetRoute)) {
|
||||||
|
if (Constants.DRAWER_ROUTE_CHANNEL_CREATOR_FORM === route) {
|
||||||
|
targetRoute = Constants.DRAWER_ROUTE_CHANNEL_CREATOR;
|
||||||
|
} else if (Constants.DRAWER_ROUTE_PUBLISH_FORM === route) {
|
||||||
|
targetRoute = Constants.DRAWER_ROUTE_PUBLISH_FORM;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (targetParams) {
|
||||||
|
targetParams.displayForm = true;
|
||||||
|
} else {
|
||||||
|
targetParams = { displayForm: true };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const navigateAction = NavigationActions.navigate({
|
const navigateAction = NavigationActions.navigate({
|
||||||
routeName: newTarget.route,
|
routeName: targetRoute,
|
||||||
params: newTarget.params,
|
params: targetParams,
|
||||||
});
|
});
|
||||||
|
|
||||||
dispatch(navigateAction);
|
dispatch(navigateAction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -256,3 +289,42 @@ export function transformUrl(url) {
|
|||||||
export function __(str) {
|
export function __(str) {
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function uploadImageAsset(filePath, success, failure) {
|
||||||
|
const makeid = () => {
|
||||||
|
let text = '';
|
||||||
|
const possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
||||||
|
for (let i = 0; i < 24; i += 1) text += possible.charAt(Math.floor(Math.random() * 62));
|
||||||
|
return text;
|
||||||
|
};
|
||||||
|
|
||||||
|
const fileName = filePath.substring(filePath.lastIndexOf('/') + 1);
|
||||||
|
let fileExt = fileName.indexOf('.') > -1 ? fileName.substring(fileName.lastIndexOf('.') + 1).trim() : 0;
|
||||||
|
if (!fileExt) {
|
||||||
|
fileExt = 'jpg'; // default to jpg
|
||||||
|
}
|
||||||
|
const fileType = `image/${fileExt}`;
|
||||||
|
|
||||||
|
const data = new FormData();
|
||||||
|
const name = makeid();
|
||||||
|
data.append('name', name);
|
||||||
|
data.append('file', { uri: 'file://' + filePath, type: fileType, name: fileName });
|
||||||
|
|
||||||
|
return fetch('https://spee.ch/api/claim/publish', {
|
||||||
|
method: 'POST',
|
||||||
|
body: data,
|
||||||
|
})
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(json => {
|
||||||
|
if (json.success) {
|
||||||
|
if (success) {
|
||||||
|
success({ url: `${json.data.url}.${fileExt}` });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
if (failure) {
|
||||||
|
failure(err.message ? err.message : 'The image failed to upload.');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
Reference in new issue
Block a user