Compare commits
58
Commits
patch-release
...
invites
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1db0e9a09f | ||
|
|
63ba6ecf47 | ||
|
|
4e6267d5a9 | ||
|
|
dc0b06ce55 | ||
|
|
82d15f0c7f | ||
|
|
9f32363a09 | ||
|
|
467272d5c8 | ||
|
|
3594b70113 | ||
|
|
5f008b3ac9 | ||
|
|
3f21c4e08c | ||
|
|
3717a8072b | ||
|
|
46bfbd242a | ||
|
|
0361b10575 | ||
|
|
b9dec86cae | ||
|
|
2465b5514f | ||
|
|
df3a9587c0 | ||
|
|
5df8b8c4aa | ||
|
|
156e310368 | ||
|
|
683b1f4805 | ||
|
|
e263ad7569 | ||
|
|
24d580ea13 | ||
|
|
bfc3b11035 | ||
|
|
6bf2f9460d | ||
|
|
504baeefaf | ||
|
|
6c55633751 | ||
|
|
3395fa7aa2 | ||
|
|
7a3def7ea1 | ||
|
|
f1aafd6e34 | ||
|
|
1ce5fad8c0 | ||
|
|
4690451bfe | ||
|
|
b149c0039a | ||
|
|
e97bf7ce79 | ||
|
|
8c79115ce0 | ||
|
|
24fa80d92a | ||
|
|
624d95ab42 | ||
|
|
8519b561b3 | ||
|
|
00dfc205a5 | ||
|
|
b6ab92a700 | ||
|
|
561aa0db9c | ||
|
|
ad9056f91a | ||
|
|
bc62580aae | ||
|
|
f5cb8e44d1 | ||
|
|
c47c7cd925 | ||
|
|
b25f913921 | ||
|
|
673d6dc0f5 | ||
|
|
91eb18ec9b | ||
|
|
4ed3809ffd | ||
|
|
3f0ed7988a | ||
|
|
b3e20e78cb | ||
|
|
331f3d58ee | ||
|
|
3b0ea191fe | ||
|
|
20a984f259 | ||
|
|
2d91c83628 | ||
|
|
d7635dc7ee | ||
|
|
13136e606d | ||
|
|
5ae5144eda | ||
|
|
3e81d4ef8d | ||
|
|
8365fa3fa0 |
No files matched your search
@@ -10,6 +10,7 @@
|
|||||||
"__": true
|
"__": true
|
||||||
},
|
},
|
||||||
"rules": {
|
"rules": {
|
||||||
|
"no-console": 2,
|
||||||
"no-multi-spaces": 0,
|
"no-multi-spaces": 0,
|
||||||
"new-cap": 0,
|
"new-cap": 0,
|
||||||
"prefer-promise-reject-errors": 0,
|
"prefer-promise-reject-errors": 0,
|
||||||
|
|||||||
+62
-1
@@ -243,5 +243,66 @@
|
|||||||
"Are you a supermodel or rockstar that received a custom reward code? Claim it here.": "Are you a supermodel or rockstar that received a custom reward code? Claim it here.",
|
"Are you a supermodel or rockstar that received a custom reward code? Claim it here.": "Are you a supermodel or rockstar that received a custom reward code? Claim it here.",
|
||||||
"Redeem": "Redeem",
|
"Redeem": "Redeem",
|
||||||
"Please confirm that you want to use LBRY without creating an account.": "Please confirm that you want to use LBRY without creating an account.",
|
"Please confirm that you want to use LBRY without creating an account.": "Please confirm that you want to use LBRY without creating an account.",
|
||||||
"You sent %amount% LBC as a tip, Mahalo!": "You sent %amount% LBC as a tip, Mahalo!"
|
"You sent %amount% LBC as a tip, Mahalo!": "You sent %amount% LBC as a tip, Mahalo!",
|
||||||
|
"%follower% follower": "%follower% follower",
|
||||||
|
"Authenticating": "Authenticating",
|
||||||
|
"Waiting for authentication": "Waiting for authentication",
|
||||||
|
"Delete file": "Delete file",
|
||||||
|
"Are you sure you want to remove this file from your device?": "Are you sure you want to remove this file from your device?",
|
||||||
|
"Following": "Following",
|
||||||
|
"Update mailing preferences": "Update mailing preferences",
|
||||||
|
"Please confirm you want to tip %amount% credits": "Please confirm you want to tip %amount% credits",
|
||||||
|
"Send Tip": "Send Tip",
|
||||||
|
"You do not have any\ndownloaded content on this device.": "You do not have any\ndownloaded content on this device.",
|
||||||
|
"%view% view": "%view% view",
|
||||||
|
"No channel name after @.": "No channel name after @.",
|
||||||
|
"Loading transactions...": "Loading transactions...",
|
||||||
|
"Pending": "Pending",
|
||||||
|
"Phone Number": "Phone Number",
|
||||||
|
"Please provide a phone number to prevent fraud.": "Please provide a phone number to prevent fraud.",
|
||||||
|
"Send verification text": "Send verification text",
|
||||||
|
"Open": "Open",
|
||||||
|
"for": "for",
|
||||||
|
"Everyone": "Everyone",
|
||||||
|
"Suggested channels": "Suggested channels",
|
||||||
|
"You might also like": "You might also like",
|
||||||
|
"Publish something new": "Publish something new",
|
||||||
|
"Filter for": "Filter for",
|
||||||
|
"Tags you follow": "Tags you follow",
|
||||||
|
"Sort content by": "Sort content by",
|
||||||
|
"Trending content": "Trending content",
|
||||||
|
"New content": "New content",
|
||||||
|
"Top content": "Top content",
|
||||||
|
"Top": "Top",
|
||||||
|
"Past week": "Past week",
|
||||||
|
"It looks like you have not\npublished any content to LBRY yet.": "It looks like you have not\npublished any content to LBRY yet.",
|
||||||
|
"Stop": "Stop",
|
||||||
|
"Unsupported Content": "Unsupported Content",
|
||||||
|
"all tags you follow": "all tags you follow",
|
||||||
|
"Send LBC": "Send LBC",
|
||||||
|
"from": "from",
|
||||||
|
"This file cannot be displayed in the LBRY app.": "This file cannot be displayed in the LBRY app.",
|
||||||
|
"Please press the Play button.": "Please press the Play button.",
|
||||||
|
"Stop download": "Stop download",
|
||||||
|
"Are you sure you want to stop downloading this file?": "Are you sure you want to stop downloading this file?",
|
||||||
|
"The download will stop momentarily. You do not need to wait to discover something else.": "The download will stop momentarily. You do not need to wait to discover something else.",
|
||||||
|
"Connection Failure": "Connection Failure",
|
||||||
|
"We could not establish a connection to the SDK. Your data connection may be preventing LBRY from connecting. Contact hello@lbry.com if you think this is a software bug.": "We could not establish a connection to the SDK. Your data connection may be preventing LBRY from connecting. Contact hello@lbry.com if you think this is a software bug.",
|
||||||
|
"%num% block behind": "%num% block behind",
|
||||||
|
"Delete files": "Delete files",
|
||||||
|
"Are you sure you want to delete the selected content?": "Are you sure you want to delete the selected content?",
|
||||||
|
"We could not find any videos on your device. Take a photo or record a video to get started.": "We could not find any videos on your device. Take a photo or record a video to get started.",
|
||||||
|
"You have already published to the specified content address. Please enter a new address.": "You have already published to the specified content address. Please enter a new address.",
|
||||||
|
"Camera": "Camera",
|
||||||
|
"Please grant access to make use of your camera": "Please grant access to make use of your camera",
|
||||||
|
"OK": "OK",
|
||||||
|
"Audio": "Audio",
|
||||||
|
"Please grant access to record audio": "Please grant access to record audio",
|
||||||
|
"Camera not authorized": "Camera not authorized",
|
||||||
|
"There's nothing at this location.": "There's nothing at this location.",
|
||||||
|
"Publish something here": "Publish something here",
|
||||||
|
"This content cannot be viewed at this time. Please try again in a bit.": "This content cannot be viewed at this time. Please try again in a bit.",
|
||||||
|
"Download file": "Download file",
|
||||||
|
"Save %title% (%size%) to your device": "Save %title% (%size%) to your device",
|
||||||
|
"Save \"%title%\" (%size%) to your device": "Save \"%title%\" (%size%) to your device"
|
||||||
}
|
}
|
||||||
Generated
+244
-53
@@ -2073,6 +2073,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@react-native-community/masked-view": {
|
||||||
|
"version": "0.1.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@react-native-community/masked-view/-/masked-view-0.1.5.tgz",
|
||||||
|
"integrity": "sha512-Lj1DzfCmW0f4HnmHtEuX8Yy2f7cnUA8r5KGGUuDDGtQt1so6QJkKeUmsnLo2zYDtsF8due6hvIL06Vdo5xxuLQ=="
|
||||||
|
},
|
||||||
"@react-navigation/core": {
|
"@react-navigation/core": {
|
||||||
"version": "3.5.1",
|
"version": "3.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/@react-navigation/core/-/core-3.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/@react-navigation/core/-/core-3.5.1.tgz",
|
||||||
@@ -2111,6 +2116,21 @@
|
|||||||
"requires": {
|
"requires": {
|
||||||
"react-is": "^16.7.0"
|
"react-is": "^16.7.0"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"react-native-safe-area-view": {
|
||||||
|
"version": "0.14.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/react-native-safe-area-view/-/react-native-safe-area-view-0.14.8.tgz",
|
||||||
|
"integrity": "sha512-MtRSIcZNstxv87Jet+UsPhEd1tpGe8cVskDXlP657x6rHpSrbrc+y13ZNXrwAgGNNhqQNX7UJT68ZIq//ZRmvw==",
|
||||||
|
"requires": {
|
||||||
|
"hoist-non-react-statics": "^2.3.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"hoist-non-react-statics": {
|
||||||
|
"version": "2.5.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz",
|
||||||
|
"integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw=="
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -7047,8 +7067,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lbry-redux": {
|
"lbry-redux": {
|
||||||
"version": "github:lbryio/lbry-redux#2c569a729bb40d45249ca38150b00922162b7ce3",
|
"version": "github:lbryio/lbry-redux#c910cd2b80b165843a81fdf6ce96094429b94ec8",
|
||||||
"from": "github:lbryio/lbry-redux#2c569a729bb40d45249ca38150b00922162b7ce3",
|
"from": "github:lbryio/lbry-redux#c910cd2b80b165843a81fdf6ce96094429b94ec8",
|
||||||
"requires": {
|
"requires": {
|
||||||
"proxy-polyfill": "0.1.6",
|
"proxy-polyfill": "0.1.6",
|
||||||
"reselect": "^3.0.0",
|
"reselect": "^3.0.0",
|
||||||
@@ -7056,8 +7076,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lbryinc": {
|
"lbryinc": {
|
||||||
"version": "github:lbryio/lbryinc#053ca52f4f7f9bf8eb62a3581b183671a475ad1c",
|
"version": "github:lbryio/lbryinc#138a053754ec8e3da8e9bf153d32f527c962f25c",
|
||||||
"from": "github:lbryio/lbryinc#053ca52f4f7f9bf8eb62a3581b183671a475ad1c",
|
"from": "github:lbryio/lbryinc#138a053754ec8e3da8e9bf153d32f527c962f25c",
|
||||||
"requires": {
|
"requires": {
|
||||||
"reselect": "^3.0.0"
|
"reselect": "^3.0.0"
|
||||||
}
|
}
|
||||||
@@ -9825,9 +9845,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-native-exception-handler": {
|
"react-native-exception-handler": {
|
||||||
"version": "2.9.0",
|
"version": "2.10.8",
|
||||||
"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.10.8.tgz",
|
||||||
"integrity": "sha512-XRHhGH5aM4lSenX4zZBa07JaszJGXeF8cv1KY314Q4qJWOihKWLpkdvwqwsBieZ2iy8DPhdAVioQzw8JLD/Okw=="
|
"integrity": "sha512-ZN+jwpADRkCUNdad/50k0mZdMoICGrGdtaxgvRU+pNcWRRBAXJhuo4+jY0eQaoVpx1ghycGE6tBu9ka8gL2NOQ=="
|
||||||
},
|
},
|
||||||
"react-native-fast-image": {
|
"react-native-fast-image": {
|
||||||
"version": "7.0.2",
|
"version": "7.0.2",
|
||||||
@@ -9885,18 +9905,20 @@
|
|||||||
"prop-types": "^15.5.10"
|
"prop-types": "^15.5.10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"react-native-progress-circle": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/react-native-progress-circle/-/react-native-progress-circle-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-VP0s92bgbTMQy4hQzPU4LlGyFj3z5u7i1HYFG8/yzXXfGkX1cxKS4xOlE+OTaObWC99w7Bodi3h8R7En2nQPYw=="
|
||||||
|
},
|
||||||
"react-native-reanimated": {
|
"react-native-reanimated": {
|
||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/react-native-reanimated/-/react-native-reanimated-1.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/react-native-reanimated/-/react-native-reanimated-1.4.0.tgz",
|
||||||
"integrity": "sha512-tO7nSNNP+iRLVbkcSS5GXyDBb7tSI02+XuRL3/S39EAr35rnvUy2JfeLUQG+fWSObJjnMVhasUDEUwlENk8IXw=="
|
"integrity": "sha512-tO7nSNNP+iRLVbkcSS5GXyDBb7tSI02+XuRL3/S39EAr35rnvUy2JfeLUQG+fWSObJjnMVhasUDEUwlENk8IXw=="
|
||||||
},
|
},
|
||||||
"react-native-safe-area-view": {
|
"react-native-safe-area-context": {
|
||||||
"version": "0.14.8",
|
"version": "0.6.2",
|
||||||
"resolved": "https://registry.npmjs.org/react-native-safe-area-view/-/react-native-safe-area-view-0.14.8.tgz",
|
"resolved": "https://registry.npmjs.org/react-native-safe-area-context/-/react-native-safe-area-context-0.6.2.tgz",
|
||||||
"integrity": "sha512-MtRSIcZNstxv87Jet+UsPhEd1tpGe8cVskDXlP657x6rHpSrbrc+y13ZNXrwAgGNNhqQNX7UJT68ZIq//ZRmvw==",
|
"integrity": "sha512-VtBW0JymVCwVt0TGxTv25Co3wtOv3Yb/K5pAUYkjKXNhWFDz5ZwUG/Yho/p0EkWYlFdroJcSqlvVFl2n3AU7SA=="
|
||||||
"requires": {
|
|
||||||
"hoist-non-react-statics": "^2.3.1"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"react-native-screens": {
|
"react-native-screens": {
|
||||||
"version": "1.0.0-alpha.23",
|
"version": "1.0.0-alpha.23",
|
||||||
@@ -9928,12 +9950,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-native-tab-view": {
|
"react-native-tab-view": {
|
||||||
"version": "1.4.1",
|
"version": "2.11.0",
|
||||||
"resolved": "https://registry.npmjs.org/react-native-tab-view/-/react-native-tab-view-1.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/react-native-tab-view/-/react-native-tab-view-2.11.0.tgz",
|
||||||
"integrity": "sha512-Bke8KkDcDhvB/z0AS7MnQKMD2p6Kwfc1rSKlMOvg9CC5CnClQ2QEnhPSbwegKDYhUkBI92iH/BYy7hNSm5kbUQ==",
|
"integrity": "sha512-vqetlxGO7A8bnqvXcB50MWpRZAImXFrDGz1WCQKdCqe03Ey3ZzENe7yLuWrtBJYlepGfOLAsmCXv+wW82Yfm1w=="
|
||||||
"requires": {
|
|
||||||
"prop-types": "^15.6.1"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"react-native-vector-icons": {
|
"react-native-vector-icons": {
|
||||||
"version": "6.6.0",
|
"version": "6.6.0",
|
||||||
@@ -10096,36 +10115,31 @@
|
|||||||
"shaka-player": "^2.4.4"
|
"shaka-player": "^2.4.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-navigation": {
|
"react-native-webview": {
|
||||||
"version": "3.13.0",
|
"version": "8.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/react-navigation/-/react-navigation-3.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/react-native-webview/-/react-native-webview-8.0.2.tgz",
|
||||||
"integrity": "sha512-r64bTImY2aNye8wtd39ubouVB6ZMJqjVQYKxH4LFmOav4FsI59fQTDN7sZzyJa29owowYw/wVkh+NWGT+tdD1A==",
|
"integrity": "sha512-Higfj0CCPM9N76S3rQsKHKS8Rw5QA7h7UENrREmMarEN/2saZJ+ko0aIVYOlEJ4P9ZhhRLNH/3mWvzmT4spncw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@react-navigation/core": "~3.5.1",
|
"escape-string-regexp": "2.0.0",
|
||||||
"@react-navigation/native": "~3.6.2",
|
"invariant": "2.2.4"
|
||||||
"react-navigation-drawer": "~1.4.0",
|
|
||||||
"react-navigation-stack": "1.5.3",
|
|
||||||
"react-navigation-tabs": "~1.2.0"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"react-navigation-drawer": {
|
"escape-string-regexp": {
|
||||||
"version": "1.4.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/react-navigation-drawer/-/react-navigation-drawer-1.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
|
||||||
"integrity": "sha512-ZyWBozcjB2aZ7vwCALv90cYA2NpDjM+WALaiYRshvPvue8l7cqynePbHK8GhlMGyJDwZqp4MxQmu8u1XAKp3Bw==",
|
"integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w=="
|
||||||
"requires": {
|
|
||||||
"react-native-tab-view": "^1.2.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"react-navigation-stack": {
|
|
||||||
"version": "1.5.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/react-navigation-stack/-/react-navigation-stack-1.5.3.tgz",
|
|
||||||
"integrity": "sha512-MQcwDVbZUYsTtDJb5cFOSm+K+e7KpUCoROaGoUOR+JHWE3uuaJ3pd/Nu+32a57J98TNBf4qq0+2TPJWl6z6IBg==",
|
|
||||||
"requires": {
|
|
||||||
"prop-types": "^15.7.2"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"react-navigation": {
|
||||||
|
"version": "4.0.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/react-navigation/-/react-navigation-4.0.10.tgz",
|
||||||
|
"integrity": "sha512-7PqvmsdQ7HIyxPUMYbd9Uq//VoMdniEOLAOSvIhb/ExtbAt/1INSjUF+RiMWOMCWLTCNvNPRvTz7xy7qwWureg==",
|
||||||
|
"requires": {
|
||||||
|
"@react-navigation/core": "^3.5.1",
|
||||||
|
"@react-navigation/native": "^3.6.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"react-navigation-drawer": {
|
"react-navigation-drawer": {
|
||||||
"version": "2.3.3",
|
"version": "2.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/react-navigation-drawer/-/react-navigation-drawer-2.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/react-navigation-drawer/-/react-navigation-drawer-2.3.3.tgz",
|
||||||
@@ -10140,21 +10154,47 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-navigation-stack": {
|
"react-navigation-stack": {
|
||||||
"version": "1.8.1",
|
"version": "1.10.3",
|
||||||
"resolved": "https://registry.npmjs.org/react-navigation-stack/-/react-navigation-stack-1.8.1.tgz",
|
"resolved": "https://registry.npmjs.org/react-navigation-stack/-/react-navigation-stack-1.10.3.tgz",
|
||||||
"integrity": "sha512-XOkHuYlQjZKnD4jTU0Ml847sKjpwsJpQ6JX4ZfOq8D0e6fPWXbpYNhvUnzHMHMm+tnbhTqkqP1Umu40Hmx748Q==",
|
"integrity": "sha512-1gksFi/g/Lg9sBhgLlD0OiEB5xnatHb4C0eNMA5tli9cTVlhq375XNPIqOiTyftibBmjdApAsZFj5srUCoOu/w==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"prop-types": "^15.7.2"
|
"prop-types": "^15.7.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-navigation-tabs": {
|
"react-navigation-tabs": {
|
||||||
"version": "1.2.0",
|
"version": "2.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/react-navigation-tabs/-/react-navigation-tabs-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/react-navigation-tabs/-/react-navigation-tabs-2.7.0.tgz",
|
||||||
"integrity": "sha512-I6vq3XX4ub9KhWQzcrggznls+2Z2C6w2ro46vokDGGvJ02CBpQRar7J0ETV29Ot5AJY67HucNUmZdH3yDFckmQ==",
|
"integrity": "sha512-fQEHjFrIBi+89loLL521HjGS0Z9tl4Y89SSamRkDl8Of6bPS1Ep++an3ctl2j7c3veqBZBrj3H1qa7qjd3apBQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"hoist-non-react-statics": "^2.5.0",
|
"hoist-non-react-statics": "^3.3.0",
|
||||||
"prop-types": "^15.6.1",
|
"react-lifecycles-compat": "^3.0.4",
|
||||||
"react-native-tab-view": "^1.4.1"
|
"react-native-safe-area-view": "^0.14.6",
|
||||||
|
"react-native-tab-view": "^2.11.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"hoist-non-react-statics": {
|
||||||
|
"version": "3.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz",
|
||||||
|
"integrity": "sha512-wbg3bpgA/ZqWrZuMOeJi8+SKMhr7X9TesL/rXMjTzh0p0JUBo3II8DHboYbuIXWRlttrUFxwcu/5kygrCw8fJw==",
|
||||||
|
"requires": {
|
||||||
|
"react-is": "^16.7.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"react-native-safe-area-view": {
|
||||||
|
"version": "0.14.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/react-native-safe-area-view/-/react-native-safe-area-view-0.14.8.tgz",
|
||||||
|
"integrity": "sha512-MtRSIcZNstxv87Jet+UsPhEd1tpGe8cVskDXlP657x6rHpSrbrc+y13ZNXrwAgGNNhqQNX7UJT68ZIq//ZRmvw==",
|
||||||
|
"requires": {
|
||||||
|
"hoist-non-react-statics": "^2.3.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"hoist-non-react-statics": {
|
||||||
|
"version": "2.5.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz",
|
||||||
|
"integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-redux": {
|
"react-redux": {
|
||||||
@@ -10852,6 +10892,157 @@
|
|||||||
"resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz",
|
||||||
"integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww=="
|
"integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww=="
|
||||||
},
|
},
|
||||||
|
"showdown": {
|
||||||
|
"version": "1.9.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/showdown/-/showdown-1.9.1.tgz",
|
||||||
|
"integrity": "sha512-9cGuS382HcvExtf5AHk7Cb4pAeQQ+h0eTr33V1mu+crYWV4KvWAw6el92bDrqGEk5d46Ai/fhbEUwqJ/mTCNEA==",
|
||||||
|
"requires": {
|
||||||
|
"yargs": "^14.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"ansi-regex": {
|
||||||
|
"version": "4.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
|
||||||
|
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg=="
|
||||||
|
},
|
||||||
|
"ansi-styles": {
|
||||||
|
"version": "3.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
|
||||||
|
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
|
||||||
|
"requires": {
|
||||||
|
"color-convert": "^1.9.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"camelcase": {
|
||||||
|
"version": "5.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
|
||||||
|
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg=="
|
||||||
|
},
|
||||||
|
"cliui": {
|
||||||
|
"version": "5.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
|
||||||
|
"integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
|
||||||
|
"requires": {
|
||||||
|
"string-width": "^3.1.0",
|
||||||
|
"strip-ansi": "^5.2.0",
|
||||||
|
"wrap-ansi": "^5.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"find-up": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
|
||||||
|
"requires": {
|
||||||
|
"locate-path": "^3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"get-caller-file": {
|
||||||
|
"version": "2.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
|
||||||
|
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
|
||||||
|
},
|
||||||
|
"is-fullwidth-code-point": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
|
||||||
|
},
|
||||||
|
"locate-path": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
|
||||||
|
"requires": {
|
||||||
|
"p-locate": "^3.0.0",
|
||||||
|
"path-exists": "^3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"p-limit": {
|
||||||
|
"version": "2.2.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz",
|
||||||
|
"integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==",
|
||||||
|
"requires": {
|
||||||
|
"p-try": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"p-locate": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
|
||||||
|
"requires": {
|
||||||
|
"p-limit": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"p-try": {
|
||||||
|
"version": "2.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
|
||||||
|
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="
|
||||||
|
},
|
||||||
|
"require-main-filename": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg=="
|
||||||
|
},
|
||||||
|
"string-width": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
|
||||||
|
"requires": {
|
||||||
|
"emoji-regex": "^7.0.1",
|
||||||
|
"is-fullwidth-code-point": "^2.0.0",
|
||||||
|
"strip-ansi": "^5.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"strip-ansi": {
|
||||||
|
"version": "5.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
|
||||||
|
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
|
||||||
|
"requires": {
|
||||||
|
"ansi-regex": "^4.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"wrap-ansi": {
|
||||||
|
"version": "5.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
|
||||||
|
"integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
|
||||||
|
"requires": {
|
||||||
|
"ansi-styles": "^3.2.0",
|
||||||
|
"string-width": "^3.0.0",
|
||||||
|
"strip-ansi": "^5.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"y18n": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w=="
|
||||||
|
},
|
||||||
|
"yargs": {
|
||||||
|
"version": "14.2.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.2.tgz",
|
||||||
|
"integrity": "sha512-/4ld+4VV5RnrynMhPZJ/ZpOCGSCeghMykZ3BhdFBDa9Wy/RH6uEGNWDJog+aUlq+9OM1CFTgtYRW5Is1Po9NOA==",
|
||||||
|
"requires": {
|
||||||
|
"cliui": "^5.0.0",
|
||||||
|
"decamelize": "^1.2.0",
|
||||||
|
"find-up": "^3.0.0",
|
||||||
|
"get-caller-file": "^2.0.1",
|
||||||
|
"require-directory": "^2.1.1",
|
||||||
|
"require-main-filename": "^2.0.0",
|
||||||
|
"set-blocking": "^2.0.0",
|
||||||
|
"string-width": "^3.0.0",
|
||||||
|
"which-module": "^2.0.0",
|
||||||
|
"y18n": "^4.0.0",
|
||||||
|
"yargs-parser": "^15.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"yargs-parser": {
|
||||||
|
"version": "15.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.0.tgz",
|
||||||
|
"integrity": "sha512-xLTUnCMc4JhxrPEPUYD5IBR1mWCK/aT6+RJ/K29JY2y1vD+FhtgKK0AXRWvI262q3QSffAQuTouFIKUuHX89wQ==",
|
||||||
|
"requires": {
|
||||||
|
"camelcase": "^5.0.0",
|
||||||
|
"decamelize": "^1.2.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"signal-exit": {
|
"signal-exit": {
|
||||||
"version": "3.0.2",
|
"version": "3.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
|
||||||
|
|||||||
+12
-6
@@ -12,32 +12,37 @@
|
|||||||
"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#2c569a729bb40d45249ca38150b00922162b7ce3",
|
"lbry-redux": "lbryio/lbry-redux#c910cd2b80b165843a81fdf6ce96094429b94ec8",
|
||||||
"lbryinc": "lbryio/lbryinc#053ca52f4f7f9bf8eb62a3581b183671a475ad1c",
|
"lbryinc": "lbryio/lbryinc#138a053754ec8e3da8e9bf153d32f527c962f25c",
|
||||||
"lodash": ">=4.17.11",
|
"lodash": ">=4.17.11",
|
||||||
"merge": ">=1.2.1",
|
"merge": ">=1.2.1",
|
||||||
"moment": "^2.22.1",
|
"moment": "^2.22.1",
|
||||||
"react": "16.9.0",
|
"react": "16.9.0",
|
||||||
"react-native": "0.61.5",
|
"react-native": "0.61.5",
|
||||||
"@react-native-community/async-storage": "^1.5.1",
|
"@react-native-community/async-storage": "^1.5.1",
|
||||||
|
"@react-native-community/masked-view": "^0.1.5",
|
||||||
"react-native-camera": "^3.15.0",
|
"react-native-camera": "^3.15.0",
|
||||||
"react-native-country-picker-modal": "^1.10.0",
|
"react-native-country-picker-modal": "^1.10.0",
|
||||||
"react-native-exception-handler": "2.9.0",
|
"react-native-exception-handler": "2.10.8",
|
||||||
"react-native-fast-image": "^7.0.2",
|
"react-native-fast-image": "^7.0.2",
|
||||||
"react-native-fs": "^2.13.3",
|
"react-native-fs": "^2.13.3",
|
||||||
"react-native-gesture-handler": "1.5.2",
|
"react-native-gesture-handler": "1.5.2",
|
||||||
"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",
|
||||||
|
"react-native-progress-circle": "2.1.0",
|
||||||
"react-native-reanimated": "1.4.0",
|
"react-native-reanimated": "1.4.0",
|
||||||
|
"react-native-safe-area-context": "^0.6.2",
|
||||||
"react-native-snackbar": "2.0.4",
|
"react-native-snackbar": "2.0.4",
|
||||||
"react-native-super-grid": "^3.0.4",
|
"react-native-super-grid": "^3.0.4",
|
||||||
"react-native-vector-icons": "^6.6.0",
|
"react-native-vector-icons": "^6.6.0",
|
||||||
"react-native-video": "lbryio/react-native-video#7992ff945872f9bd00a3736d9ff1318f343abf47",
|
"react-native-video": "lbryio/react-native-video#7992ff945872f9bd00a3736d9ff1318f343abf47",
|
||||||
"react-navigation": "^3.13.0",
|
"react-native-webview": "^8.0.2",
|
||||||
|
"react-navigation": "^4.0.10",
|
||||||
"react-navigation-drawer": "^2.3.3",
|
"react-navigation-drawer": "^2.3.3",
|
||||||
"react-navigation-redux-helpers": "^3.0.2",
|
"react-navigation-redux-helpers": "^3.0.2",
|
||||||
"react-navigation-stack": "^1.8.1",
|
"react-navigation-tabs": "^2.7.0",
|
||||||
|
"react-navigation-stack": "^1.10.3",
|
||||||
"react-redux": "^5.0.3",
|
"react-redux": "^5.0.3",
|
||||||
"redux": "^4.0.4",
|
"redux": "^4.0.4",
|
||||||
"redux-persist": "^6.0.0",
|
"redux-persist": "^6.0.0",
|
||||||
@@ -46,7 +51,8 @@
|
|||||||
"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.12.0",
|
"rn-fetch-blob": "0.12.0",
|
||||||
"seedrandom": "3.0.3"
|
"seedrandom": "3.0.3",
|
||||||
|
"showdown": "1.9.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.6.2",
|
"@babel/core": "^7.6.2",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import DownloadsPage from 'page/downloads';
|
|||||||
import DrawerContent from 'component/drawerContent';
|
import DrawerContent from 'component/drawerContent';
|
||||||
import FilePage from 'page/file';
|
import FilePage from 'page/file';
|
||||||
import FirstRunScreen from 'page/firstRun';
|
import FirstRunScreen from 'page/firstRun';
|
||||||
|
import InvitesPage from 'page/invites';
|
||||||
import PublishPage from 'page/publish';
|
import PublishPage from 'page/publish';
|
||||||
import PublishesPage from 'page/publishes';
|
import PublishesPage from 'page/publishes';
|
||||||
import RewardsPage from 'page/rewards';
|
import RewardsPage from 'page/rewards';
|
||||||
@@ -38,7 +39,15 @@ import {
|
|||||||
ToastAndroid,
|
ToastAndroid,
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import { selectDrawerStack } from 'redux/selectors/drawer';
|
import { selectDrawerStack } from 'redux/selectors/drawer';
|
||||||
import { SETTINGS, doDismissToast, doPopulateSharedUserState, doPreferenceGet, doToast, selectToast } from 'lbry-redux';
|
import {
|
||||||
|
ACTIONS,
|
||||||
|
SETTINGS,
|
||||||
|
doDismissToast,
|
||||||
|
doPopulateSharedUserState,
|
||||||
|
doPreferenceGet,
|
||||||
|
doToast,
|
||||||
|
selectToast,
|
||||||
|
} from 'lbry-redux';
|
||||||
import {
|
import {
|
||||||
Lbryio,
|
Lbryio,
|
||||||
doGetSync,
|
doGetSync,
|
||||||
@@ -108,7 +117,7 @@ const discoverStack = createStackNavigator(
|
|||||||
{
|
{
|
||||||
headerMode: 'screen',
|
headerMode: 'screen',
|
||||||
transitionConfig: () => ({ screenInterpolator: () => null }),
|
transitionConfig: () => ({ screenInterpolator: () => null }),
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
discoverStack.navigationOptions = ({ navigation }) => {
|
discoverStack.navigationOptions = ({ navigation }) => {
|
||||||
@@ -142,7 +151,7 @@ const walletStack = createStackNavigator(
|
|||||||
{
|
{
|
||||||
headerMode: 'screen',
|
headerMode: 'screen',
|
||||||
transitionConfig: () => ({ screenInterpolator: () => null }),
|
transitionConfig: () => ({ screenInterpolator: () => null }),
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const drawerIconSize = 18;
|
const drawerIconSize = 18;
|
||||||
@@ -202,6 +211,12 @@ const drawer = createDrawerNavigator(
|
|||||||
drawerIcon: ({ tintColor }) => <Icon name="award" size={drawerIconSize} style={{ color: tintColor }} />,
|
drawerIcon: ({ tintColor }) => <Icon name="award" size={drawerIconSize} style={{ color: tintColor }} />,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Invites: {
|
||||||
|
screen: InvitesPage,
|
||||||
|
navigationOptions: {
|
||||||
|
drawerIcon: ({ tintColor }) => <Icon name="user-friends" size={drawerIconSize} style={{ color: tintColor }} />,
|
||||||
|
},
|
||||||
|
},
|
||||||
Downloads: {
|
Downloads: {
|
||||||
screen: DownloadsPage,
|
screen: DownloadsPage,
|
||||||
navigationOptions: {
|
navigationOptions: {
|
||||||
@@ -225,17 +240,18 @@ const drawer = createDrawerNavigator(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
drawerWidth: 300,
|
drawerWidth: 299,
|
||||||
drawerBackgroundColor: 'transparent',
|
drawerBackgroundColor: 'transparent',
|
||||||
headerMode: 'none',
|
headerMode: 'none',
|
||||||
backBehavior: 'none',
|
backBehavior: 'none',
|
||||||
unmountInactiveRoutes: true,
|
unmountInactiveRoutes: true,
|
||||||
contentComponent: DrawerContent,
|
contentComponent: DrawerContent,
|
||||||
|
overlayColor: 'rgba(0, 0, 0, 0.7)',
|
||||||
contentOptions: {
|
contentOptions: {
|
||||||
activeTintColor: Colors.LbryGreen,
|
activeTintColor: Colors.LbryGreen,
|
||||||
labelStyle: discoverStyle.menuText,
|
labelStyle: discoverStyle.menuText,
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const mainStackNavigator = new createStackNavigator(
|
const mainStackNavigator = new createStackNavigator(
|
||||||
@@ -264,7 +280,7 @@ const mainStackNavigator = new createStackNavigator(
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
headerMode: 'none',
|
headerMode: 'none',
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
export const AppNavigator = mainStackNavigator;
|
export const AppNavigator = mainStackNavigator;
|
||||||
@@ -303,7 +319,7 @@ class AppWithNavigationState extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}.bind(this)
|
}.bind(this),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -312,6 +328,7 @@ class AppWithNavigationState extends React.Component {
|
|||||||
this.emailVerifyCheckInterval = setInterval(() => this.checkEmailVerification(), 5000);
|
this.emailVerifyCheckInterval = setInterval(() => this.checkEmailVerification(), 5000);
|
||||||
Linking.addEventListener('url', this._handleUrl);
|
Linking.addEventListener('url', this._handleUrl);
|
||||||
|
|
||||||
|
DeviceEventEmitter.addListener('onDownloadAborted', this.handleDownloadAborted);
|
||||||
DeviceEventEmitter.addListener('onDownloadStarted', this.handleDownloadStarted);
|
DeviceEventEmitter.addListener('onDownloadStarted', this.handleDownloadStarted);
|
||||||
DeviceEventEmitter.addListener('onDownloadUpdated', this.handleDownloadUpdated);
|
DeviceEventEmitter.addListener('onDownloadUpdated', this.handleDownloadUpdated);
|
||||||
DeviceEventEmitter.addListener('onDownloadCompleted', this.handleDownloadCompleted);
|
DeviceEventEmitter.addListener('onDownloadCompleted', this.handleDownloadCompleted);
|
||||||
@@ -346,7 +363,7 @@ class AppWithNavigationState extends React.Component {
|
|||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
/* failed */
|
/* failed */
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -368,7 +385,24 @@ class AppWithNavigationState extends React.Component {
|
|||||||
dispatch(doCompleteDownload(uri, outpoint, fileInfo));
|
dispatch(doCompleteDownload(uri, outpoint, fileInfo));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
handleDownloadAborted = evt => {
|
||||||
|
const { dispatch } = this.props;
|
||||||
|
const { uri, outpoint } = evt;
|
||||||
|
dispatch({
|
||||||
|
type: ACTIONS.DOWNLOADING_CANCELED,
|
||||||
|
data: { uri, outpoint },
|
||||||
|
});
|
||||||
|
|
||||||
|
dispatch({
|
||||||
|
type: ACTIONS.FILE_DELETE,
|
||||||
|
data: {
|
||||||
|
outpoint,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
|
DeviceEventEmitter.removeListener('onDownloadAborted', this.handleDownloadAborted);
|
||||||
DeviceEventEmitter.removeListener('onDownloadStarted', this.handleDownloadStarted);
|
DeviceEventEmitter.removeListener('onDownloadStarted', this.handleDownloadStarted);
|
||||||
DeviceEventEmitter.removeListener('onDownloadUpdated', this.handleDownloadUpdated);
|
DeviceEventEmitter.removeListener('onDownloadUpdated', this.handleDownloadUpdated);
|
||||||
DeviceEventEmitter.removeListener('onDownloadCompleted', this.handleDownloadCompleted);
|
DeviceEventEmitter.removeListener('onDownloadCompleted', this.handleDownloadCompleted);
|
||||||
@@ -503,7 +537,7 @@ class AppWithNavigationState extends React.Component {
|
|||||||
try {
|
try {
|
||||||
verification = JSON.parse(atob(evt.url.substring(15)));
|
verification = JSON.parse(atob(evt.url.substring(15)));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
// console.log(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (verification.token && verification.recaptcha) {
|
if (verification.token && verification.recaptcha) {
|
||||||
@@ -519,7 +553,7 @@ class AppWithNavigationState extends React.Component {
|
|||||||
dispatch(
|
dispatch(
|
||||||
doToast({
|
doToast({
|
||||||
message: 'Invalid Verification URI',
|
message: 'Invalid Verification URI',
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export default class ChannelIconItem extends React.PureComponent {
|
|||||||
<TouchableOpacity style={channelIconStyle.container} onPress={onPress}>
|
<TouchableOpacity style={channelIconStyle.container} onPress={onPress}>
|
||||||
{isResolvingUri && (
|
{isResolvingUri && (
|
||||||
<View style={channelIconStyle.centered}>
|
<View style={channelIconStyle.centered}>
|
||||||
<ActivityIndicator size={'small'} color={Colors.LbryGreen} />
|
<ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
<View
|
<View
|
||||||
|
|||||||
@@ -36,10 +36,14 @@ export default class ChannelSelector extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
componentWillReceiveProps(nextProps) {
|
||||||
const { channels: prevChannels = [], channelName } = this.props;
|
const { channels: prevChannels = [], channelName: prevChannelName } = this.props;
|
||||||
const { channels = [] } = nextProps;
|
const { channels = [], channelName } = nextProps;
|
||||||
|
|
||||||
if (channels && channels.length !== prevChannels.length && channelName !== this.state.currentSelectedValue) {
|
if (channels && channels.length !== prevChannels.length && channelName !== this.state.currentSelectedValue) {
|
||||||
|
this.setState({ currentSelectedValue: prevChannelName });
|
||||||
|
}
|
||||||
|
|
||||||
|
if (channelName !== prevChannelName) {
|
||||||
this.setState({ currentSelectedValue: channelName });
|
this.setState({ currentSelectedValue: channelName });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -189,10 +193,11 @@ export default class ChannelSelector extends React.PureComponent {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const channel = this.state.addingChannel ? 'new' : this.props.channel;
|
const channel = this.state.addingChannel ? 'new' : this.props.channel;
|
||||||
const { balance, enabled, fetchingChannels, channels = [] } = this.props;
|
const { balance, enabled, fetchingChannels, channels = [], showAnonymous } = this.props;
|
||||||
const pickerItems = [Constants.ITEM_ANONYMOUS, Constants.ITEM_CREATE_A_CHANNEL].concat(
|
const pickerItems = (showAnonymous
|
||||||
channels ? channels.map(ch => ch.name) : []
|
? [Constants.ITEM_ANONYMOUS, Constants.ITEM_CREATE_A_CHANNEL]
|
||||||
);
|
: [Constants.ITEM_CREATE_A_CHANNEL]
|
||||||
|
).concat(channels ? channels.map(ch => ch.name) : []);
|
||||||
|
|
||||||
const {
|
const {
|
||||||
newChannelName,
|
newChannelName,
|
||||||
@@ -264,7 +269,7 @@ export default class ChannelSelector extends React.PureComponent {
|
|||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
<View style={channelSelectorStyle.buttonContainer}>
|
<View style={channelSelectorStyle.buttonContainer}>
|
||||||
{creatingChannel && <ActivityIndicator size={'small'} color={Colors.LbryGreen} />}
|
{creatingChannel && <ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />}
|
||||||
{!creatingChannel && (
|
{!creatingChannel && (
|
||||||
<View style={channelSelectorStyle.buttons}>
|
<View style={channelSelectorStyle.buttons}>
|
||||||
<Link style={channelSelectorStyle.cancelLink} text={__('Cancel')} onPress={this.handleCreateCancel} />
|
<Link style={channelSelectorStyle.cancelLink} text={__('Cancel')} onPress={this.handleCreateCancel} />
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
import { connect } from 'react-redux';
|
||||||
|
import {
|
||||||
|
doResolveUri,
|
||||||
|
makeSelectClaimForUri,
|
||||||
|
makeSelectMetadataForUri,
|
||||||
|
makeSelectFileInfoForUri,
|
||||||
|
makeSelectIsUriResolving,
|
||||||
|
makeSelectClaimIsNsfw,
|
||||||
|
makeSelectShortUrlForUri,
|
||||||
|
makeSelectTitleForUri,
|
||||||
|
makeSelectThumbnailForUri,
|
||||||
|
} from 'lbry-redux';
|
||||||
|
import { doSetPlayerVisible } from 'redux/actions/drawer';
|
||||||
|
import { selectBlackListedOutpoints, selectFilteredOutpoints, selectRewardContentClaimIds } from 'lbryinc';
|
||||||
|
import { selectShowNsfw } from 'redux/selectors/settings';
|
||||||
|
import ClaimResultItem from './view';
|
||||||
|
|
||||||
|
const select = (state, props) => ({
|
||||||
|
blackListedOutpoints: selectBlackListedOutpoints(state),
|
||||||
|
claim: makeSelectClaimForUri(props.uri)(state),
|
||||||
|
fileInfo: makeSelectFileInfoForUri(props.uri)(state),
|
||||||
|
filteredOutpoints: selectFilteredOutpoints(state),
|
||||||
|
isDownloaded: !!makeSelectFileInfoForUri(props.uri)(state),
|
||||||
|
metadata: makeSelectMetadataForUri(props.uri)(state),
|
||||||
|
nsfw: makeSelectClaimIsNsfw(props.uri)(state),
|
||||||
|
isResolvingUri: makeSelectIsUriResolving(props.uri)(state),
|
||||||
|
obscureNsfw: !selectShowNsfw(state),
|
||||||
|
rewardedContentClaimIds: selectRewardContentClaimIds(state),
|
||||||
|
shortUrl: makeSelectShortUrlForUri(props.uri)(state),
|
||||||
|
title: makeSelectTitleForUri(props.uri)(state),
|
||||||
|
thumbnail: makeSelectThumbnailForUri(props.uri)(state),
|
||||||
|
});
|
||||||
|
|
||||||
|
const perform = dispatch => ({
|
||||||
|
resolveUri: uri => dispatch(doResolveUri(uri)),
|
||||||
|
setPlayerVisible: (visible, uri) => dispatch(doSetPlayerVisible(visible, uri)),
|
||||||
|
});
|
||||||
|
|
||||||
|
export default connect(
|
||||||
|
select,
|
||||||
|
perform,
|
||||||
|
)(ClaimResultItem);
|
||||||
@@ -0,0 +1,176 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { normalizeURI, parseURI } from 'lbry-redux';
|
||||||
|
import { ActivityIndicator, Platform, Text, TouchableOpacity, View } from 'react-native';
|
||||||
|
import { navigateToUri, getDownloadProgress, getStorageForFileInfo } from 'utils/helper';
|
||||||
|
import Colors from 'styles/colors';
|
||||||
|
import ChannelIconItem from 'component/channelIconItem';
|
||||||
|
import channelIconStyle from 'styles/channelIcon';
|
||||||
|
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||||
|
import DateTime from 'component/dateTime';
|
||||||
|
import FastImage from 'react-native-fast-image';
|
||||||
|
import FileItemMedia from 'component/fileItemMedia';
|
||||||
|
import FilePrice from 'component/filePrice';
|
||||||
|
import Icon from 'react-native-vector-icons/FontAwesome5';
|
||||||
|
import Link from 'component/link';
|
||||||
|
import NsfwOverlay from 'component/nsfwOverlay';
|
||||||
|
import ProgressBar from 'component/progressBar';
|
||||||
|
import fileListStyle from 'styles/fileList';
|
||||||
|
import seedrandom from 'seedrandom';
|
||||||
|
|
||||||
|
class ClaimResultItem extends React.PureComponent {
|
||||||
|
state = {
|
||||||
|
autoStyle: null,
|
||||||
|
};
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
const { result } = this.props;
|
||||||
|
|
||||||
|
if (!result || !result.name || !result.claimId) {
|
||||||
|
this.setState({
|
||||||
|
autoStyle:
|
||||||
|
ChannelIconItem.AUTO_THUMB_STYLES[Math.floor(Math.random() * ChannelIconItem.AUTO_THUMB_STYLES.length)],
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// result property set, use deterministic random style
|
||||||
|
const rng = seedrandom(normalizeURI(`${result.name}#${result.claimId}`));
|
||||||
|
const index = Math.floor(rng.quick() * ChannelIconItem.AUTO_THUMB_STYLES.length);
|
||||||
|
this.setState({ autoStyle: ChannelIconItem.AUTO_THUMB_STYLES[index] });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onPressHandler = () => {
|
||||||
|
const { autoplay, navigation, result, setPlayerVisible } = this.props;
|
||||||
|
const { claimId, name } = result;
|
||||||
|
const url = normalizeURI(`${name}#${claimId}`);
|
||||||
|
navigateToUri(navigation, url, { autoplay }, false, url, setPlayerVisible);
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { fileInfo, navigation, obscureNsfw, result, rewardedContentClaimIds, setPlayerVisible, style } = this.props;
|
||||||
|
const {
|
||||||
|
channel,
|
||||||
|
channel_claim_id: channelClaimId,
|
||||||
|
claimId,
|
||||||
|
duration,
|
||||||
|
fee,
|
||||||
|
name,
|
||||||
|
nsfw,
|
||||||
|
release_time: releaseTime,
|
||||||
|
thumbnail_url: thumbnailUrl,
|
||||||
|
title,
|
||||||
|
} = result;
|
||||||
|
|
||||||
|
const isChannel = name && name.startsWith('@');
|
||||||
|
const hasThumbnail = !!thumbnailUrl;
|
||||||
|
const obscure = obscureNsfw && nsfw;
|
||||||
|
const url = normalizeURI(`${name}#${claimId}`);
|
||||||
|
const hasChannel = !!channel;
|
||||||
|
const channelUrl = hasChannel ? normalizeURI(`${channel}#${channelClaimId}`) : null;
|
||||||
|
const isRewardContent = rewardedContentClaimIds.includes(claimId);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<View style={style}>
|
||||||
|
<TouchableOpacity
|
||||||
|
style={[style, isChannel ? fileListStyle.channelContainer : null]}
|
||||||
|
onPress={this.onPressHandler}
|
||||||
|
>
|
||||||
|
{!isChannel && (
|
||||||
|
<FileItemMedia
|
||||||
|
style={fileListStyle.thumbnail}
|
||||||
|
duration={duration}
|
||||||
|
resizeMode="cover"
|
||||||
|
title={title || name || normalizeURI(url).substring(7)}
|
||||||
|
thumbnail={thumbnailUrl}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{isChannel && (
|
||||||
|
<View style={fileListStyle.channelThumbnailView}>
|
||||||
|
<View style={[fileListStyle.channelThumbnailContainer, this.state.autoStyle]}>
|
||||||
|
{hasThumbnail && (
|
||||||
|
<FastImage
|
||||||
|
style={fileListStyle.channelThumbnail}
|
||||||
|
resizeMode={FastImage.resizeMode.cover}
|
||||||
|
source={{ uri: thumbnailUrl }}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{!hasThumbnail && (
|
||||||
|
<Text style={channelIconStyle.autothumbCharacter}>
|
||||||
|
{title ? title.substring(0, 1).toUpperCase() : name.substring(1, 2).toUpperCase()}
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{fileInfo && fileInfo.completed && fileInfo.download_path && (
|
||||||
|
<Icon style={fileListStyle.downloadedIcon} solid color={Colors.NextLbryGreen} name={'folder'} size={16} />
|
||||||
|
)}
|
||||||
|
<FilePrice
|
||||||
|
cost={fee ? parseFloat(fee) / 100000000 : 0}
|
||||||
|
uri={url}
|
||||||
|
style={fileListStyle.filePriceContainer}
|
||||||
|
iconStyle={fileListStyle.filePriceIcon}
|
||||||
|
textStyle={fileListStyle.filePriceText}
|
||||||
|
/>
|
||||||
|
<View style={fileListStyle.detailsContainer}>
|
||||||
|
{(title || name) && (
|
||||||
|
<View style={fileListStyle.titleContainer}>
|
||||||
|
<Text style={fileListStyle.title} numberOfLines={3}>
|
||||||
|
{title || name}
|
||||||
|
</Text>
|
||||||
|
{isRewardContent && <Icon style={fileListStyle.rewardIcon} name="award" size={12} />}
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{(hasChannel || isChannel) && (
|
||||||
|
<Link
|
||||||
|
style={fileListStyle.publisher}
|
||||||
|
text={isChannel ? name : channel}
|
||||||
|
onPress={() => {
|
||||||
|
navigateToUri(
|
||||||
|
navigation,
|
||||||
|
normalizeURI(isChannel ? url : channelUrl),
|
||||||
|
null,
|
||||||
|
false,
|
||||||
|
isChannel ? url : channelUrl,
|
||||||
|
setPlayerVisible,
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<View style={fileListStyle.info}>
|
||||||
|
{fileInfo && !isNaN(fileInfo.written_bytes) && fileInfo.written_bytes > 0 && (
|
||||||
|
<Text style={fileListStyle.infoText}>{getStorageForFileInfo(fileInfo)}</Text>
|
||||||
|
)}
|
||||||
|
<DateTime
|
||||||
|
style={fileListStyle.publishInfo}
|
||||||
|
textStyle={fileListStyle.infoText}
|
||||||
|
timeAgo
|
||||||
|
date={releaseTime}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
{fileInfo && fileInfo.download_path && (
|
||||||
|
<View style={fileListStyle.downloadInfo}>
|
||||||
|
{!fileInfo.completed && (
|
||||||
|
<ProgressBar
|
||||||
|
borderRadius={3}
|
||||||
|
color={Colors.NextLbryGreen}
|
||||||
|
height={3}
|
||||||
|
style={fileListStyle.progress}
|
||||||
|
progress={getDownloadProgress(fileInfo)}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
|
</View>
|
||||||
|
</TouchableOpacity>
|
||||||
|
{obscure && <NsfwOverlay onPress={() => navigation.navigate({ routeName: 'Settings', key: 'settingsPage' })} />}
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ClaimResultItem;
|
||||||
@@ -22,6 +22,7 @@ const groupedMenuItems = {
|
|||||||
Wallet: [
|
Wallet: [
|
||||||
{ icon: 'wallet', label: 'Wallet', route: Constants.DRAWER_ROUTE_WALLET },
|
{ icon: 'wallet', label: 'Wallet', route: Constants.DRAWER_ROUTE_WALLET },
|
||||||
{ icon: 'award', label: 'Rewards', route: Constants.DRAWER_ROUTE_REWARDS },
|
{ icon: 'award', label: 'Rewards', route: Constants.DRAWER_ROUTE_REWARDS },
|
||||||
|
{ icon: 'user-friends', label: 'Invites', route: Constants.DRAWER_ROUTE_INVITES },
|
||||||
],
|
],
|
||||||
Settings: [
|
Settings: [
|
||||||
{ icon: 'cog', label: 'Settings', route: Constants.DRAWER_ROUTE_SETTINGS },
|
{ icon: 'cog', label: 'Settings', route: Constants.DRAWER_ROUTE_SETTINGS },
|
||||||
|
|||||||
@@ -43,7 +43,17 @@ class FileDownloadButton extends React.PureComponent {
|
|||||||
onButtonLayout,
|
onButtonLayout,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
if ((fileInfo && !fileInfo.stopped) || loading || downloading) {
|
if (fileInfo && fileInfo.download_path && fileInfo.completed) {
|
||||||
|
return (
|
||||||
|
<TouchableOpacity
|
||||||
|
onLayout={onButtonLayout}
|
||||||
|
style={[style, fileDownloadButtonStyle.container]}
|
||||||
|
onPress={openFile}
|
||||||
|
>
|
||||||
|
<Text style={fileDownloadButtonStyle.text}>{isViewable ? __('View') : __('Open')}</Text>
|
||||||
|
</TouchableOpacity>
|
||||||
|
);
|
||||||
|
} else if ((fileInfo && !fileInfo.stopped) || loading || downloading) {
|
||||||
const progress = fileInfo && fileInfo.written_bytes ? (fileInfo.written_bytes / fileInfo.total_bytes) * 100 : 0,
|
const progress = fileInfo && fileInfo.written_bytes ? (fileInfo.written_bytes / fileInfo.total_bytes) * 100 : 0,
|
||||||
label = fileInfo ? __('%progress%% complete', { progress: progress.toFixed(0) }) : __('Connecting...');
|
label = fileInfo ? __('%progress%% complete', { progress: progress.toFixed(0) }) : __('Connecting...');
|
||||||
|
|
||||||
@@ -70,16 +80,6 @@ class FileDownloadButton extends React.PureComponent {
|
|||||||
onPress={onFileActionPress}
|
onPress={onFileActionPress}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
} else if (fileInfo && fileInfo.download_path) {
|
|
||||||
return (
|
|
||||||
<TouchableOpacity
|
|
||||||
onLayout={onButtonLayout}
|
|
||||||
style={[style, fileDownloadButtonStyle.container]}
|
|
||||||
onPress={openFile}
|
|
||||||
>
|
|
||||||
<Text style={fileDownloadButtonStyle.text}>{isViewable ? __('View') : __('Open')}</Text>
|
|
||||||
</TouchableOpacity>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import {
|
|||||||
makeSelectClaimIsNsfw,
|
makeSelectClaimIsNsfw,
|
||||||
makeSelectShortUrlForUri,
|
makeSelectShortUrlForUri,
|
||||||
} from 'lbry-redux';
|
} from 'lbry-redux';
|
||||||
|
import { doSetPlayerVisible } from 'redux/actions/drawer';
|
||||||
import { selectBlackListedOutpoints, selectFilteredOutpoints, selectRewardContentClaimIds } from 'lbryinc';
|
import { selectBlackListedOutpoints, selectFilteredOutpoints, selectRewardContentClaimIds } from 'lbryinc';
|
||||||
import { selectShowNsfw } from 'redux/selectors/settings';
|
import { selectShowNsfw } from 'redux/selectors/settings';
|
||||||
import FileItem from './view';
|
import FileItem from './view';
|
||||||
@@ -31,9 +32,10 @@ const select = (state, props) => ({
|
|||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
resolveUri: uri => dispatch(doResolveUri(uri)),
|
resolveUri: uri => dispatch(doResolveUri(uri)),
|
||||||
|
setPlayerVisible: (visible, uri) => dispatch(doSetPlayerVisible(visible, uri)),
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect(
|
export default connect(
|
||||||
select,
|
select,
|
||||||
perform
|
perform,
|
||||||
)(FileItem);
|
)(FileItem);
|
||||||
@@ -56,6 +56,7 @@ class FileItem extends React.PureComponent {
|
|||||||
obscureNsfw,
|
obscureNsfw,
|
||||||
showDetails,
|
showDetails,
|
||||||
compactView,
|
compactView,
|
||||||
|
setPlayerVisible,
|
||||||
titleBeforeThumbnail,
|
titleBeforeThumbnail,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
@@ -107,7 +108,12 @@ class FileItem extends React.PureComponent {
|
|||||||
<Icon style={discoverStyle.downloadedIcon} solid color={Colors.NextLbryGreen} name={'folder'} size={16} />
|
<Icon style={discoverStyle.downloadedIcon} solid color={Colors.NextLbryGreen} name={'folder'} size={16} />
|
||||||
)}
|
)}
|
||||||
{!compactView && (!fileInfo || !fileInfo.completed || !fileInfo.download_path) && (
|
{!compactView && (!fileInfo || !fileInfo.completed || !fileInfo.download_path) && (
|
||||||
<FilePrice uri={uri} style={discoverStyle.filePriceContainer} textStyle={discoverStyle.filePriceText} />
|
<FilePrice
|
||||||
|
uri={uri}
|
||||||
|
style={discoverStyle.filePriceContainer}
|
||||||
|
iconStyle={discoverStyle.filePriceIcon}
|
||||||
|
textStyle={discoverStyle.filePriceText}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
{!compactView && (
|
{!compactView && (
|
||||||
<View style={isRewardContent ? discoverStyle.rewardTitleContainer : null}>
|
<View style={isRewardContent ? discoverStyle.rewardTitleContainer : null}>
|
||||||
@@ -129,7 +135,8 @@ class FileItem extends React.PureComponent {
|
|||||||
normalizeURI(shortChannelUri || fullChannelUri),
|
normalizeURI(shortChannelUri || fullChannelUri),
|
||||||
null,
|
null,
|
||||||
false,
|
false,
|
||||||
fullChannelUri
|
fullChannelUri,
|
||||||
|
setPlayerVisible,
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ class FileItemMedia extends React.PureComponent {
|
|||||||
let style = this.props.style;
|
let style = this.props.style;
|
||||||
const { duration, isResolvingUri, thumbnail, title, resizeMode } = this.props;
|
const { duration, isResolvingUri, thumbnail, title, resizeMode } = this.props;
|
||||||
const atStyle = this.state.autoThumbStyle;
|
const atStyle = this.state.autoThumbStyle;
|
||||||
|
const hasDuration = !!duration;
|
||||||
|
|
||||||
if (this.isThumbnailValid(thumbnail) && !this.state.imageLoadFailed) {
|
if (this.isThumbnailValid(thumbnail) && !this.state.imageLoadFailed) {
|
||||||
if (style == null) {
|
if (style == null) {
|
||||||
@@ -75,7 +76,7 @@ class FileItemMedia extends React.PureComponent {
|
|||||||
resizeMode={this.getFastImageResizeMode(resizeMode)}
|
resizeMode={this.getFastImageResizeMode(resizeMode)}
|
||||||
style={fileItemMediaStyle.image}
|
style={fileItemMediaStyle.image}
|
||||||
/>
|
/>
|
||||||
{duration && (
|
{duration > 0 && (
|
||||||
<VideoDuration
|
<VideoDuration
|
||||||
duration={duration}
|
duration={duration}
|
||||||
style={fileItemMediaStyle.duration}
|
style={fileItemMediaStyle.duration}
|
||||||
@@ -104,7 +105,7 @@ class FileItemMedia extends React.PureComponent {
|
|||||||
.toUpperCase()}
|
.toUpperCase()}
|
||||||
</Text>
|
</Text>
|
||||||
)}
|
)}
|
||||||
{duration && (
|
{duration > 0 && (
|
||||||
<VideoDuration
|
<VideoDuration
|
||||||
duration={duration}
|
duration={duration}
|
||||||
style={fileItemMediaStyle.duration}
|
style={fileItemMediaStyle.duration}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import {
|
|||||||
makeSelectTitleForUri,
|
makeSelectTitleForUri,
|
||||||
makeSelectThumbnailForUri,
|
makeSelectThumbnailForUri,
|
||||||
} from 'lbry-redux';
|
} from 'lbry-redux';
|
||||||
|
import { doSetPlayerVisible } from 'redux/actions/drawer';
|
||||||
import { selectBlackListedOutpoints, selectFilteredOutpoints, selectRewardContentClaimIds } from 'lbryinc';
|
import { selectBlackListedOutpoints, selectFilteredOutpoints, selectRewardContentClaimIds } from 'lbryinc';
|
||||||
import { selectShowNsfw } from 'redux/selectors/settings';
|
import { selectShowNsfw } from 'redux/selectors/settings';
|
||||||
import FileListItem from './view';
|
import FileListItem from './view';
|
||||||
@@ -32,6 +33,7 @@ const select = (state, props) => ({
|
|||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
resolveUri: uri => dispatch(doResolveUri(uri)),
|
resolveUri: uri => dispatch(doResolveUri(uri)),
|
||||||
|
setPlayerVisible: (visible, uri) => dispatch(doSetPlayerVisible(visible, uri)),
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect(
|
export default connect(
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { normalizeURI, parseURI } from 'lbry-redux';
|
import { normalizeURI, parseURI } from 'lbry-redux';
|
||||||
import { ActivityIndicator, Platform, Text, TouchableOpacity, View } from 'react-native';
|
import { ActivityIndicator, Platform, Text, TouchableOpacity, View } from 'react-native';
|
||||||
import { navigateToUri, formatBytes } from 'utils/helper';
|
import { navigateToUri, getDownloadProgress, getStorageForFileInfo } from 'utils/helper';
|
||||||
import Colors from 'styles/colors';
|
import Colors from 'styles/colors';
|
||||||
|
import ChannelIconItem from 'component/channelIconItem';
|
||||||
|
import channelIconStyle from 'styles/channelIcon';
|
||||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||||
import DateTime from 'component/dateTime';
|
import DateTime from 'component/dateTime';
|
||||||
|
import FastImage from 'react-native-fast-image';
|
||||||
import FileItemMedia from 'component/fileItemMedia';
|
import FileItemMedia from 'component/fileItemMedia';
|
||||||
import FilePrice from 'component/filePrice';
|
import FilePrice from 'component/filePrice';
|
||||||
import Icon from 'react-native-vector-icons/FontAwesome5';
|
import Icon from 'react-native-vector-icons/FontAwesome5';
|
||||||
@@ -15,27 +18,10 @@ import fileListStyle from 'styles/fileList';
|
|||||||
|
|
||||||
class FileListItem extends React.PureComponent {
|
class FileListItem extends React.PureComponent {
|
||||||
state = {
|
state = {
|
||||||
|
autoStyle: null,
|
||||||
url: null,
|
url: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
getStorageForFileInfo = fileInfo => {
|
|
||||||
if (!fileInfo.completed) {
|
|
||||||
const written = formatBytes(fileInfo.written_bytes);
|
|
||||||
const total = formatBytes(fileInfo.total_bytes);
|
|
||||||
return `(${written} / ${total})`;
|
|
||||||
}
|
|
||||||
|
|
||||||
return formatBytes(fileInfo.written_bytes);
|
|
||||||
};
|
|
||||||
|
|
||||||
formatTitle = title => {
|
|
||||||
if (!title) {
|
|
||||||
return title;
|
|
||||||
}
|
|
||||||
|
|
||||||
return title.length > 80 ? title.substring(0, 77).trim() + '...' : title;
|
|
||||||
};
|
|
||||||
|
|
||||||
getDownloadProgress = fileInfo => {
|
getDownloadProgress = fileInfo => {
|
||||||
return Math.ceil((fileInfo.written_bytes / fileInfo.total_bytes) * 100);
|
return Math.ceil((fileInfo.written_bytes / fileInfo.total_bytes) * 100);
|
||||||
};
|
};
|
||||||
@@ -45,6 +31,11 @@ class FileListItem extends React.PureComponent {
|
|||||||
if (!claim && !batchResolve) {
|
if (!claim && !batchResolve) {
|
||||||
resolveUri(uri);
|
resolveUri(uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.setState({
|
||||||
|
autoStyle:
|
||||||
|
ChannelIconItem.AUTO_THUMB_STYLES[Math.floor(Math.random() * ChannelIconItem.AUTO_THUMB_STYLES.length)],
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate() {
|
componentDidUpdate() {
|
||||||
@@ -89,6 +80,7 @@ class FileListItem extends React.PureComponent {
|
|||||||
onPress,
|
onPress,
|
||||||
navigation,
|
navigation,
|
||||||
rewardedContentClaimIds,
|
rewardedContentClaimIds,
|
||||||
|
setPlayerVisible,
|
||||||
thumbnail,
|
thumbnail,
|
||||||
hideChannel,
|
hideChannel,
|
||||||
onLongPress,
|
onLongPress,
|
||||||
@@ -135,10 +127,13 @@ class FileListItem extends React.PureComponent {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const isChannel = name && name.startsWith('@');
|
||||||
|
const hasThumbnail = !!thumbnail;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={style}>
|
<View style={style}>
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
style={style}
|
style={[style, isChannel ? fileListStyle.channelContainer : null]}
|
||||||
onPress={this.onPressHandler}
|
onPress={this.onPressHandler}
|
||||||
onLongPress={() => {
|
onLongPress={() => {
|
||||||
if (onLongPress) {
|
if (onLongPress) {
|
||||||
@@ -146,13 +141,35 @@ class FileListItem extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<FileItemMedia
|
{!isChannel && (
|
||||||
style={fileListStyle.thumbnail}
|
<FileItemMedia
|
||||||
duration={duration}
|
style={fileListStyle.thumbnail}
|
||||||
resizeMode="cover"
|
duration={duration}
|
||||||
title={title || name || normalizeURI(uri).substring(7)}
|
resizeMode="cover"
|
||||||
thumbnail={thumbnail}
|
title={title || name || normalizeURI(uri).substring(7)}
|
||||||
/>
|
thumbnail={thumbnail}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{isChannel && (
|
||||||
|
<View style={fileListStyle.channelThumbnailView}>
|
||||||
|
<View style={[fileListStyle.channelThumbnailContainer, this.state.autoStyle]}>
|
||||||
|
{hasThumbnail && (
|
||||||
|
<FastImage
|
||||||
|
style={fileListStyle.channelThumbnail}
|
||||||
|
resizeMode={FastImage.resizeMode.cover}
|
||||||
|
source={{ uri: thumbnail }}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{!hasThumbnail && (
|
||||||
|
<Text style={channelIconStyle.autothumbCharacter}>
|
||||||
|
{title ? title.substring(0, 1).toUpperCase() : claim.name.substring(1, 2).toUpperCase()}
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
|
|
||||||
{selected && (
|
{selected && (
|
||||||
<View style={fileListStyle.selectedOverlay}>
|
<View style={fileListStyle.selectedOverlay}>
|
||||||
<Icon name={'check-circle'} solid color={Colors.NextLbryGreen} size={32} />
|
<Icon name={'check-circle'} solid color={Colors.NextLbryGreen} size={32} />
|
||||||
@@ -167,7 +184,12 @@ class FileListItem extends React.PureComponent {
|
|||||||
size={16}
|
size={16}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<FilePrice uri={uri} style={fileListStyle.filePriceContainer} textStyle={fileListStyle.filePriceText} />
|
<FilePrice
|
||||||
|
uri={uri}
|
||||||
|
style={fileListStyle.filePriceContainer}
|
||||||
|
iconStyle={fileListStyle.filePriceIcon}
|
||||||
|
textStyle={fileListStyle.filePriceText}
|
||||||
|
/>
|
||||||
<View style={fileListStyle.detailsContainer}>
|
<View style={fileListStyle.detailsContainer}>
|
||||||
{featuredResult && (
|
{featuredResult && (
|
||||||
<Text style={fileListStyle.featuredUri} numberOfLines={1}>
|
<Text style={fileListStyle.featuredUri} numberOfLines={1}>
|
||||||
@@ -188,8 +210,11 @@ class FileListItem extends React.PureComponent {
|
|||||||
|
|
||||||
{(title || name) && (
|
{(title || name) && (
|
||||||
<View style={fileListStyle.titleContainer}>
|
<View style={fileListStyle.titleContainer}>
|
||||||
<Text style={featuredResult ? fileListStyle.featuredTitle : fileListStyle.title}>
|
<Text
|
||||||
{this.formatTitle(title) || this.formatTitle(name)}
|
style={featuredResult ? fileListStyle.featuredTitle : fileListStyle.title}
|
||||||
|
numberOfLines={hideChannel ? 4 : 3}
|
||||||
|
>
|
||||||
|
{title || name}
|
||||||
</Text>
|
</Text>
|
||||||
{isRewardContent && <Icon style={fileListStyle.rewardIcon} name="award" size={12} />}
|
{isRewardContent && <Icon style={fileListStyle.rewardIcon} name="award" size={12} />}
|
||||||
</View>
|
</View>
|
||||||
@@ -201,17 +226,18 @@ class FileListItem extends React.PureComponent {
|
|||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{channel && !hideChannel && (
|
{(channel || isChannel) && !hideChannel && (
|
||||||
<Link
|
<Link
|
||||||
style={fileListStyle.publisher}
|
style={fileListStyle.publisher}
|
||||||
text={channel}
|
text={isChannel ? name : channel}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
navigateToUri(
|
navigateToUri(
|
||||||
navigation,
|
navigation,
|
||||||
normalizeURI(shortChannelUri || fullChannelUri),
|
normalizeURI(isChannel ? uri : shortChannelUri || fullChannelUri),
|
||||||
null,
|
null,
|
||||||
false,
|
false,
|
||||||
fullChannelUri,
|
isChannel ? claim && claim.permanent_url : fullChannelUri,
|
||||||
|
setPlayerVisible,
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
@@ -219,7 +245,7 @@ class FileListItem extends React.PureComponent {
|
|||||||
|
|
||||||
<View style={fileListStyle.info}>
|
<View style={fileListStyle.info}>
|
||||||
{fileInfo && !isNaN(fileInfo.written_bytes) && fileInfo.written_bytes > 0 && (
|
{fileInfo && !isNaN(fileInfo.written_bytes) && fileInfo.written_bytes > 0 && (
|
||||||
<Text style={fileListStyle.infoText}>{this.getStorageForFileInfo(fileInfo)}</Text>
|
<Text style={fileListStyle.infoText}>{getStorageForFileInfo(fileInfo)}</Text>
|
||||||
)}
|
)}
|
||||||
<DateTime style={fileListStyle.publishInfo} textStyle={fileListStyle.infoText} timeAgo uri={uri} />
|
<DateTime style={fileListStyle.publishInfo} textStyle={fileListStyle.infoText} timeAgo uri={uri} />
|
||||||
</View>
|
</View>
|
||||||
@@ -232,7 +258,7 @@ class FileListItem extends React.PureComponent {
|
|||||||
color={Colors.NextLbryGreen}
|
color={Colors.NextLbryGreen}
|
||||||
height={3}
|
height={3}
|
||||||
style={fileListStyle.progress}
|
style={fileListStyle.progress}
|
||||||
progress={this.getDownloadProgress(fileInfo)}
|
progress={getDownloadProgress(fileInfo)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import React from 'react';
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { Text, View } from 'react-native';
|
import { Text, View } from 'react-native';
|
||||||
import { formatCredits, formatFullPrice } from 'lbry-redux';
|
import { formatCredits, formatFullPrice } from 'lbry-redux';
|
||||||
|
import Icon from 'react-native-vector-icons/FontAwesome5';
|
||||||
|
|
||||||
class CreditAmount extends React.PureComponent {
|
class CreditAmount extends React.PureComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
@@ -62,25 +63,27 @@ class CreditAmount extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* {this.props.isEstimate ? (
|
return (
|
||||||
<span
|
<Text style={style} numberOfLines={1}>
|
||||||
className="credit-amount__estimate"
|
{amountText}
|
||||||
title={__('This is an estimate and does not include data fees')}
|
</Text>
|
||||||
>
|
);
|
||||||
*
|
|
||||||
</span>
|
|
||||||
) : null} */
|
|
||||||
return <Text style={style}>{amountText}</Text>;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class FilePrice extends React.PureComponent {
|
class FilePrice extends React.PureComponent {
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
this.fetchCost(this.props);
|
const { cost } = this.props;
|
||||||
|
if (isNaN(parseFloat(cost))) {
|
||||||
|
this.fetchCost(this.props);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
componentWillReceiveProps(nextProps) {
|
||||||
this.fetchCost(nextProps);
|
const { cost } = this.props;
|
||||||
|
if (isNaN(parseFloat(cost))) {
|
||||||
|
this.fetchCost(nextProps);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fetchCost(props) {
|
fetchCost(props) {
|
||||||
@@ -92,30 +95,25 @@ class FilePrice extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { costInfo, look = 'indicator', showFullPrice = false, style, textStyle } = this.props;
|
const { cost, costInfo, look = 'indicator', showFullPrice = false, style, iconStyle, textStyle } = this.props;
|
||||||
|
|
||||||
const isEstimate = costInfo ? !costInfo.includesData : null;
|
const isEstimate = costInfo ? !costInfo.includesData : null;
|
||||||
|
const amount = cost ? parseFloat(cost) : costInfo ? parseFloat(costInfo.cost) : 0;
|
||||||
if (!costInfo) {
|
if (isNaN(amount) || amount === 0) {
|
||||||
return (
|
return null;
|
||||||
<View style={style}>
|
|
||||||
<Text style={textStyle}>???</Text>
|
|
||||||
</View>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={style}>
|
<View style={style}>
|
||||||
|
<Icon name="coins" size={9} style={iconStyle} />
|
||||||
<CreditAmount
|
<CreditAmount
|
||||||
style={textStyle}
|
style={textStyle}
|
||||||
label={false}
|
label={false}
|
||||||
amount={parseFloat(costInfo.cost)}
|
amount={amount}
|
||||||
isEstimate={isEstimate}
|
isEstimate={isEstimate}
|
||||||
showFree
|
showFree
|
||||||
showFullPrice={showFullPrice}
|
showFullPrice={showFullPrice}
|
||||||
>
|
/>
|
||||||
???
|
|
||||||
</CreditAmount>
|
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -341,6 +341,12 @@ class MediaPlayer extends React.PureComponent {
|
|||||||
this.setState({ paused: true }, this.updateBackgroundMediaNotification);
|
this.setState({ paused: true }, this.updateBackgroundMediaNotification);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
handleSeek = time => {
|
||||||
|
const { currentTime } = this.state;
|
||||||
|
const newTime = currentTime + time;
|
||||||
|
this.seekTo(newTime);
|
||||||
|
};
|
||||||
|
|
||||||
updateBackgroundMediaNotification = () => {
|
updateBackgroundMediaNotification = () => {
|
||||||
this.handlePausedState();
|
this.handlePausedState();
|
||||||
const { backgroundPlayEnabled } = this.props;
|
const { backgroundPlayEnabled } = this.props;
|
||||||
@@ -362,14 +368,26 @@ class MediaPlayer extends React.PureComponent {
|
|||||||
<Icon name={'arrow-left'} size={18} style={mediaPlayerStyle.backButtonIcon} />
|
<Icon name={'arrow-left'} size={18} style={mediaPlayerStyle.backButtonIcon} />
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|
||||||
<TouchableOpacity style={mediaPlayerStyle.playPauseButton} onPress={this.togglePlay}>
|
<View style={mediaPlayerStyle.midControls}>
|
||||||
{this.state.paused && <Icon name="play" size={40} color="#ffffff" />}
|
<TouchableOpacity style={mediaPlayerStyle.rewind10} onPress={() => this.handleSeek(-10)}>
|
||||||
{!this.state.paused && <Icon name="pause" size={40} color="#ffffff" />}
|
<Icon name="undo" size={24} color={Colors.White} />
|
||||||
</TouchableOpacity>
|
<Text style={[mediaPlayerStyle.midControlText, mediaPlayerStyle.leftMidControlText]}>10</Text>
|
||||||
|
</TouchableOpacity>
|
||||||
|
|
||||||
|
<TouchableOpacity style={mediaPlayerStyle.playPauseButton} onPress={this.togglePlay}>
|
||||||
|
{this.state.paused && <Icon name="play" size={40} color={Colors.White} />}
|
||||||
|
{!this.state.paused && <Icon name="pause" size={40} color={Colors.White} />}
|
||||||
|
</TouchableOpacity>
|
||||||
|
|
||||||
|
<TouchableOpacity style={mediaPlayerStyle.forward10} onPress={() => this.handleSeek(10)}>
|
||||||
|
<Icon name="redo" size={24} color={Colors.White} />
|
||||||
|
<Text style={[mediaPlayerStyle.midControlText, mediaPlayerStyle.rightMidControlText]}>10</Text>
|
||||||
|
</TouchableOpacity>
|
||||||
|
</View>
|
||||||
|
|
||||||
<TouchableOpacity style={mediaPlayerStyle.toggleFullscreenButton} onPress={this.toggleFullscreenMode}>
|
<TouchableOpacity style={mediaPlayerStyle.toggleFullscreenButton} onPress={this.toggleFullscreenMode}>
|
||||||
{this.state.fullscreenMode && <Icon name="compress" size={16} color="#ffffff" />}
|
{this.state.fullscreenMode && <Icon name="compress" size={16} color={Colors.White} />}
|
||||||
{!this.state.fullscreenMode && <Icon name="expand" size={16} color="#ffffff" />}
|
{!this.state.fullscreenMode && <Icon name="expand" size={16} color={Colors.White} />}
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|
||||||
<Text style={mediaPlayerStyle.elapsedDuration}>{this.formatTime(this.state.currentTime)}</Text>
|
<Text style={mediaPlayerStyle.elapsedDuration}>{this.formatTime(this.state.currentTime)}</Text>
|
||||||
@@ -421,7 +439,7 @@ class MediaPlayer extends React.PureComponent {
|
|||||||
const seekerCircleStyle = [this.state.seeking ? mediaPlayerStyle.bigSeekerCircle : mediaPlayerStyle.seekerCircle];
|
const seekerCircleStyle = [this.state.seeking ? mediaPlayerStyle.bigSeekerCircle : mediaPlayerStyle.seekerCircle];
|
||||||
if (!this.state.seeking) {
|
if (!this.state.seeking) {
|
||||||
seekerCircleStyle.push(
|
seekerCircleStyle.push(
|
||||||
this.state.fullscreenMode ? mediaPlayerStyle.seekerCircleTopFs : mediaPlayerStyle.seekerCircleTop
|
this.state.fullscreenMode ? mediaPlayerStyle.seekerCircleTopFs : mediaPlayerStyle.seekerCircleTop,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -440,6 +458,7 @@ class MediaPlayer extends React.PureComponent {
|
|||||||
}}
|
}}
|
||||||
resizeMode={this.state.resizeMode}
|
resizeMode={this.state.resizeMode}
|
||||||
playInBackground={this.state.backgroundPlayEnabled}
|
playInBackground={this.state.backgroundPlayEnabled}
|
||||||
|
playWhenInactive={this.state.backgroundPlayEnabled}
|
||||||
style={mediaPlayerStyle.player}
|
style={mediaPlayerStyle.player}
|
||||||
rate={this.state.rate}
|
rate={this.state.rate}
|
||||||
volume={this.state.volume}
|
volume={this.state.volume}
|
||||||
|
|||||||
@@ -1,24 +1,27 @@
|
|||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import {
|
import {
|
||||||
doResolveUris,
|
doResolveUris,
|
||||||
doSearch,
|
doResolvedSearch,
|
||||||
makeSelectClaimForUri,
|
makeSelectClaimForUri,
|
||||||
makeSelectRecommendedContentForUri,
|
makeSelectResolvedRecommendedContentForUri,
|
||||||
selectResolvingUris,
|
selectResolvingUris,
|
||||||
selectIsSearching,
|
selectIsSearching,
|
||||||
} from 'lbry-redux';
|
} from 'lbry-redux';
|
||||||
import RelatedContent from './view';
|
import RelatedContent from './view';
|
||||||
|
|
||||||
|
const RESULT_SIZE = 16;
|
||||||
|
|
||||||
const select = (state, props) => ({
|
const select = (state, props) => ({
|
||||||
claim: makeSelectClaimForUri(props.uri)(state),
|
claim: makeSelectClaimForUri(props.uri)(state),
|
||||||
isSearching: selectIsSearching(state),
|
isSearching: selectIsSearching(state),
|
||||||
recommendedContent: makeSelectRecommendedContentForUri(props.uri)(state),
|
recommendedContent: makeSelectResolvedRecommendedContentForUri(props.uri, RESULT_SIZE)(state),
|
||||||
resolvingUris: selectResolvingUris(state),
|
resolvingUris: selectResolvingUris(state),
|
||||||
});
|
});
|
||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
resolveUris: uris => dispatch(doResolveUris(uris)),
|
resolveUris: uris => dispatch(doResolveUris(uris)),
|
||||||
searchRecommended: query => dispatch(doSearch(query, 20, undefined, true, false)),
|
searchRecommended: (query, claimId) =>
|
||||||
|
dispatch(doResolvedSearch(query, RESULT_SIZE, undefined, true, { related_to: claimId }, false)),
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect(
|
export default connect(
|
||||||
|
|||||||
@@ -4,49 +4,21 @@ import { normalizeURI } from 'lbry-redux';
|
|||||||
import { navigateToUri } from 'utils/helper';
|
import { navigateToUri } from 'utils/helper';
|
||||||
import Colors from 'styles/colors';
|
import Colors from 'styles/colors';
|
||||||
import FileListItem from 'component/fileListItem';
|
import FileListItem from 'component/fileListItem';
|
||||||
|
import ClaimResultItem from 'component/claimResultItem';
|
||||||
import fileListStyle from 'styles/fileList';
|
import fileListStyle from 'styles/fileList';
|
||||||
import relatedContentStyle from 'styles/relatedContent';
|
import relatedContentStyle from 'styles/relatedContent';
|
||||||
|
|
||||||
export default class RelatedContent extends React.PureComponent {
|
export default class RelatedContent extends React.PureComponent {
|
||||||
state = {
|
|
||||||
resolveStarted: false,
|
|
||||||
};
|
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
const { title, searchRecommended } = this.props;
|
const { title, claimId, searchRecommended } = this.props;
|
||||||
if (title) {
|
if (title && claimId) {
|
||||||
searchRecommended(title);
|
searchRecommended(title, claimId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
shouldComponentUpdate(nextProps, nextState) {
|
shouldComponentUpdate(nextProps, nextState) {
|
||||||
const { isSearching, recommendedContent } = nextProps;
|
const { isSearching, recommendedContent } = nextProps;
|
||||||
return isSearching || (!isSearching && this.allContentResolved());
|
return isSearching || (!isSearching && recommendedContent && recommendedContent.length > 0);
|
||||||
}
|
|
||||||
|
|
||||||
allContentResolved() {
|
|
||||||
const { recommendedContent, resolvingUris } = this.props;
|
|
||||||
if (recommendedContent) {
|
|
||||||
let allResolved = true;
|
|
||||||
recommendedContent.forEach(uri => {
|
|
||||||
allResolved = allResolved && !resolvingUris.includes(uri);
|
|
||||||
});
|
|
||||||
return allResolved;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidUpdate() {
|
|
||||||
const { isSearching, resolveUris, recommendedContent } = this.props;
|
|
||||||
if (!isSearching && !this.state.resolveStarted) {
|
|
||||||
this.setState({ resolveStarted: true }, () => {
|
|
||||||
if (recommendedContent && recommendedContent.length > 0) {
|
|
||||||
// batch resolve the uris
|
|
||||||
resolveUris(recommendedContent);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
@@ -57,18 +29,16 @@ export default class RelatedContent extends React.PureComponent {
|
|||||||
<Text style={relatedContentStyle.title}>{__('Related Content')}</Text>
|
<Text style={relatedContentStyle.title}>{__('Related Content')}</Text>
|
||||||
{isSearching && <ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />}
|
{isSearching && <ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />}
|
||||||
{recommendedContent &&
|
{recommendedContent &&
|
||||||
recommendedContent
|
recommendedContent.map(result => (
|
||||||
.filter(recommendedUri => recommendedUri !== normalizeURI(fullUri))
|
<ClaimResultItem
|
||||||
.map(recommendedUri => (
|
style={fileListStyle.item}
|
||||||
<FileListItem
|
uri={result ? normalizeURI(`${result.name}#${result.claimId}`) : null}
|
||||||
style={fileListStyle.item}
|
key={result.claimId}
|
||||||
key={recommendedUri}
|
result={result}
|
||||||
uri={recommendedUri}
|
navigation={navigation}
|
||||||
batchResolve
|
autoplay
|
||||||
navigation={navigation}
|
/>
|
||||||
autoplay
|
))}
|
||||||
/>
|
|
||||||
))}
|
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ import { buildURI, normalizeURI } from 'lbry-redux';
|
|||||||
import { ActivityIndicator, FlatList, Image, Text, View } from 'react-native';
|
import { ActivityIndicator, FlatList, Image, Text, View } from 'react-native';
|
||||||
import { navigateToUri } from 'utils/helper';
|
import { navigateToUri } from 'utils/helper';
|
||||||
import Colors from 'styles/colors';
|
import Colors from 'styles/colors';
|
||||||
|
import ChannelIconItem from 'component/channelIconItem';
|
||||||
|
import channelIconStyle from 'styles/channelIcon';
|
||||||
import discoverStyle from 'styles/discover';
|
import discoverStyle from 'styles/discover';
|
||||||
import FileItem from 'component/fileItem';
|
import FileItem from 'component/fileItem';
|
||||||
import SubscribeButton from 'component/subscribeButton';
|
import SubscribeButton from 'component/subscribeButton';
|
||||||
@@ -11,11 +13,20 @@ import Link from 'component/link';
|
|||||||
import Tag from 'component/tag';
|
import Tag from 'component/tag';
|
||||||
|
|
||||||
class SuggestedSubscriptionItem extends React.PureComponent {
|
class SuggestedSubscriptionItem extends React.PureComponent {
|
||||||
|
state = {
|
||||||
|
autoStyle: null,
|
||||||
|
};
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
const { claim, uri, resolveUri } = this.props;
|
const { claim, uri, resolveUri } = this.props;
|
||||||
if (!claim) {
|
if (!claim) {
|
||||||
resolveUri(uri);
|
resolveUri(uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.setState({
|
||||||
|
autoStyle:
|
||||||
|
ChannelIconItem.AUTO_THUMB_STYLES[Math.floor(Math.random() * ChannelIconItem.AUTO_THUMB_STYLES.length)],
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
@@ -28,22 +39,26 @@ class SuggestedSubscriptionItem extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const hasThumbnail = !!thumbnail;
|
||||||
if (isResolvingUri) {
|
if (isResolvingUri) {
|
||||||
return (
|
return (
|
||||||
<View style={subscriptionsStyle.itemLoadingContainer}>
|
<View style={subscriptionsStyle.itemLoadingContainer}>
|
||||||
<ActivityIndicator size={'small'} color={Colors.LbryGreen} />
|
<ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={subscriptionsStyle.suggestedItem}>
|
<View style={subscriptionsStyle.suggestedItem}>
|
||||||
<View style={subscriptionsStyle.suggestedItemThumbnailContainer}>
|
<View style={[subscriptionsStyle.suggestedItemThumbnailContainer, this.state.autoStyle]}>
|
||||||
<Image
|
{hasThumbnail && (
|
||||||
style={subscriptionsStyle.suggestedItemThumbnail}
|
<Image style={subscriptionsStyle.suggestedItemThumbnail} resizeMode={'cover'} source={{ uri: thumbnail }} />
|
||||||
resizeMode={'cover'}
|
)}
|
||||||
source={thumbnail ? { uri: thumbnail } : require('../../assets/default_avatar.jpg')}
|
{!hasThumbnail && (
|
||||||
/>
|
<Text style={channelIconStyle.autothumbCharacter}>
|
||||||
|
{title ? title.substring(0, 1).toUpperCase() : claim ? claim.name.substring(1, 2).toUpperCase() : ''}
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View style={subscriptionsStyle.suggestedItemDetails}>
|
<View style={subscriptionsStyle.suggestedItemDetails}>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import {
|
|||||||
selectSearchSuggestions,
|
selectSearchSuggestions,
|
||||||
SETTINGS,
|
SETTINGS,
|
||||||
} from 'lbry-redux';
|
} from 'lbry-redux';
|
||||||
|
import { doSetPlayerVisible } from 'redux/actions/drawer';
|
||||||
import { selectCurrentRoute } from 'redux/selectors/drawer';
|
import { selectCurrentRoute } from 'redux/selectors/drawer';
|
||||||
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
||||||
import UriBar from './view';
|
import UriBar from './view';
|
||||||
@@ -24,9 +25,10 @@ const select = state => {
|
|||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
updateSearchQuery: query => dispatch(doUpdateSearchQuery(query)),
|
updateSearchQuery: query => dispatch(doUpdateSearchQuery(query)),
|
||||||
|
setPlayerVisible: (visible, uri) => dispatch(doSetPlayerVisible(visible, uri)),
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect(
|
export default connect(
|
||||||
select,
|
select,
|
||||||
perform
|
perform,
|
||||||
)(UriBar);
|
)(UriBar);
|
||||||
@@ -18,18 +18,20 @@ class UriBar extends React.PureComponent {
|
|||||||
|
|
||||||
keyboardDidHideListener = null;
|
keyboardDidHideListener = null;
|
||||||
|
|
||||||
|
changeTextTimeout = -1;
|
||||||
|
|
||||||
state = {
|
state = {
|
||||||
changeTextTimeout: null,
|
|
||||||
currentValue: null,
|
currentValue: null,
|
||||||
inputText: null,
|
inputText: null,
|
||||||
focused: false,
|
focused: false,
|
||||||
keyboardHeight: 0,
|
keyboardHeight: 0,
|
||||||
|
selection: undefined,
|
||||||
};
|
};
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', this._keyboardDidShow);
|
this.keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', this._keyboardDidShow);
|
||||||
this.keyboardDidHideListener = Keyboard.addListener('keyboardDidHide', this._keyboardDidHide);
|
this.keyboardDidHideListener = Keyboard.addListener('keyboardDidHide', this._keyboardDidHide);
|
||||||
this.setSelection();
|
this.setState({ selection: { start: 0, end: 0 } });
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
@@ -46,20 +48,19 @@ class UriBar extends React.PureComponent {
|
|||||||
const { currentRoute: prevRoute } = this.props;
|
const { currentRoute: prevRoute } = this.props;
|
||||||
|
|
||||||
if (Constants.DRAWER_ROUTE_SEARCH === currentRoute && currentRoute !== prevRoute) {
|
if (Constants.DRAWER_ROUTE_SEARCH === currentRoute && currentRoute !== prevRoute) {
|
||||||
this.setState({ currentValue: query, inputText: query }, () => this.setCaretPosition(query));
|
this.setState({ currentValue: query, inputText: query });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleChangeText = text => {
|
handleChangeText = text => {
|
||||||
|
this.setState({ selection: undefined });
|
||||||
const newValue = text || '';
|
const newValue = text || '';
|
||||||
clearTimeout(this.state.changeTextTimeout);
|
clearTimeout(this.changeTextTimeout);
|
||||||
const { updateSearchQuery, onSearchSubmitted, showUriBarSuggestions, navigation } = this.props;
|
const { updateSearchQuery, onSearchSubmitted, showUriBarSuggestions, navigation } = this.props;
|
||||||
|
|
||||||
updateSearchQuery(text);
|
this.changeTextTimeout = -1;
|
||||||
|
|
||||||
let timeout = -1;
|
|
||||||
if (!showUriBarSuggestions) {
|
if (!showUriBarSuggestions) {
|
||||||
timeout = setTimeout(() => {
|
this.changeTextTimeout = setTimeout(() => {
|
||||||
if (text.trim().length === 0) {
|
if (text.trim().length === 0) {
|
||||||
// don't do anything if the text is empty
|
// don't do anything if the text is empty
|
||||||
return;
|
return;
|
||||||
@@ -67,6 +68,7 @@ class UriBar extends React.PureComponent {
|
|||||||
|
|
||||||
if (!text.startsWith('lbry://')) {
|
if (!text.startsWith('lbry://')) {
|
||||||
// not a URI input, so this is a search, perform a direct search
|
// not a URI input, so this is a search, perform a direct search
|
||||||
|
updateSearchQuery(text);
|
||||||
if (onSearchSubmitted) {
|
if (onSearchSubmitted) {
|
||||||
onSearchSubmitted(text);
|
onSearchSubmitted(text);
|
||||||
} else {
|
} else {
|
||||||
@@ -74,20 +76,20 @@ class UriBar extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, UriBar.INPUT_TIMEOUT);
|
}, UriBar.INPUT_TIMEOUT);
|
||||||
|
} else {
|
||||||
|
updateSearchQuery(text);
|
||||||
}
|
}
|
||||||
this.setState({ inputText: newValue, currentValue: newValue, changeTextTimeout: timeout }, () =>
|
this.setState({ inputText: newValue, currentValue: newValue });
|
||||||
this.setCaretPosition(newValue),
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
handleItemPress = item => {
|
handleItemPress = item => {
|
||||||
const { navigation, onSearchSubmitted, updateSearchQuery } = this.props;
|
const { navigation, onSearchSubmitted, setPlayerVisible, updateSearchQuery } = this.props;
|
||||||
const { type, value } = item;
|
const { type, value } = item;
|
||||||
|
|
||||||
Keyboard.dismiss();
|
Keyboard.dismiss();
|
||||||
|
|
||||||
if (SEARCH_TYPES.SEARCH === type) {
|
if (SEARCH_TYPES.SEARCH === type) {
|
||||||
this.setState({ currentValue: value }, () => this.setCaretPosition(value));
|
this.setState({ currentValue: value });
|
||||||
updateSearchQuery(value);
|
updateSearchQuery(value);
|
||||||
|
|
||||||
if (onSearchSubmitted) {
|
if (onSearchSubmitted) {
|
||||||
@@ -110,7 +112,7 @@ class UriBar extends React.PureComponent {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const uri = normalizeURI(value);
|
const uri = normalizeURI(value);
|
||||||
navigateToUri(navigation, uri);
|
navigateToUri(navigation, uri, null, false, null, setPlayerVisible);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -125,20 +127,8 @@ class UriBar extends React.PureComponent {
|
|||||||
this.setState({ focused: false, keyboardHeight: 0 });
|
this.setState({ focused: false, keyboardHeight: 0 });
|
||||||
};
|
};
|
||||||
|
|
||||||
setSelection() {
|
|
||||||
if (this.textInput) {
|
|
||||||
this.textInput.setNativeProps({ selection: { start: 0, end: 0 } });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
setCaretPosition(text) {
|
|
||||||
if (this.textInput && text && text.length > 0) {
|
|
||||||
this.textInput.setNativeProps({ selection: { start: text.length, end: text.length } });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
handleSubmitEditing = () => {
|
handleSubmitEditing = () => {
|
||||||
const { navigation, onSearchSubmitted, updateSearchQuery } = this.props;
|
const { navigation, onSearchSubmitted, setPlayerVisible, updateSearchQuery } = this.props;
|
||||||
if (this.state.inputText) {
|
if (this.state.inputText) {
|
||||||
let inputText = this.state.inputText,
|
let inputText = this.state.inputText,
|
||||||
inputTextIsUrl = false;
|
inputTextIsUrl = false;
|
||||||
@@ -147,7 +137,7 @@ class UriBar extends React.PureComponent {
|
|||||||
// if it's a URI (lbry://...), open the file page
|
// if it's a URI (lbry://...), open the file page
|
||||||
if (transformedUrl && isURIValid(transformedUrl)) {
|
if (transformedUrl && isURIValid(transformedUrl)) {
|
||||||
inputTextIsUrl = true;
|
inputTextIsUrl = true;
|
||||||
navigateToUri(navigation, transformedUrl);
|
navigateToUri(navigation, transformedUrl, null, false, null, setPlayerVisible);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -167,9 +157,31 @@ class UriBar extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
onSearchPageBlurred() {
|
handleFocus = () => {
|
||||||
this.setState({ currenValueSet: false });
|
this.setState(
|
||||||
}
|
{
|
||||||
|
focused: true,
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
this.setState({
|
||||||
|
selection: { start: 0, end: this.state.currentValue ? this.state.currentValue.length : 0 },
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
handleTouchStart = () => {
|
||||||
|
if (this.state.focused) {
|
||||||
|
this.setState({ selection: null });
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
handleBlur = () => {
|
||||||
|
this.setState({
|
||||||
|
focused: false,
|
||||||
|
selection: { start: 0, end: 0 },
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
@@ -187,7 +199,7 @@ class UriBar extends React.PureComponent {
|
|||||||
value,
|
value,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
if (this.state.currentValue === null) {
|
if (this.state.currentValue === null) {
|
||||||
this.setState({ currentValue: value }, () => this.setCaretPosition(value));
|
this.setState({ currentValue: value });
|
||||||
}
|
}
|
||||||
|
|
||||||
let style = [
|
let style = [
|
||||||
@@ -258,14 +270,10 @@ class UriBar extends React.PureComponent {
|
|||||||
ref={ref => {
|
ref={ref => {
|
||||||
this.textInput = ref;
|
this.textInput = ref;
|
||||||
}}
|
}}
|
||||||
|
onTouchStart={this.handleTouchStart}
|
||||||
autoCorrect={false}
|
autoCorrect={false}
|
||||||
style={uriBarStyle.uriText}
|
style={uriBarStyle.uriText}
|
||||||
onLayout={() => {
|
selection={this.state.selection}
|
||||||
if (!this.state.focused) {
|
|
||||||
this.setSelection();
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
selectTextOnFocus
|
|
||||||
placeholder={__('Search movies, music, and more')}
|
placeholder={__('Search movies, music, and more')}
|
||||||
underlineColorAndroid={'transparent'}
|
underlineColorAndroid={'transparent'}
|
||||||
numberOfLines={1}
|
numberOfLines={1}
|
||||||
@@ -274,11 +282,8 @@ class UriBar extends React.PureComponent {
|
|||||||
returnKeyType={'go'}
|
returnKeyType={'go'}
|
||||||
inlineImageLeft={'baseline_search_black_24'}
|
inlineImageLeft={'baseline_search_black_24'}
|
||||||
inlineImagePadding={16}
|
inlineImagePadding={16}
|
||||||
onFocus={() => this.setState({ focused: true })}
|
onFocus={this.handleFocus}
|
||||||
onBlur={() => {
|
onBlur={this.handleBlur}
|
||||||
this.setState({ focused: false });
|
|
||||||
this.setSelection();
|
|
||||||
}}
|
|
||||||
onChangeText={this.handleChangeText}
|
onChangeText={this.handleChangeText}
|
||||||
onSubmitEditing={this.handleSubmitEditing}
|
onSubmitEditing={this.handleSubmitEditing}
|
||||||
/>
|
/>
|
||||||
|
|||||||
+3
-1
@@ -90,6 +90,7 @@ const Constants = {
|
|||||||
DRAWER_ROUTE_TAG: 'Tag',
|
DRAWER_ROUTE_TAG: 'Tag',
|
||||||
DRAWER_ROUTE_CHANNEL_CREATOR: 'ChannelCreator',
|
DRAWER_ROUTE_CHANNEL_CREATOR: 'ChannelCreator',
|
||||||
DRAWER_ROUTE_CHANNEL_CREATOR_FORM: 'ChannnelCreatorForm',
|
DRAWER_ROUTE_CHANNEL_CREATOR_FORM: 'ChannnelCreatorForm',
|
||||||
|
DRAWER_ROUTE_INVITES: 'Invites',
|
||||||
|
|
||||||
FULL_ROUTE_NAME_DISCOVER: 'DiscoverStack',
|
FULL_ROUTE_NAME_DISCOVER: 'DiscoverStack',
|
||||||
FULL_ROUTE_NAME_WALLET: 'WalletStack',
|
FULL_ROUTE_NAME_WALLET: 'WalletStack',
|
||||||
@@ -134,7 +135,7 @@ const Constants = {
|
|||||||
|
|
||||||
ORDER_BY_EFFECTIVE_AMOUNT: 'effective_amount',
|
ORDER_BY_EFFECTIVE_AMOUNT: 'effective_amount',
|
||||||
|
|
||||||
DEFAULT_PAGE_SIZE: 10,
|
DEFAULT_PAGE_SIZE: 20,
|
||||||
|
|
||||||
ALL_PLACEHOLDER: '_all',
|
ALL_PLACEHOLDER: '_all',
|
||||||
|
|
||||||
@@ -165,6 +166,7 @@ export const DrawerRoutes = [
|
|||||||
Constants.DRAWER_ROUTE_SEARCH,
|
Constants.DRAWER_ROUTE_SEARCH,
|
||||||
Constants.DRAWER_ROUTE_TRANSACTION_HISTORY,
|
Constants.DRAWER_ROUTE_TRANSACTION_HISTORY,
|
||||||
Constants.DRAWER_ROUTE_CHANNEL_CREATOR,
|
Constants.DRAWER_ROUTE_CHANNEL_CREATOR,
|
||||||
|
Constants.DRAWER_ROUTE_INVITES,
|
||||||
];
|
];
|
||||||
|
|
||||||
// sub-pages for main routes
|
// sub-pages for main routes
|
||||||
|
|||||||
+5
-3
@@ -95,6 +95,7 @@ const compressor = createCompressor();
|
|||||||
const authFilter = createFilter('auth', ['authToken']);
|
const authFilter = createFilter('auth', ['authToken']);
|
||||||
const blockedFilter = createFilter('blocked', ['blockedChannels']);
|
const blockedFilter = createFilter('blocked', ['blockedChannels']);
|
||||||
const contentFilter = createFilter('content', ['positions']);
|
const contentFilter = createFilter('content', ['positions']);
|
||||||
|
const drawerFilter = createFilter('drawer', ['lastRouteInStack']);
|
||||||
const saveClaimsFilter = createFilter('claims', ['claimsByUri']);
|
const saveClaimsFilter = createFilter('claims', ['claimsByUri']);
|
||||||
const subscriptionsFilter = createFilter('subscriptions', ['enabledChannelNotifications', 'subscriptions', 'latest']);
|
const subscriptionsFilter = createFilter('subscriptions', ['enabledChannelNotifications', 'subscriptions', 'latest']);
|
||||||
const settingsFilter = createFilter('settings', ['clientSettings']);
|
const settingsFilter = createFilter('settings', ['clientSettings']);
|
||||||
@@ -102,12 +103,13 @@ const tagsFilter = createFilter('tags', ['followedTags']);
|
|||||||
const walletFilter = createFilter('wallet', ['receiveAddress']);
|
const walletFilter = createFilter('wallet', ['receiveAddress']);
|
||||||
|
|
||||||
const v4PersistOptions = {
|
const v4PersistOptions = {
|
||||||
whitelist: ['auth', 'blocked', 'claims', 'content', 'subscriptions', 'settings', 'tags', 'wallet'],
|
whitelist: ['auth', 'blocked', 'claims', 'drawer', 'content', 'subscriptions', 'settings', 'tags', 'wallet'],
|
||||||
// Order is important. Needs to be compressed last or other transforms can't
|
// Order is important. Needs to be compressed last or other transforms can't
|
||||||
// read the data
|
// read the data
|
||||||
transforms: [
|
transforms: [
|
||||||
authFilter,
|
authFilter,
|
||||||
blockedFilter,
|
blockedFilter,
|
||||||
|
drawerFilter,
|
||||||
saveClaimsFilter,
|
saveClaimsFilter,
|
||||||
subscriptionsFilter,
|
subscriptionsFilter,
|
||||||
settingsFilter,
|
settingsFilter,
|
||||||
@@ -200,9 +202,9 @@ const store = createStore(
|
|||||||
);
|
);
|
||||||
window.store = store;
|
window.store = store;
|
||||||
|
|
||||||
const persistor = persistStore(store, persistOptions, err => {
|
const persistor = persistStore(store, null, err => {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log('Unable to load saved SETTINGS');
|
// console.log('Unable to load saved SETTINGS');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
window.persistor = persistor;
|
window.persistor = persistor;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { CLAIM_VALUES, formatCredits, isNameValid, regexInvalidURI } from 'lbry-redux';
|
import { CLAIM_VALUES, Lbry, formatCredits, isNameValid, regexInvalidURI } from 'lbry-redux';
|
||||||
import {
|
import {
|
||||||
ActivityIndicator,
|
ActivityIndicator,
|
||||||
Alert,
|
Alert,
|
||||||
@@ -21,6 +21,7 @@ import ChannelRewardsDriver from 'component/channelRewardsDriver';
|
|||||||
import Colors from 'styles/colors';
|
import Colors from 'styles/colors';
|
||||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||||
import EmptyStateView from 'component/emptyStateView';
|
import EmptyStateView from 'component/emptyStateView';
|
||||||
|
import FastImage from 'react-native-fast-image';
|
||||||
import FloatingWalletBalance from 'component/floatingWalletBalance';
|
import FloatingWalletBalance from 'component/floatingWalletBalance';
|
||||||
import Icon from 'react-native-vector-icons/FontAwesome5';
|
import Icon from 'react-native-vector-icons/FontAwesome5';
|
||||||
import Link from 'component/link';
|
import Link from 'component/link';
|
||||||
@@ -225,9 +226,9 @@ export default class ChannelCreator extends React.PureComponent {
|
|||||||
error => {
|
error => {
|
||||||
notify({ message: `The image could not be uploaded: ${error}` });
|
notify({ message: `The image could not be uploaded: ${error}` });
|
||||||
this.setState({ uploadingImage: false });
|
this.setState({ uploadingImage: false });
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
// could not determine the file path
|
// could not determine the file path
|
||||||
@@ -489,12 +490,12 @@ export default class ChannelCreator extends React.PureComponent {
|
|||||||
claim_id: claimId,
|
claim_id: claimId,
|
||||||
amount: newChannelBid,
|
amount: newChannelBid,
|
||||||
},
|
},
|
||||||
optionalParams
|
optionalParams,
|
||||||
);
|
);
|
||||||
this.setState({ updateChannelStarted: true }, () => updateChannel(params));
|
this.setState({ updateChannelStarted: true }, () => updateChannel(params));
|
||||||
} else {
|
} else {
|
||||||
this.setState({ creatingChannel: true }, () =>
|
this.setState({ creatingChannel: true }, () =>
|
||||||
createChannel(channelName, newChannelBid, optionalParams).then(success, failure)
|
createChannel(channelName, newChannelBid, optionalParams).then(success, failure),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -527,7 +528,7 @@ export default class ChannelCreator extends React.PureComponent {
|
|||||||
avatarImagePickerOpen: false,
|
avatarImagePickerOpen: false,
|
||||||
coverImagePickerOpen: true,
|
coverImagePickerOpen: true,
|
||||||
},
|
},
|
||||||
() => NativeModules.UtilityModule.openDocumentPicker('image/*')
|
() => this.checkStoragePermission(),
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -543,7 +544,7 @@ export default class ChannelCreator extends React.PureComponent {
|
|||||||
avatarImagePickerOpen: true,
|
avatarImagePickerOpen: true,
|
||||||
coverImagePickerOpen: false,
|
coverImagePickerOpen: false,
|
||||||
},
|
},
|
||||||
() => NativeModules.UtilityModule.openDocumentPicker('image/*')
|
() => this.checkStoragePermission(),
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -673,7 +674,7 @@ export default class ChannelCreator extends React.PureComponent {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
{ cancelable: true }
|
{ cancelable: true },
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -749,6 +750,42 @@ export default class ChannelCreator extends React.PureComponent {
|
|||||||
this.addOrRemoveItem(channel);
|
this.addOrRemoveItem(channel);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
checkStoragePermission = () => {
|
||||||
|
// check if we the permission to write to external storage has been granted
|
||||||
|
NativeModules.UtilityModule.canReadWriteStorage().then(canReadWrite => {
|
||||||
|
if (!canReadWrite) {
|
||||||
|
// request permission
|
||||||
|
NativeModules.UtilityModule.requestStoragePermission();
|
||||||
|
} else {
|
||||||
|
NativeModules.UtilityModule.openDocumentPicker('image/*');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
handleStoragePermissionGranted = () => {
|
||||||
|
// update the configured download folder
|
||||||
|
NativeModules.UtilityModule.getDownloadDirectory().then(downloadDirectory => {
|
||||||
|
Lbry.settings_set({
|
||||||
|
key: 'download_dir',
|
||||||
|
value: downloadDirectory,
|
||||||
|
})
|
||||||
|
.then(() => {})
|
||||||
|
.catch(() => {});
|
||||||
|
});
|
||||||
|
|
||||||
|
// open picker for images
|
||||||
|
NativeModules.UtilityModule.openDocumentPicker('image/*');
|
||||||
|
};
|
||||||
|
|
||||||
|
handleStoragePermissionRefused = () => {
|
||||||
|
const { notify } = this.props;
|
||||||
|
notify({
|
||||||
|
message: __('Pictures from your device cannot be used because the permission to read storage was not granted.'),
|
||||||
|
isError: true,
|
||||||
|
});
|
||||||
|
this.setState({ avatarImagePickerOpen: false, coverImagePickerOpen: false });
|
||||||
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { abandoningClaimIds, balance, fetchingChannels, updatingChannel, channels = [], navigation } = this.props;
|
const { abandoningClaimIds, balance, fetchingChannels, updatingChannel, channels = [], navigation } = this.props;
|
||||||
const {
|
const {
|
||||||
@@ -831,9 +868,9 @@ export default class ChannelCreator extends React.PureComponent {
|
|||||||
>
|
>
|
||||||
<View style={[channelCreatorStyle.channelListAvatar, itemAutoStyle]}>
|
<View style={[channelCreatorStyle.channelListAvatar, itemAutoStyle]}>
|
||||||
{itemThumbnailUrl && (
|
{itemThumbnailUrl && (
|
||||||
<Image
|
<FastImage
|
||||||
style={channelCreatorStyle.avatarImage}
|
style={channelCreatorStyle.avatarImage}
|
||||||
resizeMode={'cover'}
|
resizeMode={FastImage.resizeMode.cover}
|
||||||
source={{ uri: itemThumbnailUrl }}
|
source={{ uri: itemThumbnailUrl }}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@@ -868,7 +905,7 @@ export default class ChannelCreator extends React.PureComponent {
|
|||||||
style={channelCreatorStyle.coverImage}
|
style={channelCreatorStyle.coverImage}
|
||||||
resizeMode={'cover'}
|
resizeMode={'cover'}
|
||||||
source={
|
source={
|
||||||
coverImageUrl !== null && coverImageUrl.trim().length > 0
|
!!coverImageUrl && coverImageUrl.trim().length > 0
|
||||||
? { uri: coverImageUrl }
|
? { uri: coverImageUrl }
|
||||||
: require('../../assets/default_channel_cover.png')
|
: require('../../assets/default_channel_cover.png')
|
||||||
}
|
}
|
||||||
@@ -887,14 +924,15 @@ export default class ChannelCreator extends React.PureComponent {
|
|||||||
|
|
||||||
<View style={[channelCreatorStyle.avatarImageContainer, autoStyle]}>
|
<View style={[channelCreatorStyle.avatarImageContainer, autoStyle]}>
|
||||||
<TouchableOpacity style={channelCreatorStyle.avatarTouchArea} onPress={this.onAvatarImagePress}>
|
<TouchableOpacity style={channelCreatorStyle.avatarTouchArea} onPress={this.onAvatarImagePress}>
|
||||||
{thumbnailUrl !== null && thumbnailUrl.trim().length > 0 && (
|
{!!thumbnailUrl && thumbnailUrl.trim().length > 0 && (
|
||||||
<Image
|
<Image
|
||||||
style={channelCreatorStyle.avatarImage}
|
style={channelCreatorStyle.avatarImage}
|
||||||
resizeMode={'cover'}
|
resizeMode={'cover'}
|
||||||
source={{ uri: thumbnailUrl }}
|
source={{ uri: thumbnailUrl }}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{(thumbnailUrl === null || thumbnailUrl.trim().length === 0) && newChannelName.length > 0 && (
|
{(!!thumbnailUrl || (!!thumbnailUrl && thumbnailUrl.trim().length === 0)) &&
|
||||||
|
newChannelName.length > 0 && (
|
||||||
<Text style={channelIconStyle.autothumbCharacter}>
|
<Text style={channelIconStyle.autothumbCharacter}>
|
||||||
{newChannelName.substring(0, 1).toUpperCase()}
|
{newChannelName.substring(0, 1).toUpperCase()}
|
||||||
</Text>
|
</Text>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
selectSubscriptionClaims,
|
selectSubscriptionClaims,
|
||||||
selectUnreadSubscriptions,
|
selectUnreadSubscriptions,
|
||||||
} from 'lbryinc';
|
} from 'lbryinc';
|
||||||
import { doPushDrawerStack } from 'redux/actions/drawer';
|
import { doPushDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
|
||||||
import { doSetClientSetting, doSetSortByItem, doSetTimeItem } from 'redux/actions/settings';
|
import { doSetClientSetting, doSetSortByItem, doSetTimeItem } from 'redux/actions/settings';
|
||||||
import { makeSelectClientSetting, selectSortByItem, selectTimeItem } from 'redux/selectors/settings';
|
import { makeSelectClientSetting, selectSortByItem, selectTimeItem } from 'redux/selectors/settings';
|
||||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||||
@@ -41,11 +41,12 @@ const perform = dispatch => ({
|
|||||||
pushDrawerStack: () => dispatch(doPushDrawerStack(Constants.DRAWER_ROUTE_DISCOVER)),
|
pushDrawerStack: () => dispatch(doPushDrawerStack(Constants.DRAWER_ROUTE_DISCOVER)),
|
||||||
removeUnreadSubscriptions: () => dispatch(doRemoveUnreadSubscriptions()),
|
removeUnreadSubscriptions: () => dispatch(doRemoveUnreadSubscriptions()),
|
||||||
setClientSetting: (key, value) => dispatch(doSetClientSetting(key, value)),
|
setClientSetting: (key, value) => dispatch(doSetClientSetting(key, value)),
|
||||||
|
setPlayerVisible: () => dispatch(doSetPlayerVisible(false)),
|
||||||
setSortByItem: item => dispatch(doSetSortByItem(item)),
|
setSortByItem: item => dispatch(doSetSortByItem(item)),
|
||||||
setTimeItem: item => dispatch(doSetTimeItem(item)),
|
setTimeItem: item => dispatch(doSetTimeItem(item)),
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect(
|
export default connect(
|
||||||
select,
|
select,
|
||||||
perform
|
perform,
|
||||||
)(DiscoverPage);
|
)(DiscoverPage);
|
||||||
@@ -86,9 +86,11 @@ class DiscoverPage extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onComponentFocused = () => {
|
onComponentFocused = () => {
|
||||||
const { pushDrawerStack } = this.props;
|
const { pushDrawerStack, setPlayerVisible } = this.props;
|
||||||
// pushDrawerStack();
|
// pushDrawerStack();
|
||||||
|
|
||||||
NativeModules.Firebase.setCurrentScreen('Your tags');
|
NativeModules.Firebase.setCurrentScreen('Your tags');
|
||||||
|
setPlayerVisible();
|
||||||
};
|
};
|
||||||
|
|
||||||
handleSortByItemSelected = item => {
|
handleSortByItemSelected = item => {
|
||||||
@@ -135,7 +137,7 @@ class DiscoverPage extends React.PureComponent {
|
|||||||
Alert.alert(
|
Alert.alert(
|
||||||
__('Enjoying LBRY?'),
|
__('Enjoying LBRY?'),
|
||||||
__(
|
__(
|
||||||
'Are you enjoying your experience with the LBRY app? You can leave a review for us on the Play Store.'
|
'Are you enjoying your experience with the LBRY app? You can leave a review for us on the Play Store.',
|
||||||
),
|
),
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@@ -151,7 +153,7 @@ class DiscoverPage extends React.PureComponent {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
{ cancelable: false }
|
{ cancelable: false },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ class DownloadsPage extends React.PureComponent {
|
|||||||
const { claims, fileInfos } = this.props;
|
const { claims, fileInfos } = this.props;
|
||||||
const claimUris = claims.map(claim => normalizeURI(`${claim.name}#${claim.claim_id}`));
|
const claimUris = claims.map(claim => normalizeURI(`${claim.name}#${claim.claim_id}`));
|
||||||
return fileInfos.filter(
|
return fileInfos.filter(
|
||||||
fileInfo => !claimUris.includes(normalizeURI(`${fileInfo.claim_name}#${fileInfo.claim_id}`))
|
fileInfo => !claimUris.includes(normalizeURI(`${fileInfo.claim_name}#${fileInfo.claim_id}`)),
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -125,7 +125,11 @@ class DownloadsPage extends React.PureComponent {
|
|||||||
onPress: () => {
|
onPress: () => {
|
||||||
const uris = Object.keys(selectedClaimsMap);
|
const uris = Object.keys(selectedClaimsMap);
|
||||||
uris.forEach(uri => {
|
uris.forEach(uri => {
|
||||||
const { txid, nout } = selectedClaimsMap[uri];
|
const { txid, nout, name, claim_id: claimId } = selectedClaimsMap[uri];
|
||||||
|
if (name && claimId) {
|
||||||
|
NativeModules.UtilityModule.deleteDownload(normalizeURI(`${name}#${claimId}`));
|
||||||
|
}
|
||||||
|
|
||||||
deleteFile(`${txid}:${nout}`, true);
|
deleteFile(`${txid}:${nout}`, true);
|
||||||
});
|
});
|
||||||
this.onExitSelectionMode();
|
this.onExitSelectionMode();
|
||||||
@@ -135,7 +139,7 @@ class DownloadsPage extends React.PureComponent {
|
|||||||
],
|
],
|
||||||
{
|
{
|
||||||
cancelable: true,
|
cancelable: true,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -184,7 +188,7 @@ class DownloadsPage extends React.PureComponent {
|
|||||||
this.handleSelectItem(item, claim);
|
this.handleSelectItem(item, claim);
|
||||||
} else {
|
} else {
|
||||||
// TODO: when shortUrl is available for my claims, navigate to that URL instead
|
// TODO: when shortUrl is available for my claims, navigate to that URL instead
|
||||||
navigateToUri(navigation, item, { autoplay: true });
|
navigateToUri(navigation, item, { autoplay: true }, false, null);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
onLongPress={claim => this.handleItemLongPress(item, claim)}
|
onLongPress={claim => this.handleItemLongPress(item, claim)}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ import {
|
|||||||
import { doDeleteFile, doStopDownloadingFile } from 'redux/actions/file';
|
import { doDeleteFile, doStopDownloadingFile } from 'redux/actions/file';
|
||||||
import { doPushDrawerStack, doPopDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
|
import { doPushDrawerStack, doPopDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
|
||||||
import { doToggleFullscreenMode } from 'redux/actions/settings';
|
import { doToggleFullscreenMode } from 'redux/actions/settings';
|
||||||
import { selectDrawerStack } from 'redux/selectors/drawer';
|
import { selectDrawerStack, makeSelectPlayerVisible } from 'redux/selectors/drawer';
|
||||||
import FilePage from './view';
|
import FilePage from './view';
|
||||||
|
|
||||||
const select = (state, props) => {
|
const select = (state, props) => {
|
||||||
@@ -61,6 +61,7 @@ const select = (state, props) => {
|
|||||||
fileInfo: makeSelectFileInfoForUri(contentUri)(state),
|
fileInfo: makeSelectFileInfoForUri(contentUri)(state),
|
||||||
rewardedContentClaimIds: selectRewardContentClaimIds(state, selectProps),
|
rewardedContentClaimIds: selectRewardContentClaimIds(state, selectProps),
|
||||||
channelUri: makeSelectChannelForClaimUri(contentUri, true)(state),
|
channelUri: makeSelectChannelForClaimUri(contentUri, true)(state),
|
||||||
|
isPlayerVisible: makeSelectPlayerVisible(uri)(state), // use navigation uri for this selector
|
||||||
position: makeSelectContentPositionForUri(contentUri)(state),
|
position: makeSelectContentPositionForUri(contentUri)(state),
|
||||||
purchasedUris: selectPurchasedUris(state),
|
purchasedUris: selectPurchasedUris(state),
|
||||||
failedPurchaseUris: selectFailedPurchaseUris(state),
|
failedPurchaseUris: selectFailedPurchaseUris(state),
|
||||||
@@ -95,7 +96,7 @@ const perform = dispatch => ({
|
|||||||
resolveUris: uris => dispatch(doResolveUris(uris)),
|
resolveUris: uris => dispatch(doResolveUris(uris)),
|
||||||
sendTip: (amount, claimId, isSupport, successCallback, errorCallback) =>
|
sendTip: (amount, claimId, isSupport, successCallback, errorCallback) =>
|
||||||
dispatch(doSendTip(amount, claimId, isSupport, successCallback, errorCallback)),
|
dispatch(doSendTip(amount, claimId, isSupport, successCallback, errorCallback)),
|
||||||
setPlayerVisible: () => dispatch(doSetPlayerVisible(true)),
|
setPlayerVisible: (visible, uri) => dispatch(doSetPlayerVisible(visible, uri)),
|
||||||
stopDownload: (uri, fileInfo) => dispatch(doStopDownloadingFile(uri, fileInfo)),
|
stopDownload: (uri, fileInfo) => dispatch(doStopDownloadingFile(uri, fileInfo)),
|
||||||
toggleFullscreenMode: mode => dispatch(doToggleFullscreenMode(mode)),
|
toggleFullscreenMode: mode => dispatch(doToggleFullscreenMode(mode)),
|
||||||
});
|
});
|
||||||
|
|||||||
+284
-117
@@ -9,6 +9,7 @@ import {
|
|||||||
Image,
|
Image,
|
||||||
Linking,
|
Linking,
|
||||||
NativeModules,
|
NativeModules,
|
||||||
|
Platform,
|
||||||
ScrollView,
|
ScrollView,
|
||||||
StatusBar,
|
StatusBar,
|
||||||
StyleSheet,
|
StyleSheet,
|
||||||
@@ -17,10 +18,10 @@ import {
|
|||||||
TouchableOpacity,
|
TouchableOpacity,
|
||||||
TouchableWithoutFeedback,
|
TouchableWithoutFeedback,
|
||||||
View,
|
View,
|
||||||
WebView,
|
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
|
import { WebView } from 'react-native-webview';
|
||||||
import { NavigationEvents } from 'react-navigation';
|
import { NavigationEvents } from 'react-navigation';
|
||||||
import { navigateBack, navigateToUri, formatLbryUrlForWeb } from 'utils/helper';
|
import { navigateBack, navigateToUri, formatBytes, formatLbryUrlForWeb } from 'utils/helper';
|
||||||
import Icon from 'react-native-vector-icons/FontAwesome5';
|
import Icon from 'react-native-vector-icons/FontAwesome5';
|
||||||
import ImageViewer from 'react-native-image-zoom-viewer';
|
import ImageViewer from 'react-native-image-zoom-viewer';
|
||||||
import Button from 'component/button';
|
import Button from 'component/button';
|
||||||
@@ -37,6 +38,7 @@ import FloatingWalletBalance from 'component/floatingWalletBalance';
|
|||||||
import Link from 'component/link';
|
import Link from 'component/link';
|
||||||
import MediaPlayer from 'component/mediaPlayer';
|
import MediaPlayer from 'component/mediaPlayer';
|
||||||
import ModalTipView from 'component/modalTipView';
|
import ModalTipView from 'component/modalTipView';
|
||||||
|
import ProgressCircle from 'react-native-progress-circle';
|
||||||
import RelatedContent from 'component/relatedContent';
|
import RelatedContent from 'component/relatedContent';
|
||||||
import SubscribeButton from 'component/subscribeButton';
|
import SubscribeButton from 'component/subscribeButton';
|
||||||
import SubscribeNotificationButton from 'component/subscribeNotificationButton';
|
import SubscribeNotificationButton from 'component/subscribeNotificationButton';
|
||||||
@@ -45,6 +47,8 @@ import Video from 'react-native-video';
|
|||||||
import FileRewardsDriver from 'component/fileRewardsDriver';
|
import FileRewardsDriver from 'component/fileRewardsDriver';
|
||||||
import filePageStyle from 'styles/filePage';
|
import filePageStyle from 'styles/filePage';
|
||||||
import uriBarStyle from 'styles/uriBar';
|
import uriBarStyle from 'styles/uriBar';
|
||||||
|
import RNFS from 'react-native-fs';
|
||||||
|
import showdown from 'showdown';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
|
||||||
class FilePage extends React.PureComponent {
|
class FilePage extends React.PureComponent {
|
||||||
@@ -58,6 +62,14 @@ class FilePage extends React.PureComponent {
|
|||||||
|
|
||||||
startTime = null;
|
startTime = null;
|
||||||
|
|
||||||
|
webView = null;
|
||||||
|
|
||||||
|
converter = null;
|
||||||
|
|
||||||
|
linkHandlerScript = `(function () {
|
||||||
|
window.onclick = function(evt) { evt.preventDefault(); window.ReactNativeWebView.postMessage(evt.target.href); evt.stopPropagation(); }
|
||||||
|
}());`;
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
@@ -83,6 +95,7 @@ class FilePage extends React.PureComponent {
|
|||||||
showImageViewer: false,
|
showImageViewer: false,
|
||||||
showWebView: false,
|
showWebView: false,
|
||||||
showTipView: false,
|
showTipView: false,
|
||||||
|
playbackStarted: false,
|
||||||
playerBgHeight: 0,
|
playerBgHeight: 0,
|
||||||
playerHeight: 0,
|
playerHeight: 0,
|
||||||
uri: null,
|
uri: null,
|
||||||
@@ -104,6 +117,9 @@ class FilePage extends React.PureComponent {
|
|||||||
onComponentFocused = () => {
|
onComponentFocused = () => {
|
||||||
StatusBar.setHidden(false);
|
StatusBar.setHidden(false);
|
||||||
NativeModules.Firebase.setCurrentScreen('File').then(result => {
|
NativeModules.Firebase.setCurrentScreen('File').then(result => {
|
||||||
|
const { setPlayerVisible } = this.props;
|
||||||
|
|
||||||
|
DeviceEventEmitter.addListener('onDownloadAborted', this.handleDownloadAborted);
|
||||||
DeviceEventEmitter.addListener('onStoragePermissionGranted', this.handleStoragePermissionGranted);
|
DeviceEventEmitter.addListener('onStoragePermissionGranted', this.handleStoragePermissionGranted);
|
||||||
DeviceEventEmitter.addListener('onStoragePermissionRefused', this.handleStoragePermissionRefused);
|
DeviceEventEmitter.addListener('onStoragePermissionRefused', this.handleStoragePermissionRefused);
|
||||||
|
|
||||||
@@ -111,6 +127,7 @@ class FilePage extends React.PureComponent {
|
|||||||
const { uri, uriVars } = navigation.state.params;
|
const { uri, uriVars } = navigation.state.params;
|
||||||
this.setState({ uri, uriVars });
|
this.setState({ uri, uriVars });
|
||||||
|
|
||||||
|
setPlayerVisible(true, uri);
|
||||||
if (!isResolvingUri && !claim) resolveUri(uri);
|
if (!isResolvingUri && !claim) resolveUri(uri);
|
||||||
|
|
||||||
this.fetchFileInfo(uri, this.props);
|
this.fetchFileInfo(uri, this.props);
|
||||||
@@ -145,13 +162,12 @@ class FilePage extends React.PureComponent {
|
|||||||
failedPurchaseUris: prevFailedPurchaseUris,
|
failedPurchaseUris: prevFailedPurchaseUris,
|
||||||
fetchViewCount,
|
fetchViewCount,
|
||||||
purchasedUris: prevPurchasedUris,
|
purchasedUris: prevPurchasedUris,
|
||||||
|
purchaseUriErrorMessage: prevPurchaseUriErrorMessage,
|
||||||
navigation,
|
navigation,
|
||||||
contentType,
|
contentType,
|
||||||
notify,
|
notify,
|
||||||
recommendedContent: prevRecommendedContent,
|
|
||||||
drawerStack: prevDrawerStack,
|
drawerStack: prevDrawerStack,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const { uri } = navigation.state.params;
|
|
||||||
const {
|
const {
|
||||||
currentRoute: prevRoute,
|
currentRoute: prevRoute,
|
||||||
failedPurchaseUris,
|
failedPurchaseUris,
|
||||||
@@ -160,39 +176,41 @@ class FilePage extends React.PureComponent {
|
|||||||
purchaseUriErrorMessage,
|
purchaseUriErrorMessage,
|
||||||
streamingUrl,
|
streamingUrl,
|
||||||
drawerStack,
|
drawerStack,
|
||||||
recommendedContent,
|
|
||||||
resolveUris,
|
resolveUris,
|
||||||
} = nextProps;
|
} = nextProps;
|
||||||
|
const uri = this.getPurchaseUrl();
|
||||||
|
|
||||||
if (Constants.ROUTE_FILE === currentRoute && currentRoute !== prevRoute) {
|
if (Constants.ROUTE_FILE === currentRoute && currentRoute !== prevRoute) {
|
||||||
this.onComponentFocused();
|
this.onComponentFocused();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (failedPurchaseUris.includes(uri) && !purchasedUris.includes(uri)) {
|
if (failedPurchaseUris.includes(uri) && prevPurchaseUriErrorMessage !== purchaseUriErrorMessage) {
|
||||||
if (purchaseUriErrorMessage && purchaseUriErrorMessage.trim().length > 0) {
|
if (purchaseUriErrorMessage && purchaseUriErrorMessage.trim().length > 0) {
|
||||||
notify({ message: purchaseUriErrorMessage, isError: true });
|
notify({ message: purchaseUriErrorMessage, isError: true });
|
||||||
}
|
}
|
||||||
this.setState({ downloadPressed: false, fileViewLogged: false, mediaLoaded: false });
|
this.setState({ downloadPressed: false, fileViewLogged: false, mediaLoaded: false, showRecommended: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
const mediaType = Lbry.getMediaType(contentType);
|
const mediaType = Lbry.getMediaType(contentType);
|
||||||
const isPlayable = mediaType === 'video' || mediaType === 'audio';
|
const isPlayable = mediaType === 'video' || mediaType === 'audio';
|
||||||
if (this.state.fileGetStarted || prevPurchasedUris.length !== purchasedUris.length) {
|
if (this.state.fileGetStarted || prevPurchasedUris.length !== purchasedUris.length) {
|
||||||
const { permanent_url: permanentUrl } = claim;
|
const { permanent_url: permanentUrl, nout, txid } = claim;
|
||||||
if (purchasedUris.includes(uri) || purchasedUris.includes(permanentUrl)) {
|
const outpoint = `${txid}:${nout}`;
|
||||||
const { nout, txid } = claim;
|
if (this.state.fileGetStarted) {
|
||||||
const outpoint = `${txid}:${nout}`;
|
|
||||||
NativeModules.UtilityModule.queueDownload(outpoint);
|
NativeModules.UtilityModule.queueDownload(outpoint);
|
||||||
|
this.setState({ fileGetStarted: false });
|
||||||
|
}
|
||||||
|
|
||||||
|
if (purchasedUris.includes(uri) || purchasedUris.includes(permanentUrl)) {
|
||||||
// If the media is playable, file/view will be done in onPlaybackStarted
|
// If the media is playable, file/view will be done in onPlaybackStarted
|
||||||
if (!isPlayable && !this.state.fileViewLogged) {
|
if (!isPlayable && !this.state.fileViewLogged) {
|
||||||
this.logFileView(uri, claim);
|
this.logFileView(uri, claim);
|
||||||
}
|
}
|
||||||
this.setState({ fileGetStarted: false });
|
|
||||||
}
|
}
|
||||||
NativeModules.UtilityModule.checkDownloads();
|
NativeModules.UtilityModule.checkDownloads();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.state.streamingMode && isPlayable) {
|
if ((!fileInfo || (fileInfo && !fileInfo.completed)) && !this.state.streamingMode && isPlayable) {
|
||||||
if (streamingUrl) {
|
if (streamingUrl) {
|
||||||
this.setState({ streamingMode: true, currentStreamUrl: streamingUrl });
|
this.setState({ streamingMode: true, currentStreamUrl: streamingUrl });
|
||||||
} else if (fileInfo && fileInfo.streaming_url) {
|
} else if (fileInfo && fileInfo.streaming_url) {
|
||||||
@@ -214,16 +232,12 @@ class FilePage extends React.PureComponent {
|
|||||||
if (claim && !this.state.viewCountFetched) {
|
if (claim && !this.state.viewCountFetched) {
|
||||||
this.setState({ viewCountFetched: true }, () => fetchViewCount(claim.claim_id));
|
this.setState({ viewCountFetched: true }, () => fetchViewCount(claim.claim_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
|
||||||
(!prevRecommendedContent && recommendedContent) ||
|
|
||||||
(recommendedContent && prevRecommendedContent && recommendedContent.length !== prevRecommendedContent.length)
|
|
||||||
) {
|
|
||||||
resolveUris(recommendedContent);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
shouldComponentUpdate(nextProps, nextState) {
|
shouldComponentUpdate(nextProps, nextState) {
|
||||||
|
const { fileInfo: prevFileInfo } = this.props;
|
||||||
|
const { fileInfo } = nextProps;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
Object.keys(this.difference(nextProps, this.props)).length > 0 ||
|
Object.keys(this.difference(nextProps, this.props)).length > 0 ||
|
||||||
Object.keys(this.difference(nextState, this.state)).length > 0
|
Object.keys(this.difference(nextState, this.state)).length > 0
|
||||||
@@ -231,17 +245,7 @@ class FilePage extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate(prevProps, prevState) {
|
componentDidUpdate(prevProps, prevState) {
|
||||||
const {
|
const { claim, contentType, costInfo, fileInfo, isResolvingUri, resolveUri, navigation, title } = this.props;
|
||||||
claim,
|
|
||||||
contentType,
|
|
||||||
costInfo,
|
|
||||||
fileInfo,
|
|
||||||
isResolvingUri,
|
|
||||||
resolveUri,
|
|
||||||
navigation,
|
|
||||||
purchaseUri,
|
|
||||||
title,
|
|
||||||
} = this.props;
|
|
||||||
const { uri } = this.state;
|
const { uri } = this.state;
|
||||||
if (!isResolvingUri && claim === undefined && uri) {
|
if (!isResolvingUri && claim === undefined && uri) {
|
||||||
resolveUri(uri);
|
resolveUri(uri);
|
||||||
@@ -265,9 +269,27 @@ class FilePage extends React.PureComponent {
|
|||||||
this.setState({ autoGetAttempted: true }, () => this.checkStoragePermissionForDownload());
|
this.setState({ autoGetAttempted: true }, () => this.checkStoragePermissionForDownload());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((costInfo && costInfo.cost > 0) || !isPlayable) && !this.state.showRecommended) {
|
if (((costInfo && costInfo.cost > 0) || !isPlayable) && (!fileInfo && !isViewable) && !this.state.showRecommended) {
|
||||||
this.setState({ showRecommended: true });
|
this.setState({ showRecommended: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
!fileInfo &&
|
||||||
|
!this.state.autoDownloadStarted &&
|
||||||
|
claim &&
|
||||||
|
costInfo &&
|
||||||
|
costInfo.cost === 0 &&
|
||||||
|
(isPlayable || (this.state.uriVars && this.state.uriVars.download === 'true'))
|
||||||
|
) {
|
||||||
|
this.setState({ autoDownloadStarted: true }, () => {
|
||||||
|
if (!isPlayable) {
|
||||||
|
this.checkStoragePermissionForDownload();
|
||||||
|
} else {
|
||||||
|
this.confirmPurchaseUri(claim.permanent_url, costInfo, !isPlayable);
|
||||||
|
}
|
||||||
|
NativeModules.UtilityModule.checkDownloads();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fetchFileInfo(uri, props) {
|
fetchFileInfo(uri, props) {
|
||||||
@@ -284,11 +306,8 @@ class FilePage extends React.PureComponent {
|
|||||||
|
|
||||||
handleFullscreenToggle = isFullscreen => {
|
handleFullscreenToggle = isFullscreen => {
|
||||||
const { toggleFullscreenMode } = this.props;
|
const { toggleFullscreenMode } = this.props;
|
||||||
this.setState({ fullscreenMode: isFullscreen });
|
|
||||||
toggleFullscreenMode(isFullscreen);
|
toggleFullscreenMode(isFullscreen);
|
||||||
|
|
||||||
StatusBar.setHidden(isFullscreen);
|
|
||||||
|
|
||||||
if (isFullscreen) {
|
if (isFullscreen) {
|
||||||
// fullscreen, so change orientation to landscape mode
|
// fullscreen, so change orientation to landscape mode
|
||||||
NativeModules.ScreenOrientation.lockOrientationLandscape();
|
NativeModules.ScreenOrientation.lockOrientationLandscape();
|
||||||
@@ -299,9 +318,12 @@ class FilePage extends React.PureComponent {
|
|||||||
// Switch back to portrait mode when the media is not fullscreen
|
// Switch back to portrait mode when the media is not fullscreen
|
||||||
NativeModules.ScreenOrientation.lockOrientationPortrait();
|
NativeModules.ScreenOrientation.lockOrientationPortrait();
|
||||||
|
|
||||||
// hide the navigation bar (on devices that have the soft navigation bar)
|
// show the navigation bar (on devices that have the soft navigation bar)
|
||||||
NativeModules.UtilityModule.showNavigationBar();
|
NativeModules.UtilityModule.showNavigationBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.setState({ fullscreenMode: isFullscreen });
|
||||||
|
StatusBar.setHidden(isFullscreen);
|
||||||
};
|
};
|
||||||
|
|
||||||
onEditPressed = () => {
|
onEditPressed = () => {
|
||||||
@@ -321,11 +343,12 @@ class FilePage extends React.PureComponent {
|
|||||||
text: __('Yes'),
|
text: __('Yes'),
|
||||||
onPress: () => {
|
onPress: () => {
|
||||||
const { uri } = navigation.state.params;
|
const { uri } = navigation.state.params;
|
||||||
|
const purchaseUrl = this.getPurchaseUrl();
|
||||||
|
|
||||||
deleteFile(`${claim.txid}:${claim.nout}`, true);
|
deleteFile(`${claim.txid}:${claim.nout}`, true);
|
||||||
deletePurchasedUri(uri);
|
deletePurchasedUri(uri);
|
||||||
|
|
||||||
NativeModules.UtilityModule.deleteDownload(uri);
|
NativeModules.UtilityModule.deleteDownload(normalizeURI(purchaseUrl));
|
||||||
this.setState({
|
this.setState({
|
||||||
downloadPressed: false,
|
downloadPressed: false,
|
||||||
fileViewLogged: false,
|
fileViewLogged: false,
|
||||||
@@ -353,19 +376,18 @@ class FilePage extends React.PureComponent {
|
|||||||
const { deletePurchasedUri, fileInfo, navigation, notify, stopDownload } = this.props;
|
const { deletePurchasedUri, fileInfo, navigation, notify, stopDownload } = this.props;
|
||||||
|
|
||||||
Alert.alert(
|
Alert.alert(
|
||||||
'Stop download',
|
__('Stop download'),
|
||||||
'Are you sure you want to stop downloading this file?',
|
__('Are you sure you want to stop downloading this file?'),
|
||||||
[
|
[
|
||||||
{ text: 'No' },
|
{ text: __('No') },
|
||||||
{
|
{
|
||||||
text: 'Yes',
|
text: __('Yes'),
|
||||||
onPress: () => {
|
onPress: () => {
|
||||||
const { uri } = navigation.state.params;
|
const uri = this.getPurchaseUrl();
|
||||||
stopDownload(uri, fileInfo);
|
stopDownload(uri, fileInfo);
|
||||||
deletePurchasedUri(uri);
|
deletePurchasedUri(uri);
|
||||||
if (NativeModules.UtilityModule) {
|
NativeModules.UtilityModule.deleteDownload(normalizeURI(uri));
|
||||||
NativeModules.UtilityModule.deleteDownload(uri);
|
|
||||||
}
|
|
||||||
this.setState({
|
this.setState({
|
||||||
downloadPressed: false,
|
downloadPressed: false,
|
||||||
fileViewLogged: false,
|
fileViewLogged: false,
|
||||||
@@ -376,7 +398,7 @@ class FilePage extends React.PureComponent {
|
|||||||
// there can be a bit of lag between the user pressing Yes and the UI being updated
|
// there can be a bit of lag between the user pressing Yes and the UI being updated
|
||||||
// after the file_set_status and file_delete operations, so let the user know
|
// after the file_set_status and file_delete operations, so let the user know
|
||||||
notify({
|
notify({
|
||||||
message: 'The download will stop momentarily. You do not need to wait to discover something else.',
|
message: __('The download will stop momentarily. You do not need to wait to discover something else.'),
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -401,12 +423,29 @@ class FilePage extends React.PureComponent {
|
|||||||
if (window.currentMediaInfo) {
|
if (window.currentMediaInfo) {
|
||||||
window.currentMediaInfo = null;
|
window.currentMediaInfo = null;
|
||||||
}
|
}
|
||||||
window.player = null;
|
DeviceEventEmitter.removeListener('onDownloadAborted', this.handleDownloadAborted);
|
||||||
|
|
||||||
DeviceEventEmitter.removeListener('onStoragePermissionGranted', this.handleStoragePermissionGranted);
|
DeviceEventEmitter.removeListener('onStoragePermissionGranted', this.handleStoragePermissionGranted);
|
||||||
DeviceEventEmitter.removeListener('onStoragePermissionRefused', this.handleStoragePermissionRefused);
|
DeviceEventEmitter.removeListener('onStoragePermissionRefused', this.handleStoragePermissionRefused);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleDownloadAborted = evt => {
|
||||||
|
const { deletePurchasedUri, fileInfo, stopDownload } = this.props;
|
||||||
|
const { uri, outpoint } = evt;
|
||||||
|
const purchaseUrl = normalizeURI(this.getPurchaseUrl());
|
||||||
|
if (purchaseUrl === uri) {
|
||||||
|
stopDownload(uri, fileInfo);
|
||||||
|
deletePurchasedUri(uri);
|
||||||
|
NativeModules.UtilityModule.deleteDownload(normalizeURI(uri));
|
||||||
|
|
||||||
|
this.setState({
|
||||||
|
downloadPressed: false,
|
||||||
|
fileViewLogged: false,
|
||||||
|
mediaLoaded: false,
|
||||||
|
stopDownloadConfirmed: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
handleStoragePermissionGranted = () => {
|
handleStoragePermissionGranted = () => {
|
||||||
// permission was allowed. proceed to download
|
// permission was allowed. proceed to download
|
||||||
const { notify } = this.props;
|
const { notify } = this.props;
|
||||||
@@ -419,7 +458,7 @@ class FilePage extends React.PureComponent {
|
|||||||
})
|
})
|
||||||
.then(() => this.performDownload())
|
.then(() => this.performDownload())
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
notify({ message: 'The file could not be downloaded to the default download directory.', isError: true });
|
notify({ message: __('The file could not be downloaded to the default download directory.'), isError: true });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -437,12 +476,14 @@ class FilePage extends React.PureComponent {
|
|||||||
if (!fileInfo) {
|
if (!fileInfo) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return 'file:///' + fileInfo.download_path;
|
return 'file://' + fileInfo.download_path;
|
||||||
};
|
};
|
||||||
|
|
||||||
playerUriForFileInfo = fileInfo => {
|
playerUriForFileInfo = fileInfo => {
|
||||||
const { streamingUrl } = this.props;
|
const { streamingUrl } = this.props;
|
||||||
if (fileInfo && fileInfo.download_path) {
|
if (!this.state.streamingMode && fileInfo && fileInfo.download_path && fileInfo.completed) {
|
||||||
|
// take streamingMode in the state into account because if the download completes while
|
||||||
|
// the media is already streaming, it will restart from the beginning
|
||||||
return this.getEncodedDownloadPath(fileInfo);
|
return this.getEncodedDownloadPath(fileInfo);
|
||||||
}
|
}
|
||||||
if (streamingUrl) {
|
if (streamingUrl) {
|
||||||
@@ -549,7 +590,7 @@ class FilePage extends React.PureComponent {
|
|||||||
NativeModules.Firebase.track('play', payload);
|
NativeModules.Firebase.track('play', payload);
|
||||||
|
|
||||||
// only fetch recommended content after playback has started
|
// only fetch recommended content after playback has started
|
||||||
this.setState({ showRecommended: true });
|
this.setState({ playbackStarted: true, showRecommended: true });
|
||||||
};
|
};
|
||||||
|
|
||||||
onPlaybackFinished = () => {
|
onPlaybackFinished = () => {
|
||||||
@@ -605,13 +646,14 @@ class FilePage extends React.PureComponent {
|
|||||||
|
|
||||||
confirmPurchaseUri = (uri, costInfo, download) => {
|
confirmPurchaseUri = (uri, costInfo, download) => {
|
||||||
const { notify, purchaseUri, title } = this.props;
|
const { notify, purchaseUri, title } = this.props;
|
||||||
const { cost } = costInfo;
|
|
||||||
|
|
||||||
if (!costInfo) {
|
if (!costInfo) {
|
||||||
notify({ message: __('This content cannot be viewed at this time. Please try again in a bit.'), isError: true });
|
notify({ message: __('This content cannot be viewed at this time. Please try again in a bit.'), isError: true });
|
||||||
|
this.setState({ downloadPressed: false });
|
||||||
|
this.fetchCostInfo(uri, this.props);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const { cost } = costInfo;
|
||||||
if (costInfo.cost > 0) {
|
if (costInfo.cost > 0) {
|
||||||
Alert.alert(
|
Alert.alert(
|
||||||
__('Confirm Purchase'),
|
__('Confirm Purchase'),
|
||||||
@@ -641,27 +683,59 @@ class FilePage extends React.PureComponent {
|
|||||||
const isPlayable = mediaType === 'video' || mediaType === 'audio';
|
const isPlayable = mediaType === 'video' || mediaType === 'audio';
|
||||||
const isViewable = mediaType === 'image' || mediaType === 'text';
|
const isViewable = mediaType === 'image' || mediaType === 'text';
|
||||||
|
|
||||||
const { permanent_url: uri } = claim;
|
const purchaseUrl = this.getPurchaseUrl();
|
||||||
NativeModules.Firebase.track('purchase_uri', { uri: uri });
|
NativeModules.Firebase.track('purchase_uri', { uri: purchaseUrl });
|
||||||
|
|
||||||
if (!isPlayable) {
|
if (!isPlayable) {
|
||||||
this.checkStoragePermissionForDownload();
|
this.onDownloadPressed();
|
||||||
} else {
|
} else {
|
||||||
this.confirmPurchaseUri(uri, costInfo, !isPlayable);
|
this.confirmPurchaseUri(purchaseUrl, costInfo, !isPlayable);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isPlayable) {
|
if (isPlayable) {
|
||||||
this.startTime = Date.now();
|
this.startTime = Date.now();
|
||||||
this.setState({ downloadPressed: true, autoPlayMedia: true, stopDownloadConfirmed: false });
|
this.setState({ downloadPressed: true, autoPlayMedia: true, stopDownloadConfirmed: false });
|
||||||
setPlayerVisible();
|
|
||||||
}
|
}
|
||||||
if (isViewable) {
|
if (isViewable) {
|
||||||
this.setState({ downloadPressed: true });
|
this.setState({ downloadPressed: true });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
getPurchaseUrl = () => {
|
||||||
|
const { claim, navigation } = this.props;
|
||||||
|
const permanentUrl = claim ? claim.permanent_url : null;
|
||||||
|
|
||||||
|
let purchaseUrl;
|
||||||
|
if (navigation.state.params) {
|
||||||
|
const { uri, fullUri } = navigation.state.params;
|
||||||
|
purchaseUrl = fullUri || permanentUrl || uri;
|
||||||
|
}
|
||||||
|
if (!purchaseUrl && permanentUrl) {
|
||||||
|
purchaseUrl = permanentUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
return purchaseUrl;
|
||||||
|
};
|
||||||
|
|
||||||
onDownloadPressed = () => {
|
onDownloadPressed = () => {
|
||||||
this.checkStoragePermissionForDownload();
|
const { claim, title } = this.props;
|
||||||
|
const fileSize = claim && claim.value && claim.value.source ? claim.value.source.size : 0;
|
||||||
|
Alert.alert(
|
||||||
|
__('Download file'),
|
||||||
|
fileSize > 0
|
||||||
|
? __('Save "%title%" (%size%) to your device', { title, size: formatBytes(fileSize, 0) })
|
||||||
|
: __('Save "%title%" to your device', { title }),
|
||||||
|
[
|
||||||
|
{ text: __('No') },
|
||||||
|
{
|
||||||
|
text: __('Yes'),
|
||||||
|
onPress: () => {
|
||||||
|
this.checkStoragePermissionForDownload();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
{ cancelable: true },
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
checkStoragePermissionForDownload = () => {
|
checkStoragePermissionForDownload = () => {
|
||||||
@@ -677,7 +751,7 @@ class FilePage extends React.PureComponent {
|
|||||||
};
|
};
|
||||||
|
|
||||||
performDownload = () => {
|
performDownload = () => {
|
||||||
const { claim, costInfo, purchaseUri } = this.props;
|
const { claim, costInfo, fileGet, fileInfo, purchasedUris } = this.props;
|
||||||
this.setState(
|
this.setState(
|
||||||
{
|
{
|
||||||
downloadPressed: true,
|
downloadPressed: true,
|
||||||
@@ -685,30 +759,39 @@ class FilePage extends React.PureComponent {
|
|||||||
stopDownloadConfirmed: false,
|
stopDownloadConfirmed: false,
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
this.confirmPurchaseUri(claim.permanent_url, costInfo, true);
|
const url = this.getPurchaseUrl();
|
||||||
|
if (fileInfo || purchasedUris.includes(url)) {
|
||||||
|
// file already in library or URI already purchased, use fileGet directly
|
||||||
|
this.setState({ fileGetStarted: true }, () => fileGet(url, true));
|
||||||
|
} else {
|
||||||
|
this.confirmPurchaseUri(url, costInfo, true);
|
||||||
|
}
|
||||||
NativeModules.UtilityModule.checkDownloads();
|
NativeModules.UtilityModule.checkDownloads();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
onBackButtonPressed = () => {
|
onBackButtonPressed = () => {
|
||||||
const { navigation, drawerStack, popDrawerStack } = this.props;
|
const { navigation, drawerStack, popDrawerStack, setPlayerVisible } = this.props;
|
||||||
navigateBack(navigation, drawerStack, popDrawerStack);
|
navigateBack(navigation, drawerStack, popDrawerStack, setPlayerVisible);
|
||||||
};
|
};
|
||||||
|
|
||||||
onSaveFilePressed = () => {
|
onOpenFilePressed = () => {
|
||||||
const { costInfo, fileGet, fileInfo, navigation, purchasedUris, purchaseUri } = this.props;
|
const { contentType, fileInfo, notify } = this.props;
|
||||||
const { uri } = navigation.state.params;
|
const localFileUri = this.localUriForFileInfo(fileInfo);
|
||||||
|
const mediaType = Lbry.getMediaType(contentType);
|
||||||
if (fileInfo || purchasedUris.includes(uri)) {
|
const isViewable = mediaType === 'image' || mediaType === 'text';
|
||||||
// file already in library or URI already purchased, use fileGet directly
|
const isPlayable = mediaType === 'video' || mediaType === 'audio';
|
||||||
this.setState({ fileGetStarted: true }, () => fileGet(uri, true));
|
if (isViewable) {
|
||||||
|
this.openFile(localFileUri, mediaType, contentType);
|
||||||
|
} else if (isPlayable) {
|
||||||
|
notify({ message: __('Please press the Play button.') });
|
||||||
} else {
|
} else {
|
||||||
this.checkStoragePermissionForDownload();
|
notify({ message: __('This file cannot be displayed in the LBRY app.') });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
openFile = (localFileUri, mediaType) => {
|
openFile = (localFileUri, mediaType, contentType) => {
|
||||||
const { pushDrawerStack } = this.props;
|
const { pushDrawerStack } = this.props;
|
||||||
const isWebViewable = mediaType === 'text';
|
const isWebViewable = mediaType === 'text';
|
||||||
|
|
||||||
@@ -723,6 +806,7 @@ class FilePage extends React.PureComponent {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
showImageViewer: true,
|
showImageViewer: true,
|
||||||
|
showRecommended: true,
|
||||||
},
|
},
|
||||||
() => pushDrawerStack(Constants.DRAWER_ROUTE_FILE_VIEW),
|
() => pushDrawerStack(Constants.DRAWER_ROUTE_FILE_VIEW),
|
||||||
);
|
);
|
||||||
@@ -734,13 +818,88 @@ class FilePage extends React.PureComponent {
|
|||||||
this.setState(
|
this.setState(
|
||||||
{
|
{
|
||||||
showWebView: true,
|
showWebView: true,
|
||||||
|
showRecommended: true,
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
pushDrawerStack(Constants.DRAWER_ROUTE_FILE_VIEW);
|
||||||
},
|
},
|
||||||
() => pushDrawerStack(Constants.DRAWER_ROUTE_FILE_VIEW),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
handleWebViewLoad = () => {
|
||||||
|
const { contentType, fileInfo } = this.props;
|
||||||
|
const localFileUri = this.localUriForFileInfo(fileInfo);
|
||||||
|
if (this.webView && ['text/markdown', 'text/md'].includes(contentType)) {
|
||||||
|
RNFS.readFile(localFileUri, 'utf8').then(markdown => {
|
||||||
|
if (this.webView) {
|
||||||
|
if (!this.converter) {
|
||||||
|
this.converter = new showdown.Converter();
|
||||||
|
}
|
||||||
|
const html = this.converter.makeHtml(markdown);
|
||||||
|
this.webView.injectJavaScript(
|
||||||
|
'document.getElementById("content").innerHTML = \'' +
|
||||||
|
html.replace(/\n/g, '').replace(/'/g, "\\'") +
|
||||||
|
"'; true;",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
handleWebViewMessage = evt => {
|
||||||
|
const href = evt.nativeEvent.data;
|
||||||
|
if (href && href.startsWith('http')) {
|
||||||
|
Linking.openURL(href);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
buildWebViewSource = () => {
|
||||||
|
const { contentType, fileInfo } = this.props;
|
||||||
|
const localFileUri = this.localUriForFileInfo(fileInfo);
|
||||||
|
|
||||||
|
if (['text/markdown', 'text/md'].includes(contentType)) {
|
||||||
|
let fontdecl = '';
|
||||||
|
if (Platform.OS === 'android') {
|
||||||
|
fontdecl = `
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Inter';
|
||||||
|
src: url('file:///android_asset/fonts/Inter-Regular.otf');
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Inter;
|
||||||
|
src: url('file:///android_asset/fonts/Inter-Bold.otf');
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
|
const html = `
|
||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width, user-scalable=no"/>
|
||||||
|
<style type="text/css">
|
||||||
|
${fontdecl}
|
||||||
|
body { font-family: 'Inter', sans-serif; margin: 16px }
|
||||||
|
img { width: 100%; }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="content"></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
`;
|
||||||
|
|
||||||
|
return { html };
|
||||||
|
}
|
||||||
|
|
||||||
|
return { uri: localFileUri };
|
||||||
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
balance,
|
balance,
|
||||||
@@ -753,6 +912,7 @@ class FilePage extends React.PureComponent {
|
|||||||
contentType,
|
contentType,
|
||||||
tab,
|
tab,
|
||||||
rewardedContentClaimIds,
|
rewardedContentClaimIds,
|
||||||
|
isPlayerVisible,
|
||||||
isResolvingUri,
|
isResolvingUri,
|
||||||
blackListedOutpoints,
|
blackListedOutpoints,
|
||||||
myClaimUris,
|
myClaimUris,
|
||||||
@@ -760,8 +920,7 @@ class FilePage extends React.PureComponent {
|
|||||||
position,
|
position,
|
||||||
purchaseUri,
|
purchaseUri,
|
||||||
pushDrawerStack,
|
pushDrawerStack,
|
||||||
isSearchingRecommendContent,
|
setPlayerVisible,
|
||||||
recommendedContent,
|
|
||||||
thumbnail,
|
thumbnail,
|
||||||
title,
|
title,
|
||||||
viewCount,
|
viewCount,
|
||||||
@@ -889,25 +1048,9 @@ class FilePage extends React.PureComponent {
|
|||||||
const localFileUri = this.localUriForFileInfo(fileInfo);
|
const localFileUri = this.localUriForFileInfo(fileInfo);
|
||||||
const unsupported = !isPlayable && !canOpen;
|
const unsupported = !isPlayable && !canOpen;
|
||||||
|
|
||||||
if (
|
|
||||||
!this.state.autoDownloadStarted &&
|
|
||||||
claim &&
|
|
||||||
costInfo &&
|
|
||||||
((isPlayable && costInfo.cost === 0) || (this.state.uriVars && this.state.uriVars.download === 'true'))
|
|
||||||
) {
|
|
||||||
this.setState({ autoDownloadStarted: true }, () => {
|
|
||||||
if (!isPlayable) {
|
|
||||||
this.checkStoragePermissionForDownload();
|
|
||||||
} else {
|
|
||||||
this.confirmPurchaseUri(claim.permanent_url, costInfo, !isPlayable);
|
|
||||||
}
|
|
||||||
NativeModules.UtilityModule.checkDownloads();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.state.downloadPressed && canOpen && !this.state.autoOpened) {
|
if (this.state.downloadPressed && canOpen && !this.state.autoOpened) {
|
||||||
// automatically open a web viewable or image file after the download button is pressed
|
// automatically open a web viewable or image file after the download button is pressed
|
||||||
this.setState({ autoOpened: true }, () => this.openFile(localFileUri, mediaType));
|
this.setState({ autoOpened: true }, () => this.openFile(localFileUri, mediaType, contentType));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isChannel) {
|
if (isChannel) {
|
||||||
@@ -918,9 +1061,20 @@ class FilePage extends React.PureComponent {
|
|||||||
<View style={filePageStyle.pageContainer}>
|
<View style={filePageStyle.pageContainer}>
|
||||||
{!this.state.fullscreenMode && <UriBar value={uri} navigation={navigation} />}
|
{!this.state.fullscreenMode && <UriBar value={uri} navigation={navigation} />}
|
||||||
{innerContent}
|
{innerContent}
|
||||||
|
|
||||||
{this.state.showWebView && isWebViewable && (
|
{this.state.showWebView && isWebViewable && (
|
||||||
<WebView allowFileAccess source={{ uri: localFileUri }} style={filePageStyle.viewer} />
|
<WebView
|
||||||
|
ref={ref => {
|
||||||
|
this.webView = ref;
|
||||||
|
}}
|
||||||
|
allowFileAccess
|
||||||
|
javaScriptEnabled
|
||||||
|
originWhiteList={['*']}
|
||||||
|
source={this.buildWebViewSource()}
|
||||||
|
style={filePageStyle.viewer}
|
||||||
|
onLoad={this.handleWebViewLoad}
|
||||||
|
injectedJavaScript={this.linkHandlerScript}
|
||||||
|
onMessage={this.handleWebViewMessage}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
{this.state.showImageViewer && (
|
{this.state.showImageViewer && (
|
||||||
<ImageViewer
|
<ImageViewer
|
||||||
@@ -979,7 +1133,7 @@ class FilePage extends React.PureComponent {
|
|||||||
<FileDownloadButton
|
<FileDownloadButton
|
||||||
uri={claim && claim.permanent_url ? claim.permanent_url : uri}
|
uri={claim && claim.permanent_url ? claim.permanent_url : uri}
|
||||||
style={filePageStyle.downloadButton}
|
style={filePageStyle.downloadButton}
|
||||||
openFile={() => this.openFile(localFileUri, mediaType)}
|
openFile={() => this.openFile(localFileUri, mediaType, contentType)}
|
||||||
isPlayable={isPlayable}
|
isPlayable={isPlayable}
|
||||||
isViewable={isViewable}
|
isViewable={isViewable}
|
||||||
onFileActionPress={this.onFileDownloadButtonPressed}
|
onFileActionPress={this.onFileDownloadButtonPressed}
|
||||||
@@ -991,6 +1145,7 @@ class FilePage extends React.PureComponent {
|
|||||||
uri={claim && claim.permanent_url ? claim.permanent_url : uri}
|
uri={claim && claim.permanent_url ? claim.permanent_url : uri}
|
||||||
style={filePageStyle.filePriceContainer}
|
style={filePageStyle.filePriceContainer}
|
||||||
textStyle={filePageStyle.filePriceText}
|
textStyle={filePageStyle.filePriceText}
|
||||||
|
iconStyle={filePageStyle.filePriceIcon}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
@@ -1014,7 +1169,9 @@ class FilePage extends React.PureComponent {
|
|||||||
{!innerContent &&
|
{!innerContent &&
|
||||||
(this.state.streamingMode || (canLoadMedia && fileInfo && isPlayable)) &&
|
(this.state.streamingMode || (canLoadMedia && fileInfo && isPlayable)) &&
|
||||||
this.state.fullscreenMode && <View style={fsPlayerBgStyle} />}
|
this.state.fullscreenMode && <View style={fsPlayerBgStyle} />}
|
||||||
{!innerContent && (this.state.streamingMode || (canLoadMedia && fileInfo && isPlayable)) && (
|
{isPlayerVisible &&
|
||||||
|
!innerContent &&
|
||||||
|
(this.state.streamingMode || (canLoadMedia && fileInfo && isPlayable)) && (
|
||||||
<MediaPlayer
|
<MediaPlayer
|
||||||
claim={claim}
|
claim={claim}
|
||||||
assignPlayer={ref => {
|
assignPlayer={ref => {
|
||||||
@@ -1083,29 +1240,40 @@ class FilePage extends React.PureComponent {
|
|||||||
<Text style={filePageStyle.largeButtonText}>{__('Tip')}</Text>
|
<Text style={filePageStyle.largeButtonText}>{__('Tip')}</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|
||||||
{!canEdit && !isPlayable && (
|
{!canEdit && (
|
||||||
<View style={filePageStyle.sharedLargeButton}>
|
<View style={filePageStyle.sharedLargeButton}>
|
||||||
{!fileInfo ||
|
{!this.state.downloadPressed &&
|
||||||
(fileInfo.written_bytes <= 0 && !completed && (
|
(!fileInfo || !fileInfo.download_path || (fileInfo.written_bytes <= 0 && !completed)) && (
|
||||||
<TouchableOpacity style={filePageStyle.innerLargeButton} onPress={this.onDownloadPressed}>
|
<TouchableOpacity style={filePageStyle.innerLargeButton} onPress={this.onDownloadPressed}>
|
||||||
<Icon name={'download'} size={16} style={filePageStyle.largeButtonIcon} />
|
<Icon name={'download'} size={16} style={filePageStyle.largeButtonIcon} />
|
||||||
<Text style={filePageStyle.largeButtonText}>{__('Download')}</Text>
|
<Text style={filePageStyle.largeButtonText}>{__('Download')}</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
))}
|
)}
|
||||||
|
|
||||||
|
{this.state.downloadPressed && (!fileInfo || fileInfo.written_bytes === 0) && (
|
||||||
|
<ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />
|
||||||
|
)}
|
||||||
|
|
||||||
{!completed &&
|
{!completed &&
|
||||||
fileInfo &&
|
fileInfo &&
|
||||||
!fileInfo.stopped &&
|
|
||||||
fileInfo.written_bytes > 0 &&
|
fileInfo.written_bytes > 0 &&
|
||||||
fileInfo.written_bytes < fileInfo.total_bytes &&
|
fileInfo.written_bytes < fileInfo.total_bytes &&
|
||||||
!this.state.stopDownloadConfirmed && (
|
!this.state.stopDownloadConfirmed && (
|
||||||
<TouchableOpacity style={filePageStyle.innerLargeButton} onPress={this.onStopDownloadPressed}>
|
<TouchableOpacity style={filePageStyle.innerLargeButton} onPress={this.onStopDownloadPressed}>
|
||||||
<Icon name={'stop'} size={16} style={filePageStyle.largeButtonIcon} />
|
<ProgressCircle
|
||||||
|
percent={(fileInfo.written_bytes / fileInfo.total_bytes) * 100}
|
||||||
|
radius={9}
|
||||||
|
borderWidth={2}
|
||||||
|
shadowColor={Colors.ActionGrey}
|
||||||
|
color={Colors.NextLbryGreen}
|
||||||
|
>
|
||||||
|
<Icon name={'stop'} size={6} style={filePageStyle.largeButtonIcon} />
|
||||||
|
</ProgressCircle>
|
||||||
<Text style={filePageStyle.largeButtonText}>{__('Stop')}</Text>
|
<Text style={filePageStyle.largeButtonText}>{__('Stop')}</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{completed && fileInfo && fileInfo.written_bytes >= fileInfo.total_bytes && (
|
{completed && fileInfo && (
|
||||||
<TouchableOpacity style={filePageStyle.innerLargeButton} onPress={this.onOpenFilePressed}>
|
<TouchableOpacity style={filePageStyle.innerLargeButton} onPress={this.onOpenFilePressed}>
|
||||||
<Icon name={'folder-open'} size={16} style={filePageStyle.largeButtonIcon} />
|
<Icon name={'folder-open'} size={16} style={filePageStyle.largeButtonIcon} />
|
||||||
<Text style={filePageStyle.largeButtonText}>{__('Open')}</Text>
|
<Text style={filePageStyle.largeButtonText}>{__('Open')}</Text>
|
||||||
@@ -1155,6 +1323,7 @@ class FilePage extends React.PureComponent {
|
|||||||
null,
|
null,
|
||||||
false,
|
false,
|
||||||
fullChannelUri,
|
fullChannelUri,
|
||||||
|
setPlayerVisible,
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
@@ -1173,14 +1342,6 @@ class FilePage extends React.PureComponent {
|
|||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
<View style={filePageStyle.subscriptionRow}>
|
<View style={filePageStyle.subscriptionRow}>
|
||||||
{false && ((isPlayable && !fileInfo) || (isPlayable && fileInfo && !fileInfo.download_path)) && (
|
|
||||||
<Button
|
|
||||||
style={[filePageStyle.actionButton, filePageStyle.saveFileButton]}
|
|
||||||
theme={'light'}
|
|
||||||
icon={'download'}
|
|
||||||
onPress={this.onSaveFilePressed}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
{channelName && (
|
{channelName && (
|
||||||
<SubscribeButton
|
<SubscribeButton
|
||||||
style={filePageStyle.actionButton}
|
style={filePageStyle.actionButton}
|
||||||
@@ -1223,7 +1384,13 @@ class FilePage extends React.PureComponent {
|
|||||||
<View onLayout={this.setRelatedContentPosition} />
|
<View onLayout={this.setRelatedContentPosition} />
|
||||||
|
|
||||||
{this.state.showRecommended && (
|
{this.state.showRecommended && (
|
||||||
<RelatedContent navigation={navigation} title={title} uri={fullUri} fullUri={fullUri} />
|
<RelatedContent
|
||||||
|
navigation={navigation}
|
||||||
|
claimId={claim.claim_id}
|
||||||
|
title={title}
|
||||||
|
uri={fullUri}
|
||||||
|
fullUri={fullUri}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
import { connect } from 'react-redux';
|
||||||
|
import { selectMyChannelClaims, selectFetchingMyChannels, doFetchChannelListMine, doToast } from 'lbry-redux';
|
||||||
|
import {
|
||||||
|
selectReferralReward,
|
||||||
|
selectUserInvitesRemaining,
|
||||||
|
selectUserInviteNewIsPending,
|
||||||
|
selectUserInviteNewErrorMessage,
|
||||||
|
selectUserInviteReferralLink,
|
||||||
|
selectUserInviteReferralCode,
|
||||||
|
selectUserInvitees,
|
||||||
|
selectUserInviteStatusIsPending,
|
||||||
|
doFetchInviteStatus,
|
||||||
|
doUserInviteNew,
|
||||||
|
} from 'lbryinc';
|
||||||
|
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 InvitesPage from './view';
|
||||||
|
|
||||||
|
const select = state => ({
|
||||||
|
channels: selectMyChannelClaims(state),
|
||||||
|
fetchingChannels: selectFetchingMyChannels(state),
|
||||||
|
fetchingInvitees: selectUserInviteStatusIsPending(state),
|
||||||
|
errorMessage: selectUserInviteNewErrorMessage(state),
|
||||||
|
invitesRemaining: selectUserInvitesRemaining(state),
|
||||||
|
referralCode: selectUserInviteReferralCode(state),
|
||||||
|
isPending: selectUserInviteNewIsPending(state),
|
||||||
|
invitees: selectUserInvitees(state),
|
||||||
|
referralReward: selectReferralReward(state),
|
||||||
|
});
|
||||||
|
|
||||||
|
const perform = dispatch => ({
|
||||||
|
fetchChannelListMine: () => dispatch(doFetchChannelListMine()),
|
||||||
|
fetchInviteStatus: () => dispatch(doFetchInviteStatus()),
|
||||||
|
inviteNew: email => dispatch(doUserInviteNew(email)),
|
||||||
|
pushDrawerStack: () => dispatch(doPushDrawerStack(Constants.DRAWER_ROUTE_INVITES)),
|
||||||
|
setPlayerVisible: () => dispatch(doSetPlayerVisible(false)),
|
||||||
|
notify: data => dispatch(doToast(data)),
|
||||||
|
});
|
||||||
|
|
||||||
|
export default connect(
|
||||||
|
select,
|
||||||
|
perform,
|
||||||
|
)(InvitesPage);
|
||||||
@@ -0,0 +1,228 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { Lbry, parseURI } from 'lbry-redux';
|
||||||
|
import {
|
||||||
|
ActivityIndicator,
|
||||||
|
Clipboard,
|
||||||
|
NativeModules,
|
||||||
|
ScrollView,
|
||||||
|
Text,
|
||||||
|
TextInput,
|
||||||
|
TouchableOpacity,
|
||||||
|
View,
|
||||||
|
} from 'react-native';
|
||||||
|
import Colors from 'styles/colors';
|
||||||
|
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||||
|
import Icon from 'react-native-vector-icons/FontAwesome5';
|
||||||
|
import Link from 'component/link';
|
||||||
|
import Button from 'component/button';
|
||||||
|
import ChannelSelector from 'component/channelSelector';
|
||||||
|
import PageHeader from 'component/pageHeader';
|
||||||
|
import RewardCard from 'component/rewardCard';
|
||||||
|
import RewardEnrolment from 'component/rewardEnrolment';
|
||||||
|
import UriBar from 'component/uriBar';
|
||||||
|
import invitesStyle from 'styles/invites';
|
||||||
|
|
||||||
|
class InvitesPage extends React.PureComponent {
|
||||||
|
state = {
|
||||||
|
channelName: null,
|
||||||
|
email: null,
|
||||||
|
inviteLink: null,
|
||||||
|
selectedChannel: null,
|
||||||
|
};
|
||||||
|
|
||||||
|
componentWillMount() {
|
||||||
|
const { navigation } = this.props;
|
||||||
|
// this.didFocusListener = navigation.addListener('didFocus', this.onComponentFocused);
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
if (this.didFocusListener) {
|
||||||
|
this.didFocusListener.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onComponentFocused = () => {
|
||||||
|
const { fetchChannelListMine, fetchInviteStatus, pushDrawerStack, navigation, setPlayerVisible, user } = this.props;
|
||||||
|
|
||||||
|
pushDrawerStack();
|
||||||
|
setPlayerVisible();
|
||||||
|
NativeModules.Firebase.setCurrentScreen('Invites').then(result => {
|
||||||
|
fetchChannelListMine();
|
||||||
|
fetchInviteStatus();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
this.onComponentFocused();
|
||||||
|
}
|
||||||
|
|
||||||
|
handleChannelChange = channelName => {
|
||||||
|
const { channels = [] } = this.props;
|
||||||
|
if (channels && channels.length > 0) {
|
||||||
|
const filtered = channels.filter(c => c.name === channelName);
|
||||||
|
if (filtered.length > 0) {
|
||||||
|
const channel = filtered[0];
|
||||||
|
this.setState({ channelName, inviteLink: this.getLinkForChannel(channel) });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
getLinkForChannel = channel => {
|
||||||
|
const { claimId, claimName } = parseURI(channel.permanent_url);
|
||||||
|
return `https://lbry.tv/$/invite/${claimName}:${claimId}`;
|
||||||
|
};
|
||||||
|
|
||||||
|
handleInviteEmailChange = text => {
|
||||||
|
this.setState({ email: text });
|
||||||
|
};
|
||||||
|
|
||||||
|
handleInvitePress = () => {
|
||||||
|
const { inviteNew, notify } = this.props;
|
||||||
|
const { email } = this.state;
|
||||||
|
if (!email || email.indexOf('@') === -1) {
|
||||||
|
return notify({
|
||||||
|
message: __('Please enter a valid email address to send an invite to.'),
|
||||||
|
isError: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
inviteNew(email);
|
||||||
|
};
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
const { isPending: prevPending, notify } = this.props;
|
||||||
|
const { channels = [], isPending, errorMessage } = nextProps;
|
||||||
|
const { email } = this.state;
|
||||||
|
|
||||||
|
if (!this.state.channelName && channels && channels.length > 0) {
|
||||||
|
const firstChannel = channels[0];
|
||||||
|
this.setState({ channelName: firstChannel.name, inviteLink: this.getLinkForChannel(firstChannel) });
|
||||||
|
}
|
||||||
|
|
||||||
|
if (prevPending && !isPending) {
|
||||||
|
if (errorMessage && errorMessage.trim().length > 0) {
|
||||||
|
notify({ message: errorMessage, isError: true });
|
||||||
|
} else {
|
||||||
|
notify({ message: __(`${email} was invited to the LBRY party!`) });
|
||||||
|
this.setState({ email: null });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
handleInviteLinkPress = () => {
|
||||||
|
const { notify } = this.props;
|
||||||
|
Clipboard.setString(this.state.inviteLink);
|
||||||
|
notify({
|
||||||
|
message: __('Invite link copied'),
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { fetchingInvitees, user, navigation, notify, isPending, invitees } = this.props;
|
||||||
|
const { email, inviteLink } = this.state;
|
||||||
|
const hasInvitees = invitees && invitees.length > 0;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<View style={invitesStyle.container}>
|
||||||
|
<UriBar navigation={navigation} />
|
||||||
|
|
||||||
|
<ScrollView style={invitesStyle.scrollContainer}>
|
||||||
|
<TouchableOpacity style={invitesStyle.rewardDriverCard} onPress={() => navigation.navigate('Rewards')}>
|
||||||
|
<Icon name="award" size={16} style={invitesStyle.rewardDriverIcon} />
|
||||||
|
<Text style={invitesStyle.rewardDriverText}>{__('Earn rewards for inviting your friends.')}</Text>
|
||||||
|
</TouchableOpacity>
|
||||||
|
|
||||||
|
<View style={invitesStyle.card}>
|
||||||
|
<Text style={invitesStyle.title}>{__('Invite Link')}</Text>
|
||||||
|
<Text style={invitesStyle.text}>
|
||||||
|
{__('Share this link with friends (or enemies) and get 20 LBC when they join lbry.tv')}
|
||||||
|
</Text>
|
||||||
|
|
||||||
|
<Text style={invitesStyle.subTitle}>{__('Your invite link')}</Text>
|
||||||
|
<View style={invitesStyle.row}>
|
||||||
|
<Text selectable numberOfLines={1} style={invitesStyle.inviteLink} onPress={this.handleInviteLinkPress}>
|
||||||
|
{this.state.inviteLink}
|
||||||
|
</Text>
|
||||||
|
<Button icon={'clipboard'} style={invitesStyle.button} onPress={this.handleInviteLinkPress} />
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<Text style={invitesStyle.customizeTitle}>{__('Customize invite link')}</Text>
|
||||||
|
<ChannelSelector
|
||||||
|
showAnonymous={false}
|
||||||
|
channelName={this.state.channelName}
|
||||||
|
onChannelChange={this.handleChannelChange}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<View style={invitesStyle.card}>
|
||||||
|
<Text style={invitesStyle.title}>{__('Invite by Email')}</Text>
|
||||||
|
<Text style={invitesStyle.text}>
|
||||||
|
{__('Invite someone you know by email and earn 20 LBC when they join lbry.tv.')}
|
||||||
|
</Text>
|
||||||
|
|
||||||
|
<TextInput
|
||||||
|
style={invitesStyle.emailInput}
|
||||||
|
editable={!isPending}
|
||||||
|
value={this.state.email}
|
||||||
|
onChangeText={this.handleInviteEmailChange}
|
||||||
|
placeholder={__('imaginary@friend.com')}
|
||||||
|
underlineColorAndroid={Colors.NextLbryGreen}
|
||||||
|
/>
|
||||||
|
<View style={invitesStyle.rightRow}>
|
||||||
|
{isPending && (
|
||||||
|
<ActivityIndicator size={'small'} color={Colors.NextLbryGreen} style={invitesStyle.loading} />
|
||||||
|
)}
|
||||||
|
<Button
|
||||||
|
disabled={!email || email.indexOf('@') === -1 || isPending}
|
||||||
|
style={invitesStyle.button}
|
||||||
|
text={__('Invite')}
|
||||||
|
onPress={this.handleInvitePress}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<View style={[invitesStyle.card, invitesStyle.lastCard]}>
|
||||||
|
<View style={invitesStyle.titleRow}>
|
||||||
|
<Text style={invitesStyle.titleCol}>{__('Invite History')}</Text>
|
||||||
|
{fetchingInvitees && <ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />}
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<Text style={invitesStyle.text}>
|
||||||
|
{__(
|
||||||
|
'Earn 20 LBC for inviting a friend, an enemy, a frenemy, or an enefriend. Everyone needs content freedom.',
|
||||||
|
)}
|
||||||
|
</Text>
|
||||||
|
|
||||||
|
<View style={invitesStyle.invitees}>
|
||||||
|
{hasInvitees && (
|
||||||
|
<View style={invitesStyle.inviteesHeader}>
|
||||||
|
<Text style={invitesStyle.emailHeader} numberOfLines={1}>
|
||||||
|
{__('Email')}
|
||||||
|
</Text>
|
||||||
|
<Text style={invitesStyle.rewardHeader} numberOfLines={1}>
|
||||||
|
{__('Reward')}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
|
{hasInvitees &&
|
||||||
|
invitees.map(invitee => (
|
||||||
|
<View key={invitee.email} style={invitesStyle.inviteeItem}>
|
||||||
|
<Text style={invitesStyle.inviteeEmail} numberOfLines={1}>
|
||||||
|
{invitee.email}
|
||||||
|
</Text>
|
||||||
|
<Text style={invitesStyle.rewardStatus} numberOfLines={1}>
|
||||||
|
{invitee.invite_reward_claimed && __('Claimed')}
|
||||||
|
{!invitee.invite_reward_claimed &&
|
||||||
|
(invitee.invite_reward_claimable ? __('Claimable') : __('Unclaimable'))}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
))}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
</ScrollView>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default InvitesPage;
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import {
|
import {
|
||||||
doPublish,
|
doPublish,
|
||||||
|
doFetchClaimListMine,
|
||||||
doResolveUri,
|
doResolveUri,
|
||||||
doToast,
|
doToast,
|
||||||
doUpdatePublishForm,
|
doUpdatePublishForm,
|
||||||
@@ -27,6 +28,7 @@ const select = state => ({
|
|||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
notify: data => dispatch(doToast(data)),
|
notify: data => dispatch(doToast(data)),
|
||||||
clearPublishFormState: () => dispatch(doClearPublishFormState()),
|
clearPublishFormState: () => dispatch(doClearPublishFormState()),
|
||||||
|
fetchMyClaims: () => dispatch(doFetchClaimListMine()),
|
||||||
pendingPublishSuccess: pendingClaim => dispatch(doPendingPublishSuccess(pendingClaim)),
|
pendingPublishSuccess: pendingClaim => dispatch(doPendingPublishSuccess(pendingClaim)),
|
||||||
updatePublishForm: value => dispatch(doUpdatePublishForm(value)),
|
updatePublishForm: value => dispatch(doUpdatePublishForm(value)),
|
||||||
updatePublishFormState: data => dispatch(doUpdatePublishFormState(data)),
|
updatePublishFormState: data => dispatch(doUpdatePublishFormState(data)),
|
||||||
@@ -39,5 +41,5 @@ const perform = dispatch => ({
|
|||||||
|
|
||||||
export default connect(
|
export default connect(
|
||||||
select,
|
select,
|
||||||
perform
|
perform,
|
||||||
)(PublishPage);
|
)(PublishPage);
|
||||||
+85
-13
@@ -16,6 +16,7 @@ import {
|
|||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import { FlatGrid } from 'react-native-super-grid';
|
import { FlatGrid } from 'react-native-super-grid';
|
||||||
import {
|
import {
|
||||||
|
Lbry,
|
||||||
isNameValid,
|
isNameValid,
|
||||||
batchActions,
|
batchActions,
|
||||||
buildURI,
|
buildURI,
|
||||||
@@ -139,6 +140,7 @@ class PublishPage extends React.PureComponent {
|
|||||||
|
|
||||||
// other
|
// other
|
||||||
publishStarted: false,
|
publishStarted: false,
|
||||||
|
storagePermissionRequired: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
didFocusListener;
|
didFocusListener;
|
||||||
@@ -160,6 +162,8 @@ class PublishPage extends React.PureComponent {
|
|||||||
DeviceEventEmitter.removeListener('onAllGalleryThumbnailsChecked', this.handleAllGalleryThumbnailsChecked);
|
DeviceEventEmitter.removeListener('onAllGalleryThumbnailsChecked', this.handleAllGalleryThumbnailsChecked);
|
||||||
DeviceEventEmitter.removeListener('onDocumentPickerFilePicked', this.onFilePicked);
|
DeviceEventEmitter.removeListener('onDocumentPickerFilePicked', this.onFilePicked);
|
||||||
DeviceEventEmitter.removeListener('onDocumentPickerCanceled', this.onPickerCanceled);
|
DeviceEventEmitter.removeListener('onDocumentPickerCanceled', this.onPickerCanceled);
|
||||||
|
DeviceEventEmitter.removeListener('onStoragePermissionGranted', this.handleStoragePermissionGranted);
|
||||||
|
DeviceEventEmitter.removeListener('onStoragePermissionRefused', this.handleStoragePermissionRefused);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleGalleryThumbnailChecked = evt => {
|
handleGalleryThumbnailChecked = evt => {
|
||||||
@@ -182,22 +186,51 @@ class PublishPage extends React.PureComponent {
|
|||||||
this.setState({ ...publishFormState, advancedMode });
|
this.setState({ ...publishFormState, advancedMode });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
checkStoragePermission = () => {
|
||||||
|
// check if we the permission to write to external storage has been granted
|
||||||
|
NativeModules.UtilityModule.canReadWriteStorage().then(canReadWrite => {
|
||||||
|
if (!canReadWrite) {
|
||||||
|
// request permission
|
||||||
|
NativeModules.UtilityModule.requestStoragePermission();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
loadVideos = () => {
|
||||||
|
this.setState(
|
||||||
|
{
|
||||||
|
loadingVideos: true,
|
||||||
|
storagePermissionRequired: false,
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
NativeModules.Gallery.getVideos().then(videos => this.setState({ videos, loadingVideos: false }));
|
||||||
|
},
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
onComponentFocused = () => {
|
onComponentFocused = () => {
|
||||||
const { balance, hasFormState, pushDrawerStack, setPlayerVisible, navigation } = this.props;
|
const { balance, fetchMyClaims, 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);
|
pushDrawerStack(Constants.DRAWER_ROUTE_PUBLISH, navigation.state.params ? navigation.state.params : null);
|
||||||
setPlayerVisible();
|
setPlayerVisible();
|
||||||
|
|
||||||
|
DeviceEventEmitter.addListener('onStoragePermissionGranted', this.handleStoragePermissionGranted);
|
||||||
|
DeviceEventEmitter.addListener('onStoragePermissionRefused', this.handleStoragePermissionRefused);
|
||||||
|
|
||||||
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(
|
fetchMyClaims();
|
||||||
{
|
|
||||||
loadingVideos: true,
|
NativeModules.UtilityModule.canReadWriteStorage().then(canReadWrite => {
|
||||||
},
|
if (!canReadWrite) {
|
||||||
() => {
|
this.setState({ storagePermissionRequired: true }, () =>
|
||||||
NativeModules.Gallery.getVideos().then(videos => this.setState({ videos, loadingVideos: false }));
|
NativeModules.UtilityModule.requestStoragePermission(),
|
||||||
},
|
);
|
||||||
);
|
} else {
|
||||||
|
// Can only load videos when the storage permission is granted
|
||||||
|
this.loadVideos();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Check if this is an edit action
|
// Check if this is an edit action
|
||||||
let isEditMode = false,
|
let isEditMode = false,
|
||||||
@@ -324,7 +357,7 @@ class PublishPage extends React.PureComponent {
|
|||||||
};
|
};
|
||||||
|
|
||||||
handlePublishPressed = () => {
|
handlePublishPressed = () => {
|
||||||
const { balance, notify, publish, updatePublishForm } = this.props;
|
const { balance, myClaims, notify, publish, updatePublishForm } = this.props;
|
||||||
const {
|
const {
|
||||||
editMode,
|
editMode,
|
||||||
bid,
|
bid,
|
||||||
@@ -368,6 +401,14 @@ class PublishPage extends React.PureComponent {
|
|||||||
if (!isNameValid(name, false)) {
|
if (!isNameValid(name, false)) {
|
||||||
notify({ message: __('Your content address contains invalid characters.'), isError: true });
|
notify({ message: __('Your content address contains invalid characters.'), isError: true });
|
||||||
return;
|
return;
|
||||||
|
} else if (!editMode && myClaims && myClaims.length > 0) {
|
||||||
|
if (myClaims.some(claim => claim.name.toLowerCase() === name.trim().toLowerCase())) {
|
||||||
|
notify({
|
||||||
|
message: __('You have already published to the specified content address. Please enter a new address.'),
|
||||||
|
isError: true,
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!currentMedia && !editMode) {
|
if (!currentMedia && !editMode) {
|
||||||
@@ -596,7 +637,7 @@ class PublishPage extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// could not determine the file path
|
// could not determine the file path
|
||||||
notify({ message: __('The path could not be determined. Please try a different file.') });
|
notify({ message: __('The path could not be determined. Please try a different file.'), isError: true });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -893,6 +934,29 @@ class PublishPage extends React.PureComponent {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
handleStoragePermissionGranted = () => {
|
||||||
|
// update the configured download folder
|
||||||
|
this.loadVideos();
|
||||||
|
NativeModules.UtilityModule.getDownloadDirectory().then(downloadDirectory => {
|
||||||
|
Lbry.settings_set({
|
||||||
|
key: 'download_dir',
|
||||||
|
value: downloadDirectory,
|
||||||
|
})
|
||||||
|
.then(() => {})
|
||||||
|
.catch(() => {});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
handleStoragePermissionRefused = () => {
|
||||||
|
const { notify } = this.props;
|
||||||
|
notify({
|
||||||
|
message: __(
|
||||||
|
'Content from your device cannot be published because the permission to read storage was not granted.',
|
||||||
|
),
|
||||||
|
isError: true,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { balance, navigation, notify, publishFormValues } = this.props;
|
const { balance, navigation, notify, publishFormValues } = this.props;
|
||||||
const {
|
const {
|
||||||
@@ -902,6 +966,7 @@ class PublishPage extends React.PureComponent {
|
|||||||
currentPhase,
|
currentPhase,
|
||||||
checkedThumbnails,
|
checkedThumbnails,
|
||||||
loadingVideos,
|
loadingVideos,
|
||||||
|
storagePermissionRequired,
|
||||||
thumbnailPath,
|
thumbnailPath,
|
||||||
videos,
|
videos,
|
||||||
} = this.state;
|
} = this.state;
|
||||||
@@ -943,13 +1008,20 @@ class PublishPage extends React.PureComponent {
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
{(loadingVideos || !allThumbnailsChecked) && (
|
{storagePermissionRequired && (
|
||||||
|
<View style={publishStyle.relativeCentered}>
|
||||||
|
<Text style={publishStyle.noVideos}>
|
||||||
|
{__('The storage permission is required to be able to display and publish your videos.')}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
|
{!storagePermissionRequired && (loadingVideos || !allThumbnailsChecked) && (
|
||||||
<View style={publishStyle.loadingView}>
|
<View style={publishStyle.loadingView}>
|
||||||
<ActivityIndicator size="small" color={Colors.NextLbryGreen} />
|
<ActivityIndicator size="small" color={Colors.NextLbryGreen} />
|
||||||
<Text style={publishStyle.loadingText}>{__('Please wait while we load your videos...')}</Text>
|
<Text style={publishStyle.loadingText}>{__('Please wait while we load your videos...')}</Text>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
{!loadingVideos && (!videos || videos.length === 0) && (
|
{!storagePermissionRequired && !loadingVideos && (!videos || videos.length === 0) && (
|
||||||
<View style={publishStyle.relativeCentered}>
|
<View style={publishStyle.relativeCentered}>
|
||||||
<Text style={publishStyle.noVideos}>
|
<Text style={publishStyle.noVideos}>
|
||||||
{__('We could not find any videos on your device. Take a photo or record a video to get started.')}
|
{__('We could not find any videos on your device. Take a photo or record a video to get started.')}
|
||||||
|
|||||||
@@ -11,6 +11,10 @@ import RewardEnrolment from 'component/rewardEnrolment';
|
|||||||
import UriBar from 'component/uriBar';
|
import UriBar from 'component/uriBar';
|
||||||
import rewardStyle from 'styles/reward';
|
import rewardStyle from 'styles/reward';
|
||||||
|
|
||||||
|
const FILTER_ALL = 'all';
|
||||||
|
const FILTER_AVAILABLE = 'available';
|
||||||
|
const FILTER_CLAIMED = 'claimed';
|
||||||
|
|
||||||
class RewardsPage extends React.PureComponent {
|
class RewardsPage extends React.PureComponent {
|
||||||
state = {
|
state = {
|
||||||
isEmailVerified: false,
|
isEmailVerified: false,
|
||||||
@@ -19,6 +23,7 @@ class RewardsPage extends React.PureComponent {
|
|||||||
verifyRequestStarted: false,
|
verifyRequestStarted: false,
|
||||||
revealVerification: true,
|
revealVerification: true,
|
||||||
firstRewardClaimed: false,
|
firstRewardClaimed: false,
|
||||||
|
currentFilter: FILTER_AVAILABLE,
|
||||||
};
|
};
|
||||||
|
|
||||||
scrollView = null;
|
scrollView = null;
|
||||||
@@ -182,8 +187,13 @@ class RewardsPage extends React.PureComponent {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
setFilter = filter => {
|
||||||
|
this.setState({ currentFilter: filter });
|
||||||
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { user, navigation } = this.props;
|
const { user, navigation } = this.props;
|
||||||
|
const { currentFilter } = this.state;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={rewardStyle.container}>
|
<View style={rewardStyle.container}>
|
||||||
@@ -197,8 +207,29 @@ class RewardsPage extends React.PureComponent {
|
|||||||
style={rewardStyle.scrollContainer}
|
style={rewardStyle.scrollContainer}
|
||||||
contentContainerStyle={rewardStyle.scrollContentContainer}
|
contentContainerStyle={rewardStyle.scrollContentContainer}
|
||||||
>
|
>
|
||||||
{this.renderUnclaimedRewards()}
|
<View style={rewardStyle.filterHeader}>
|
||||||
{this.renderClaimedRewards()}
|
<Link
|
||||||
|
style={[rewardStyle.filterLink, currentFilter === FILTER_ALL ? rewardStyle.activeFilterLink : null]}
|
||||||
|
text={__('All')}
|
||||||
|
onPress={() => this.setFilter(FILTER_ALL)}
|
||||||
|
/>
|
||||||
|
<Link
|
||||||
|
style={[
|
||||||
|
rewardStyle.filterLink,
|
||||||
|
currentFilter === FILTER_AVAILABLE ? rewardStyle.activeFilterLink : null,
|
||||||
|
]}
|
||||||
|
text={__('Available')}
|
||||||
|
onPress={() => this.setFilter(FILTER_AVAILABLE)}
|
||||||
|
/>
|
||||||
|
<Link
|
||||||
|
style={[rewardStyle.filterLink, currentFilter === FILTER_CLAIMED ? rewardStyle.activeFilterLink : null]}
|
||||||
|
text={__('Claimed')}
|
||||||
|
onPress={() => this.setFilter(FILTER_CLAIMED)}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
{(currentFilter === FILTER_AVAILABLE || currentFilter === FILTER_ALL) && this.renderUnclaimedRewards()}
|
||||||
|
{(currentFilter === FILTER_CLAIMED || currentFilter === FILTER_ALL) && this.renderClaimedRewards()}
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -2,8 +2,10 @@ import { connect } from 'react-redux';
|
|||||||
import {
|
import {
|
||||||
doClaimSearch,
|
doClaimSearch,
|
||||||
doResolveUris,
|
doResolveUris,
|
||||||
doSearch,
|
doResolvedSearch,
|
||||||
doUpdateSearchQuery,
|
doUpdateSearchQuery,
|
||||||
|
makeSelectResolvedSearchResults,
|
||||||
|
makeSelectResolvedSearchResultsLastPageReached,
|
||||||
makeSelectSearchUris,
|
makeSelectSearchUris,
|
||||||
selectClaimSearchByQuery,
|
selectClaimSearchByQuery,
|
||||||
selectIsSearching,
|
selectIsSearching,
|
||||||
@@ -16,19 +18,21 @@ import { selectCurrentRoute } from 'redux/selectors/drawer';
|
|||||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||||
import SearchPage from './view';
|
import SearchPage from './view';
|
||||||
|
|
||||||
const numSearchResults = 25;
|
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
claimSearchByQuery: selectClaimSearchByQuery(state),
|
claimSearchByQuery: selectClaimSearchByQuery(state),
|
||||||
currentRoute: selectCurrentRoute(state),
|
currentRoute: selectCurrentRoute(state),
|
||||||
isSearching: selectIsSearching(state),
|
isSearching: selectIsSearching(state),
|
||||||
query: selectSearchValue(state),
|
query: selectSearchValue(state),
|
||||||
resolvingUris: selectResolvingUris(state),
|
resolvingUris: selectResolvingUris(state),
|
||||||
uris: makeSelectSearchUris(makeSelectQueryWithOptions(null, numSearchResults)(state))(state),
|
uris: makeSelectSearchUris(makeSelectQueryWithOptions(null, Constants.DEFAULT_PAGE_SIZE)(state))(state),
|
||||||
|
results: makeSelectResolvedSearchResults(makeSelectQueryWithOptions(null, Constants.DEFAULT_PAGE_SIZE)(state))(state),
|
||||||
|
lastPageReached: makeSelectResolvedSearchResultsLastPageReached(
|
||||||
|
makeSelectQueryWithOptions(null, Constants.DEFAULT_PAGE_SIZE)(state),
|
||||||
|
)(state),
|
||||||
});
|
});
|
||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
search: query => dispatch(doSearch(query, numSearchResults, null, false, false)),
|
search: (query, from) => dispatch(doResolvedSearch(query, Constants.DEFAULT_PAGE_SIZE, from, false, {})),
|
||||||
claimSearch: options => dispatch(doClaimSearch(options)),
|
claimSearch: options => dispatch(doClaimSearch(options)),
|
||||||
updateSearchQuery: query => dispatch(doUpdateSearchQuery(query)),
|
updateSearchQuery: query => dispatch(doUpdateSearchQuery(query)),
|
||||||
pushDrawerStack: () => dispatch(doPushDrawerStack(Constants.DRAWER_ROUTE_SEARCH)),
|
pushDrawerStack: () => dispatch(doPushDrawerStack(Constants.DRAWER_ROUTE_SEARCH)),
|
||||||
|
|||||||
+61
-30
@@ -15,18 +15,23 @@ import Colors from 'styles/colors';
|
|||||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||||
import PageHeader from 'component/pageHeader';
|
import PageHeader from 'component/pageHeader';
|
||||||
import FileListItem from 'component/fileListItem';
|
import FileListItem from 'component/fileListItem';
|
||||||
|
import ClaimResultItem from 'component/claimResultItem';
|
||||||
import FloatingWalletBalance from 'component/floatingWalletBalance';
|
import FloatingWalletBalance from 'component/floatingWalletBalance';
|
||||||
import UriBar from 'component/uriBar';
|
import UriBar from 'component/uriBar';
|
||||||
import searchStyle from 'styles/search';
|
import searchStyle from 'styles/search';
|
||||||
|
|
||||||
|
const softLimit = 500;
|
||||||
|
|
||||||
class SearchPage extends React.PureComponent {
|
class SearchPage extends React.PureComponent {
|
||||||
state = {
|
state = {
|
||||||
currentQuery: null,
|
currentQuery: null,
|
||||||
|
currentFrom: 0,
|
||||||
currentUri: null,
|
currentUri: null,
|
||||||
showTagResult: false,
|
showTagResult: false,
|
||||||
claimSearchRun: false,
|
claimSearchRun: false,
|
||||||
claimSearchOptions: null,
|
claimSearchOptions: null,
|
||||||
resultsResolved: false,
|
resultsResolved: false,
|
||||||
|
tagResultDisplayed: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
static navigationOptions = {
|
static navigationOptions = {
|
||||||
@@ -54,14 +59,16 @@ class SearchPage extends React.PureComponent {
|
|||||||
const searchQuery = query || this.getSearchQuery();
|
const searchQuery = query || this.getSearchQuery();
|
||||||
if (searchQuery && searchQuery.trim().length > 0) {
|
if (searchQuery && searchQuery.trim().length > 0) {
|
||||||
this.setState({
|
this.setState({
|
||||||
|
currentFrom: 0,
|
||||||
currentQuery: searchQuery,
|
currentQuery: searchQuery,
|
||||||
currentUri: isURIValid(searchQuery) ? normalizeURI(searchQuery) : null,
|
currentUri: isURIValid(searchQuery) ? normalizeURI(searchQuery) : null,
|
||||||
claimSearchOptions: null,
|
claimSearchOptions: null,
|
||||||
claimSearchRun: false,
|
claimSearchRun: false,
|
||||||
showTagResult: false,
|
showTagResult: false,
|
||||||
resultsResolved: false,
|
resultsResolved: false,
|
||||||
|
tagResultDisplayed: false,
|
||||||
});
|
});
|
||||||
search(searchQuery);
|
search(searchQuery, 0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -80,11 +87,13 @@ class SearchPage extends React.PureComponent {
|
|||||||
|
|
||||||
if (query && query.trim().length > 0 && query !== this.state.currentQuery) {
|
if (query && query.trim().length > 0 && query !== this.state.currentQuery) {
|
||||||
this.setState({
|
this.setState({
|
||||||
|
currentFrom: 0,
|
||||||
currentQuery: query,
|
currentQuery: query,
|
||||||
currentUri: isURIValid(query) ? normalizeURI(query) : null,
|
currentUri: isURIValid(query) ? normalizeURI(query) : null,
|
||||||
resultsResolved: false,
|
resultsResolved: false,
|
||||||
|
tagResultDisplayed: false,
|
||||||
});
|
});
|
||||||
search(query);
|
search(query, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,19 +113,17 @@ class SearchPage extends React.PureComponent {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
shouldComponentUpdate(nextProps) {
|
/* shouldComponentUpdate(nextProps) {
|
||||||
const { isSearching, uris } = this.props;
|
const { isSearching, uris } = this.props;
|
||||||
return (isSearching && (!uris || uris.length === 0)) || (!isSearching && this.allContentResolved(this.props));
|
return (isSearching && (!uris || uris.length === 0)) || (!isSearching && this.allContentResolved(this.props));
|
||||||
}
|
} */
|
||||||
|
|
||||||
componentDidUpdate() {
|
componentDidUpdate() {
|
||||||
const { isSearching, resolveUris, uris } = this.props;
|
const { claimSearchByQuery } = this.props;
|
||||||
if (!isSearching && !this.state.resultsResolved) {
|
if (this.state.claimSearchRun && this.state.claimSearchOptions && !this.state.tagResultDisplayed) {
|
||||||
this.setState({ resultsResolved: true }, () => {
|
const claimSearchKey = createNormalizedClaimSearchKey(this.state.claimSearchOptions);
|
||||||
if (uris && uris.length > 0) {
|
const claimSearchUris = claimSearchByQuery[claimSearchKey];
|
||||||
resolveUris(uris);
|
this.setState({ showTagResult: claimSearchUris && claimSearchUris.length > 0, tagResultDisplayed: true });
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,12 +139,15 @@ class SearchPage extends React.PureComponent {
|
|||||||
const { search } = this.props;
|
const { search } = this.props;
|
||||||
this.setState({
|
this.setState({
|
||||||
currentUri: isURIValid(keywords) ? normalizeURI(keywords) : null,
|
currentUri: isURIValid(keywords) ? normalizeURI(keywords) : null,
|
||||||
|
currentFrom: 0,
|
||||||
|
currentQuery: keywords,
|
||||||
claimSearchOptions: null,
|
claimSearchOptions: null,
|
||||||
claimSearchRun: false,
|
claimSearchRun: false,
|
||||||
showTagResult: false,
|
showTagResult: false,
|
||||||
resultsResolved: false,
|
resultsResolved: false,
|
||||||
|
tagResultDisplayed: false,
|
||||||
});
|
});
|
||||||
search(keywords);
|
search(keywords, 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
listEmptyComponent = () => {
|
listEmptyComponent = () => {
|
||||||
@@ -151,27 +161,20 @@ class SearchPage extends React.PureComponent {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
listHeaderComponent = showTagResult => {
|
listHeaderComponent = (showTagResult, query) => {
|
||||||
const { navigation, claimSearch, claimSearchByQuery } = this.props;
|
const { navigation, claimSearch } = this.props;
|
||||||
const { currentUri } = this.state;
|
const { currentUri } = this.state;
|
||||||
const query = this.getSearchQuery();
|
|
||||||
|
|
||||||
const canBeTag = query && query.trim().length > 0 && isURIValid(query);
|
const canBeTag = query && query.trim().length > 0 && isURIValid(query);
|
||||||
if (canBeTag && !this.state.claimSearchRun) {
|
if (canBeTag && !this.state.claimSearchRun) {
|
||||||
const options = {
|
const options = {
|
||||||
any_tags: [query],
|
any_tags: [query.toLowerCase()],
|
||||||
page: 1,
|
page: 1,
|
||||||
no_totals: true,
|
no_totals: true,
|
||||||
};
|
};
|
||||||
this.setState({ claimSearchOptions: options, claimSearchRun: true }, () => claimSearch(options));
|
this.setState({ claimSearchOptions: options, claimSearchRun: true }, () => claimSearch(options));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if (this.state.claimSearchRun && this.state.claimSearchOptions) {
|
|
||||||
const claimSearchKey = createNormalizedClaimSearchKey(this.state.claimSearchOptions);
|
|
||||||
const claimSearchUris = claimSearchByQuery[claimSearchKey];
|
|
||||||
this.setState({ showTagResult: claimSearchUris && claimSearchUris.length > 0 });
|
|
||||||
} */
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View>
|
<View>
|
||||||
<FileListItem uri={currentUri} featuredResult style={searchStyle.featuredResultItem} navigation={navigation} />
|
<FileListItem uri={currentUri} featuredResult style={searchStyle.featuredResultItem} navigation={navigation} />
|
||||||
@@ -190,37 +193,65 @@ class SearchPage extends React.PureComponent {
|
|||||||
navigation.navigate({ routeName: Constants.DRAWER_ROUTE_TAG, key: `tagPage`, params: { tag: tag.toLowerCase() } });
|
navigation.navigate({ routeName: Constants.DRAWER_ROUTE_TAG, key: `tagPage`, params: { tag: tag.toLowerCase() } });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
handleVerticalEndReached = () => {
|
||||||
|
// fetch more results
|
||||||
|
const { lastPageReached, results, search, isSearching } = this.props;
|
||||||
|
if (lastPageReached || (results && results.length > softLimit)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isSearching) {
|
||||||
|
const from = results ? results.length : 0;
|
||||||
|
this.setState({ currentFrom: from }, () => {
|
||||||
|
search(this.state.currentQuery, from);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { isSearching, navigation, query, uris } = this.props;
|
const { isSearching, navigation, query, results } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={searchStyle.container}>
|
<View style={searchStyle.container}>
|
||||||
<UriBar value={query} navigation={navigation} onSearchSubmitted={this.handleSearchSubmitted} />
|
<UriBar value={query} navigation={navigation} onSearchSubmitted={this.handleSearchSubmitted} />
|
||||||
|
|
||||||
{isSearching && (
|
{isSearching && this.state.currentFrom === 0 && (
|
||||||
<View style={searchStyle.busyContainer}>
|
<View style={searchStyle.busyContainer}>
|
||||||
<ActivityIndicator size="large" color={Colors.NextLbryGreen} style={searchStyle.loading} />
|
<ActivityIndicator size="large" color={Colors.NextLbryGreen} style={searchStyle.loading} />
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{!isSearching && (
|
{(!isSearching || this.state.currentFrom > 0) && (
|
||||||
<FlatList
|
<FlatList
|
||||||
extraData={this.state}
|
extraData={this.state}
|
||||||
style={searchStyle.scrollContainer}
|
style={searchStyle.scrollContainer}
|
||||||
contentContainerStyle={searchStyle.scrollPadding}
|
contentContainerStyle={searchStyle.scrollPadding}
|
||||||
keyboardShouldPersistTaps={'handled'}
|
keyboardShouldPersistTaps={'handled'}
|
||||||
data={uris}
|
data={results}
|
||||||
keyExtractor={(item, index) => item}
|
keyExtractor={(item, index) => item.claimId}
|
||||||
initialNumToRender={8}
|
initialNumToRender={10}
|
||||||
maxToRenderPerBatch={20}
|
maxToRenderPerBatch={20}
|
||||||
|
onEndReached={this.handleVerticalEndReached}
|
||||||
|
onEndReachedThreshold={0.2}
|
||||||
removeClippedSubviews
|
removeClippedSubviews
|
||||||
ListEmptyComponent={!isSearching ? this.listEmptyComponent() : null}
|
ListEmptyComponent={!isSearching ? this.listEmptyComponent() : null}
|
||||||
ListHeaderComponent={this.state.currentUri ? this.listHeaderComponent(this.state.showTagResult) : null}
|
ListHeaderComponent={this.listHeaderComponent(this.state.showTagResult, this.state.currentQuery)}
|
||||||
renderItem={({ item }) => (
|
renderItem={({ item }) => (
|
||||||
<FileListItem key={item} uri={item} style={searchStyle.resultItem} batchResolve navigation={navigation} />
|
<ClaimResultItem
|
||||||
|
key={item.claimId}
|
||||||
|
uri={item ? normalizeURI(`${item.name}#${item.claimId}`) : null}
|
||||||
|
result={item}
|
||||||
|
style={searchStyle.resultItem}
|
||||||
|
navigation={navigation}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
{this.state.currentFrom > 0 && isSearching && (
|
||||||
|
<View style={searchStyle.moreLoading}>
|
||||||
|
<ActivityIndicator size="small" color={Colors.NextLbryGreen} />
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
<FloatingWalletBalance navigation={navigation} />
|
<FloatingWalletBalance navigation={navigation} />
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import {
|
|||||||
doAuthenticate,
|
doAuthenticate,
|
||||||
doBlackListedOutpointsSubscribe,
|
doBlackListedOutpointsSubscribe,
|
||||||
doFilteredOutpointsSubscribe,
|
doFilteredOutpointsSubscribe,
|
||||||
doCheckSubscriptionsInit,
|
|
||||||
doFetchMySubscriptions,
|
doFetchMySubscriptions,
|
||||||
doFetchRewardedContent,
|
doFetchRewardedContent,
|
||||||
doGetSync,
|
doGetSync,
|
||||||
@@ -15,11 +14,13 @@ import {
|
|||||||
selectEmailToVerify,
|
selectEmailToVerify,
|
||||||
} from 'lbryinc';
|
} from 'lbryinc';
|
||||||
import { doSetClientSetting } from 'redux/actions/settings';
|
import { doSetClientSetting } from 'redux/actions/settings';
|
||||||
|
import { selectLastRouteInStack } from 'redux/selectors/drawer';
|
||||||
import SplashScreen from './view';
|
import SplashScreen from './view';
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
user: selectUser(state),
|
user: selectUser(state),
|
||||||
emailToVerify: selectEmailToVerify(state),
|
emailToVerify: selectEmailToVerify(state),
|
||||||
|
lastRouteInStack: selectLastRouteInStack(state),
|
||||||
});
|
});
|
||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
@@ -27,7 +28,6 @@ const perform = dispatch => ({
|
|||||||
balanceSubscribe: () => dispatch(doBalanceSubscribe()),
|
balanceSubscribe: () => dispatch(doBalanceSubscribe()),
|
||||||
blacklistedOutpointsSubscribe: () => dispatch(doBlackListedOutpointsSubscribe()),
|
blacklistedOutpointsSubscribe: () => dispatch(doBlackListedOutpointsSubscribe()),
|
||||||
filteredOutpointsSubscribe: () => dispatch(doFilteredOutpointsSubscribe()),
|
filteredOutpointsSubscribe: () => dispatch(doFilteredOutpointsSubscribe()),
|
||||||
checkSubscriptionsInit: () => dispatch(doCheckSubscriptionsInit()),
|
|
||||||
fetchRewardedContent: () => dispatch(doFetchRewardedContent()),
|
fetchRewardedContent: () => dispatch(doFetchRewardedContent()),
|
||||||
fetchSubscriptions: callback => dispatch(doFetchMySubscriptions(callback)),
|
fetchSubscriptions: callback => dispatch(doFetchMySubscriptions(callback)),
|
||||||
getSync: (password, callback) => dispatch(doGetSync(password, callback)),
|
getSync: (password, callback) => dispatch(doGetSync(password, callback)),
|
||||||
@@ -42,5 +42,5 @@ const perform = dispatch => ({
|
|||||||
|
|
||||||
export default connect(
|
export default connect(
|
||||||
select,
|
select,
|
||||||
perform
|
perform,
|
||||||
)(SplashScreen);
|
)(SplashScreen);
|
||||||
+42
-57
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Lbry, doPreferenceGet } from 'lbry-redux';
|
import { Lbry, doPreferenceGet, isURIValid } from 'lbry-redux';
|
||||||
import { Lbryio } from 'lbryinc';
|
import { Lbryio } from 'lbryinc';
|
||||||
import { ActivityIndicator, DeviceEventEmitter, Linking, NativeModules, Platform, Text, View } from 'react-native';
|
import { ActivityIndicator, DeviceEventEmitter, Linking, NativeModules, Platform, Text, View } from 'react-native';
|
||||||
import { NavigationActions, StackActions } from 'react-navigation';
|
import { NavigationActions, StackActions } from 'react-navigation';
|
||||||
@@ -11,7 +11,7 @@ import Button from 'component/button';
|
|||||||
import ProgressBar from 'component/progressBar';
|
import ProgressBar from 'component/progressBar';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import Colors from 'styles/colors';
|
import Colors from 'styles/colors';
|
||||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
import Constants, { DrawerRoutes, InnerDrawerRoutes } from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||||
import splashStyle from 'styles/splash';
|
import splashStyle from 'styles/splash';
|
||||||
import RNFS from 'react-native-fs';
|
import RNFS from 'react-native-fs';
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ class SplashScreen extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
navigateToMain = () => {
|
navigateToMain = () => {
|
||||||
const { navigation, notify, verifyUserEmail, verifyUserEmailFailure } = this.props;
|
const { lastRouteInStack, navigation, notify, verifyUserEmail, verifyUserEmailFailure } = this.props;
|
||||||
const resetAction = StackActions.reset({
|
const resetAction = StackActions.reset({
|
||||||
index: 0,
|
index: 0,
|
||||||
actions: [NavigationActions.navigate({ routeName: 'Main' })],
|
actions: [NavigationActions.navigate({ routeName: 'Main' })],
|
||||||
@@ -55,29 +55,16 @@ class SplashScreen extends React.PureComponent {
|
|||||||
? navigation.state.params.launchUrl
|
? navigation.state.params.launchUrl
|
||||||
: this.state.launchUrl;
|
: this.state.launchUrl;
|
||||||
if (launchUrl) {
|
if (launchUrl) {
|
||||||
if (launchUrl.startsWith('lbry://?verify=')) {
|
navigateToUri(navigation, transformUrl(launchUrl));
|
||||||
let verification = {};
|
} else if (lastRouteInStack) {
|
||||||
try {
|
// no launch url, check if there's a last route in stack to navigate to.
|
||||||
verification = JSON.parse(atob(launchUrl.substring(15)));
|
const { route, params } = lastRouteInStack;
|
||||||
} catch (error) {
|
if (route) {
|
||||||
console.log(error);
|
if (DrawerRoutes.includes(route)) {
|
||||||
|
navigation.navigate({ routeName: route, params });
|
||||||
|
} else if (!InnerDrawerRoutes.includes(route) && isURIValid(route)) {
|
||||||
|
navigateToUri(navigation, route);
|
||||||
}
|
}
|
||||||
if (verification.token && verification.recaptcha) {
|
|
||||||
AsyncStorage.setItem(Constants.KEY_SHOULD_VERIFY_EMAIL, 'true');
|
|
||||||
try {
|
|
||||||
verifyUserEmail(verification.token, verification.recaptcha);
|
|
||||||
} catch (error) {
|
|
||||||
const message = __('Invalid Verification Token');
|
|
||||||
verifyUserEmailFailure(message);
|
|
||||||
notify({ message });
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
notify({
|
|
||||||
message: __('Invalid Verification URI'),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
navigateToUri(navigation, transformUrl(launchUrl));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -94,9 +81,9 @@ class SplashScreen extends React.PureComponent {
|
|||||||
NativeModules.UtilityModule.getSecureValue(Constants.KEY_WALLET_PASSWORD).then(walletPassword => {
|
NativeModules.UtilityModule.getSecureValue(Constants.KEY_WALLET_PASSWORD).then(walletPassword => {
|
||||||
getSync(walletPassword, () => {
|
getSync(walletPassword, () => {
|
||||||
this.getUserSettings();
|
this.getUserSettings();
|
||||||
this.navigateToMain();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
this.navigateToMain();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,39 +117,37 @@ class SplashScreen extends React.PureComponent {
|
|||||||
authenticate,
|
authenticate,
|
||||||
balanceSubscribe,
|
balanceSubscribe,
|
||||||
blacklistedOutpointsSubscribe,
|
blacklistedOutpointsSubscribe,
|
||||||
checkSubscriptionsInit,
|
|
||||||
filteredOutpointsSubscribe,
|
filteredOutpointsSubscribe,
|
||||||
getSync,
|
getSync,
|
||||||
updateBlockHeight,
|
updateBlockHeight,
|
||||||
user,
|
user,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
Lbry.resolve({ urls: 'lbry://one' }).then(() => {
|
// Lbry.resolve({ urls: 'lbry://one' }).then(() => {
|
||||||
// Leave the splash screen
|
// Leave the splash screen
|
||||||
balanceSubscribe();
|
balanceSubscribe();
|
||||||
blacklistedOutpointsSubscribe();
|
blacklistedOutpointsSubscribe();
|
||||||
filteredOutpointsSubscribe();
|
filteredOutpointsSubscribe();
|
||||||
checkSubscriptionsInit();
|
|
||||||
|
|
||||||
if (user && user.id && user.has_verified_email) {
|
if (user && user.id && user.has_verified_email) {
|
||||||
// user already authenticated
|
// user already authenticated
|
||||||
NativeModules.UtilityModule.getSecureValue(Constants.KEY_WALLET_PASSWORD).then(walletPassword => {
|
NativeModules.UtilityModule.getSecureValue(Constants.KEY_WALLET_PASSWORD).then(walletPassword => {
|
||||||
getSync(walletPassword, () => {
|
getSync(walletPassword, () => {
|
||||||
this.getUserSettings();
|
this.getUserSettings();
|
||||||
this.navigateToMain();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
} else {
|
});
|
||||||
NativeModules.VersionInfo.getAppVersion().then(appVersion => {
|
this.navigateToMain();
|
||||||
this.setState({ shouldAuthenticate: true });
|
} else {
|
||||||
NativeModules.Firebase.getMessagingToken()
|
NativeModules.VersionInfo.getAppVersion().then(appVersion => {
|
||||||
.then(firebaseToken => {
|
this.setState({ shouldAuthenticate: true });
|
||||||
authenticate(appVersion, Platform.OS, firebaseToken);
|
NativeModules.Firebase.getMessagingToken()
|
||||||
})
|
.then(firebaseToken => {
|
||||||
.catch(() => authenticate(appVersion, Platform.OS));
|
authenticate(appVersion, Platform.OS, firebaseToken);
|
||||||
});
|
})
|
||||||
}
|
.catch(() => authenticate(appVersion, Platform.OS));
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
handleAccountUnlockFailed() {
|
handleAccountUnlockFailed() {
|
||||||
@@ -200,8 +185,8 @@ class SplashScreen extends React.PureComponent {
|
|||||||
Lbry.wallet_unlock({ password: password || '' }).then(unlocked => {
|
Lbry.wallet_unlock({ password: password || '' }).then(unlocked => {
|
||||||
if (unlocked) {
|
if (unlocked) {
|
||||||
this.setState({
|
this.setState({
|
||||||
message: __('Testing network'),
|
message: __('Authenticating'),
|
||||||
details: __('Waiting for name resolution'),
|
details: __('Waiting for authentication'),
|
||||||
});
|
});
|
||||||
this.finishSplashScreen();
|
this.finishSplashScreen();
|
||||||
} else {
|
} else {
|
||||||
@@ -210,8 +195,8 @@ class SplashScreen extends React.PureComponent {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.setState({
|
this.setState({
|
||||||
message: __('Testing network'),
|
message: __('Authenticating'),
|
||||||
details: __('Waiting for name resolution'),
|
details: __('Waiting for authentication'),
|
||||||
});
|
});
|
||||||
this.finishSplashScreen();
|
this.finishSplashScreen();
|
||||||
}
|
}
|
||||||
@@ -315,8 +300,8 @@ class SplashScreen extends React.PureComponent {
|
|||||||
this.setState(
|
this.setState(
|
||||||
{
|
{
|
||||||
accountUnlockFailed: false,
|
accountUnlockFailed: false,
|
||||||
message: __('Testing network'),
|
message: __('Authenticating'),
|
||||||
details: __('Waiting for name resolution'),
|
details: __('Waiting for authentication'),
|
||||||
},
|
},
|
||||||
() => this.finishSplashScreen(),
|
() => this.finishSplashScreen(),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ class SubscriptionsPage extends React.PureComponent {
|
|||||||
};
|
};
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
// this.onComponentFocused();
|
this.onComponentFocused();
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
componentWillReceiveProps(nextProps) {
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ class PhoneVerifyPage extends React.PureComponent {
|
|||||||
codeVerifyStarted: false,
|
codeVerifyStarted: false,
|
||||||
codeVerifySuccessful: false,
|
codeVerifySuccessful: false,
|
||||||
countryCode: null,
|
countryCode: null,
|
||||||
|
countryPickerVisible: false,
|
||||||
newPhoneAdded: false,
|
newPhoneAdded: false,
|
||||||
number: null,
|
number: null,
|
||||||
phoneVerifyFailed: false,
|
phoneVerifyFailed: false,
|
||||||
@@ -125,15 +126,15 @@ class PhoneVerifyPage extends React.PureComponent {
|
|||||||
};
|
};
|
||||||
|
|
||||||
onPressFlag = () => {
|
onPressFlag = () => {
|
||||||
if (this.picker) {
|
this.setState({ countryPickerVisible: true });
|
||||||
this.picker.openModal();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
selectCountry(country) {
|
selectCountry = country => {
|
||||||
this.phoneInput.selectCountry(country.cca2.toLowerCase());
|
this.phoneInput.selectCountry(country.cca2.toLowerCase());
|
||||||
this.setState({ cca2: country.cca2 });
|
this.setState({ cca2: country.cca2, countryPickerVisible: false }, () => {
|
||||||
}
|
this.phoneInput.focus();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
handleChangeText = text => {
|
handleChangeText = text => {
|
||||||
this.setState({ verificationCode: text });
|
this.setState({ verificationCode: text });
|
||||||
@@ -233,17 +234,17 @@ class PhoneVerifyPage extends React.PureComponent {
|
|||||||
</View>
|
</View>
|
||||||
|
|
||||||
<CountryPicker
|
<CountryPicker
|
||||||
ref={picker => {
|
countryCode={this.state.cca2}
|
||||||
this.picker = picker;
|
withAlphaFilter
|
||||||
}}
|
withFilter
|
||||||
cca2={this.state.cca2}
|
withFlag
|
||||||
filterable
|
withFlagButton={false}
|
||||||
onChange={value => this.selectCountry(value)}
|
withCallingCode
|
||||||
showCallingCode
|
withModal
|
||||||
|
onSelect={this.selectCountry}
|
||||||
translation="eng"
|
translation="eng"
|
||||||
>
|
modalProps={{ visible: this.state.countryPickerVisible }}
|
||||||
<View />
|
/>
|
||||||
</CountryPicker>
|
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,28 @@
|
|||||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||||
|
|
||||||
export const doPushDrawerStack = (routeName, params) => dispatch =>
|
export const doPushDrawerStack = (routeName, params) => dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: Constants.ACTION_PUSH_DRAWER_STACK,
|
type: Constants.ACTION_PUSH_DRAWER_STACK,
|
||||||
data: { routeName, params },
|
data: { routeName, params },
|
||||||
});
|
});
|
||||||
|
|
||||||
export const doPopDrawerStack = () => dispatch =>
|
if (window.persistor) {
|
||||||
|
window.persistor.flush();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export const doPopDrawerStack = () => dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: Constants.ACTION_POP_DRAWER_STACK,
|
type: Constants.ACTION_POP_DRAWER_STACK,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const doSetPlayerVisible = visible => dispatch =>
|
if (window.persistor) {
|
||||||
|
window.persistor.flush();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export const doSetPlayerVisible = (visible, uri) => dispatch =>
|
||||||
dispatch({
|
dispatch({
|
||||||
type: Constants.ACTION_SET_PLAYER_VISIBLE,
|
type: Constants.ACTION_SET_PLAYER_VISIBLE,
|
||||||
data: { visible },
|
data: { visible, uri },
|
||||||
});
|
});
|
||||||
+18
-16
@@ -59,22 +59,24 @@ export function doCompleteDownload(uri, outpoint, fileInfo) {
|
|||||||
export function doStopDownloadingFile(uri, fileInfo) {
|
export function doStopDownloadingFile(uri, fileInfo) {
|
||||||
return dispatch => {
|
return dispatch => {
|
||||||
let params = { status: 'stop' };
|
let params = { status: 'stop' };
|
||||||
if (fileInfo.sd_hash) {
|
if (fileInfo) {
|
||||||
params.sd_hash = fileInfo.sd_hash;
|
if (fileInfo.sd_hash) {
|
||||||
}
|
params.sd_hash = fileInfo.sd_hash;
|
||||||
if (fileInfo.stream_hash) {
|
}
|
||||||
params.stream_hash = fileInfo.stream_hash;
|
if (fileInfo.stream_hash) {
|
||||||
}
|
params.stream_hash = fileInfo.stream_hash;
|
||||||
|
}
|
||||||
|
|
||||||
Lbry.file_set_status(params).then(() => {
|
Lbry.file_set_status(params).then(() => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.DOWNLOADING_CANCELED,
|
type: ACTIONS.DOWNLOADING_CANCELED,
|
||||||
data: { uri, outpoint: fileInfo.outpoint },
|
data: { uri, outpoint: fileInfo.outpoint },
|
||||||
|
});
|
||||||
|
|
||||||
|
// Should also delete the file after the user stops downloading
|
||||||
|
dispatch(doDeleteFile(fileInfo.outpoint, uri));
|
||||||
});
|
});
|
||||||
|
}
|
||||||
// Should also delete the file after the user stops downloading
|
|
||||||
dispatch(doDeleteFile(fileInfo.outpoint, uri));
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,7 +97,7 @@ export function doDeleteFile(outpoint, deleteFromComputer, abandonClaim) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// If the file is for a claim we published then also abandon the claim
|
// If the file is for a claim we published then also abandon the claim
|
||||||
/*const myClaimsOutpoints = selectMyClaimsOutpoints(state);
|
/* const myClaimsOutpoints = selectMyClaimsOutpoints(state);
|
||||||
if (abandonClaim && myClaimsOutpoints.indexOf(outpoint) !== -1) {
|
if (abandonClaim && myClaimsOutpoints.indexOf(outpoint) !== -1) {
|
||||||
const byOutpoint = selectFileInfosByOutpoint(state);
|
const byOutpoint = selectFileInfosByOutpoint(state);
|
||||||
const fileInfo = byOutpoint[outpoint];
|
const fileInfo = byOutpoint[outpoint];
|
||||||
@@ -106,7 +108,7 @@ export function doDeleteFile(outpoint, deleteFromComputer, abandonClaim) {
|
|||||||
|
|
||||||
dispatch(doAbandonClaim(txid, nout));
|
dispatch(doAbandonClaim(txid, nout));
|
||||||
}
|
}
|
||||||
}*/
|
} */
|
||||||
|
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.FILE_DELETE,
|
type: ACTIONS.FILE_DELETE,
|
||||||
|
|||||||
@@ -3,14 +3,29 @@ import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
|||||||
const reducers = {};
|
const reducers = {};
|
||||||
const defaultState = {
|
const defaultState = {
|
||||||
stack: [{ route: Constants.DRAWER_ROUTE_DISCOVER, params: {} }], // Discover is always the first drawer route
|
stack: [{ route: Constants.DRAWER_ROUTE_DISCOVER, params: {} }], // Discover is always the first drawer route
|
||||||
|
lastRouteInStack: {},
|
||||||
playerVisible: false,
|
playerVisible: false,
|
||||||
|
playerVisibleByUri: {},
|
||||||
currentRoute: null,
|
currentRoute: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[Constants.ACTION_SET_PLAYER_VISIBLE] = (state, action) =>
|
reducers[Constants.ACTION_SET_PLAYER_VISIBLE] = (state, action) => {
|
||||||
Object.assign({}, state, {
|
const { visible, uri } = action.data;
|
||||||
|
const playerVisibleByUri = Object.assign({}, state.playerVisibleByUri);
|
||||||
|
|
||||||
|
if (!uri) {
|
||||||
|
Object.keys(playerVisibleByUri).forEach(playerUri => {
|
||||||
|
playerVisibleByUri[playerUri] = visible;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
playerVisibleByUri[uri] = visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Object.assign({}, state, {
|
||||||
playerVisible: action.data.visible,
|
playerVisible: action.data.visible,
|
||||||
|
playerVisibleByUri,
|
||||||
});
|
});
|
||||||
|
};
|
||||||
|
|
||||||
reducers[Constants.ACTION_PUSH_DRAWER_STACK] = (state, action) => {
|
reducers[Constants.ACTION_PUSH_DRAWER_STACK] = (state, action) => {
|
||||||
const { routeName, params } = action.data;
|
const { routeName, params } = action.data;
|
||||||
@@ -28,23 +43,30 @@ reducers[Constants.ACTION_PUSH_DRAWER_STACK] = (state, action) => {
|
|||||||
canPushStack = false;
|
canPushStack = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let lastRouteInStack;
|
||||||
if (canPushStack) {
|
if (canPushStack) {
|
||||||
newStack.push({ route: routeName, params });
|
newStack.push({ route: routeName, params });
|
||||||
|
|
||||||
|
// save the route
|
||||||
|
lastRouteInStack = { route: routeName, params };
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
stack: newStack,
|
stack: newStack,
|
||||||
|
lastRouteInStack,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[Constants.ACTION_POP_DRAWER_STACK] = (state, action) => {
|
reducers[Constants.ACTION_POP_DRAWER_STACK] = (state, action) => {
|
||||||
// We don't want to pop the Discover route, since it's always expected to be the first
|
// We don't want to pop the Discover route, since it's always expected to be the first
|
||||||
const newStack = state.stack.length === 1 ? state.stack.slice() : state.stack.slice(0, state.stack.length - 1);
|
const newStack = state.stack.length === 1 ? state.stack.slice() : state.stack.slice(0, state.stack.length - 1);
|
||||||
|
const lastRouteInStack = newStack && newStack.length > 0 ? newStack[newStack.length - 1] : null;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
stack: newStack,
|
stack: newStack,
|
||||||
|
lastRouteInStack,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -4,14 +4,25 @@ export const selectState = state => state.drawer || {};
|
|||||||
|
|
||||||
export const selectDrawerStack = createSelector(
|
export const selectDrawerStack = createSelector(
|
||||||
selectState,
|
selectState,
|
||||||
state => state.stack
|
state => state.stack,
|
||||||
);
|
);
|
||||||
|
|
||||||
export const selectIsPlayerVisible = createSelector(
|
export const selectIsPlayerVisible = createSelector(
|
||||||
selectState,
|
selectState,
|
||||||
state => state.playerVisible
|
state => state.playerVisible,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
export const selectPlayerVisibleByUri = createSelector(
|
||||||
|
selectState,
|
||||||
|
state => state.playerVisibleByUri,
|
||||||
|
);
|
||||||
|
|
||||||
|
export const makeSelectPlayerVisible = uri =>
|
||||||
|
createSelector(
|
||||||
|
selectPlayerVisibleByUri,
|
||||||
|
byUri => (byUri ? byUri[uri] : false),
|
||||||
|
);
|
||||||
|
|
||||||
export const selectLastDrawerRoute = createSelector(
|
export const selectLastDrawerRoute = createSelector(
|
||||||
selectState,
|
selectState,
|
||||||
state => {
|
state => {
|
||||||
@@ -20,10 +31,15 @@ export const selectLastDrawerRoute = createSelector(
|
|||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
export const selectLastRouteInStack = createSelector(
|
||||||
|
selectState,
|
||||||
|
state => state.lastRouteInStack,
|
||||||
);
|
);
|
||||||
|
|
||||||
export const selectCurrentRoute = createSelector(
|
export const selectCurrentRoute = createSelector(
|
||||||
selectState,
|
selectState,
|
||||||
state => state.currentRoute
|
state => state.currentRoute,
|
||||||
);
|
);
|
||||||
+9
-9
@@ -32,14 +32,14 @@ const aboutStyle = StyleSheet.create({
|
|||||||
title: {
|
title: {
|
||||||
color: Colors.LbryGreen,
|
color: Colors.LbryGreen,
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
marginTop: 16,
|
marginTop: 16,
|
||||||
marginLeft: 12,
|
marginLeft: 12,
|
||||||
marginRight: 12,
|
marginRight: 12,
|
||||||
marginBottom: 8,
|
marginBottom: 8,
|
||||||
},
|
},
|
||||||
paragraph: {
|
paragraph: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
lineHeight: 24,
|
lineHeight: 24,
|
||||||
marginLeft: 12,
|
marginLeft: 12,
|
||||||
@@ -53,13 +53,13 @@ const aboutStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
link: {
|
link: {
|
||||||
color: Colors.LbryGreen,
|
color: Colors.LbryGreen,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
marginBottom: 24,
|
marginBottom: 24,
|
||||||
},
|
},
|
||||||
listLink: {
|
listLink: {
|
||||||
color: Colors.LbryGreen,
|
color: Colors.LbryGreen,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
alignSelf: 'flex-end',
|
alignSelf: 'flex-end',
|
||||||
},
|
},
|
||||||
@@ -67,30 +67,30 @@ const aboutStyle = StyleSheet.create({
|
|||||||
alignSelf: 'stretch',
|
alignSelf: 'stretch',
|
||||||
},
|
},
|
||||||
socialTitle: {
|
socialTitle: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
marginLeft: 12,
|
marginLeft: 12,
|
||||||
marginRight: 12,
|
marginRight: 12,
|
||||||
marginBottom: 8,
|
marginBottom: 8,
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
},
|
},
|
||||||
releaseInfoTitle: {
|
releaseInfoTitle: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
marginLeft: 12,
|
marginLeft: 12,
|
||||||
marginRight: 12,
|
marginRight: 12,
|
||||||
marginBottom: 12,
|
marginBottom: 12,
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
},
|
},
|
||||||
text: {
|
text: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
},
|
},
|
||||||
valueText: {
|
valueText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
textAlign: 'right',
|
textAlign: 'right',
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
},
|
},
|
||||||
lineValueText: {
|
lineValueText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ const buttonStyle = StyleSheet.create({
|
|||||||
color: Colors.DarkGrey,
|
color: Colors.DarkGrey,
|
||||||
},
|
},
|
||||||
text: {
|
text: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
},
|
},
|
||||||
textWithIcon: {
|
textWithIcon: {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ const channelCreatorStyle = StyleSheet.create({
|
|||||||
backgroundColor: Colors.PageBackground,
|
backgroundColor: Colors.PageBackground,
|
||||||
},
|
},
|
||||||
channelPicker: {
|
channelPicker: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
height: 52,
|
height: 52,
|
||||||
width: '100%',
|
width: '100%',
|
||||||
@@ -27,7 +27,7 @@ const channelCreatorStyle = StyleSheet.create({
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
},
|
},
|
||||||
label: {
|
label: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
},
|
},
|
||||||
balance: {
|
balance: {
|
||||||
@@ -36,24 +36,24 @@ const channelCreatorStyle = StyleSheet.create({
|
|||||||
marginLeft: 24,
|
marginLeft: 24,
|
||||||
},
|
},
|
||||||
balanceText: {
|
balanceText: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
marginLeft: 4,
|
marginLeft: 4,
|
||||||
},
|
},
|
||||||
channelNameInput: {
|
channelNameInput: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
paddingLeft: 20,
|
paddingLeft: 20,
|
||||||
},
|
},
|
||||||
bidAmountInput: {
|
bidAmountInput: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
marginLeft: 16,
|
marginLeft: 16,
|
||||||
textAlign: 'right',
|
textAlign: 'right',
|
||||||
width: 80,
|
width: 80,
|
||||||
},
|
},
|
||||||
helpText: {
|
helpText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: Colors.DescriptionGrey,
|
color: Colors.DescriptionGrey,
|
||||||
},
|
},
|
||||||
@@ -68,7 +68,7 @@ const channelCreatorStyle = StyleSheet.create({
|
|||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
left: 4,
|
left: 4,
|
||||||
top: 13,
|
top: 13,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
},
|
},
|
||||||
buttonContainer: {
|
buttonContainer: {
|
||||||
@@ -90,7 +90,7 @@ const channelCreatorStyle = StyleSheet.create({
|
|||||||
alignSelf: 'flex-end',
|
alignSelf: 'flex-end',
|
||||||
},
|
},
|
||||||
inlineError: {
|
inlineError: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: Colors.Red,
|
color: Colors.Red,
|
||||||
marginTop: 2,
|
marginTop: 2,
|
||||||
@@ -151,12 +151,12 @@ const channelCreatorStyle = StyleSheet.create({
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
},
|
},
|
||||||
channelListTitle: {
|
channelListTitle: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
marginBottom: 4,
|
marginBottom: 4,
|
||||||
},
|
},
|
||||||
channelListName: {
|
channelListName: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
},
|
},
|
||||||
channelListAvatar: {
|
channelListAvatar: {
|
||||||
@@ -189,13 +189,13 @@ const channelCreatorStyle = StyleSheet.create({
|
|||||||
marginBottom: 4,
|
marginBottom: 4,
|
||||||
},
|
},
|
||||||
textInputTitle: {
|
textInputTitle: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
marginBottom: -10,
|
marginBottom: -10,
|
||||||
marginLeft: 4,
|
marginLeft: 4,
|
||||||
},
|
},
|
||||||
inputText: {
|
inputText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
},
|
},
|
||||||
toggleContainer: {
|
toggleContainer: {
|
||||||
@@ -209,7 +209,7 @@ const channelCreatorStyle = StyleSheet.create({
|
|||||||
marginRight: 16,
|
marginRight: 16,
|
||||||
},
|
},
|
||||||
cardTitle: {
|
cardTitle: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
marginBottom: 8,
|
marginBottom: 8,
|
||||||
},
|
},
|
||||||
@@ -243,7 +243,7 @@ const channelCreatorStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
editIcon: {
|
editIcon: {
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
},
|
},
|
||||||
uploadProgress: {
|
uploadProgress: {
|
||||||
@@ -262,7 +262,7 @@ const channelCreatorStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
uploadText: {
|
uploadText: {
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
marginLeft: 4,
|
marginLeft: 4,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ const channelIconStyle = StyleSheet.create({
|
|||||||
alignSelf: 'flex-start',
|
alignSelf: 'flex-start',
|
||||||
},
|
},
|
||||||
placeholderText: {
|
placeholderText: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
},
|
},
|
||||||
thumbnailContainer: {
|
thumbnailContainer: {
|
||||||
@@ -39,14 +39,14 @@ const channelIconStyle = StyleSheet.create({
|
|||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
width: 80,
|
width: 80,
|
||||||
marginTop: 4,
|
marginTop: 4,
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
},
|
},
|
||||||
autothumbCharacter: {
|
autothumbCharacter: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 48,
|
fontSize: 48,
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ const channelPageStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
color: Colors.LbryGreen,
|
color: Colors.LbryGreen,
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 30,
|
fontSize: 30,
|
||||||
margin: 16,
|
margin: 16,
|
||||||
},
|
},
|
||||||
@@ -34,7 +34,7 @@ const channelPageStyle = StyleSheet.create({
|
|||||||
padding: 24,
|
padding: 24,
|
||||||
},
|
},
|
||||||
infoText: {
|
infoText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
},
|
},
|
||||||
@@ -62,7 +62,7 @@ const channelPageStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
channelName: {
|
channelName: {
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
padding: 2,
|
padding: 2,
|
||||||
backgroundColor: '#000000aa',
|
backgroundColor: '#000000aa',
|
||||||
@@ -98,7 +98,7 @@ const channelPageStyle = StyleSheet.create({
|
|||||||
justifyContent: 'flex-end',
|
justifyContent: 'flex-end',
|
||||||
},
|
},
|
||||||
tabTitle: {
|
tabTitle: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
},
|
},
|
||||||
@@ -131,12 +131,12 @@ const channelPageStyle = StyleSheet.create({
|
|||||||
padding: 24,
|
padding: 24,
|
||||||
},
|
},
|
||||||
aboutTitle: {
|
aboutTitle: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
lineHeight: 24,
|
lineHeight: 24,
|
||||||
},
|
},
|
||||||
aboutText: {
|
aboutText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
lineHeight: 24,
|
lineHeight: 24,
|
||||||
},
|
},
|
||||||
@@ -182,7 +182,7 @@ const channelPageStyle = StyleSheet.create({
|
|||||||
marginRight: 8,
|
marginRight: 8,
|
||||||
},
|
},
|
||||||
followerCount: {
|
followerCount: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
marginTop: 2,
|
marginTop: 2,
|
||||||
|
|||||||
@@ -6,13 +6,13 @@ const channelSelectorStyle = StyleSheet.create({
|
|||||||
flex: 1,
|
flex: 1,
|
||||||
},
|
},
|
||||||
channelPicker: {
|
channelPicker: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
height: 52,
|
height: 52,
|
||||||
width: '100%',
|
width: '100%',
|
||||||
},
|
},
|
||||||
channelPickerItem: {
|
channelPickerItem: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
},
|
},
|
||||||
bidRow: {
|
bidRow: {
|
||||||
@@ -21,7 +21,7 @@ const channelSelectorStyle = StyleSheet.create({
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
},
|
},
|
||||||
label: {
|
label: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
},
|
},
|
||||||
balance: {
|
balance: {
|
||||||
@@ -30,24 +30,24 @@ const channelSelectorStyle = StyleSheet.create({
|
|||||||
marginLeft: 24,
|
marginLeft: 24,
|
||||||
},
|
},
|
||||||
balanceText: {
|
balanceText: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
marginLeft: 4,
|
marginLeft: 4,
|
||||||
},
|
},
|
||||||
channelNameInput: {
|
channelNameInput: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
paddingLeft: 20,
|
paddingLeft: 20,
|
||||||
},
|
},
|
||||||
bidAmountInput: {
|
bidAmountInput: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
marginLeft: 16,
|
marginLeft: 16,
|
||||||
textAlign: 'right',
|
textAlign: 'right',
|
||||||
width: 80,
|
width: 80,
|
||||||
},
|
},
|
||||||
helpText: {
|
helpText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
},
|
},
|
||||||
createChannelContainer: {
|
createChannelContainer: {
|
||||||
@@ -59,7 +59,7 @@ const channelSelectorStyle = StyleSheet.create({
|
|||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
left: 4,
|
left: 4,
|
||||||
top: 13,
|
top: 13,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
},
|
},
|
||||||
buttonContainer: {
|
buttonContainer: {
|
||||||
@@ -80,7 +80,7 @@ const channelSelectorStyle = StyleSheet.create({
|
|||||||
backgroundColor: Colors.NextLbryGreen,
|
backgroundColor: Colors.NextLbryGreen,
|
||||||
},
|
},
|
||||||
inlineError: {
|
inlineError: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: Colors.Red,
|
color: Colors.Red,
|
||||||
marginTop: 2,
|
marginTop: 2,
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ const claimListStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
noContentText: {
|
noContentText: {
|
||||||
color: Colors.DescriptionGrey,
|
color: Colors.DescriptionGrey,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
margin: 16,
|
margin: 16,
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ const Colors = {
|
|||||||
TagGreen: '#e3f6f1',
|
TagGreen: '#e3f6f1',
|
||||||
TagGrape: '#da77f255',
|
TagGrape: '#da77f255',
|
||||||
LightGrey: '#cccccc',
|
LightGrey: '#cccccc',
|
||||||
|
ActionGrey: '#aaaaaa',
|
||||||
LighterGrey: '#e5e5e5',
|
LighterGrey: '#e5e5e5',
|
||||||
Orange: '#ffbb00',
|
Orange: '#ffbb00',
|
||||||
Red: '#ff0000',
|
Red: '#ff0000',
|
||||||
@@ -24,6 +25,8 @@ const Colors = {
|
|||||||
StatsAudio: '#f6a637',
|
StatsAudio: '#f6a637',
|
||||||
StatsImage: '#ff4a7d',
|
StatsImage: '#ff4a7d',
|
||||||
StatsOther: '#26bcf7',
|
StatsOther: '#26bcf7',
|
||||||
|
|
||||||
|
ThumbnailPlaceholder: '#d5d5d5',
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Colors;
|
export default Colors;
|
||||||
+28
-22
@@ -55,11 +55,11 @@ const discoverStyle = StyleSheet.create({
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
},
|
},
|
||||||
pageTitle: {
|
pageTitle: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
},
|
},
|
||||||
customizeLink: {
|
customizeLink: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
},
|
},
|
||||||
trendingContainer: {
|
trendingContainer: {
|
||||||
@@ -74,7 +74,7 @@ const discoverStyle = StyleSheet.create({
|
|||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
marginLeft: 10,
|
marginLeft: 10,
|
||||||
@@ -95,7 +95,7 @@ const discoverStyle = StyleSheet.create({
|
|||||||
marginBottom: 56,
|
marginBottom: 56,
|
||||||
},
|
},
|
||||||
footerTitle: {
|
footerTitle: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
marginBottom: 10,
|
marginBottom: 10,
|
||||||
},
|
},
|
||||||
@@ -108,7 +108,7 @@ const discoverStyle = StyleSheet.create({
|
|||||||
marginBottom: 12,
|
marginBottom: 12,
|
||||||
},
|
},
|
||||||
categoryName: {
|
categoryName: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
color: Colors.Black,
|
color: Colors.Black,
|
||||||
},
|
},
|
||||||
@@ -127,7 +127,7 @@ const discoverStyle = StyleSheet.create({
|
|||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
},
|
},
|
||||||
moreText: {
|
moreText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
},
|
},
|
||||||
@@ -142,18 +142,18 @@ const discoverStyle = StyleSheet.create({
|
|||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
},
|
},
|
||||||
fileItemName: {
|
fileItemName: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
marginTop: 8,
|
marginTop: 8,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
},
|
},
|
||||||
channelName: {
|
channelName: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
marginTop: 4,
|
marginTop: 4,
|
||||||
color: Colors.LbryGreen,
|
color: Colors.LbryGreen,
|
||||||
},
|
},
|
||||||
anonChannelName: {
|
anonChannelName: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
marginTop: 4,
|
marginTop: 4,
|
||||||
color: Colors.DescriptionGrey,
|
color: Colors.DescriptionGrey,
|
||||||
@@ -166,6 +166,8 @@ const discoverStyle = StyleSheet.create({
|
|||||||
filePriceContainer: {
|
filePriceContainer: {
|
||||||
backgroundColor: Colors.NextLbryGreen,
|
backgroundColor: Colors.NextLbryGreen,
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
flexDirection: 'row',
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
right: 8,
|
right: 8,
|
||||||
top: 8,
|
top: 8,
|
||||||
@@ -174,11 +176,15 @@ const discoverStyle = StyleSheet.create({
|
|||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
},
|
},
|
||||||
filePriceText: {
|
filePriceText: {
|
||||||
fontFamily: 'Inter-UI-Bold',
|
fontFamily: 'Inter-Bold',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
color: '#0c604b',
|
color: '#0c604b',
|
||||||
},
|
},
|
||||||
|
filePriceIcon: {
|
||||||
|
marginRight: 2,
|
||||||
|
color: '#0c604b',
|
||||||
|
},
|
||||||
rightHeaderIcon: {
|
rightHeaderIcon: {
|
||||||
marginRight: 16,
|
marginRight: 16,
|
||||||
},
|
},
|
||||||
@@ -199,7 +205,7 @@ const discoverStyle = StyleSheet.create({
|
|||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
},
|
},
|
||||||
rewardTitleContainer: {
|
rewardTitleContainer: {
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
@@ -216,11 +222,11 @@ const discoverStyle = StyleSheet.create({
|
|||||||
flex: 0.9,
|
flex: 0.9,
|
||||||
},
|
},
|
||||||
menuText: {
|
menuText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
},
|
},
|
||||||
titleText: {
|
titleText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
},
|
},
|
||||||
detailsRow: {
|
detailsRow: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
@@ -230,7 +236,7 @@ const discoverStyle = StyleSheet.create({
|
|||||||
marginTop: 2,
|
marginTop: 2,
|
||||||
},
|
},
|
||||||
dateTimeText: {
|
dateTimeText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: Colors.DescriptionGrey,
|
color: Colors.DescriptionGrey,
|
||||||
},
|
},
|
||||||
@@ -253,7 +259,7 @@ const discoverStyle = StyleSheet.create({
|
|||||||
flex: 1,
|
flex: 1,
|
||||||
},
|
},
|
||||||
tagPageTitle: {
|
tagPageTitle: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
},
|
},
|
||||||
tagPageClaimList: {
|
tagPageClaimList: {
|
||||||
@@ -282,7 +288,7 @@ const discoverStyle = StyleSheet.create({
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
},
|
},
|
||||||
tagSortText: {
|
tagSortText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
marginRight: 4,
|
marginRight: 4,
|
||||||
},
|
},
|
||||||
@@ -290,7 +296,7 @@ const discoverStyle = StyleSheet.create({
|
|||||||
marginTop: -6,
|
marginTop: -6,
|
||||||
},
|
},
|
||||||
pickerLabel: {
|
pickerLabel: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: Colors.DescriptionGrey,
|
color: Colors.DescriptionGrey,
|
||||||
marginRight: 6,
|
marginRight: 6,
|
||||||
@@ -301,7 +307,7 @@ const discoverStyle = StyleSheet.create({
|
|||||||
marginBottom: 8,
|
marginBottom: 8,
|
||||||
},
|
},
|
||||||
menuGroupName: {
|
menuGroupName: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: Colors.DescriptionGrey,
|
color: Colors.DescriptionGrey,
|
||||||
textTransform: 'uppercase',
|
textTransform: 'uppercase',
|
||||||
@@ -331,7 +337,7 @@ const discoverStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
menuItem: {
|
menuItem: {
|
||||||
marginLeft: 8,
|
marginLeft: 8,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
},
|
},
|
||||||
signInContainer: {
|
signInContainer: {
|
||||||
@@ -347,7 +353,7 @@ const discoverStyle = StyleSheet.create({
|
|||||||
left: 16,
|
left: 16,
|
||||||
},
|
},
|
||||||
signedInEmail: {
|
signedInEmail: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
},
|
},
|
||||||
@@ -382,13 +388,13 @@ const discoverStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
signInMenuItemText: {
|
signInMenuItemText: {
|
||||||
color: Colors.DescriptionGrey,
|
color: Colors.DescriptionGrey,
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
},
|
},
|
||||||
signInMenuItemButtonText: {
|
signInMenuItemButtonText: {
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -24,14 +24,13 @@ const downloadsStyle = StyleSheet.create({
|
|||||||
paddingLeft: 16,
|
paddingLeft: 16,
|
||||||
paddingRight: 16,
|
paddingRight: 16,
|
||||||
marginTop: 16,
|
marginTop: 16,
|
||||||
marginBottom: 60,
|
|
||||||
},
|
},
|
||||||
scrollPadding: {
|
scrollPadding: {
|
||||||
marginTop: -16,
|
marginTop: -16,
|
||||||
paddingBottom: 16,
|
paddingBottom: 16,
|
||||||
},
|
},
|
||||||
noDownloadsText: {
|
noDownloadsText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
lineHeight: 24,
|
lineHeight: 24,
|
||||||
marginLeft: 16,
|
marginLeft: 16,
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ const emptyStateStyle = StyleSheet.create({
|
|||||||
message: {
|
message: {
|
||||||
marginTop: 24,
|
marginTop: 24,
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
lineHeight: 28,
|
lineHeight: 28,
|
||||||
marginBottom: 24,
|
marginBottom: 24,
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ const fileDownloadButtonStyle = StyleSheet.create({
|
|||||||
backgroundColor: Colors.LbryGreen,
|
backgroundColor: Colors.LbryGreen,
|
||||||
},
|
},
|
||||||
text: {
|
text: {
|
||||||
fontFamily: 'Inter-UI-Medium',
|
fontFamily: 'Inter-Medium',
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ const fileItemMediaStyle = StyleSheet.create({
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
},
|
},
|
||||||
autothumbText: {
|
autothumbText: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
fontSize: 40,
|
fontSize: 40,
|
||||||
@@ -22,7 +22,7 @@ const fileItemMediaStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
text: {
|
text: {
|
||||||
color: '#ffffff',
|
color: '#ffffff',
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
marginTop: 8,
|
marginTop: 8,
|
||||||
},
|
},
|
||||||
@@ -45,7 +45,7 @@ const fileItemMediaStyle = StyleSheet.create({
|
|||||||
paddingRight: 2,
|
paddingRight: 2,
|
||||||
},
|
},
|
||||||
durationText: {
|
durationText: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
},
|
},
|
||||||
|
|||||||
+44
-15
@@ -22,22 +22,42 @@ const fileListStyle = StyleSheet.create({
|
|||||||
flex: 1,
|
flex: 1,
|
||||||
},
|
},
|
||||||
featuredUri: {
|
featuredUri: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
},
|
},
|
||||||
featuredTitle: {
|
featuredTitle: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: screenWidthPixels <= 720 ? 12 : 16,
|
fontSize: screenWidthPixels <= 720 ? 11 : 16,
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
},
|
},
|
||||||
thumbnail: {
|
thumbnail: {
|
||||||
|
backgroundColor: Colors.ThumbnailPlaceholder,
|
||||||
width: thumbnailWidth,
|
width: thumbnailWidth,
|
||||||
height: thumbnailHeight,
|
height: thumbnailHeight,
|
||||||
marginRight: screenWidthPixels <= 720 ? 10 : 12,
|
marginRight: screenWidthPixels <= 720 ? 10 : 12,
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
},
|
},
|
||||||
|
channelThumbnailView: {
|
||||||
|
width: thumbnailWidth,
|
||||||
|
height: thumbnailHeight,
|
||||||
|
marginRight: screenWidthPixels <= 720 ? 10 : 12,
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
},
|
||||||
|
channelThumbnailContainer: {
|
||||||
|
width: thumbnailHeight, // maintain same width and height
|
||||||
|
height: thumbnailHeight,
|
||||||
|
borderRadius: 140,
|
||||||
|
overflow: 'hidden',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
},
|
||||||
|
channelThumbnail: {
|
||||||
|
width: '100%',
|
||||||
|
height: '100%',
|
||||||
|
},
|
||||||
selectedOverlay: {
|
selectedOverlay: {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
left: 0,
|
left: 0,
|
||||||
@@ -49,20 +69,23 @@ const fileListStyle = StyleSheet.create({
|
|||||||
backgroundColor: '#000000aa',
|
backgroundColor: '#000000aa',
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: screenWidthPixels <= 720 ? 12 : 14,
|
fontSize: screenWidthPixels <= 720 ? 11 : 14,
|
||||||
},
|
},
|
||||||
uri: {
|
uri: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: screenWidthPixels <= 720 ? 12 : 14,
|
fontSize: screenWidthPixels <= 720 ? 11 : 14,
|
||||||
marginBottom: 8,
|
marginBottom: 8,
|
||||||
},
|
},
|
||||||
publisher: {
|
publisher: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: screenWidthPixels <= 720 ? 11 : 12,
|
fontSize: screenWidthPixels <= 720 ? 10 : 12,
|
||||||
marginTop: screenWidthPixels <= 720 ? 1 : 3,
|
marginTop: screenWidthPixels <= 720 ? 1 : 3,
|
||||||
color: Colors.LbryGreen,
|
color: Colors.LbryGreen,
|
||||||
},
|
},
|
||||||
|
channelContainer: {
|
||||||
|
alignItems: 'center',
|
||||||
|
},
|
||||||
loading: {
|
loading: {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
},
|
},
|
||||||
@@ -72,15 +95,15 @@ const fileListStyle = StyleSheet.create({
|
|||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
},
|
},
|
||||||
infoText: {
|
infoText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: screenWidthPixels <= 720 ? 11 : 12,
|
fontSize: screenWidthPixels <= 720 ? 10 : 12,
|
||||||
color: Colors.ChannelGrey,
|
color: Colors.ChannelGrey,
|
||||||
},
|
},
|
||||||
downloadInfo: {
|
downloadInfo: {
|
||||||
marginTop: 2,
|
marginTop: 2,
|
||||||
},
|
},
|
||||||
progress: {
|
progress: {
|
||||||
marginTop: screenWidthPixels <= 720 ? 2 : 4,
|
marginTop: screenWidthPixels <= 720 ? 1 : 4,
|
||||||
},
|
},
|
||||||
progressCompleted: {
|
progressCompleted: {
|
||||||
backgroundColor: Colors.LbryGreen,
|
backgroundColor: Colors.LbryGreen,
|
||||||
@@ -123,19 +146,25 @@ const fileListStyle = StyleSheet.create({
|
|||||||
filePriceContainer: {
|
filePriceContainer: {
|
||||||
backgroundColor: Colors.NextLbryGreen,
|
backgroundColor: Colors.NextLbryGreen,
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
flexDirection: 'row',
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
left: thumbnailWidth - 64,
|
left: thumbnailWidth - 60,
|
||||||
top: 8,
|
top: 4,
|
||||||
width: 56,
|
width: 56,
|
||||||
height: 24,
|
height: 24,
|
||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
},
|
},
|
||||||
filePriceText: {
|
filePriceText: {
|
||||||
fontFamily: 'Inter-UI-Bold',
|
fontFamily: 'Inter-Bold',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
color: '#0c604b',
|
color: '#0c604b',
|
||||||
},
|
},
|
||||||
|
filePriceIcon: {
|
||||||
|
marginRight: 2,
|
||||||
|
color: '#0c604b',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export default fileListStyle;
|
export default fileListStyle;
|
||||||
+30
-25
@@ -38,7 +38,7 @@ const filePageStyle = StyleSheet.create({
|
|||||||
marginBottom: -17,
|
marginBottom: -17,
|
||||||
},
|
},
|
||||||
emptyClaimText: {
|
emptyClaimText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
marginLeft: 24,
|
marginLeft: 24,
|
||||||
@@ -54,7 +54,7 @@ const filePageStyle = StyleSheet.create({
|
|||||||
flex: 1,
|
flex: 1,
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
fontFamily: 'Inter-UI-Bold',
|
fontFamily: 'Inter-Bold',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
flex: 18,
|
flex: 18,
|
||||||
alignSelf: 'flex-start',
|
alignSelf: 'flex-start',
|
||||||
@@ -65,7 +65,6 @@ const filePageStyle = StyleSheet.create({
|
|||||||
titleRow: {
|
titleRow: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
marginTop: 12,
|
marginTop: 12,
|
||||||
marginBottom: 2,
|
|
||||||
marginLeft: 12,
|
marginLeft: 12,
|
||||||
marginRight: 12,
|
marginRight: 12,
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
@@ -89,17 +88,17 @@ const filePageStyle = StyleSheet.create({
|
|||||||
marginTop: 6,
|
marginTop: 6,
|
||||||
},
|
},
|
||||||
channelName: {
|
channelName: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: Colors.LbryGreen,
|
color: Colors.LbryGreen,
|
||||||
},
|
},
|
||||||
anonChannelName: {
|
anonChannelName: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: Colors.DescriptionGrey,
|
color: Colors.DescriptionGrey,
|
||||||
},
|
},
|
||||||
publishDateText: {
|
publishDateText: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: Colors.DescriptionGrey,
|
color: Colors.DescriptionGrey,
|
||||||
},
|
},
|
||||||
@@ -108,12 +107,13 @@ const filePageStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
description: {
|
description: {
|
||||||
color: Colors.DescriptionGrey,
|
color: Colors.DescriptionGrey,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
lineHeight: 18,
|
lineHeight: 18,
|
||||||
marginTop: -8,
|
marginTop: -8,
|
||||||
marginLeft: 12,
|
marginLeft: 12,
|
||||||
marginRight: 12,
|
marginRight: 12,
|
||||||
|
marginBottom: 16,
|
||||||
},
|
},
|
||||||
thumbnail: {
|
thumbnail: {
|
||||||
width: screenWidth,
|
width: screenWidth,
|
||||||
@@ -170,6 +170,8 @@ const filePageStyle = StyleSheet.create({
|
|||||||
filePriceContainer: {
|
filePriceContainer: {
|
||||||
backgroundColor: Colors.NextLbryGreen,
|
backgroundColor: Colors.NextLbryGreen,
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
flexDirection: 'row',
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
right: 16,
|
right: 16,
|
||||||
top: 16,
|
top: 16,
|
||||||
@@ -178,11 +180,14 @@ const filePageStyle = StyleSheet.create({
|
|||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
},
|
},
|
||||||
filePriceText: {
|
filePriceText: {
|
||||||
fontFamily: 'Inter-UI-Bold',
|
fontFamily: 'Inter-Bold',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
color: '#0c604b',
|
color: '#0c604b',
|
||||||
},
|
},
|
||||||
|
filePriceIcon: {
|
||||||
|
marginRight: 2,
|
||||||
|
},
|
||||||
actions: {
|
actions: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
@@ -230,19 +235,19 @@ const filePageStyle = StyleSheet.create({
|
|||||||
paddingRight: 24,
|
paddingRight: 24,
|
||||||
},
|
},
|
||||||
dmcaText: {
|
dmcaText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
lineHeight: 24,
|
lineHeight: 24,
|
||||||
},
|
},
|
||||||
dmcaLink: {
|
dmcaLink: {
|
||||||
color: Colors.LbryGreen,
|
color: Colors.LbryGreen,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
lineHeight: 24,
|
lineHeight: 24,
|
||||||
marginTop: 24,
|
marginTop: 24,
|
||||||
},
|
},
|
||||||
infoText: {
|
infoText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
marginLeft: 10,
|
marginLeft: 10,
|
||||||
@@ -289,7 +294,7 @@ const filePageStyle = StyleSheet.create({
|
|||||||
marginBottom: 14,
|
marginBottom: 14,
|
||||||
},
|
},
|
||||||
input: {
|
input: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
},
|
},
|
||||||
tipAmountInput: {
|
tipAmountInput: {
|
||||||
@@ -311,7 +316,7 @@ const filePageStyle = StyleSheet.create({
|
|||||||
marginTop: -8,
|
marginTop: -8,
|
||||||
},
|
},
|
||||||
text: {
|
text: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
lineHeight: 24,
|
lineHeight: 24,
|
||||||
},
|
},
|
||||||
@@ -327,17 +332,16 @@ const filePageStyle = StyleSheet.create({
|
|||||||
tagContainer: {
|
tagContainer: {
|
||||||
marginLeft: 12,
|
marginLeft: 12,
|
||||||
marginRight: 12,
|
marginRight: 12,
|
||||||
marginTop: 16,
|
|
||||||
marginBottom: 16,
|
marginBottom: 16,
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
},
|
},
|
||||||
tagTitle: {
|
tagTitle: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
flex: 0.2,
|
flex: 0.2,
|
||||||
marginTop: 4,
|
marginTop: 4,
|
||||||
},
|
},
|
||||||
tagList: {
|
tagList: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
flex: 0.8,
|
flex: 0.8,
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
flexWrap: 'wrap',
|
flexWrap: 'wrap',
|
||||||
@@ -359,7 +363,7 @@ const filePageStyle = StyleSheet.create({
|
|||||||
marginRight: 8,
|
marginRight: 8,
|
||||||
},
|
},
|
||||||
rewardDriverText: {
|
rewardDriverText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
},
|
},
|
||||||
@@ -395,11 +399,12 @@ const filePageStyle = StyleSheet.create({
|
|||||||
flex: 0.2,
|
flex: 0.2,
|
||||||
},
|
},
|
||||||
largeButtonIcon: {
|
largeButtonIcon: {
|
||||||
color: Colors.DescriptionGrey,
|
color: Colors.ActionGrey,
|
||||||
},
|
},
|
||||||
largeButtonText: {
|
largeButtonText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
color: Colors.ActionGrey,
|
||||||
fontSize: 14,
|
fontFamily: 'Inter-Regular',
|
||||||
|
fontSize: 12,
|
||||||
marginTop: 4,
|
marginTop: 4,
|
||||||
},
|
},
|
||||||
largeButtonsRow: {
|
largeButtonsRow: {
|
||||||
@@ -426,7 +431,7 @@ const filePageStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
unsupportedContentFilename: {
|
unsupportedContentFilename: {
|
||||||
color: Colors.LbryGreen,
|
color: Colors.LbryGreen,
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
},
|
},
|
||||||
unsupportedContentImage: {
|
unsupportedContentImage: {
|
||||||
@@ -435,11 +440,11 @@ const filePageStyle = StyleSheet.create({
|
|||||||
marginRight: 24,
|
marginRight: 24,
|
||||||
},
|
},
|
||||||
unsupportedContentTitle: {
|
unsupportedContentTitle: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
},
|
},
|
||||||
unsupportedContentText: {
|
unsupportedContentText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
marginTop: 4,
|
marginTop: 4,
|
||||||
},
|
},
|
||||||
@@ -447,7 +452,7 @@ const filePageStyle = StyleSheet.create({
|
|||||||
marginTop: 16,
|
marginTop: 16,
|
||||||
},
|
},
|
||||||
viewCount: {
|
viewCount: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: Colors.DescriptionGrey,
|
color: Colors.DescriptionGrey,
|
||||||
marginLeft: 12,
|
marginLeft: 12,
|
||||||
@@ -459,7 +464,7 @@ const filePageStyle = StyleSheet.create({
|
|||||||
marginLeft: 24,
|
marginLeft: 24,
|
||||||
},
|
},
|
||||||
balanceText: {
|
balanceText: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
marginLeft: 4,
|
marginLeft: 4,
|
||||||
},
|
},
|
||||||
|
|||||||
+12
-12
@@ -17,7 +17,7 @@ const firstRunStyle = StyleSheet.create({
|
|||||||
backgroundColor: Colors.LbryGreen,
|
backgroundColor: Colors.LbryGreen,
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 40,
|
fontSize: 40,
|
||||||
marginLeft: 32,
|
marginLeft: 32,
|
||||||
marginRight: 32,
|
marginRight: 32,
|
||||||
@@ -25,7 +25,7 @@ const firstRunStyle = StyleSheet.create({
|
|||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
},
|
},
|
||||||
paragraph: {
|
paragraph: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
lineHeight: 24,
|
lineHeight: 24,
|
||||||
marginLeft: 32,
|
marginLeft: 32,
|
||||||
@@ -34,7 +34,7 @@ const firstRunStyle = StyleSheet.create({
|
|||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
},
|
},
|
||||||
spacedParagraph: {
|
spacedParagraph: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
lineHeight: 28,
|
lineHeight: 28,
|
||||||
marginLeft: 32,
|
marginLeft: 32,
|
||||||
@@ -43,7 +43,7 @@ const firstRunStyle = StyleSheet.create({
|
|||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
},
|
},
|
||||||
infoParagraph: {
|
infoParagraph: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
lineHeight: 20,
|
lineHeight: 20,
|
||||||
marginLeft: 32,
|
marginLeft: 32,
|
||||||
@@ -55,7 +55,7 @@ const firstRunStyle = StyleSheet.create({
|
|||||||
marginTop: 36,
|
marginTop: 36,
|
||||||
},
|
},
|
||||||
rowParagraph: {
|
rowParagraph: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
lineHeight: 24,
|
lineHeight: 24,
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
@@ -67,7 +67,7 @@ const firstRunStyle = StyleSheet.create({
|
|||||||
marginRight: 8,
|
marginRight: 8,
|
||||||
},
|
},
|
||||||
emailInput: {
|
emailInput: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
lineHeight: 24,
|
lineHeight: 24,
|
||||||
marginLeft: 32,
|
marginLeft: 32,
|
||||||
@@ -76,7 +76,7 @@ const firstRunStyle = StyleSheet.create({
|
|||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
},
|
},
|
||||||
passwordInput: {
|
passwordInput: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
lineHeight: 24,
|
lineHeight: 24,
|
||||||
marginLeft: 32,
|
marginLeft: 32,
|
||||||
@@ -102,7 +102,7 @@ const firstRunStyle = StyleSheet.create({
|
|||||||
actionButton: {
|
actionButton: {
|
||||||
backgroundColor: Colors.White,
|
backgroundColor: Colors.White,
|
||||||
alignSelf: 'center',
|
alignSelf: 'center',
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
paddingLeft: 16,
|
paddingLeft: 16,
|
||||||
paddingRight: 16,
|
paddingRight: 16,
|
||||||
@@ -114,18 +114,18 @@ const firstRunStyle = StyleSheet.create({
|
|||||||
paddingRight: 32,
|
paddingRight: 32,
|
||||||
},
|
},
|
||||||
buttonText: {
|
buttonText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
},
|
},
|
||||||
smallButtonText: {
|
smallButtonText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
marginBottom: -2,
|
marginBottom: -2,
|
||||||
},
|
},
|
||||||
smallLeftButtonText: {
|
smallLeftButtonText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
marginBottom: 6,
|
marginBottom: 6,
|
||||||
@@ -183,7 +183,7 @@ const firstRunStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
passwordWarningText: {
|
passwordWarningText: {
|
||||||
color: Colors.NextLbryGreen,
|
color: Colors.NextLbryGreen,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
},
|
},
|
||||||
centered: {
|
centered: {
|
||||||
|
|||||||
@@ -42,12 +42,12 @@ const floatingButtonStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
text: {
|
text: {
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
},
|
},
|
||||||
bottomRight: {
|
bottomRight: {
|
||||||
right: 10,
|
right: 0,
|
||||||
bottom: 10,
|
bottom: 0,
|
||||||
},
|
},
|
||||||
rewardIcon: {
|
rewardIcon: {
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
|
|||||||
@@ -0,0 +1,150 @@
|
|||||||
|
import { StyleSheet } from 'react-native';
|
||||||
|
import Colors from './colors';
|
||||||
|
|
||||||
|
const walletStyle = StyleSheet.create({
|
||||||
|
container: {
|
||||||
|
flex: 1,
|
||||||
|
backgroundColor: Colors.PageBackground,
|
||||||
|
},
|
||||||
|
scrollContainer: {
|
||||||
|
marginTop: 60,
|
||||||
|
},
|
||||||
|
row: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
alignItems: 'center',
|
||||||
|
},
|
||||||
|
button: {
|
||||||
|
backgroundColor: Colors.LbryGreen,
|
||||||
|
alignSelf: 'flex-start',
|
||||||
|
},
|
||||||
|
card: {
|
||||||
|
backgroundColor: Colors.White,
|
||||||
|
marginTop: 16,
|
||||||
|
marginLeft: 16,
|
||||||
|
marginRight: 16,
|
||||||
|
padding: 16,
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
fontFamily: 'Inter-SemiBold',
|
||||||
|
fontSize: 20,
|
||||||
|
marginBottom: 8,
|
||||||
|
},
|
||||||
|
titleRow: {
|
||||||
|
alignItems: 'center',
|
||||||
|
flexDirection: 'row',
|
||||||
|
marginBottom: 8,
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
},
|
||||||
|
titleCol: {
|
||||||
|
fontFamily: 'Inter-SemiBold',
|
||||||
|
fontSize: 20,
|
||||||
|
},
|
||||||
|
text: {
|
||||||
|
fontFamily: 'Inter-Regular',
|
||||||
|
fontSize: 14,
|
||||||
|
},
|
||||||
|
link: {
|
||||||
|
color: Colors.LbryGreen,
|
||||||
|
fontFamily: 'Inter-Regular',
|
||||||
|
fontSize: 14,
|
||||||
|
},
|
||||||
|
smallText: {
|
||||||
|
fontFamily: 'Inter-Regular',
|
||||||
|
fontSize: 12,
|
||||||
|
},
|
||||||
|
rewardDriverCard: {
|
||||||
|
alignItems: 'center',
|
||||||
|
backgroundColor: Colors.RewardDriverBlue,
|
||||||
|
flexDirection: 'row',
|
||||||
|
padding: 16,
|
||||||
|
marginLeft: 16,
|
||||||
|
marginTop: 16,
|
||||||
|
marginRight: 16,
|
||||||
|
},
|
||||||
|
rewardDriverIcon: {
|
||||||
|
color: Colors.White,
|
||||||
|
marginRight: 8,
|
||||||
|
},
|
||||||
|
rewardDriverText: {
|
||||||
|
fontFamily: 'Inter-Regular',
|
||||||
|
color: Colors.White,
|
||||||
|
fontSize: 14,
|
||||||
|
},
|
||||||
|
subTitle: {
|
||||||
|
fontFamily: 'Inter-Regular',
|
||||||
|
fontSize: 14,
|
||||||
|
marginTop: 12,
|
||||||
|
marginBottom: 4,
|
||||||
|
},
|
||||||
|
customizeTitle: {
|
||||||
|
fontFamily: 'Inter-Regular',
|
||||||
|
fontSize: 14,
|
||||||
|
marginTop: 12,
|
||||||
|
},
|
||||||
|
inviteLink: {
|
||||||
|
fontFamily: 'Inter-Regular',
|
||||||
|
borderWidth: 1,
|
||||||
|
borderRadius: 16,
|
||||||
|
borderStyle: 'dashed',
|
||||||
|
borderColor: '#e1e1e1',
|
||||||
|
backgroundColor: '#f9f9f9',
|
||||||
|
paddingTop: 8,
|
||||||
|
paddingLeft: 8,
|
||||||
|
paddingRight: 8,
|
||||||
|
paddingBottom: 6,
|
||||||
|
width: '88%',
|
||||||
|
},
|
||||||
|
emailInput: {
|
||||||
|
fontFamily: 'Inter-Regular',
|
||||||
|
fontSize: 14,
|
||||||
|
},
|
||||||
|
rightRow: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'flex-end',
|
||||||
|
},
|
||||||
|
loading: {
|
||||||
|
marginRight: 8,
|
||||||
|
},
|
||||||
|
lastCard: {
|
||||||
|
marginBottom: 16,
|
||||||
|
},
|
||||||
|
invitees: {
|
||||||
|
marginTop: 8,
|
||||||
|
},
|
||||||
|
inviteesHeader: {
|
||||||
|
flex: 1,
|
||||||
|
flexDirection: 'row',
|
||||||
|
alignItems: 'center',
|
||||||
|
marginBottom: 8,
|
||||||
|
},
|
||||||
|
emailHeader: {
|
||||||
|
fontFamily: 'Inter-SemiBold',
|
||||||
|
fontSize: 14,
|
||||||
|
width: '65%',
|
||||||
|
},
|
||||||
|
rewardHeader: {
|
||||||
|
fontFamily: 'Inter-SemiBold',
|
||||||
|
fontSize: 14,
|
||||||
|
width: '35%',
|
||||||
|
},
|
||||||
|
inviteeItem: {
|
||||||
|
flex: 1,
|
||||||
|
flexDirection: 'row',
|
||||||
|
alignItems: 'center',
|
||||||
|
marginBottom: 8,
|
||||||
|
},
|
||||||
|
inviteeEmail: {
|
||||||
|
fontFamily: 'Inter-Regular',
|
||||||
|
fontSize: 12,
|
||||||
|
width: '65%',
|
||||||
|
},
|
||||||
|
rewardStatus: {
|
||||||
|
fontFamily: 'Inter-Regular',
|
||||||
|
fontSize: 12,
|
||||||
|
width: '35%',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export default walletStyle;
|
||||||
@@ -56,13 +56,41 @@ const mediaPlayerStyle = StyleSheet.create({
|
|||||||
height: '100%',
|
height: '100%',
|
||||||
},
|
},
|
||||||
playerControlsContainer: {
|
playerControlsContainer: {
|
||||||
backgroundColor: '#00000020',
|
backgroundColor: '#00000040',
|
||||||
flex: 1,
|
flex: 1,
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
},
|
},
|
||||||
playPauseButton: {
|
midControls: {
|
||||||
|
flex: 1,
|
||||||
|
flexDirection: 'row',
|
||||||
|
height: 64,
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
},
|
||||||
|
midControlText: {
|
||||||
|
fontFamily: 'Inter-Regular',
|
||||||
|
fontSize: 10,
|
||||||
|
position: 'absolute',
|
||||||
|
top: 10,
|
||||||
|
color: Colors.White,
|
||||||
|
},
|
||||||
|
leftMidControlText: {
|
||||||
|
left: -6,
|
||||||
|
},
|
||||||
|
rightMidControlText: {
|
||||||
|
right: -6,
|
||||||
|
},
|
||||||
|
rewind10: {
|
||||||
|
marginRight: 48,
|
||||||
|
alignItems: 'center',
|
||||||
|
},
|
||||||
|
forward10: {
|
||||||
|
marginLeft: 48,
|
||||||
|
alignItems: 'center',
|
||||||
|
},
|
||||||
|
playPauseButton: {
|
||||||
width: 64,
|
width: 64,
|
||||||
height: 64,
|
height: 64,
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
@@ -78,7 +106,7 @@ const mediaPlayerStyle = StyleSheet.create({
|
|||||||
bottom: 14,
|
bottom: 14,
|
||||||
},
|
},
|
||||||
elapsedDuration: {
|
elapsedDuration: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
left: 8,
|
left: 8,
|
||||||
bottom: 24,
|
bottom: 24,
|
||||||
@@ -86,7 +114,7 @@ const mediaPlayerStyle = StyleSheet.create({
|
|||||||
color: '#ffffff',
|
color: '#ffffff',
|
||||||
},
|
},
|
||||||
totalDuration: {
|
totalDuration: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
right: 48,
|
right: 48,
|
||||||
bottom: 24,
|
bottom: 24,
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ const modalPickerStyle = StyleSheet.create({
|
|||||||
padding: 12,
|
padding: 12,
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
marginTop: 4,
|
marginTop: 4,
|
||||||
textTransform: 'uppercase',
|
textTransform: 'uppercase',
|
||||||
@@ -54,7 +54,7 @@ const modalPickerStyle = StyleSheet.create({
|
|||||||
itemLabel: {
|
itemLabel: {
|
||||||
marginLeft: 8,
|
marginLeft: 8,
|
||||||
alignSelf: 'flex-start',
|
alignSelf: 'flex-start',
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
},
|
},
|
||||||
itemSelected: {
|
itemSelected: {
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ const modalTagSelectorStyle = StyleSheet.create({
|
|||||||
marginBottom: 12,
|
marginBottom: 12,
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
},
|
},
|
||||||
buttons: {
|
buttons: {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ const modalTipStyle = StyleSheet.create({
|
|||||||
padding: 16,
|
padding: 16,
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
},
|
},
|
||||||
row: {
|
row: {
|
||||||
@@ -19,7 +19,7 @@ const modalTipStyle = StyleSheet.create({
|
|||||||
marginRight: 24,
|
marginRight: 24,
|
||||||
},
|
},
|
||||||
tipAmountInput: {
|
tipAmountInput: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
alignSelf: 'flex-start',
|
alignSelf: 'flex-start',
|
||||||
textAlign: 'right',
|
textAlign: 'right',
|
||||||
@@ -27,7 +27,7 @@ const modalTipStyle = StyleSheet.create({
|
|||||||
letterSpacing: 1,
|
letterSpacing: 1,
|
||||||
},
|
},
|
||||||
currency: {
|
currency: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
marginLeft: 4,
|
marginLeft: 4,
|
||||||
},
|
},
|
||||||
@@ -49,7 +49,7 @@ const modalTipStyle = StyleSheet.create({
|
|||||||
marginLeft: 24,
|
marginLeft: 24,
|
||||||
},
|
},
|
||||||
balanceText: {
|
balanceText: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
marginLeft: 4,
|
marginLeft: 4,
|
||||||
},
|
},
|
||||||
@@ -57,12 +57,12 @@ const modalTipStyle = StyleSheet.create({
|
|||||||
marginTop: 4,
|
marginTop: 4,
|
||||||
},
|
},
|
||||||
infoText: {
|
infoText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: Colors.DescriptionGrey,
|
color: Colors.DescriptionGrey,
|
||||||
},
|
},
|
||||||
learnMoreLink: {
|
learnMoreLink: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: Colors.LbryGreen,
|
color: Colors.LbryGreen,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ const pageHeaderStyle = StyleSheet.create({
|
|||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
},
|
},
|
||||||
titleText: {
|
titleText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: Platform.OS === 'ios' ? 17 : 20,
|
fontSize: Platform.OS === 'ios' ? 17 : 20,
|
||||||
fontWeight: Platform.OS === 'ios' ? '700' : '500',
|
fontWeight: Platform.OS === 'ios' ? '700' : '500',
|
||||||
color: 'rgba(0, 0, 0, .9)',
|
color: 'rgba(0, 0, 0, .9)',
|
||||||
|
|||||||
+22
-22
@@ -23,7 +23,7 @@ const publishStyle = StyleSheet.create({
|
|||||||
height: 90,
|
height: 90,
|
||||||
},
|
},
|
||||||
inputText: {
|
inputText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
},
|
},
|
||||||
card: {
|
card: {
|
||||||
@@ -57,7 +57,7 @@ const publishStyle = StyleSheet.create({
|
|||||||
alignSelf: 'flex-end',
|
alignSelf: 'flex-end',
|
||||||
},
|
},
|
||||||
cardTitle: {
|
cardTitle: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
marginBottom: 8,
|
marginBottom: 8,
|
||||||
},
|
},
|
||||||
@@ -84,7 +84,7 @@ const publishStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
actionText: {
|
actionText: {
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
marginTop: 8,
|
marginTop: 8,
|
||||||
},
|
},
|
||||||
@@ -119,12 +119,12 @@ const publishStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
priceInput: {
|
priceInput: {
|
||||||
width: 80,
|
width: 80,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
textAlign: 'right',
|
textAlign: 'right',
|
||||||
},
|
},
|
||||||
currency: {
|
currency: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
},
|
},
|
||||||
cardRow: {
|
cardRow: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
@@ -155,12 +155,12 @@ const publishStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
loadingText: {
|
loadingText: {
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
marginLeft: 8,
|
marginLeft: 8,
|
||||||
},
|
},
|
||||||
listEmptyText: {
|
listEmptyText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
},
|
},
|
||||||
titleRow: {
|
titleRow: {
|
||||||
@@ -168,7 +168,7 @@ const publishStyle = StyleSheet.create({
|
|||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
},
|
},
|
||||||
cardText: {
|
cardText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
},
|
},
|
||||||
cameraPreview: {
|
cameraPreview: {
|
||||||
@@ -192,12 +192,12 @@ const publishStyle = StyleSheet.create({
|
|||||||
padding: 16,
|
padding: 16,
|
||||||
},
|
},
|
||||||
successTitle: {
|
successTitle: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 28,
|
fontSize: 28,
|
||||||
marginBottom: 16,
|
marginBottom: 16,
|
||||||
},
|
},
|
||||||
successText: {
|
successText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
marginBottom: 16,
|
marginBottom: 16,
|
||||||
lineHeight: 20,
|
lineHeight: 20,
|
||||||
@@ -211,7 +211,7 @@ const publishStyle = StyleSheet.create({
|
|||||||
successUrl: {
|
successUrl: {
|
||||||
flex: 0.9,
|
flex: 0.9,
|
||||||
fontSize: 32,
|
fontSize: 32,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
color: Colors.NextLbryGreen,
|
color: Colors.NextLbryGreen,
|
||||||
marginRight: 16,
|
marginRight: 16,
|
||||||
},
|
},
|
||||||
@@ -305,7 +305,7 @@ const publishStyle = StyleSheet.create({
|
|||||||
paddingBottom: 12,
|
paddingBottom: 12,
|
||||||
},
|
},
|
||||||
rewardDriverText: {
|
rewardDriverText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
},
|
},
|
||||||
@@ -325,7 +325,7 @@ const publishStyle = StyleSheet.create({
|
|||||||
marginBottom: 4,
|
marginBottom: 4,
|
||||||
},
|
},
|
||||||
textInputTitle: {
|
textInputTitle: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
marginBottom: -10,
|
marginBottom: -10,
|
||||||
marginLeft: 4,
|
marginLeft: 4,
|
||||||
@@ -346,7 +346,7 @@ const publishStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
thumbnailUploadText: {
|
thumbnailUploadText: {
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
marginLeft: 4,
|
marginLeft: 4,
|
||||||
},
|
},
|
||||||
@@ -357,7 +357,7 @@ const publishStyle = StyleSheet.create({
|
|||||||
marginBottom: 16,
|
marginBottom: 16,
|
||||||
},
|
},
|
||||||
toggleText: {
|
toggleText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
marginLeft: 8,
|
marginLeft: 8,
|
||||||
},
|
},
|
||||||
@@ -398,7 +398,7 @@ const publishStyle = StyleSheet.create({
|
|||||||
padding: 16,
|
padding: 16,
|
||||||
},
|
},
|
||||||
noPublishText: {
|
noPublishText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
},
|
},
|
||||||
publishNowButton: {
|
publishNowButton: {
|
||||||
@@ -423,21 +423,21 @@ const publishStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
noVideos: {
|
noVideos: {
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
},
|
},
|
||||||
cameraInfo: {
|
cameraInfo: {
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
},
|
},
|
||||||
warningText: {
|
warningText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: Colors.DescriptionGrey,
|
color: Colors.DescriptionGrey,
|
||||||
},
|
},
|
||||||
helpText: {
|
helpText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: Colors.DescriptionGrey,
|
color: Colors.DescriptionGrey,
|
||||||
},
|
},
|
||||||
@@ -463,7 +463,7 @@ const publishStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
editIcon: {
|
editIcon: {
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
},
|
},
|
||||||
balance: {
|
balance: {
|
||||||
@@ -472,7 +472,7 @@ const publishStyle = StyleSheet.create({
|
|||||||
marginLeft: 24,
|
marginLeft: 24,
|
||||||
},
|
},
|
||||||
balanceText: {
|
balanceText: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
marginLeft: 4,
|
marginLeft: 4,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ const relatedContentStyle = StyleSheet.create({
|
|||||||
borderTopWidth: 1,
|
borderTopWidth: 1,
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
},
|
},
|
||||||
itemList: {
|
itemList: {
|
||||||
|
|||||||
+38
-21
@@ -37,7 +37,7 @@ const rewardStyle = StyleSheet.create({
|
|||||||
marginTop: 36,
|
marginTop: 36,
|
||||||
},
|
},
|
||||||
enrollDescText: {
|
enrollDescText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
lineHeight: 28,
|
lineHeight: 28,
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
@@ -67,36 +67,36 @@ const rewardStyle = StyleSheet.create({
|
|||||||
paddingBottom: 16,
|
paddingBottom: 16,
|
||||||
},
|
},
|
||||||
text: {
|
text: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
lineHeight: 24,
|
lineHeight: 24,
|
||||||
},
|
},
|
||||||
infoText: {
|
infoText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
marginLeft: 12,
|
marginLeft: 12,
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 22,
|
fontSize: 22,
|
||||||
marginBottom: 6,
|
marginBottom: 6,
|
||||||
color: Colors.LbryGreen,
|
color: Colors.LbryGreen,
|
||||||
},
|
},
|
||||||
subtitle: {
|
subtitle: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
marginBottom: 6,
|
marginBottom: 6,
|
||||||
color: Colors.LbryGreen,
|
color: Colors.LbryGreen,
|
||||||
},
|
},
|
||||||
subcardText: {
|
subcardText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
lineHeight: 20,
|
lineHeight: 20,
|
||||||
marginLeft: 2,
|
marginLeft: 2,
|
||||||
marginRight: 2,
|
marginRight: 2,
|
||||||
},
|
},
|
||||||
subcardTextInput: {
|
subcardTextInput: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
marginTop: 2,
|
marginTop: 2,
|
||||||
marginBottom: 2,
|
marginBottom: 2,
|
||||||
@@ -122,7 +122,7 @@ const rewardStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
link: {
|
link: {
|
||||||
color: Colors.LbryGreen,
|
color: Colors.LbryGreen,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
},
|
},
|
||||||
textLink: {
|
textLink: {
|
||||||
@@ -148,21 +148,21 @@ const rewardStyle = StyleSheet.create({
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
},
|
},
|
||||||
rewardAmount: {
|
rewardAmount: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 26,
|
fontSize: 26,
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
},
|
},
|
||||||
rewardCurrency: {
|
rewardCurrency: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
},
|
},
|
||||||
rewardTitle: {
|
rewardTitle: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
color: Colors.LbryGreen,
|
color: Colors.LbryGreen,
|
||||||
marginBottom: 4,
|
marginBottom: 4,
|
||||||
},
|
},
|
||||||
rewardDescription: {
|
rewardDescription: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
lineHeight: 18,
|
lineHeight: 18,
|
||||||
marginBottom: 4,
|
marginBottom: 4,
|
||||||
@@ -195,7 +195,7 @@ const rewardStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
summaryText: {
|
summaryText: {
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 28,
|
fontSize: 28,
|
||||||
marginLeft: 12,
|
marginLeft: 12,
|
||||||
},
|
},
|
||||||
@@ -208,19 +208,19 @@ const rewardStyle = StyleSheet.create({
|
|||||||
marginRight: 32,
|
marginRight: 32,
|
||||||
},
|
},
|
||||||
phoneInputText: {
|
phoneInputText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
letterSpacing: 1.3,
|
letterSpacing: 1.3,
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
},
|
},
|
||||||
verifyingText: {
|
verifyingText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
marginLeft: 12,
|
marginLeft: 12,
|
||||||
alignSelf: 'flex-start',
|
alignSelf: 'flex-start',
|
||||||
},
|
},
|
||||||
verificationCodeInput: {
|
verificationCodeInput: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
letterSpacing: 12,
|
letterSpacing: 12,
|
||||||
@@ -244,11 +244,11 @@ const rewardStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
notInterestedLink: {
|
notInterestedLink: {
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
},
|
},
|
||||||
learnMoreLink: {
|
learnMoreLink: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
textDecorationLine: 'underline',
|
textDecorationLine: 'underline',
|
||||||
},
|
},
|
||||||
@@ -258,7 +258,7 @@ const rewardStyle = StyleSheet.create({
|
|||||||
paddingRight: 16,
|
paddingRight: 16,
|
||||||
},
|
},
|
||||||
customCodeInput: {
|
customCodeInput: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
letterSpacing: 1.3,
|
letterSpacing: 1.3,
|
||||||
marginTop: -8,
|
marginTop: -8,
|
||||||
@@ -285,7 +285,7 @@ const rewardStyle = StyleSheet.create({
|
|||||||
verificationTitle: {
|
verificationTitle: {
|
||||||
fontSize: 32,
|
fontSize: 32,
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
marginLeft: 32,
|
marginLeft: 32,
|
||||||
marginRight: 32,
|
marginRight: 32,
|
||||||
marginBottom: 24,
|
marginBottom: 24,
|
||||||
@@ -300,11 +300,28 @@ const rewardStyle = StyleSheet.create({
|
|||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
},
|
},
|
||||||
paragraphText: {
|
paragraphText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
lineHeight: 16,
|
lineHeight: 16,
|
||||||
},
|
},
|
||||||
|
filterHeader: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
alignItems: 'center',
|
||||||
|
marginTop: 16,
|
||||||
|
marginLeft: 16,
|
||||||
|
marginRight: 16,
|
||||||
|
padding: 16,
|
||||||
|
backgroundColor: Colors.White,
|
||||||
|
},
|
||||||
|
filterLink: {
|
||||||
|
fontFamily: 'Inter-Regular',
|
||||||
|
fontSize: 14,
|
||||||
|
marginRight: 24,
|
||||||
|
},
|
||||||
|
activeFilterLink: {
|
||||||
|
fontFamily: 'Inter-SemiBold',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export default rewardStyle;
|
export default rewardStyle;
|
||||||
+11
-5
@@ -44,19 +44,19 @@ const searchStyle = StyleSheet.create({
|
|||||||
backgroundColor: Colors.DarkerGrey,
|
backgroundColor: Colors.DarkerGrey,
|
||||||
},
|
},
|
||||||
tagResultTitle: {
|
tagResultTitle: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
},
|
},
|
||||||
tagResultDescription: {
|
tagResultDescription: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: Colors.VeryLightGrey,
|
color: Colors.VeryLightGrey,
|
||||||
},
|
},
|
||||||
searchInput: {
|
searchInput: {
|
||||||
width: '100%',
|
width: '100%',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
},
|
},
|
||||||
noResults: {
|
noResults: {
|
||||||
@@ -67,19 +67,25 @@ const searchStyle = StyleSheet.create({
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
},
|
},
|
||||||
noResultsText: {
|
noResultsText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
marginTop: 16,
|
marginTop: 16,
|
||||||
marginLeft: 16,
|
marginLeft: 16,
|
||||||
marginRight: 16,
|
marginRight: 16,
|
||||||
},
|
},
|
||||||
boldText: {
|
boldText: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
},
|
},
|
||||||
loading: {
|
loading: {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
},
|
},
|
||||||
|
moreLoading: {
|
||||||
|
width: '100%',
|
||||||
|
height: 48,
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export default searchStyle;
|
export default searchStyle;
|
||||||
@@ -38,23 +38,23 @@ const settingsStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
label: {
|
label: {
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
lineHeight: 18,
|
lineHeight: 18,
|
||||||
},
|
},
|
||||||
description: {
|
description: {
|
||||||
color: '#aaaaaa',
|
color: '#aaaaaa',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
lineHeight: 18,
|
lineHeight: 18,
|
||||||
},
|
},
|
||||||
sectionTitle: {
|
sectionTitle: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
marginBottom: 4,
|
marginBottom: 4,
|
||||||
},
|
},
|
||||||
sectionDescription: {
|
sectionDescription: {
|
||||||
color: '#aaaaaa',
|
color: '#aaaaaa',
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
lineHeight: 18,
|
lineHeight: 18,
|
||||||
marginBottom: 8,
|
marginBottom: 8,
|
||||||
@@ -66,7 +66,7 @@ const settingsStyle = StyleSheet.create({
|
|||||||
width: '85%',
|
width: '85%',
|
||||||
},
|
},
|
||||||
languagePickerItem: {
|
languagePickerItem: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
},
|
},
|
||||||
pickerRow: {
|
pickerRow: {
|
||||||
|
|||||||
@@ -8,14 +8,14 @@ const splashStyle = StyleSheet.create({
|
|||||||
backgroundColor: Colors.LbryGreen,
|
backgroundColor: Colors.LbryGreen,
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
fontFamily: 'Inter-UI-Bold',
|
fontFamily: 'Inter-Bold',
|
||||||
fontSize: 64,
|
fontSize: 64,
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
marginBottom: 48,
|
marginBottom: 48,
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
},
|
},
|
||||||
errorTitle: {
|
errorTitle: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 28,
|
fontSize: 28,
|
||||||
marginBottom: 24,
|
marginBottom: 24,
|
||||||
marginLeft: 24,
|
marginLeft: 24,
|
||||||
@@ -23,7 +23,7 @@ const splashStyle = StyleSheet.create({
|
|||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
},
|
},
|
||||||
paragraph: {
|
paragraph: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
lineHeight: 24,
|
lineHeight: 24,
|
||||||
marginBottom: 20,
|
marginBottom: 20,
|
||||||
@@ -48,7 +48,7 @@ const splashStyle = StyleSheet.create({
|
|||||||
width: '50%',
|
width: '50%',
|
||||||
},
|
},
|
||||||
details: {
|
details: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
marginLeft: 16,
|
marginLeft: 16,
|
||||||
marginRight: 16,
|
marginRight: 16,
|
||||||
@@ -56,7 +56,7 @@ const splashStyle = StyleSheet.create({
|
|||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
},
|
},
|
||||||
message: {
|
message: {
|
||||||
fontFamily: 'Inter-UI-Bold',
|
fontFamily: 'Inter-Bold',
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
marginLeft: 16,
|
marginLeft: 16,
|
||||||
|
|||||||
@@ -16,16 +16,16 @@ const storageStatsStyle = StyleSheet.create({
|
|||||||
padding: 16,
|
padding: 16,
|
||||||
},
|
},
|
||||||
totalSize: {
|
totalSize: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 36,
|
fontSize: 36,
|
||||||
},
|
},
|
||||||
annotation: {
|
annotation: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
marginTop: -4,
|
marginTop: -4,
|
||||||
},
|
},
|
||||||
statsText: {
|
statsText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
},
|
},
|
||||||
distributionBar: {
|
distributionBar: {
|
||||||
@@ -57,12 +57,12 @@ const storageStatsStyle = StyleSheet.create({
|
|||||||
height: 16,
|
height: 16,
|
||||||
},
|
},
|
||||||
legendText: {
|
legendText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
flex: 0.3,
|
flex: 0.3,
|
||||||
},
|
},
|
||||||
legendSize: {
|
legendSize: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
flex: 0.6,
|
flex: 0.6,
|
||||||
textAlign: 'right',
|
textAlign: 'right',
|
||||||
|
|||||||
+14
-12
@@ -37,7 +37,7 @@ const subscriptionsStyle = StyleSheet.create({
|
|||||||
paddingTop: 24,
|
paddingTop: 24,
|
||||||
},
|
},
|
||||||
infoText: {
|
infoText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
marginTop: 8,
|
marginTop: 8,
|
||||||
marginBottom: 8,
|
marginBottom: 8,
|
||||||
@@ -57,7 +57,7 @@ const subscriptionsStyle = StyleSheet.create({
|
|||||||
marginTop: 16,
|
marginTop: 16,
|
||||||
},
|
},
|
||||||
contentText: {
|
contentText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
marginLeft: 24,
|
marginLeft: 24,
|
||||||
marginRight: 24,
|
marginRight: 24,
|
||||||
@@ -96,7 +96,7 @@ const subscriptionsStyle = StyleSheet.create({
|
|||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
},
|
},
|
||||||
fileItemName: {
|
fileItemName: {
|
||||||
fontFamily: 'Inter-UI-Bold',
|
fontFamily: 'Inter-Bold',
|
||||||
marginTop: 8,
|
marginTop: 8,
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
},
|
},
|
||||||
@@ -109,7 +109,7 @@ const subscriptionsStyle = StyleSheet.create({
|
|||||||
borderBottomWidth: 1,
|
borderBottomWidth: 1,
|
||||||
},
|
},
|
||||||
channelTitle: {
|
channelTitle: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
marginLeft: 24,
|
marginLeft: 24,
|
||||||
marginTop: 16,
|
marginTop: 16,
|
||||||
@@ -136,16 +136,16 @@ const subscriptionsStyle = StyleSheet.create({
|
|||||||
color: Colors.LbryGreen,
|
color: Colors.LbryGreen,
|
||||||
},
|
},
|
||||||
inactiveMode: {
|
inactiveMode: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
},
|
},
|
||||||
activeMode: {
|
activeMode: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
},
|
},
|
||||||
claimList: {
|
claimList: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
},
|
},
|
||||||
pageTitle: {
|
pageTitle: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
},
|
},
|
||||||
titleRow: {
|
titleRow: {
|
||||||
@@ -171,7 +171,7 @@ const subscriptionsStyle = StyleSheet.create({
|
|||||||
marginRight: 24,
|
marginRight: 24,
|
||||||
},
|
},
|
||||||
tagSortText: {
|
tagSortText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
marginRight: 4,
|
marginRight: 4,
|
||||||
},
|
},
|
||||||
@@ -199,6 +199,8 @@ const subscriptionsStyle = StyleSheet.create({
|
|||||||
height: 70,
|
height: 70,
|
||||||
borderRadius: 140,
|
borderRadius: 140,
|
||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
},
|
},
|
||||||
suggestedItemThumbnail: {
|
suggestedItemThumbnail: {
|
||||||
width: '100%',
|
width: '100%',
|
||||||
@@ -216,13 +218,13 @@ const subscriptionsStyle = StyleSheet.create({
|
|||||||
top: 0,
|
top: 0,
|
||||||
},
|
},
|
||||||
suggestedItemTitle: {
|
suggestedItemTitle: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
marginBottom: 4,
|
marginBottom: 4,
|
||||||
width: '85%',
|
width: '85%',
|
||||||
},
|
},
|
||||||
suggestedItemName: {
|
suggestedItemName: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
marginBottom: 4,
|
marginBottom: 4,
|
||||||
color: Colors.LbryGreen,
|
color: Colors.LbryGreen,
|
||||||
@@ -233,7 +235,7 @@ const subscriptionsStyle = StyleSheet.create({
|
|||||||
flexWrap: 'wrap',
|
flexWrap: 'wrap',
|
||||||
},
|
},
|
||||||
suggestedSubTitle: {
|
suggestedSubTitle: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
marginLeft: 16,
|
marginLeft: 16,
|
||||||
marginRight: 16,
|
marginRight: 16,
|
||||||
@@ -251,7 +253,7 @@ const subscriptionsStyle = StyleSheet.create({
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
},
|
},
|
||||||
suggestedLink: {
|
suggestedLink: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
},
|
},
|
||||||
modalContainer: {
|
modalContainer: {
|
||||||
|
|||||||
+3
-3
@@ -7,7 +7,7 @@ const tagStyle = StyleSheet.create({
|
|||||||
marginBottom: 4,
|
marginBottom: 4,
|
||||||
},
|
},
|
||||||
tagSearchInput: {
|
tagSearchInput: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
},
|
},
|
||||||
content: {
|
content: {
|
||||||
@@ -22,7 +22,7 @@ const tagStyle = StyleSheet.create({
|
|||||||
marginRight: 8,
|
marginRight: 8,
|
||||||
},
|
},
|
||||||
text: {
|
text: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
marginRight: 8,
|
marginRight: 8,
|
||||||
},
|
},
|
||||||
@@ -34,7 +34,7 @@ const tagStyle = StyleSheet.create({
|
|||||||
marginTop: 8,
|
marginTop: 8,
|
||||||
},
|
},
|
||||||
nsfwTagsTitle: {
|
nsfwTagsTitle: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
marginBottom: 4,
|
marginBottom: 4,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -24,29 +24,29 @@ const transactionListStyle = StyleSheet.create({
|
|||||||
alignSelf: 'stretch',
|
alignSelf: 'stretch',
|
||||||
},
|
},
|
||||||
text: {
|
text: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
},
|
},
|
||||||
link: {
|
link: {
|
||||||
color: Colors.LbryGreen,
|
color: Colors.LbryGreen,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
},
|
},
|
||||||
amount: {
|
amount: {
|
||||||
textAlign: 'right',
|
textAlign: 'right',
|
||||||
},
|
},
|
||||||
smallText: {
|
smallText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: '#aaaaaa',
|
color: '#aaaaaa',
|
||||||
},
|
},
|
||||||
smallLink: {
|
smallLink: {
|
||||||
color: Colors.LbryGreen,
|
color: Colors.LbryGreen,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
},
|
},
|
||||||
noTransactions: {
|
noTransactions: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
padding: 16,
|
padding: 16,
|
||||||
color: '#aaaaaa',
|
color: '#aaaaaa',
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ const uriBarStyle = StyleSheet.create({
|
|||||||
borderRadius: 24,
|
borderRadius: 24,
|
||||||
paddingLeft: 12,
|
paddingLeft: 12,
|
||||||
paddingRight: 12,
|
paddingRight: 12,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
lineHeight: 18,
|
lineHeight: 18,
|
||||||
flex: 17,
|
flex: 17,
|
||||||
@@ -65,11 +65,11 @@ const uriBarStyle = StyleSheet.create({
|
|||||||
flex: 1,
|
flex: 1,
|
||||||
},
|
},
|
||||||
itemText: {
|
itemText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
},
|
},
|
||||||
itemDesc: {
|
itemDesc: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: Colors.UriDescBlue,
|
color: Colors.UriDescBlue,
|
||||||
},
|
},
|
||||||
@@ -107,7 +107,7 @@ const uriBarStyle = StyleSheet.create({
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
},
|
},
|
||||||
itemCount: {
|
itemCount: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
marginLeft: 30,
|
marginLeft: 30,
|
||||||
},
|
},
|
||||||
|
|||||||
+24
-24
@@ -26,7 +26,7 @@ const walletStyle = StyleSheet.create({
|
|||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
},
|
},
|
||||||
address: {
|
address: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
letterSpacing: 0.8,
|
letterSpacing: 0.8,
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
borderRadius: 16,
|
borderRadius: 16,
|
||||||
@@ -69,12 +69,12 @@ const walletStyle = StyleSheet.create({
|
|||||||
margin: 16,
|
margin: 16,
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
marginBottom: 24,
|
marginBottom: 24,
|
||||||
},
|
},
|
||||||
transactionsTitle: {
|
transactionsTitle: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
},
|
},
|
||||||
transactionsHeader: {
|
transactionsHeader: {
|
||||||
@@ -86,16 +86,16 @@ const walletStyle = StyleSheet.create({
|
|||||||
borderBottomColor: '#eeeeee',
|
borderBottomColor: '#eeeeee',
|
||||||
},
|
},
|
||||||
text: {
|
text: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
},
|
},
|
||||||
link: {
|
link: {
|
||||||
color: Colors.LbryGreen,
|
color: Colors.LbryGreen,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
},
|
},
|
||||||
smallText: {
|
smallText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
},
|
},
|
||||||
balanceCard: {
|
balanceCard: {
|
||||||
@@ -111,14 +111,14 @@ const walletStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
balanceTitle: {
|
balanceTitle: {
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
marginLeft: 16,
|
marginLeft: 16,
|
||||||
marginTop: 16,
|
marginTop: 16,
|
||||||
},
|
},
|
||||||
balanceCaption: {
|
balanceCaption: {
|
||||||
color: '#caedB9',
|
color: '#caedB9',
|
||||||
fontFamily: 'Inter-UI-Medium',
|
fontFamily: 'Inter-Medium',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
marginLeft: 16,
|
marginLeft: 16,
|
||||||
marginTop: 8,
|
marginTop: 8,
|
||||||
@@ -126,7 +126,7 @@ const walletStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
balance: {
|
balance: {
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
fontFamily: 'Inter-UI-Bold',
|
fontFamily: 'Inter-Bold',
|
||||||
fontSize: 36,
|
fontSize: 36,
|
||||||
marginLeft: 16,
|
marginLeft: 16,
|
||||||
marginBottom: 16,
|
marginBottom: 16,
|
||||||
@@ -137,19 +137,19 @@ const walletStyle = StyleSheet.create({
|
|||||||
marginLeft: 24,
|
marginLeft: 24,
|
||||||
},
|
},
|
||||||
balanceText: {
|
balanceText: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
marginLeft: 4,
|
marginLeft: 4,
|
||||||
},
|
},
|
||||||
infoText: {
|
infoText: {
|
||||||
color: '#aaaaaa',
|
color: '#aaaaaa',
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
padding: 16,
|
padding: 16,
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
},
|
},
|
||||||
input: {
|
input: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
},
|
},
|
||||||
amountInput: {
|
amountInput: {
|
||||||
@@ -172,14 +172,14 @@ const walletStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
warningParagraph: {
|
warningParagraph: {
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
lineHeight: 24,
|
lineHeight: 24,
|
||||||
marginBottom: 16,
|
marginBottom: 16,
|
||||||
},
|
},
|
||||||
warningText: {
|
warningText: {
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
lineHeight: 24,
|
lineHeight: 24,
|
||||||
marginBottom: 8,
|
marginBottom: 8,
|
||||||
@@ -222,7 +222,7 @@ const walletStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
rewardDriverText: {
|
rewardDriverText: {
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
lineHeight: 16,
|
lineHeight: 16,
|
||||||
},
|
},
|
||||||
@@ -237,7 +237,7 @@ const walletStyle = StyleSheet.create({
|
|||||||
marginRight: 16,
|
marginRight: 16,
|
||||||
},
|
},
|
||||||
syncDriverTitle: {
|
syncDriverTitle: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
paddingLeft: 16,
|
paddingLeft: 16,
|
||||||
marginTop: 16,
|
marginTop: 16,
|
||||||
@@ -247,7 +247,7 @@ const walletStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
syncDriverLink: {
|
syncDriverLink: {
|
||||||
color: Colors.LbryGreen,
|
color: Colors.LbryGreen,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
},
|
},
|
||||||
actionRow: {
|
actionRow: {
|
||||||
@@ -291,11 +291,11 @@ const walletStyle = StyleSheet.create({
|
|||||||
justifyContent: 'flex-end',
|
justifyContent: 'flex-end',
|
||||||
},
|
},
|
||||||
labelText: {
|
labelText: {
|
||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-SemiBold',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
},
|
},
|
||||||
valueText: {
|
valueText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
},
|
},
|
||||||
rightLink: {
|
rightLink: {
|
||||||
@@ -316,7 +316,7 @@ const walletStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
loadingText: {
|
loadingText: {
|
||||||
color: '#aaaaaa',
|
color: '#aaaaaa',
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
marginLeft: 8,
|
marginLeft: 8,
|
||||||
},
|
},
|
||||||
@@ -331,11 +331,11 @@ const walletStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
continueLink: {
|
continueLink: {
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
},
|
},
|
||||||
learnMoreLink: {
|
learnMoreLink: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
color: Colors.NextLbryGreen,
|
color: Colors.NextLbryGreen,
|
||||||
},
|
},
|
||||||
signInButton: {
|
signInButton: {
|
||||||
@@ -353,7 +353,7 @@ const walletStyle = StyleSheet.create({
|
|||||||
marginTop: 36,
|
marginTop: 36,
|
||||||
},
|
},
|
||||||
onboardingText: {
|
onboardingText: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
lineHeight: 28,
|
lineHeight: 28,
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
@@ -363,7 +363,7 @@ const walletStyle = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
signInTitle: {
|
signInTitle: {
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-Regular',
|
||||||
fontSize: 28,
|
fontSize: 28,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
+36
-6
@@ -10,6 +10,7 @@ const specialRouteMap = {
|
|||||||
about: Constants.DRAWER_ROUTE_ABOUT,
|
about: Constants.DRAWER_ROUTE_ABOUT,
|
||||||
allContent: Constants.DRAWER_ROUTE_TRENDING,
|
allContent: Constants.DRAWER_ROUTE_TRENDING,
|
||||||
channels: Constants.DRAWER_ROUTE_CHANNEL_CREATOR,
|
channels: Constants.DRAWER_ROUTE_CHANNEL_CREATOR,
|
||||||
|
invites: Constants.DRAWER_ROUTE_INVITES,
|
||||||
library: Constants.DRAWER_ROUTE_MY_LBRY,
|
library: Constants.DRAWER_ROUTE_MY_LBRY,
|
||||||
publish: Constants.DRAWER_ROUTE_PUBLISH,
|
publish: Constants.DRAWER_ROUTE_PUBLISH,
|
||||||
publishes: Constants.DRAWER_ROUTE_PUBLISHES,
|
publishes: Constants.DRAWER_ROUTE_PUBLISHES,
|
||||||
@@ -54,9 +55,10 @@ export function dispatchNavigateToUri(dispatch, nav, uri, isNavigatingBack, full
|
|||||||
|
|
||||||
if (!isNavigatingBack) {
|
if (!isNavigatingBack) {
|
||||||
dispatch(doPushDrawerStack(uri));
|
dispatch(doPushDrawerStack(uri));
|
||||||
dispatch(doSetPlayerVisible(true));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dispatch(doSetPlayerVisible(false));
|
||||||
|
|
||||||
if (nav && nav.routes && nav.routes.length > 0 && nav.routes[0].routeName === 'Main') {
|
if (nav && nav.routes && nav.routes.length > 0 && nav.routes[0].routeName === 'Main') {
|
||||||
const mainRoute = nav.routes[0];
|
const mainRoute = nav.routes[0];
|
||||||
const discoverRoute = mainRoute.routes[0];
|
const discoverRoute = mainRoute.routes[0];
|
||||||
@@ -113,7 +115,7 @@ function parseUriVars(vars) {
|
|||||||
return uriVars;
|
return uriVars;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function navigateToUri(navigation, uri, additionalParams, isNavigatingBack, fullUri) {
|
export function navigateToUri(navigation, uri, additionalParams, isNavigatingBack, fullUri, setPlayerVisible) {
|
||||||
if (!navigation) {
|
if (!navigation) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -135,6 +137,10 @@ export function navigateToUri(navigation, uri, additionalParams, isNavigatingBac
|
|||||||
uriVars = parseUriVars(uriVarsStr);
|
uriVars = parseUriVars(uriVarsStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (setPlayerVisible) {
|
||||||
|
setPlayerVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
const { store } = window;
|
const { store } = window;
|
||||||
const params = Object.assign({ uri, uriVars, fullUri: fullUri }, additionalParams);
|
const params = Object.assign({ uri, uriVars, fullUri: fullUri }, additionalParams);
|
||||||
if (navigation.state.routeName === 'File') {
|
if (navigation.state.routeName === 'File') {
|
||||||
@@ -142,7 +148,6 @@ export function navigateToUri(navigation, uri, additionalParams, isNavigatingBac
|
|||||||
navigation.dispatch(stackAction);
|
navigation.dispatch(stackAction);
|
||||||
if (store && store.dispatch && !isNavigatingBack) {
|
if (store && store.dispatch && !isNavigatingBack) {
|
||||||
store.dispatch(doPushDrawerStack(uri));
|
store.dispatch(doPushDrawerStack(uri));
|
||||||
store.dispatch(doSetPlayerVisible(true));
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -150,11 +155,10 @@ export function navigateToUri(navigation, uri, additionalParams, isNavigatingBac
|
|||||||
navigation.navigate({ routeName: 'File', key: uri, params });
|
navigation.navigate({ routeName: 'File', key: uri, params });
|
||||||
if (store && store.dispatch && !isNavigatingBack) {
|
if (store && store.dispatch && !isNavigatingBack) {
|
||||||
store.dispatch(doPushDrawerStack(uri));
|
store.dispatch(doPushDrawerStack(uri));
|
||||||
store.dispatch(doSetPlayerVisible(true));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function navigateBack(navigation, drawerStack, popDrawerStack) {
|
export function navigateBack(navigation, drawerStack, popDrawerStack, setPlayerVisible) {
|
||||||
if (drawerStack[drawerStack.length - 1].route === Constants.DRAWER_ROUTE_FILE_VIEW) {
|
if (drawerStack[drawerStack.length - 1].route === Constants.DRAWER_ROUTE_FILE_VIEW) {
|
||||||
// inner file_view (web / image view) is handled differently
|
// inner file_view (web / image view) is handled differently
|
||||||
if (popDrawerStack) {
|
if (popDrawerStack) {
|
||||||
@@ -166,12 +170,15 @@ export function navigateBack(navigation, drawerStack, popDrawerStack) {
|
|||||||
if (popDrawerStack) {
|
if (popDrawerStack) {
|
||||||
popDrawerStack();
|
popDrawerStack();
|
||||||
}
|
}
|
||||||
|
if (setPlayerVisible) {
|
||||||
|
setPlayerVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
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.includes(route) && !InnerDrawerRoutes.includes(route) && isURIValid(route)) {
|
if (!DrawerRoutes.includes(route) && !InnerDrawerRoutes.includes(route) && isURIValid(route)) {
|
||||||
navigateToUri(navigation, route, null, true);
|
navigateToUri(navigation, route, null, true, null, setPlayerVisible);
|
||||||
} else {
|
} else {
|
||||||
let targetRoute = route;
|
let targetRoute = route;
|
||||||
let targetParams = params;
|
let targetParams = params;
|
||||||
@@ -201,6 +208,7 @@ export function dispatchNavigateBack(dispatch, nav, drawerStack) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dispatch(doPopDrawerStack());
|
dispatch(doPopDrawerStack());
|
||||||
|
dispatch(doSetPlayerVisible(false));
|
||||||
|
|
||||||
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;
|
||||||
@@ -370,3 +378,25 @@ export function uploadImageAsset(filePath, success, failure) {
|
|||||||
export function formatLbryUrlForWeb(url) {
|
export function formatLbryUrlForWeb(url) {
|
||||||
return url.replace('lbry://', '/').replace(/#/g, ':');
|
return url.replace('lbry://', '/').replace(/#/g, ':');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getDownloadProgress(fileInfo) {
|
||||||
|
return Math.ceil((fileInfo.written_bytes / fileInfo.total_bytes) * 100);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getStorageForFileInfo(fileInfo) {
|
||||||
|
if (!fileInfo.completed) {
|
||||||
|
const written = formatBytes(fileInfo.written_bytes);
|
||||||
|
const total = formatBytes(fileInfo.total_bytes);
|
||||||
|
return `(${written} / ${total})`;
|
||||||
|
}
|
||||||
|
|
||||||
|
return formatBytes(fileInfo.written_bytes);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function formatTitle(title) {
|
||||||
|
if (!title) {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
return title.length > 80 ? title.substring(0, 77).trim() + '...' : title;
|
||||||
|
}
|
||||||
Reference in new issue
Block a user