Compare commits

...
Author SHA1 Message Date
Akinwale Ariwodola 5aed981049 remove decimal points from time to start values 2020-02-17 07:23:36 +01:00
Akinwale Ariwodola 04f1537e76 log launch timing. recalculate play time to start timing. 2020-02-17 07:15:55 +01:00
Akinwale Ariwodola 55b292ab0e Merge pull request #122 from lbryio/wallet-balance-extra
add wallet balance extra details card
2020-02-17 06:15:20 +01:00
Akinwale Ariwodola 736de8e5d9 Merge pull request #121 from lbryio/invite-no-channels
Invite link with no channels
2020-02-17 06:15:09 +01:00
Akinwale Ariwodola f06252d397 Merge pull request #120 from lbryio/invite-channel-endpoint
call publish endpoint with selected channel on invites page
2020-02-17 06:14:58 +01:00
Akinwale Ariwodola fa25789855 Merge pull request #119 from lbryio/invites-canonical-urls
canonical urls for invite links
2020-02-17 06:14:46 +01:00
Akinwale Ariwodola 514e077fbb Merge pull request #113 from lbryio/back-navigation-tweaks
back navigation fixes and tweaks
2020-02-17 06:14:32 +01:00
Akinwale Ariwodola 3d44bfa88b add wallet balance extra details card 2020-02-10 15:27:54 +01:00
Akinwale Ariwodola f81e2d7441 generate default invite link if no channels are present 2020-02-10 12:54:35 +01:00
Akinwale Ariwodola 81bdd37576 call publish endpoint with selected channel on invites page 2020-02-10 12:38:20 +01:00
Akinwale Ariwodola 76938d3349 canonical urls for invite links 2020-02-10 12:25:20 +01:00
Akinwale Ariwodola 456c787683 fix channel creator and publish back navigation to corresponding claims. 2020-02-06 21:23:05 +01:00
Akinwale Ariwodola 3a5edc461a Merge pull request #117 from michaeltintiuc/audio-focus
Fixes #116. Listen to audio focus change
2020-02-04 05:12:15 +01:00
Thomas Zarebczan 3a8af2d7a0 Merge pull request #118 from ykris45/patch-1
Update LICENSE
2020-02-03 17:04:55 -05:00
Akinwale Ariwodola 601c589f69 fix weird case where splash screen gets stuck on authenticating 2020-02-03 09:20:48 +01:00
Akinwale Ariwodola f5ae1f34f7 resolved search nsfw 2020-02-03 07:27:07 +01:00
YULIUS KURNIAWAN KRISTIANTO 4656be64a7 Update LICENSE
update year
2020-02-03 04:40:41 +07:00
Michael Tintiuc 8e377d0e74 Fixes #116. Listen to audio focus change 2020-02-01 15:44:04 +02:00
Akinwale Ariwodola bf7f836465 fix search restore and background play bug 2020-01-31 08:52:07 +01:00
Akinwale Ariwodola 017787ef25 optimise file page renders (#115) 2020-01-29 12:55:04 +01:00
Akinwale Ariwodola d9ada93ff3 Invites page (#114) 2020-01-29 12:25:23 +01:00
Akinwale Ariwodola 95a33b411b back navigation fixes and tweaks 2020-01-24 13:47:41 +01:00
Akinwale Ariwodola 9bc5a2ecac fix thumbnailUrl check 2020-01-23 02:15:39 +01:00
Akinwale Ariwodola 4e6267d5a9 additional thumbnailUrl check 2020-01-23 00:55:45 +01:00
Akinwale Ariwodola dc0b06ce55 fix additional channel creator edit error 2020-01-22 21:21:01 +01:00
Akinwale Ariwodola 82d15f0c7f fix channel creator edit error 2020-01-22 18:39:47 +01:00
Akinwale Ariwodola 9f32363a09 fix existing publish name check for edit mode 2020-01-22 02:05:50 +01:00
Akinwale Ariwodola 467272d5c8 tweak file page style 2020-01-22 02:01:06 +01:00
Akinwale Ariwodola 3594b70113 update app strings 2020-01-21 06:47:49 +01:00
Akinwale Ariwodola 5f008b3ac9 download confirmation dialog 2020-01-20 23:36:10 +01:00
Akinwale Ariwodola 3f21c4e08c display circular download progress on file page 2020-01-20 23:11:14 +01:00
Akinwale Ariwodola 3717a8072b error on publish to existing content address 2020-01-20 21:52:59 +01:00
Akinwale Ariwodola 46bfbd242a Navigate to the last visited route (#112)
* navigate to the last visited route on app startup if there is no launch url
* update eslint no-console rule
2020-01-20 21:40:17 +01:00
Akinwale Ariwodola 0361b10575 add onDownloadAborted event handler 2020-01-20 21:33:17 +01:00
Akinwale Ariwodola b9dec86cae add 10-second seek controls to media player 2020-01-20 18:18:01 +01:00
Akinwale Ariwodola 2465b5514f remove download notification if file is deleted from Library page 2020-01-20 17:58:48 +01:00
Akinwale Ariwodola df3a9587c0 update fileGetStarted logic 2020-01-17 06:43:02 +01:00
Akinwale Ariwodola 5df8b8c4aa Playable downloads (#111)
* enable download button for video and audio content
* fix media player source and button display
* show notifications for video downloads. fix double playback.
* fix ongoing playback when back button pressed
* fix double-playback when navigating to related content links
* update url for stop download
2020-01-16 22:00:34 +01:00
Akinwale Ariwodola 156e310368 fix error on opening related content or urls 2020-01-14 02:29:30 +01:00
Akinwale Ariwodola 683b1f4805 replace file page in navigation using the same key 2020-01-13 16:17:18 +01:00
Akinwale Ariwodola e263ad7569 react navigation drawer workaround 2020-01-13 12:24:03 +01:00
Akinwale Ariwodola 24d580ea13 remove calls to doCheckSubscriptionsInit 2020-01-10 23:41:05 +01:00
Akinwale Ariwodola bfc3b11035 fix channel thumbnail container render. style tweaks for smaller screens. 2020-01-10 00:37:51 +01:00
Akinwale Ariwodola 6bf2f9460d fix claim result item channel render checks 2020-01-09 20:34:06 +01:00
Akinwale Ariwodola 504baeefaf fullscreen media player restore tweak 2020-01-09 18:56:36 +01:00
Akinwale Ariwodola 6c55633751 use Inter font for markdown display and some style tweaks 2020-01-09 18:11:23 +01:00
Akinwale Ariwodola 3395fa7aa2 fix storage permission request flow on new publish page 2020-01-09 17:45:02 +01:00
Akinwale Ariwodola 7a3def7ea1 fix claim result channel thumbnail view 2020-01-09 17:35:10 +01:00
Akinwale Ariwodola f1aafd6e34 unified display of channel results (#108)
* unified display of channel results
* add autoStyle to thumbnail container
* move common shared methods to helper
* change Image to FastImage in list views
2020-01-09 17:19:30 +01:00
Akinwale Ariwodola 1ce5fad8c0 allow scrolling for displaying more search results (#110)
* allow scrolling for displaying more search results
* add search page size constant
* use default page size. fix typo.
2020-01-09 16:49:14 +01:00
Akinwale Ariwodola 4690451bfe change default page size to 20 2020-01-09 16:46:08 +01:00
Akinwale Ariwodola b149c0039a update fontFamily definitions 2020-01-09 15:43:36 +01:00
Akinwale Ariwodola e97bf7ce79 cleanup: remove unused function 2020-01-09 04:43:09 +01:00
Akinwale Ariwodola 8c79115ce0 update input cursor position on press when the uri bar focused 2020-01-09 04:42:06 +01:00
Akinwale Ariwodola 24fa80d92a open links displayed in the embedded webview on the device browser 2020-01-09 04:29:48 +01:00
Akinwale Ariwodola 624d95ab42 Merge pull request #109 from lbryio/better-markdown-display
improve markdown display
2020-01-08 22:03:38 +01:00
Akinwale Ariwodola 8519b561b3 improve markdown display 2020-01-08 21:23:02 +01:00
Akinwale Ariwodola 00dfc205a5 readjust margin for view count 2020-01-08 12:08:32 +01:00
Akinwale Ariwodola b6ab92a700 adjust margins for view count and floating wallet balance 2020-01-08 12:06:06 +01:00
Akinwale Ariwodola 561aa0db9c placeholder background for thumbnails being loaded 2020-01-08 10:17:52 +01:00
Akinwale Ariwodola ad9056f91a fix layout after restoring from fullscreen media player 2020-01-07 22:59:18 +01:00
Akinwale Ariwodola bc62580aae downgrade drawer navigator because it's still being weird 2020-01-07 11:21:01 +01:00
Akinwale Ariwodola f5cb8e44d1 display open file button. code cleanup. 2020-01-07 08:47:29 +01:00
Akinwale Ariwodola c47c7cd925 basic markdown rendering 2020-01-07 08:34:20 +01:00
Akinwale Ariwodola b25f913921 fix country selector on phone verification page 2020-01-07 02:36:42 +01:00
Akinwale Ariwodola 673d6dc0f5 update tag result if the search keyword is updated 2020-01-06 23:01:27 +01:00
Akinwale Ariwodola 91eb18ec9b fix error message displayed repeatedly for content with fileInfo 2020-01-06 21:49:22 +01:00
Akinwale Ariwodola 4ed3809ffd final fix for uri bar and some performance improvements 2020-01-06 21:11:15 +01:00
Akinwale Ariwodola 3f0ed7988a Merge remote-tracking branch 'origin/resolved-search' 2020-01-05 19:02:25 +01:00
Akinwale Ariwodola b3e20e78cb fix uri bar text input selection. update react navigation packages. 2020-01-05 19:01:31 +01:00
Akinwale Ariwodola 331f3d58ee remove console.log 2020-01-05 18:12:03 +01:00
Akinwale Ariwodola 3b0ea191fe display duration, fees and obscure nsfw for resolved search results 2020-01-05 18:07:28 +01:00
Akinwale Ariwodola 20a984f259 display resolved search results 2020-01-05 13:56:09 +01:00
Akinwale Ariwodola 2d91c83628 better fix for uri bar text input handling 2020-01-05 11:44:05 +01:00
Akinwale Ariwodola d7635dc7ee update doSearch calls 2020-01-05 11:40:38 +01:00
Akinwale Ariwodola 13136e606d fix uri bar text input handling 2020-01-05 11:24:03 +01:00
Akinwale Ariwodola 5ae5144eda file price styling changes 2020-01-05 11:11:02 +01:00
Akinwale Ariwodola 3e81d4ef8d check storage permission for channel creator and publish pages 2020-01-04 07:11:06 +01:00
Akinwale Ariwodola 8365fa3fa0 Merge pull request #106 from lbryio/patch-release
updates for patch release
2020-01-03 18:53:18 +01:00
Akinwale Ariwodola 5681630e4c updates for patch release 2020-01-03 18:51:39 +01:00
Akinwale Ariwodola 1eecae469d rename Subscriptions -> Following. fix bad subs. 2019-12-29 14:56:15 +01:00
Akinwale Ariwodola f7c8bf3949 fix subsequent searches on search page. 2019-12-29 11:10:33 +01:00
Akinwale Ariwodola d538838921 hook reactotron into redux. more search page tweaks. 2019-12-29 11:02:11 +01:00
Akinwale Ariwodola b5abddb69a Merge pull request #105 from lbryio/reactotron
add reactotron. fix batch resolve functionality for search results.
2019-12-29 10:35:13 +01:00
Akinwale Ariwodola 15cbdcfaca add reactotron. fix batch resolve functionality for search results. 2019-12-29 10:34:00 +01:00
Akinwale Ariwodola 30246a189c remove console.log 2019-12-29 07:23:42 +01:00
Akinwale Ariwodola f77f0a7aa2 search tweaks and package updates 2019-12-29 06:48:13 +01:00
Akinwale Ariwodola 36d4bd7e99 Merge pull request #104 from lbryio/navigation-drawer-test
update react-navigation-drawer package
2019-12-29 06:45:47 +01:00
Akinwale Ariwodola b8f2a9e24f tweak related content view for perf. fix displayed dates. 2019-12-28 21:02:29 +01:00
95 changed files with 3033 additions and 1080 deletions

No files matched your search

+1
View File
@@ -10,6 +10,7 @@
"__": true
},
"rules": {
"no-console": 2,
"no-multi-spaces": 0,
"new-cap": 0,
"prefer-promise-reject-errors": 0,
+1 -1
View File
@@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2017-2019 LBRY Inc
Copyright (c) 2017-2020 LBRY Inc
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish,distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+4
View File
@@ -1,3 +1,7 @@
if (__DEV__) {
import('./reactotron').then(() => console.log('Reactotron Configured'));
}
import LBRYApp from './src/index';
export default LBRYApp;
+62 -1
View File
@@ -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.",
"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.",
"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"
}
+310 -77
View File
@@ -2073,10 +2073,15 @@
}
}
},
"@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": {
"version": "3.5.0",
"resolved": "https://registry.npmjs.org/@react-navigation/core/-/core-3.5.0.tgz",
"integrity": "sha512-NLm24lA51R8o8c+iFnwtN9elqRzm4OJ8f1qPBCUNIYW1sb8M5yCD53vRP0fRcPFpr/6Xzs2TJMsWnnebwFp0Rw==",
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/@react-navigation/core/-/core-3.5.1.tgz",
"integrity": "sha512-q7NyhWVYOhVIWqL2GZKa6G78YarXaVTTtOlSDkvy4ZIggo40wZzamlnrJRvsaQX46gsgw45FAWb5SriHh8o7eA==",
"requires": {
"hoist-non-react-statics": "^3.3.0",
"path-to-regexp": "^1.7.0",
@@ -2085,9 +2090,9 @@
},
"dependencies": {
"hoist-non-react-statics": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz",
"integrity": "sha512-0XsbTXxgiaCDYDIWFcwkmerZPSwywfUqYmwT4jzewKTQSWoE6FCMoUVOeBJWK3E/CrWbxRG3m5GzY4lnIwGRBA==",
"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"
}
@@ -2095,9 +2100,9 @@
}
},
"@react-navigation/native": {
"version": "3.6.1",
"resolved": "https://registry.npmjs.org/@react-navigation/native/-/native-3.6.1.tgz",
"integrity": "sha512-q12/sG4LinEokc7K0DRn0uxoBuLy42TedHNDXN3b9Fj9c2FamUqlLeTZQtjDQc8dLBEeN2Bpp5FSDN8MYxxjAA==",
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/@react-navigation/native/-/native-3.6.2.tgz",
"integrity": "sha512-Cybeou6N82ZeRmgnGlu+wzlV3z5BZQR2dmYaNFV1TNLUGHqtvv8E7oNw9uYcz9Ox5LFbiX+FdNTn2d6ZPlK0kg==",
"requires": {
"hoist-non-react-statics": "^3.0.1",
"react-native-safe-area-view": "^0.14.1",
@@ -2105,17 +2110,17 @@
},
"dependencies": {
"hoist-non-react-statics": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz",
"integrity": "sha512-0XsbTXxgiaCDYDIWFcwkmerZPSwywfUqYmwT4jzewKTQSWoE6FCMoUVOeBJWK3E/CrWbxRG3m5GzY4lnIwGRBA==",
"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.7",
"resolved": "https://registry.npmjs.org/react-native-safe-area-view/-/react-native-safe-area-view-0.14.7.tgz",
"integrity": "sha512-fmuBYpvKDJK33bimo4JXrK2BN2CGw7nof1y1LDRgzqv+FZ3eADSDGshprN8WeQqSZjQ20hJx1CiWk28Edg/v4Q==",
"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"
},
@@ -7062,8 +7067,8 @@
}
},
"lbry-redux": {
"version": "github:lbryio/lbry-redux#abe90e0665cfad3fb8853501ec058c5d1f0d9cc8",
"from": "github:lbryio/lbry-redux#abe90e0665cfad3fb8853501ec058c5d1f0d9cc8",
"version": "github:lbryio/lbry-redux#1de1d534c982db913f145a6171f39d7b8ebd61af",
"from": "github:lbryio/lbry-redux#1de1d534c982db913f145a6171f39d7b8ebd61af",
"requires": {
"proxy-polyfill": "0.1.6",
"reselect": "^3.0.0",
@@ -7071,8 +7076,8 @@
}
},
"lbryinc": {
"version": "github:lbryio/lbryinc#053ca52f4f7f9bf8eb62a3581b183671a475ad1c",
"from": "github:lbryio/lbryinc#053ca52f4f7f9bf8eb62a3581b183671a475ad1c",
"version": "github:lbryio/lbryinc#138a053754ec8e3da8e9bf153d32f527c962f25c",
"from": "github:lbryio/lbryinc#138a053754ec8e3da8e9bf153d32f527c962f25c",
"requires": {
"reselect": "^3.0.0"
}
@@ -8584,6 +8589,12 @@
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
},
"mitt": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/mitt/-/mitt-1.1.3.tgz",
"integrity": "sha512-mUDCnVNsAi+eD6qA0HkRkwYczbLHJ49z17BGe2PYRhZL4wpZUFZGJHU7/5tmvohoma+Hdn0Vh/oJTiPEmgSruA==",
"dev": true
},
"mixin-deep": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz",
@@ -9155,9 +9166,9 @@
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw=="
},
"path-to-regexp": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz",
"integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=",
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz",
"integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==",
"requires": {
"isarray": "0.0.1"
},
@@ -9526,9 +9537,9 @@
"dev": true
},
"query-string": {
"version": "6.8.2",
"resolved": "https://registry.npmjs.org/query-string/-/query-string-6.8.2.tgz",
"integrity": "sha512-J3Qi8XZJXh93t2FiKyd/7Ec6GNifsjKXUsVFkSBj/kjLsDylWhnCz4NT1bkPcKotttPW+QbKGqqPH8OoI2pdqw==",
"version": "6.9.0",
"resolved": "https://registry.npmjs.org/query-string/-/query-string-6.9.0.tgz",
"integrity": "sha512-KG4bhCFYapExLsUHrFt+kQVEegF2agm4cpF/VNc6pZVthIfCc/GK8t8VyNIE3nyXG9DK3Tf2EGkxjR6/uRdYsA==",
"requires": {
"decode-uri-component": "^0.2.0",
"split-on-first": "^1.0.0",
@@ -9834,9 +9845,9 @@
}
},
"react-native-exception-handler": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/react-native-exception-handler/-/react-native-exception-handler-2.9.0.tgz",
"integrity": "sha512-XRHhGH5aM4lSenX4zZBa07JaszJGXeF8cv1KY314Q4qJWOihKWLpkdvwqwsBieZ2iy8DPhdAVioQzw8JLD/Okw=="
"version": "2.10.8",
"resolved": "https://registry.npmjs.org/react-native-exception-handler/-/react-native-exception-handler-2.10.8.tgz",
"integrity": "sha512-ZN+jwpADRkCUNdad/50k0mZdMoICGrGdtaxgvRU+pNcWRRBAXJhuo4+jY0eQaoVpx1ghycGE6tBu9ka8gL2NOQ=="
},
"react-native-fast-image": {
"version": "7.0.2",
@@ -9894,11 +9905,21 @@
"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": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/react-native-reanimated/-/react-native-reanimated-1.4.0.tgz",
"integrity": "sha512-tO7nSNNP+iRLVbkcSS5GXyDBb7tSI02+XuRL3/S39EAr35rnvUy2JfeLUQG+fWSObJjnMVhasUDEUwlENk8IXw=="
},
"react-native-safe-area-context": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/react-native-safe-area-context/-/react-native-safe-area-context-0.6.2.tgz",
"integrity": "sha512-VtBW0JymVCwVt0TGxTv25Co3wtOv3Yb/K5pAUYkjKXNhWFDz5ZwUG/Yho/p0EkWYlFdroJcSqlvVFl2n3AU7SA=="
},
"react-native-screens": {
"version": "1.0.0-alpha.23",
"resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-1.0.0-alpha.23.tgz",
@@ -9929,12 +9950,9 @@
}
},
"react-native-tab-view": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/react-native-tab-view/-/react-native-tab-view-1.4.1.tgz",
"integrity": "sha512-Bke8KkDcDhvB/z0AS7MnQKMD2p6Kwfc1rSKlMOvg9CC5CnClQ2QEnhPSbwegKDYhUkBI92iH/BYy7hNSm5kbUQ==",
"requires": {
"prop-types": "^15.6.1"
}
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/react-native-tab-view/-/react-native-tab-view-2.11.0.tgz",
"integrity": "sha512-vqetlxGO7A8bnqvXcB50MWpRZAImXFrDGz1WCQKdCqe03Ey3ZzENe7yLuWrtBJYlepGfOLAsmCXv+wW82Yfm1w=="
},
"react-native-vector-icons": {
"version": "6.6.0",
@@ -10097,36 +10115,31 @@
"shaka-player": "^2.4.4"
}
},
"react-navigation": {
"version": "3.12.1",
"resolved": "https://registry.npmjs.org/react-navigation/-/react-navigation-3.12.1.tgz",
"integrity": "sha512-WLjQis/A40cIMpFlw4o26nSLN+CvrZp8MGvJoL5K5H7DMZ/TdwgPa/Nm2sAQA27Hw7hOohQGj+diyxFRZi89Iw==",
"react-native-webview": {
"version": "8.0.2",
"resolved": "https://registry.npmjs.org/react-native-webview/-/react-native-webview-8.0.2.tgz",
"integrity": "sha512-Higfj0CCPM9N76S3rQsKHKS8Rw5QA7h7UENrREmMarEN/2saZJ+ko0aIVYOlEJ4P9ZhhRLNH/3mWvzmT4spncw==",
"requires": {
"@react-navigation/core": "~3.5.0",
"@react-navigation/native": "~3.6.1",
"react-navigation-drawer": "~1.4.0",
"react-navigation-stack": "~1.5.0",
"react-navigation-tabs": "~1.2.0"
"escape-string-regexp": "2.0.0",
"invariant": "2.2.4"
},
"dependencies": {
"react-navigation-drawer": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/react-navigation-drawer/-/react-navigation-drawer-1.4.0.tgz",
"integrity": "sha512-ZyWBozcjB2aZ7vwCALv90cYA2NpDjM+WALaiYRshvPvue8l7cqynePbHK8GhlMGyJDwZqp4MxQmu8u1XAKp3Bw==",
"requires": {
"react-native-tab-view": "^1.2.0"
}
},
"react-navigation-stack": {
"version": "1.5.5",
"resolved": "https://registry.npmjs.org/react-navigation-stack/-/react-navigation-stack-1.5.5.tgz",
"integrity": "sha512-qMhOhmUmyPNfFGWMbwv5flrNVsFU4JZSBWnONSgVGK4KWGW8DbobXBi4i4sBAC9Kg8EqJK0qyWcxnkMJJtfMWA==",
"requires": {
"prop-types": "^15.7.2"
}
"escape-string-regexp": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
"integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w=="
}
}
},
"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": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/react-navigation-drawer/-/react-navigation-drawer-2.3.3.tgz",
@@ -10141,21 +10154,47 @@
}
},
"react-navigation-stack": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/react-navigation-stack/-/react-navigation-stack-1.8.1.tgz",
"integrity": "sha512-XOkHuYlQjZKnD4jTU0Ml847sKjpwsJpQ6JX4ZfOq8D0e6fPWXbpYNhvUnzHMHMm+tnbhTqkqP1Umu40Hmx748Q==",
"version": "1.10.3",
"resolved": "https://registry.npmjs.org/react-navigation-stack/-/react-navigation-stack-1.10.3.tgz",
"integrity": "sha512-1gksFi/g/Lg9sBhgLlD0OiEB5xnatHb4C0eNMA5tli9cTVlhq375XNPIqOiTyftibBmjdApAsZFj5srUCoOu/w==",
"requires": {
"prop-types": "^15.7.2"
}
},
"react-navigation-tabs": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/react-navigation-tabs/-/react-navigation-tabs-1.2.0.tgz",
"integrity": "sha512-I6vq3XX4ub9KhWQzcrggznls+2Z2C6w2ro46vokDGGvJ02CBpQRar7J0ETV29Ot5AJY67HucNUmZdH3yDFckmQ==",
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/react-navigation-tabs/-/react-navigation-tabs-2.7.0.tgz",
"integrity": "sha512-fQEHjFrIBi+89loLL521HjGS0Z9tl4Y89SSamRkDl8Of6bPS1Ep++an3ctl2j7c3veqBZBrj3H1qa7qjd3apBQ==",
"requires": {
"hoist-non-react-statics": "^2.5.0",
"prop-types": "^15.6.1",
"react-native-tab-view": "^1.4.1"
"hoist-non-react-statics": "^3.3.0",
"react-lifecycles-compat": "^3.0.4",
"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": {
@@ -10188,6 +10227,43 @@
"integrity": "sha512-kv5QlFFSZWo7OlJFNYbxRtY66JImuP2LcrFgyJfQaf85gSP+byzG21UbDQEYjU7f//ny8rwiEkO6py2Y+fEgAQ==",
"dev": true
},
"reactotron-core-client": {
"version": "2.8.6",
"resolved": "https://registry.npmjs.org/reactotron-core-client/-/reactotron-core-client-2.8.6.tgz",
"integrity": "sha512-xgg6dusfgQHC98f4iRH/Zak/PNvA46znupEd2U7DSCmmhZbfCpSSveKUsYok0OW0HiSCSvi41tNELj+QU6pRVQ==",
"dev": true
},
"reactotron-react-native": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/reactotron-react-native/-/reactotron-react-native-4.0.2.tgz",
"integrity": "sha512-zY5m0TV9y52h31/Vvd/Zs3jneEKYWbJ6vGrBeZ/d6Z2gVvwI3su+7B2qh8s00KHStIF4MTg0MrKc0FYRFWmmoQ==",
"dev": true,
"requires": {
"mitt": "1.1.3",
"query-string": "6.8.1",
"reactotron-core-client": "2.8.6",
"rn-host-detect": "1.1.5"
},
"dependencies": {
"query-string": {
"version": "6.8.1",
"resolved": "https://registry.npmjs.org/query-string/-/query-string-6.8.1.tgz",
"integrity": "sha512-g6y0Lbq10a5pPQpjlFuojfMfV1Pd2Jw9h75ypiYPPia3Gcq2rgkKiIwbkS6JxH7c5f5u/B/sB+d13PU+g1eu4Q==",
"dev": true,
"requires": {
"decode-uri-component": "^0.2.0",
"split-on-first": "^1.0.0",
"strict-uri-encode": "^2.0.0"
}
}
}
},
"reactotron-redux": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/reactotron-redux/-/reactotron-redux-3.1.2.tgz",
"integrity": "sha512-2ScTmE2+kxjKPc7+vsYuw+igkhd4tjoftn4ouugVudQCO7B5vXVyQwLkNv/feaFfFoPlCQSVeJVg7PdzDFOsEQ==",
"dev": true
},
"read-pkg": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz",
@@ -10261,16 +10337,16 @@
}
},
"redux-persist": {
"version": "5.10.0",
"resolved": "https://registry.npmjs.org/redux-persist/-/redux-persist-5.10.0.tgz",
"integrity": "sha512-sSJAzNq7zka3qVHKce1hbvqf0Vf5DuTVm7dr4GtsqQVOexnrvbV47RWFiPxQ8fscnyiuWyD2O92DOxPl0tGCRg=="
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/redux-persist/-/redux-persist-6.0.0.tgz",
"integrity": "sha512-71LLMbUq2r02ng2We9S215LtPu3fY0KgaGE0k8WRgl6RkqxtGfl7HUozz1Dftwsb0D/5mZ8dwAaPbtnzfvbEwQ=="
},
"redux-persist-filesystem-storage": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/redux-persist-filesystem-storage/-/redux-persist-filesystem-storage-1.4.1.tgz",
"integrity": "sha512-QDBlRWdFpn4JMrdLZcimwT7d3yc0xkSnA5j9xKWAY2Qw9rd3Uzlt76qXwEuuQ4M3qgKu/nLE8Roazl5BUcxfcA==",
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/redux-persist-filesystem-storage/-/redux-persist-filesystem-storage-2.1.0.tgz",
"integrity": "sha512-KFj4opJCu8WXUveNV8YKZ1OMGiQm0kiTjWHSSYJ2hmQNrhEa7MOMiIcTImfNDO3vfRl9U+bidKDhQebtCeWrCw==",
"requires": {
"rn-fetch-blob": "0.10.15"
"rn-fetch-blob": "^0.10.16"
},
"dependencies": {
"glob": {
@@ -10287,9 +10363,9 @@
}
},
"rn-fetch-blob": {
"version": "0.10.15",
"resolved": "https://registry.npmjs.org/rn-fetch-blob/-/rn-fetch-blob-0.10.15.tgz",
"integrity": "sha512-/m/gurTaPAvR3J843uehHhznj5k89x7XClyO5ejmbspNLNQ4ByF+kZs80wiiKGWntj+Wqo0jJu1goArXEfc0kA==",
"version": "0.10.16",
"resolved": "https://registry.npmjs.org/rn-fetch-blob/-/rn-fetch-blob-0.10.16.tgz",
"integrity": "sha512-hZV+nF0HK4CWmspXGMw7/G8Q8qugpS/wbKiNLsFpdBZR8XYzjFZNvBWgGyC0F5JWQn3sjmK2w/FJjBlwdQWNQg==",
"requires": {
"base-64": "0.1.0",
"glob": "7.0.6"
@@ -10550,6 +10626,12 @@
}
}
},
"rn-host-detect": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/rn-host-detect/-/rn-host-detect-1.1.5.tgz",
"integrity": "sha512-ufk2dFT3QeP9HyZ/xTuMtW27KnFy815CYitJMqQm+pgG3ZAtHBsrU8nXizNKkqXGy3bQmhEoloVbrfbvMJMqkg==",
"dev": true
},
"rsvp": {
"version": "4.8.5",
"resolved": "https://registry.npmjs.org/rsvp/-/rsvp-4.8.5.tgz",
@@ -10810,6 +10892,157 @@
"resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz",
"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": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
+17 -9
View File
@@ -12,41 +12,47 @@
"base-64": "^0.1.0",
"@expo/vector-icons": "^8.1.0",
"gfycat-style-urls": "^1.0.3",
"lbry-redux": "lbryio/lbry-redux#abe90e0665cfad3fb8853501ec058c5d1f0d9cc8",
"lbryinc": "lbryio/lbryinc#053ca52f4f7f9bf8eb62a3581b183671a475ad1c",
"lbry-redux": "lbryio/lbry-redux#1de1d534c982db913f145a6171f39d7b8ebd61af",
"lbryinc": "lbryio/lbryinc#138a053754ec8e3da8e9bf153d32f527c962f25c",
"lodash": ">=4.17.11",
"merge": ">=1.2.1",
"moment": "^2.22.1",
"react": "16.9.0",
"react-native": "0.61.5",
"@react-native-community/async-storage": "^1.5.1",
"@react-native-community/masked-view": "^0.1.5",
"react-native-camera": "^3.15.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-fs": "^2.13.3",
"react-native-gesture-handler": "1.5.2",
"react-native-image-zoom-viewer": "^2.2.5",
"react-native-password-strength-meter": "^0.0.2",
"react-native-phone-input": "lbryio/react-native-phone-input",
"react-native-progress-circle": "2.1.0",
"react-native-reanimated": "1.4.0",
"react-native-safe-area-context": "^0.6.2",
"react-native-snackbar": "2.0.4",
"react-native-super-grid": "^3.0.4",
"react-native-vector-icons": "^6.6.0",
"react-native-video": "lbryio/react-native-video#7992ff945872f9bd00a3736d9ff1318f343abf47",
"react-navigation": "^3.11.0",
"react-native-webview": "^8.0.2",
"react-navigation": "^4.0.10",
"react-navigation-drawer": "^2.3.3",
"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",
"redux": "^4.0.4",
"redux-persist": "^5.10.0",
"redux-persist-filesystem-storage": "^1.3.2",
"redux-persist": "^6.0.0",
"redux-persist-filesystem-storage": "^2.1.0",
"redux-persist-transform-compress": "^4.2.0",
"redux-persist-transform-filter": "0.0.18",
"redux-thunk": "^2.3.0",
"rn-fetch-blob": "0.12.0",
"seedrandom": "3.0.3"
"seedrandom": "3.0.3",
"showdown": "1.9.1"
},
"devDependencies": {
"@babel/core": "^7.6.2",
@@ -70,6 +76,8 @@
"metro-react-native-babel-preset": "^0.56.0",
"prettier": "^1.11.1",
"@react-native-community/eslint-config": "^0.0.5",
"react-devtools": "^3.6.3"
"react-devtools": "^3.6.3",
"reactotron-react-native": "4.0.2",
"reactotron-redux": "3.1.2"
}
}
+12
View File
@@ -0,0 +1,12 @@
import AsyncStorage from '@react-native-community/async-storage';
import Reactotron from 'reactotron-react-native';
import { reactotronRedux } from 'reactotron-redux';
const reactotron = Reactotron
.setAsyncStorageHandler(AsyncStorage) // AsyncStorage would either come from `react-native` or `@react-native-community/async-storage` depending on where you get it from
.configure() // controls connection & communication settings
.useReactNative() // add all built-in react native plugins
.use(reactotronRedux())
.connect();
export default reactotron;
+44 -10
View File
@@ -6,6 +6,7 @@ import DownloadsPage from 'page/downloads';
import DrawerContent from 'component/drawerContent';
import FilePage from 'page/file';
import FirstRunScreen from 'page/firstRun';
import InvitesPage from 'page/invites';
import PublishPage from 'page/publish';
import PublishesPage from 'page/publishes';
import RewardsPage from 'page/rewards';
@@ -38,7 +39,15 @@ import {
ToastAndroid,
} from 'react-native';
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 {
Lbryio,
doGetSync,
@@ -108,7 +117,7 @@ const discoverStack = createStackNavigator(
{
headerMode: 'screen',
transitionConfig: () => ({ screenInterpolator: () => null }),
}
},
);
discoverStack.navigationOptions = ({ navigation }) => {
@@ -142,7 +151,7 @@ const walletStack = createStackNavigator(
{
headerMode: 'screen',
transitionConfig: () => ({ screenInterpolator: () => null }),
}
},
);
const drawerIconSize = 18;
@@ -202,6 +211,12 @@ const drawer = createDrawerNavigator(
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: {
screen: DownloadsPage,
navigationOptions: {
@@ -225,17 +240,18 @@ const drawer = createDrawerNavigator(
},
},
{
drawerWidth: 300,
drawerWidth: 299,
drawerBackgroundColor: 'transparent',
headerMode: 'none',
backBehavior: 'none',
unmountInactiveRoutes: true,
contentComponent: DrawerContent,
overlayColor: 'rgba(0, 0, 0, 0.7)',
contentOptions: {
activeTintColor: Colors.LbryGreen,
labelStyle: discoverStyle.menuText,
},
}
},
);
const mainStackNavigator = new createStackNavigator(
@@ -264,7 +280,7 @@ const mainStackNavigator = new createStackNavigator(
},
{
headerMode: 'none',
}
},
);
export const AppNavigator = mainStackNavigator;
@@ -303,7 +319,7 @@ class AppWithNavigationState extends React.Component {
}
return false;
}.bind(this)
}.bind(this),
);
}
@@ -312,6 +328,7 @@ class AppWithNavigationState extends React.Component {
this.emailVerifyCheckInterval = setInterval(() => this.checkEmailVerification(), 5000);
Linking.addEventListener('url', this._handleUrl);
DeviceEventEmitter.addListener('onDownloadAborted', this.handleDownloadAborted);
DeviceEventEmitter.addListener('onDownloadStarted', this.handleDownloadStarted);
DeviceEventEmitter.addListener('onDownloadUpdated', this.handleDownloadUpdated);
DeviceEventEmitter.addListener('onDownloadCompleted', this.handleDownloadCompleted);
@@ -346,7 +363,7 @@ class AppWithNavigationState extends React.Component {
},
error => {
/* failed */
}
},
);
};
@@ -368,7 +385,24 @@ class AppWithNavigationState extends React.Component {
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() {
DeviceEventEmitter.removeListener('onDownloadAborted', this.handleDownloadAborted);
DeviceEventEmitter.removeListener('onDownloadStarted', this.handleDownloadStarted);
DeviceEventEmitter.removeListener('onDownloadUpdated', this.handleDownloadUpdated);
DeviceEventEmitter.removeListener('onDownloadCompleted', this.handleDownloadCompleted);
@@ -503,7 +537,7 @@ class AppWithNavigationState extends React.Component {
try {
verification = JSON.parse(atob(evt.url.substring(15)));
} catch (error) {
console.log(error);
// console.log(error);
}
if (verification.token && verification.recaptcha) {
@@ -519,7 +553,7 @@ class AppWithNavigationState extends React.Component {
dispatch(
doToast({
message: 'Invalid Verification URI',
})
}),
);
}
} else {
+1 -1
View File
@@ -51,7 +51,7 @@ export default class ChannelIconItem extends React.PureComponent {
<TouchableOpacity style={channelIconStyle.container} onPress={onPress}>
{isResolvingUri && (
<View style={channelIconStyle.centered}>
<ActivityIndicator size={'small'} color={Colors.LbryGreen} />
<ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />
</View>
)}
<View
+2 -2
View File
@@ -19,11 +19,11 @@ const select = state => ({
const perform = dispatch => ({
notify: data => dispatch(doToast(data)),
createChannel: (name, amount) => dispatch(doCreateChannel(name, amount)),
fetchChannelListMine: () => dispatch(doFetchChannelListMine()),
fetchChannelListMine: () => dispatch(doFetchChannelListMine(1, 99999, true)),
getSync: (password, callback) => dispatch(doGetSync(password, callback)),
});
export default connect(
select,
perform
perform,
)(ChannelSelector);
+12 -7
View File
@@ -36,10 +36,14 @@ export default class ChannelSelector extends React.PureComponent {
}
componentWillReceiveProps(nextProps) {
const { channels: prevChannels = [], channelName } = this.props;
const { channels = [] } = nextProps;
const { channels: prevChannels = [], channelName: prevChannelName } = this.props;
const { channels = [], channelName } = nextProps;
if (channels && channels.length !== prevChannels.length && channelName !== this.state.currentSelectedValue) {
this.setState({ currentSelectedValue: prevChannelName });
}
if (channelName !== prevChannelName) {
this.setState({ currentSelectedValue: channelName });
}
}
@@ -189,10 +193,11 @@ export default class ChannelSelector extends React.PureComponent {
render() {
const channel = this.state.addingChannel ? 'new' : this.props.channel;
const { balance, enabled, fetchingChannels, channels = [] } = this.props;
const pickerItems = [Constants.ITEM_ANONYMOUS, Constants.ITEM_CREATE_A_CHANNEL].concat(
channels ? channels.map(ch => ch.name) : []
);
const { balance, enabled, fetchingChannels, channels = [], showAnonymous } = this.props;
const pickerItems = (showAnonymous
? [Constants.ITEM_ANONYMOUS, Constants.ITEM_CREATE_A_CHANNEL]
: [Constants.ITEM_CREATE_A_CHANNEL]
).concat(channels ? channels.map(ch => ch.name) : []);
const {
newChannelName,
@@ -264,7 +269,7 @@ export default class ChannelSelector extends React.PureComponent {
</Text>
<View style={channelSelectorStyle.buttonContainer}>
{creatingChannel && <ActivityIndicator size={'small'} color={Colors.LbryGreen} />}
{creatingChannel && <ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />}
{!creatingChannel && (
<View style={channelSelectorStyle.buttons}>
<Link style={channelSelectorStyle.cancelLink} text={__('Cancel')} onPress={this.handleCreateCancel} />
+2 -2
View File
@@ -12,11 +12,11 @@ import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
import ClaimList from './view';
const select = state => ({
showNsfwContent: selectShowNsfw(state),
claimSearchByQuery: selectClaimSearchByQuery(state),
lastPageReached: selectClaimSearchByQueryLastPageReached(state),
loadingByQuery: selectFetchingClaimSearchByQuery(state),
loading: selectFetchingClaimSearch(state),
showNsfwContent: selectShowNsfw(state),
});
const perform = dispatch => ({
@@ -25,5 +25,5 @@ const perform = dispatch => ({
export default connect(
select,
perform
perform,
)(ClaimList);
+42
View File
@@ -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);
+176
View File
@@ -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;
+2 -2
View File
@@ -9,10 +9,10 @@ const select = state => ({
});
const perform = dispatch => ({
fetchChannelListMine: () => dispatch(doFetchChannelListMine()),
fetchChannelListMine: () => dispatch(doFetchChannelListMine(1, 99999, true)),
});
export default connect(
select,
perform
perform,
)(DrawerContent);
+2 -1
View File
@@ -10,7 +10,7 @@ import discoverStyle from 'styles/discover';
const groupedMenuItems = {
'Find content': [
{ icon: 'hashtag', label: 'Your Tags', route: Constants.DRAWER_ROUTE_DISCOVER },
{ icon: 'heart', solid: true, label: 'Subscriptions', route: Constants.DRAWER_ROUTE_SUBSCRIPTIONS },
{ icon: 'heart', solid: true, label: 'Following', route: Constants.DRAWER_ROUTE_SUBSCRIPTIONS },
{ icon: 'globe-americas', label: 'All Content', route: Constants.DRAWER_ROUTE_TRENDING },
],
'Your content': [
@@ -22,6 +22,7 @@ const groupedMenuItems = {
Wallet: [
{ icon: 'wallet', label: 'Wallet', route: Constants.DRAWER_ROUTE_WALLET },
{ icon: 'award', label: 'Rewards', route: Constants.DRAWER_ROUTE_REWARDS },
{ icon: 'user-friends', label: 'Invites', route: Constants.DRAWER_ROUTE_INVITES },
],
Settings: [
{ icon: 'cog', label: 'Settings', route: Constants.DRAWER_ROUTE_SETTINGS },
+11 -12
View File
@@ -30,7 +30,6 @@ class FileDownloadButton extends React.PureComponent {
fileInfo,
downloading,
uri,
purchaseUri,
costInfo,
isPlayable,
isViewable,
@@ -44,7 +43,17 @@ class FileDownloadButton extends React.PureComponent {
onButtonLayout,
} = 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,
label = fileInfo ? __('%progress%% complete', { progress: progress.toFixed(0) }) : __('Connecting...');
@@ -71,16 +80,6 @@ class FileDownloadButton extends React.PureComponent {
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;
+3 -1
View File
@@ -10,6 +10,7 @@ import {
makeSelectClaimIsNsfw,
makeSelectShortUrlForUri,
} from 'lbry-redux';
import { doSetPlayerVisible } from 'redux/actions/drawer';
import { selectBlackListedOutpoints, selectFilteredOutpoints, selectRewardContentClaimIds } from 'lbryinc';
import { selectShowNsfw } from 'redux/selectors/settings';
import FileItem from './view';
@@ -31,9 +32,10 @@ const select = (state, props) => ({
const perform = dispatch => ({
resolveUri: uri => dispatch(doResolveUri(uri)),
setPlayerVisible: (visible, uri) => dispatch(doSetPlayerVisible(visible, uri)),
});
export default connect(
select,
perform
perform,
)(FileItem);
+9 -2
View File
@@ -56,6 +56,7 @@ class FileItem extends React.PureComponent {
obscureNsfw,
showDetails,
compactView,
setPlayerVisible,
titleBeforeThumbnail,
} = this.props;
@@ -107,7 +108,12 @@ class FileItem extends React.PureComponent {
<Icon style={discoverStyle.downloadedIcon} solid color={Colors.NextLbryGreen} name={'folder'} size={16} />
)}
{!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 && (
<View style={isRewardContent ? discoverStyle.rewardTitleContainer : null}>
@@ -129,7 +135,8 @@ class FileItem extends React.PureComponent {
normalizeURI(shortChannelUri || fullChannelUri),
null,
false,
fullChannelUri
fullChannelUri,
setPlayerVisible,
);
}}
/>
+3 -2
View File
@@ -61,6 +61,7 @@ class FileItemMedia extends React.PureComponent {
let style = this.props.style;
const { duration, isResolvingUri, thumbnail, title, resizeMode } = this.props;
const atStyle = this.state.autoThumbStyle;
const hasDuration = !!duration;
if (this.isThumbnailValid(thumbnail) && !this.state.imageLoadFailed) {
if (style == null) {
@@ -75,7 +76,7 @@ class FileItemMedia extends React.PureComponent {
resizeMode={this.getFastImageResizeMode(resizeMode)}
style={fileItemMediaStyle.image}
/>
{duration && (
{duration > 0 && (
<VideoDuration
duration={duration}
style={fileItemMediaStyle.duration}
@@ -104,7 +105,7 @@ class FileItemMedia extends React.PureComponent {
.toUpperCase()}
</Text>
)}
{duration && (
{duration > 0 && (
<VideoDuration
duration={duration}
style={fileItemMediaStyle.duration}
+3 -1
View File
@@ -10,6 +10,7 @@ import {
makeSelectTitleForUri,
makeSelectThumbnailForUri,
} from 'lbry-redux';
import { doSetPlayerVisible } from 'redux/actions/drawer';
import { selectBlackListedOutpoints, selectFilteredOutpoints, selectRewardContentClaimIds } from 'lbryinc';
import { selectShowNsfw } from 'redux/selectors/settings';
import FileListItem from './view';
@@ -32,9 +33,10 @@ const select = (state, props) => ({
const perform = dispatch => ({
resolveUri: uri => dispatch(doResolveUri(uri)),
setPlayerVisible: (visible, uri) => dispatch(doSetPlayerVisible(visible, uri)),
});
export default connect(
select,
perform
perform,
)(FileListItem);
+66 -38
View File
@@ -1,11 +1,15 @@
import React from 'react';
import { normalizeURI, parseURI } from 'lbry-redux';
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 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';
@@ -14,27 +18,10 @@ import fileListStyle from 'styles/fileList';
class FileListItem extends React.PureComponent {
state = {
autoStyle: 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 => {
return Math.ceil((fileInfo.written_bytes / fileInfo.total_bytes) * 100);
};
@@ -44,11 +31,16 @@ class FileListItem extends React.PureComponent {
if (!claim && !batchResolve) {
resolveUri(uri);
}
this.setState({
autoStyle:
ChannelIconItem.AUTO_THUMB_STYLES[Math.floor(Math.random() * ChannelIconItem.AUTO_THUMB_STYLES.length)],
});
}
componentDidUpdate() {
const { claim, resolveUri, uri } = this.props;
if (!claim && uri !== this.state.url) {
const { claim, resolveUri, uri, batchResolve } = this.props;
if (!claim && uri !== this.state.url && !batchResolve) {
this.setState({ url: uri }, () => resolveUri(uri));
}
}
@@ -88,6 +80,7 @@ class FileListItem extends React.PureComponent {
onPress,
navigation,
rewardedContentClaimIds,
setPlayerVisible,
thumbnail,
hideChannel,
onLongPress,
@@ -134,10 +127,13 @@ class FileListItem extends React.PureComponent {
return null;
}
const isChannel = name && name.startsWith('@');
const hasThumbnail = !!thumbnail;
return (
<View style={style}>
<TouchableOpacity
style={style}
style={[style, isChannel ? fileListStyle.channelContainer : null]}
onPress={this.onPressHandler}
onLongPress={() => {
if (onLongPress) {
@@ -145,13 +141,35 @@ class FileListItem extends React.PureComponent {
}
}}
>
<FileItemMedia
style={fileListStyle.thumbnail}
duration={duration}
resizeMode="cover"
title={title || name || normalizeURI(uri).substring(7)}
thumbnail={thumbnail}
/>
{!isChannel && (
<FileItemMedia
style={fileListStyle.thumbnail}
duration={duration}
resizeMode="cover"
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 && (
<View style={fileListStyle.selectedOverlay}>
<Icon name={'check-circle'} solid color={Colors.NextLbryGreen} size={32} />
@@ -166,6 +184,12 @@ class FileListItem extends React.PureComponent {
size={16}
/>
)}
<FilePrice
uri={uri}
style={fileListStyle.filePriceContainer}
iconStyle={fileListStyle.filePriceIcon}
textStyle={fileListStyle.filePriceText}
/>
<View style={fileListStyle.detailsContainer}>
{featuredResult && (
<Text style={fileListStyle.featuredUri} numberOfLines={1}>
@@ -178,7 +202,7 @@ class FileListItem extends React.PureComponent {
{!title && !name && <Text style={fileListStyle.uri}>{uri}</Text>}
{!title && !name && (
<View style={fileListStyle.row}>
<ActivityIndicator size={'small'} color={featuredResult ? Colors.White : Colors.LbryGreen} />
<ActivityIndicator size={'small'} color={featuredResult ? Colors.White : Colors.NextLbryGreen} />
</View>
)}
</View>
@@ -186,8 +210,11 @@ class FileListItem extends React.PureComponent {
{(title || name) && (
<View style={fileListStyle.titleContainer}>
<Text style={featuredResult ? fileListStyle.featuredTitle : fileListStyle.title}>
{this.formatTitle(title) || this.formatTitle(name)}
<Text
style={featuredResult ? fileListStyle.featuredTitle : fileListStyle.title}
numberOfLines={hideChannel ? 4 : 3}
>
{title || name}
</Text>
{isRewardContent && <Icon style={fileListStyle.rewardIcon} name="award" size={12} />}
</View>
@@ -199,17 +226,18 @@ class FileListItem extends React.PureComponent {
</View>
)}
{channel && !hideChannel && (
{(channel || isChannel) && !hideChannel && (
<Link
style={fileListStyle.publisher}
text={channel}
text={isChannel ? name : channel}
onPress={() => {
navigateToUri(
navigation,
normalizeURI(shortChannelUri || fullChannelUri),
normalizeURI(isChannel ? uri : shortChannelUri || fullChannelUri),
null,
false,
fullChannelUri
isChannel ? claim && claim.permanent_url : fullChannelUri,
setPlayerVisible,
);
}}
/>
@@ -217,7 +245,7 @@ class FileListItem extends React.PureComponent {
<View style={fileListStyle.info}>
{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} />
</View>
@@ -230,7 +258,7 @@ class FileListItem extends React.PureComponent {
color={Colors.NextLbryGreen}
height={3}
style={fileListStyle.progress}
progress={this.getDownloadProgress(fileInfo)}
progress={getDownloadProgress(fileInfo)}
/>
)}
</View>
+21 -23
View File
@@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { Text, View } from 'react-native';
import { formatCredits, formatFullPrice } from 'lbry-redux';
import Icon from 'react-native-vector-icons/FontAwesome5';
class CreditAmount extends React.PureComponent {
static propTypes = {
@@ -62,25 +63,27 @@ class CreditAmount extends React.PureComponent {
}
}
/* {this.props.isEstimate ? (
<span
className="credit-amount__estimate"
title={__('This is an estimate and does not include data fees')}
>
*
</span>
) : null} */
return <Text style={style}>{amountText}</Text>;
return (
<Text style={style} numberOfLines={1}>
{amountText}
</Text>
);
}
}
class FilePrice extends React.PureComponent {
componentWillMount() {
this.fetchCost(this.props);
const { cost } = this.props;
if (isNaN(parseFloat(cost))) {
this.fetchCost(this.props);
}
}
componentWillReceiveProps(nextProps) {
this.fetchCost(nextProps);
const { cost } = this.props;
if (isNaN(parseFloat(cost))) {
this.fetchCost(nextProps);
}
}
fetchCost(props) {
@@ -92,30 +95,25 @@ class FilePrice extends React.PureComponent {
}
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;
if (!costInfo) {
return (
<View style={style}>
<Text style={textStyle}>???</Text>
</View>
);
const amount = cost ? parseFloat(cost) : costInfo ? parseFloat(costInfo.cost) : 0;
if (isNaN(amount) || amount === 0) {
return null;
}
return (
<View style={style}>
<Icon name="coins" size={9} style={iconStyle} />
<CreditAmount
style={textStyle}
label={false}
amount={parseFloat(costInfo.cost)}
amount={amount}
isEstimate={isEstimate}
showFree
showFullPrice={showFullPrice}
>
???
</CreditAmount>
/>
</View>
);
}
+33 -9
View File
@@ -167,7 +167,7 @@ class MediaPlayer extends React.PureComponent {
togglePlay = () => {
this.showPlayerControls();
this.setState({ paused: !this.state.paused }, this.handlePausedState);
this.setState({ paused: !this.state.paused }, this.updateBackgroundMediaNotification);
};
handlePausedState = () => {
@@ -188,7 +188,7 @@ class MediaPlayer extends React.PureComponent {
};
onEnd = () => {
this.setState({ paused: true });
this.setState({ paused: true }, this.updateBackgroundMediaNotification);
if (this.props.onPlaybackFinished) {
this.props.onPlaybackFinished();
}
@@ -327,6 +327,10 @@ class MediaPlayer extends React.PureComponent {
}
};
onFocusChanged = evt => {
this.setState({ paused: !(this.state.paused && evt.hasAudioFocus) }, this.updateBackgroundMediaNotification);
};
onBuffer = () => {
if (!this.state.paused) {
this.setState({ buffering: true }, () => this.manualHidePlayerControls());
@@ -341,6 +345,12 @@ class MediaPlayer extends React.PureComponent {
this.setState({ paused: true }, this.updateBackgroundMediaNotification);
};
handleSeek = time => {
const { currentTime } = this.state;
const newTime = currentTime + time;
this.seekTo(newTime);
};
updateBackgroundMediaNotification = () => {
this.handlePausedState();
const { backgroundPlayEnabled } = this.props;
@@ -362,14 +372,26 @@ class MediaPlayer extends React.PureComponent {
<Icon name={'arrow-left'} size={18} style={mediaPlayerStyle.backButtonIcon} />
</TouchableOpacity>
<TouchableOpacity style={mediaPlayerStyle.playPauseButton} onPress={this.togglePlay}>
{this.state.paused && <Icon name="play" size={40} color="#ffffff" />}
{!this.state.paused && <Icon name="pause" size={40} color="#ffffff" />}
</TouchableOpacity>
<View style={mediaPlayerStyle.midControls}>
<TouchableOpacity style={mediaPlayerStyle.rewind10} onPress={() => this.handleSeek(-10)}>
<Icon name="undo" size={24} color={Colors.White} />
<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}>
{this.state.fullscreenMode && <Icon name="compress" size={16} color="#ffffff" />}
{!this.state.fullscreenMode && <Icon name="expand" size={16} color="#ffffff" />}
{this.state.fullscreenMode && <Icon name="compress" size={16} color={Colors.White} />}
{!this.state.fullscreenMode && <Icon name="expand" size={16} color={Colors.White} />}
</TouchableOpacity>
<Text style={mediaPlayerStyle.elapsedDuration}>{this.formatTime(this.state.currentTime)}</Text>
@@ -421,7 +443,7 @@ class MediaPlayer extends React.PureComponent {
const seekerCircleStyle = [this.state.seeking ? mediaPlayerStyle.bigSeekerCircle : mediaPlayerStyle.seekerCircle];
if (!this.state.seeking) {
seekerCircleStyle.push(
this.state.fullscreenMode ? mediaPlayerStyle.seekerCircleTopFs : mediaPlayerStyle.seekerCircleTop
this.state.fullscreenMode ? mediaPlayerStyle.seekerCircleTopFs : mediaPlayerStyle.seekerCircleTop,
);
}
@@ -440,6 +462,7 @@ class MediaPlayer extends React.PureComponent {
}}
resizeMode={this.state.resizeMode}
playInBackground={this.state.backgroundPlayEnabled}
playWhenInactive={this.state.backgroundPlayEnabled}
style={mediaPlayerStyle.player}
rate={this.state.rate}
volume={this.state.volume}
@@ -450,6 +473,7 @@ class MediaPlayer extends React.PureComponent {
onEnd={this.onEnd}
onError={this.onError}
minLoadRetryCount={999}
onAudioFocusChanged={this.onFocusChanged}
/>
{this.state.firstPlay && thumbnail && (
+12 -5
View File
@@ -1,25 +1,32 @@
import { connect } from 'react-redux';
import {
doResolveUris,
doResolvedSearch,
makeSelectClaimForUri,
makeSelectRecommendedContentForUri,
makeSelectTitleForUri,
makeSelectResolvedRecommendedContentForUri,
selectResolvingUris,
selectIsSearching,
} from 'lbry-redux';
import { selectShowNsfw } from 'redux/selectors/settings';
import RelatedContent from './view';
const RESULT_SIZE = 16;
const select = (state, props) => ({
claim: makeSelectClaimForUri(props.uri)(state),
recommendedContent: makeSelectRecommendedContentForUri(props.uri)(state),
title: makeSelectTitleForUri(props.uri)(state),
isSearching: selectIsSearching(state),
recommendedContent: makeSelectResolvedRecommendedContentForUri(props.uri, RESULT_SIZE)(state),
resolvingUris: selectResolvingUris(state),
showNsfwContent: selectShowNsfw(state),
});
const perform = dispatch => ({
resolveUris: uris => dispatch(doResolveUris(uris)),
searchRecommended: (query, claimId, nsfw) =>
dispatch(doResolvedSearch(query, RESULT_SIZE, undefined, true, { related_to: claimId }, nsfw)),
});
export default connect(
select,
perform
perform,
)(RelatedContent);
+21 -17
View File
@@ -4,37 +4,41 @@ import { normalizeURI } from 'lbry-redux';
import { navigateToUri } from 'utils/helper';
import Colors from 'styles/colors';
import FileListItem from 'component/fileListItem';
import ClaimResultItem from 'component/claimResultItem';
import fileListStyle from 'styles/fileList';
import relatedContentStyle from 'styles/relatedContent';
export default class RelatedContent extends React.PureComponent {
componentDidMount() {
const { resolveUris, recommendedContent } = this.props;
if (recommendedContent && recommendedContent.length > 0) {
// batch resolve the uris
resolveUris(recommendedContent);
const { title, claimId, searchRecommended, showNsfwContent } = this.props;
if (title && claimId) {
searchRecommended(title, claimId, showNsfwContent);
}
}
shouldComponentUpdate(nextProps, nextState) {
const { isSearching, recommendedContent } = nextProps;
return isSearching || (!isSearching && recommendedContent && recommendedContent.length > 0);
}
render() {
const { recommendedContent, navigation, uri, fullUri } = this.props;
const { isSearching, recommendedContent, navigation, uri, fullUri } = this.props;
return (
<View style={relatedContentStyle.container}>
<Text style={relatedContentStyle.title}>{__('Related Content')}</Text>
{isSearching && <ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />}
{recommendedContent &&
recommendedContent
.filter(recommendedUri => recommendedUri !== normalizeURI(fullUri))
.map(recommendedUri => (
<FileListItem
style={fileListStyle.item}
key={recommendedUri}
uri={recommendedUri}
batchResolve
navigation={navigation}
autoplay
/>
))}
recommendedContent.map(result => (
<ClaimResultItem
style={fileListStyle.item}
uri={result ? normalizeURI(`${result.name}#${result.claimId}`) : null}
key={result.claimId}
result={result}
navigation={navigation}
autoplay
/>
))}
</View>
);
}
@@ -3,6 +3,8 @@ import { buildURI, normalizeURI } from 'lbry-redux';
import { ActivityIndicator, FlatList, Image, Text, View } from 'react-native';
import { navigateToUri } from 'utils/helper';
import Colors from 'styles/colors';
import ChannelIconItem from 'component/channelIconItem';
import channelIconStyle from 'styles/channelIcon';
import discoverStyle from 'styles/discover';
import FileItem from 'component/fileItem';
import SubscribeButton from 'component/subscribeButton';
@@ -11,11 +13,20 @@ import Link from 'component/link';
import Tag from 'component/tag';
class SuggestedSubscriptionItem extends React.PureComponent {
state = {
autoStyle: null,
};
componentDidMount() {
const { claim, uri, resolveUri } = this.props;
if (!claim) {
resolveUri(uri);
}
this.setState({
autoStyle:
ChannelIconItem.AUTO_THUMB_STYLES[Math.floor(Math.random() * ChannelIconItem.AUTO_THUMB_STYLES.length)],
});
}
render() {
@@ -28,22 +39,26 @@ class SuggestedSubscriptionItem extends React.PureComponent {
}
}
const hasThumbnail = !!thumbnail;
if (isResolvingUri) {
return (
<View style={subscriptionsStyle.itemLoadingContainer}>
<ActivityIndicator size={'small'} color={Colors.LbryGreen} />
<ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />
</View>
);
}
return (
<View style={subscriptionsStyle.suggestedItem}>
<View style={subscriptionsStyle.suggestedItemThumbnailContainer}>
<Image
style={subscriptionsStyle.suggestedItemThumbnail}
resizeMode={'cover'}
source={thumbnail ? { uri: thumbnail } : require('../../assets/default_avatar.jpg')}
/>
<View style={[subscriptionsStyle.suggestedItemThumbnailContainer, this.state.autoStyle]}>
{hasThumbnail && (
<Image style={subscriptionsStyle.suggestedItemThumbnail} resizeMode={'cover'} source={{ uri: thumbnail }} />
)}
{!hasThumbnail && (
<Text style={channelIconStyle.autothumbCharacter}>
{title ? title.substring(0, 1).toUpperCase() : claim ? claim.name.substring(1, 2).toUpperCase() : ''}
</Text>
)}
</View>
<View style={subscriptionsStyle.suggestedItemDetails}>
+3 -1
View File
@@ -6,6 +6,7 @@ import {
selectSearchSuggestions,
SETTINGS,
} from 'lbry-redux';
import { doSetPlayerVisible } from 'redux/actions/drawer';
import { selectCurrentRoute } from 'redux/selectors/drawer';
import { makeSelectClientSetting } from 'redux/selectors/settings';
import UriBar from './view';
@@ -24,9 +25,10 @@ const select = state => {
const perform = dispatch => ({
updateSearchQuery: query => dispatch(doUpdateSearchQuery(query)),
setPlayerVisible: (visible, uri) => dispatch(doSetPlayerVisible(visible, uri)),
});
export default connect(
select,
perform
perform,
)(UriBar);
+45 -30
View File
@@ -18,18 +18,20 @@ class UriBar extends React.PureComponent {
keyboardDidHideListener = null;
changeTextTimeout = -1;
state = {
changeTextTimeout: null,
currentValue: null,
inputText: null,
focused: false,
keyboardHeight: 0,
selection: undefined,
};
componentDidMount() {
this.keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', this._keyboardDidShow);
this.keyboardDidHideListener = Keyboard.addListener('keyboardDidHide', this._keyboardDidHide);
this.setSelection();
this.setState({ selection: { start: 0, end: 0 } });
}
componentWillUnmount() {
@@ -51,15 +53,14 @@ class UriBar extends React.PureComponent {
}
handleChangeText = text => {
this.setState({ selection: undefined });
const newValue = text || '';
clearTimeout(this.state.changeTextTimeout);
clearTimeout(this.changeTextTimeout);
const { updateSearchQuery, onSearchSubmitted, showUriBarSuggestions, navigation } = this.props;
updateSearchQuery(text);
let timeout = -1;
this.changeTextTimeout = -1;
if (!showUriBarSuggestions) {
timeout = setTimeout(() => {
this.changeTextTimeout = setTimeout(() => {
if (text.trim().length === 0) {
// don't do anything if the text is empty
return;
@@ -67,6 +68,7 @@ class UriBar extends React.PureComponent {
if (!text.startsWith('lbry://')) {
// not a URI input, so this is a search, perform a direct search
updateSearchQuery(text);
if (onSearchSubmitted) {
onSearchSubmitted(text);
} else {
@@ -74,12 +76,14 @@ class UriBar extends React.PureComponent {
}
}
}, UriBar.INPUT_TIMEOUT);
} else {
updateSearchQuery(text);
}
this.setState({ inputText: newValue, currentValue: newValue, changeTextTimeout: timeout });
this.setState({ inputText: newValue, currentValue: newValue });
};
handleItemPress = item => {
const { navigation, onSearchSubmitted, updateSearchQuery } = this.props;
const { navigation, onSearchSubmitted, setPlayerVisible, updateSearchQuery } = this.props;
const { type, value } = item;
Keyboard.dismiss();
@@ -108,7 +112,7 @@ class UriBar extends React.PureComponent {
});
} else {
const uri = normalizeURI(value);
navigateToUri(navigation, uri);
navigateToUri(navigation, uri, null, false, null, setPlayerVisible);
}
};
@@ -123,14 +127,8 @@ class UriBar extends React.PureComponent {
this.setState({ focused: false, keyboardHeight: 0 });
};
setSelection() {
if (this.textInput) {
this.textInput.setNativeProps({ selection: { start: 0, end: 0 } });
}
}
handleSubmitEditing = () => {
const { navigation, onSearchSubmitted, updateSearchQuery } = this.props;
const { navigation, onSearchSubmitted, setPlayerVisible, updateSearchQuery } = this.props;
if (this.state.inputText) {
let inputText = this.state.inputText,
inputTextIsUrl = false;
@@ -139,7 +137,7 @@ class UriBar extends React.PureComponent {
// if it's a URI (lbry://...), open the file page
if (transformedUrl && isURIValid(transformedUrl)) {
inputTextIsUrl = true;
navigateToUri(navigation, transformedUrl);
navigateToUri(navigation, transformedUrl, null, false, null, setPlayerVisible);
}
}
@@ -159,9 +157,31 @@ class UriBar extends React.PureComponent {
}
};
onSearchPageBlurred() {
this.setState({ currenValueSet: false });
}
handleFocus = () => {
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() {
const {
@@ -250,12 +270,10 @@ class UriBar extends React.PureComponent {
ref={ref => {
this.textInput = ref;
}}
onTouchStart={this.handleTouchStart}
autoCorrect={false}
style={uriBarStyle.uriText}
onLayout={() => {
this.setSelection();
}}
selectTextOnFocus
selection={this.state.selection}
placeholder={__('Search movies, music, and more')}
underlineColorAndroid={'transparent'}
numberOfLines={1}
@@ -264,11 +282,8 @@ class UriBar extends React.PureComponent {
returnKeyType={'go'}
inlineImageLeft={'baseline_search_black_24'}
inlineImagePadding={16}
onFocus={() => this.setState({ focused: true })}
onBlur={() => {
this.setState({ focused: false });
this.setSelection();
}}
onFocus={this.handleFocus}
onBlur={this.handleBlur}
onChangeText={this.handleChangeText}
onSubmitEditing={this.handleSubmitEditing}
/>
+14
View File
@@ -0,0 +1,14 @@
import { connect } from 'react-redux';
import { selectClaimsBalance, selectSupportsBalance, selectTipsBalance } from 'lbry-redux';
import WalletBalanceExtra from './view';
const select = state => ({
claimsBalance: selectClaimsBalance(state) || 0,
supportsBalance: selectSupportsBalance(state) || 0,
tipsBalance: selectTipsBalance(state) || 0,
});
export default connect(
select,
null,
)(WalletBalanceExtra);
+54
View File
@@ -0,0 +1,54 @@
// @flow
import React from 'react';
import { Image, Text, View } from 'react-native';
import { Lbry, formatCredits } from 'lbry-redux';
import Address from 'component/address';
import Button from 'component/button';
import Colors from 'styles/colors';
import Icon from 'react-native-vector-icons/FontAwesome5';
import walletStyle from 'styles/wallet';
type Props = {
claimsBalance: number,
supportsBalance: number,
tipsBalance: number,
};
class WalletBalanceExtra extends React.PureComponent<Props> {
render() {
const { claimsBalance, supportsBalance, tipsBalance } = this.props;
return (
<View style={walletStyle.balanceExtraCard}>
<View style={walletStyle.walletExtraRow}>
<View style={walletStyle.walletExtraCol}>
<Icon style={walletStyle.walletExtraIcon} color={Colors.LbryGreen} name={'gift'} size={16} />
<Text style={walletStyle.walletExtraCaption}>{__('You also have')}</Text>
<View style={walletStyle.balanceRow}>
<Text style={walletStyle.walletExtraBalance}>{formatCredits(parseFloat(tipsBalance), 2)}</Text>
<Text style={walletStyle.walletExtraCurrency}>LBC</Text>
</View>
<Text style={walletStyle.text}>{__('in tips')}</Text>
</View>
<View style={walletStyle.walletExtraCol}>
<Icon style={walletStyle.walletExtraIcon} color={Colors.LbryGreen} name={'lock'} size={16} />
<Text style={walletStyle.walletExtraCaption}>{__('You staked')}</Text>
<View style={walletStyle.balanceRow}>
<Text style={walletStyle.walletExtraBalance}>{formatCredits(parseFloat(claimsBalance), 2)}</Text>
<Text style={walletStyle.walletExtraCurrency}>LBC</Text>
</View>
<Text style={walletStyle.text}>{__('in your publishes')}</Text>
<View style={[walletStyle.balanceRow, walletStyle.walletExtraTopMargin]}>
<Text style={walletStyle.walletExtraBalance}>{formatCredits(parseFloat(supportsBalance), 2)}</Text>
<Text style={walletStyle.walletExtraCurrency}>LBC</Text>
</View>
<Text style={walletStyle.text}>{__('in your supports')}</Text>
</View>
</View>
</View>
);
}
}
export default WalletBalanceExtra;
+6 -2
View File
@@ -38,9 +38,10 @@ class WalletSend extends React.PureComponent<Props> {
handleSend = () => {
const { balance, sendToAddress, notify } = this.props;
const { address, amount } = this.state;
if (address && !regexAddress.test(address)) {
if (address && (!regexAddress.test(address) || address.substring(0, 1) === 'r')) {
notify({
message: __('The recipient address is not a valid LBRY address.'),
isError: true,
});
return;
}
@@ -48,6 +49,7 @@ class WalletSend extends React.PureComponent<Props> {
if (amount > balance) {
notify({
message: __('Insufficient credits'),
isError: true,
});
return;
}
@@ -72,6 +74,7 @@ class WalletSend extends React.PureComponent<Props> {
const { notify } = this.props;
notify({
message: __('The recipient address is not a valid LBRY address.'),
isError: true,
});
}
};
@@ -97,9 +100,10 @@ class WalletSend extends React.PureComponent<Props> {
this.setState({
address: value,
addressChanged: true,
addressValid: value.trim().length === 0 || regexAddress.test(value),
addressValid: value.trim().length === 0 || (regexAddress.test(value) && !value.startsWith('r')),
})
}
numberOfLines={1}
onBlur={this.handleAddressInputBlur}
onSubmitEditing={this.handleAddressInputSubmit}
placeholder={'bbFxRyXXXXXXXXXXXZD8nE7XTLUxYnddTs'}
+5 -1
View File
@@ -64,6 +64,8 @@ const Constants = {
ACTION_CLEAR_PUBLISH_FORM_STATE: 'CLEAR_PUBLISH_FORM_STATE',
ACTION_CLEAR_CHANNEL_FORM_STATE: 'CLEAR_CHANNEL_FORM_STATE',
ACTION_SET_EXPLICIT_NAVIGATE_BACK: 'SET_EXPLICIT_NAVIGATE_BACK',
ACTION_FULLSCREEN_MODE_TOGGLED: 'FULLSCREEN_MODE_TOGGLED',
ORIENTATION_HORIZONTAL: 'horizontal',
@@ -90,6 +92,7 @@ const Constants = {
DRAWER_ROUTE_TAG: 'Tag',
DRAWER_ROUTE_CHANNEL_CREATOR: 'ChannelCreator',
DRAWER_ROUTE_CHANNEL_CREATOR_FORM: 'ChannnelCreatorForm',
DRAWER_ROUTE_INVITES: 'Invites',
FULL_ROUTE_NAME_DISCOVER: 'DiscoverStack',
FULL_ROUTE_NAME_WALLET: 'WalletStack',
@@ -134,7 +137,7 @@ const Constants = {
ORDER_BY_EFFECTIVE_AMOUNT: 'effective_amount',
DEFAULT_PAGE_SIZE: 10,
DEFAULT_PAGE_SIZE: 20,
ALL_PLACEHOLDER: '_all',
@@ -165,6 +168,7 @@ export const DrawerRoutes = [
Constants.DRAWER_ROUTE_SEARCH,
Constants.DRAWER_ROUTE_TRANSACTION_HISTORY,
Constants.DRAWER_ROUTE_CHANNEL_CREATOR,
Constants.DRAWER_ROUTE_INVITES,
];
// sub-pages for main routes
+8 -5
View File
@@ -42,6 +42,7 @@ import AppWithNavigationState, {
} from 'component/AppNavigator';
import { REHYDRATE, PURGE, persistCombineReducers, persistStore } from 'redux-persist';
import { __ } from 'i18n';
import reactotron from '../reactotron';
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
import getStoredStateMigrateV4 from 'redux-persist/lib/integration/getStoredStateMigrateV4';
import FilesystemStorage from 'redux-persist-filesystem-storage';
@@ -94,6 +95,7 @@ const compressor = createCompressor();
const authFilter = createFilter('auth', ['authToken']);
const blockedFilter = createFilter('blocked', ['blockedChannels']);
const contentFilter = createFilter('content', ['positions']);
const drawerFilter = createFilter('drawer', ['lastRouteInStack']);
const saveClaimsFilter = createFilter('claims', ['claimsByUri']);
const subscriptionsFilter = createFilter('subscriptions', ['enabledChannelNotifications', 'subscriptions', 'latest']);
const settingsFilter = createFilter('settings', ['clientSettings']);
@@ -101,12 +103,13 @@ const tagsFilter = createFilter('tags', ['followedTags']);
const walletFilter = createFilter('wallet', ['receiveAddress']);
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
// read the data
transforms: [
authFilter,
blockedFilter,
drawerFilter,
saveClaimsFilter,
subscriptionsFilter,
settingsFilter,
@@ -179,7 +182,7 @@ const sharedStateCallback = ({ dispatch, getState }) => {
const emailVerified = selectUserVerifiedEmail(state);
if (syncEnabled && emailVerified) {
NativeModules.UtilityModule.getSecureValue(Constants.KEY_WALLET_PASSWORD).then(password =>
dispatch(doGetSync(password))
dispatch(doGetSync(password)),
);
}
};
@@ -195,13 +198,13 @@ const composeEnhancers = compose;
const store = createStore(
enableBatching(reducers),
{}, // initial state,
composeEnhancers(applyMiddleware(...middleware))
composeEnhancers(applyMiddleware(...middleware), reactotron.createEnhancer()),
);
window.store = store;
const persistor = persistStore(store, persistOptions, err => {
const persistor = persistStore(store, null, err => {
if (err) {
console.log('Unable to load saved SETTINGS');
// console.log('Unable to load saved SETTINGS');
}
});
window.persistor = persistor;
+2 -2
View File
@@ -18,7 +18,7 @@ const select = (state, props) => ({
const perform = dispatch => ({
abandonClaim: (txid, nout) => dispatch(doAbandonClaim(txid, nout)),
fetchChannelListMine: () => dispatch(doFetchChannelListMine()),
fetchChannelListMine: () => dispatch(doFetchChannelListMine(1, 99999, true)),
fetchSubCount: claimId => dispatch(doFetchSubCount(claimId)),
popDrawerStack: () => dispatch(doPopDrawerStack()),
setSortByItem: item => dispatch(doSetSortByItem(item)),
@@ -27,5 +27,5 @@ const perform = dispatch => ({
export default connect(
select,
perform
perform,
)(ChannelPage);
+3 -2
View File
@@ -173,9 +173,10 @@ class ChannelPage extends React.PureComponent {
const { permanent_url: permanentUrl } = claim;
navigation.navigate({
routeName: Constants.DRAWER_ROUTE_CHANNEL_CREATOR,
params: { editChannelUrl: permanentUrl },
params: { editChannelUrl: permanentUrl, returnUrl: permanentUrl },
});
}
this.onEditPressed = null;
};
onTipPressed = () => {
@@ -210,7 +211,7 @@ class ChannelPage extends React.PureComponent {
},
},
],
{ cancelable: true }
{ cancelable: true },
);
}
};
+9 -3
View File
@@ -13,7 +13,12 @@ import {
doToast,
} from 'lbry-redux';
import { doGetSync } from 'lbryinc';
import { doPushDrawerStack, doPopDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
import {
doPushDrawerStack,
doPopDrawerStack,
doSetPlayerVisible,
doSetExplicitNavigateBack,
} from 'redux/actions/drawer';
import { doUpdateChannelFormState, doClearChannelFormState } from 'redux/actions/form';
import { selectDrawerStack } from 'redux/selectors/drawer';
import { selectChannelFormState, selectHasChannelFormState } from 'redux/selectors/form';
@@ -37,16 +42,17 @@ const perform = dispatch => ({
notify: data => dispatch(doToast(data)),
clearChannelFormState: () => dispatch(doClearChannelFormState()),
createChannel: (name, amount, optionalParams) => dispatch(doCreateChannel(name, amount, optionalParams)),
fetchChannelListMine: () => dispatch(doFetchChannelListMine()),
fetchChannelListMine: () => dispatch(doFetchChannelListMine(1, 99999, true)),
getSync: (password, callback) => dispatch(doGetSync(password, callback)),
updateChannel: params => dispatch(doUpdateChannel(params)),
updateChannelFormState: data => dispatch(doUpdateChannelFormState(data)),
pushDrawerStack: (routeName, params) => dispatch(doPushDrawerStack(routeName, params)),
popDrawerStack: () => dispatch(doPopDrawerStack()),
setPlayerVisible: () => dispatch(doSetPlayerVisible(false)),
setExplicitNavigateBack: flag => dispatch(doSetExplicitNavigateBack(flag)),
});
export default connect(
select,
perform
perform,
)(ChannelCreator);
+69 -16
View File
@@ -1,5 +1,5 @@
import React from 'react';
import { CLAIM_VALUES, formatCredits, isNameValid, regexInvalidURI } from 'lbry-redux';
import { CLAIM_VALUES, Lbry, formatCredits, isNameValid, regexInvalidURI } from 'lbry-redux';
import {
ActivityIndicator,
Alert,
@@ -14,13 +14,14 @@ import {
TouchableOpacity,
View,
} from 'react-native';
import { navigateToUri, logPublish, uploadImageAsset } from 'utils/helper';
import { navigateBack, navigateToUri, logPublish, uploadImageAsset } from 'utils/helper';
import Button from 'component/button';
import ChannelIconItem from 'component/channelIconItem';
import ChannelRewardsDriver from 'component/channelRewardsDriver';
import Colors from 'styles/colors';
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
import EmptyStateView from 'component/emptyStateView';
import FastImage from 'react-native-fast-image';
import FloatingWalletBalance from 'component/floatingWalletBalance';
import Icon from 'react-native-vector-icons/FontAwesome5';
import Link from 'component/link';
@@ -36,6 +37,7 @@ export default class ChannelCreator extends React.PureComponent {
state = {
autoStyle: null,
returnUrl: null,
canSave: true,
claimId: null,
creditsInputFocused: false,
@@ -76,6 +78,7 @@ export default class ChannelCreator extends React.PureComponent {
descriptionFocused: false,
websiteFocused: false,
emailFocused: false,
hasReturnedBack: false,
};
didFocusListener;
@@ -117,7 +120,14 @@ export default class ChannelCreator extends React.PureComponent {
};
componentWillReceiveProps(nextProps) {
const { currentRoute: prevRoute, drawerStack: prevDrawerStack, notify } = this.props;
const {
currentRoute: prevRoute,
drawerStack: prevDrawerStack,
popDrawerStack,
setPlayerVisible,
navigation,
notify,
} = this.props;
const { currentRoute, drawerStack, updatingChannel, updateChannelError } = nextProps;
if (Constants.DRAWER_ROUTE_CHANNEL_CREATOR === currentRoute && currentRoute !== prevRoute) {
@@ -141,6 +151,11 @@ export default class ChannelCreator extends React.PureComponent {
) {
// navigated back from the form
this.setState({ currentPhase: Constants.PHASE_LIST });
if (!this.state.hasReturnedBack && this.state.returnUrl) {
this.setState({ hasReturnedBack: true }, () => {
navigateBack(navigation, drawerStack, popDrawerStack, setPlayerVisible);
});
}
}
}
@@ -170,11 +185,12 @@ export default class ChannelCreator extends React.PureComponent {
let isEditMode = false;
if (navigation.state.params) {
const { editChannelUrl, displayForm } = navigation.state.params;
const { editChannelUrl, displayForm, returnUrl } = navigation.state.params;
if (editChannelUrl) {
isEditMode = true;
this.setState({ editChannelUrl, currentPhase: Constants.PHASE_CREATE });
}
this.setState({ returnUrl });
}
if (!isEditMode && hasFormState) {
@@ -225,9 +241,9 @@ export default class ChannelCreator extends React.PureComponent {
error => {
notify({ message: `The image could not be uploaded: ${error}` });
this.setState({ uploadingImage: false });
}
},
);
}
},
);
} else {
// could not determine the file path
@@ -489,12 +505,12 @@ export default class ChannelCreator extends React.PureComponent {
claim_id: claimId,
amount: newChannelBid,
},
optionalParams
optionalParams,
);
this.setState({ updateChannelStarted: true }, () => updateChannel(params));
} else {
this.setState({ creatingChannel: true }, () =>
createChannel(channelName, newChannelBid, optionalParams).then(success, failure)
createChannel(channelName, newChannelBid, optionalParams).then(success, failure),
);
}
};
@@ -527,7 +543,7 @@ export default class ChannelCreator extends React.PureComponent {
avatarImagePickerOpen: false,
coverImagePickerOpen: true,
},
() => NativeModules.UtilityModule.openDocumentPicker('image/*')
() => this.checkStoragePermission(),
);
};
@@ -543,7 +559,7 @@ export default class ChannelCreator extends React.PureComponent {
avatarImagePickerOpen: true,
coverImagePickerOpen: false,
},
() => NativeModules.UtilityModule.openDocumentPicker('image/*')
() => this.checkStoragePermission(),
);
};
@@ -673,7 +689,7 @@ export default class ChannelCreator extends React.PureComponent {
},
},
],
{ cancelable: true }
{ cancelable: true },
);
};
@@ -749,6 +765,42 @@ export default class ChannelCreator extends React.PureComponent {
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() {
const { abandoningClaimIds, balance, fetchingChannels, updatingChannel, channels = [], navigation } = this.props;
const {
@@ -831,9 +883,9 @@ export default class ChannelCreator extends React.PureComponent {
>
<View style={[channelCreatorStyle.channelListAvatar, itemAutoStyle]}>
{itemThumbnailUrl && (
<Image
<FastImage
style={channelCreatorStyle.avatarImage}
resizeMode={'cover'}
resizeMode={FastImage.resizeMode.cover}
source={{ uri: itemThumbnailUrl }}
/>
)}
@@ -868,7 +920,7 @@ export default class ChannelCreator extends React.PureComponent {
style={channelCreatorStyle.coverImage}
resizeMode={'cover'}
source={
coverImageUrl !== null && coverImageUrl.trim().length > 0
!!coverImageUrl && coverImageUrl.trim().length > 0
? { uri: coverImageUrl }
: require('../../assets/default_channel_cover.png')
}
@@ -887,14 +939,15 @@ export default class ChannelCreator extends React.PureComponent {
<View style={[channelCreatorStyle.avatarImageContainer, autoStyle]}>
<TouchableOpacity style={channelCreatorStyle.avatarTouchArea} onPress={this.onAvatarImagePress}>
{thumbnailUrl !== null && thumbnailUrl.trim().length > 0 && (
{!!thumbnailUrl && thumbnailUrl.trim().length > 0 && (
<Image
style={channelCreatorStyle.avatarImage}
resizeMode={'cover'}
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}>
{newChannelName.substring(0, 1).toUpperCase()}
</Text>
+3 -2
View File
@@ -11,7 +11,7 @@ import {
selectSubscriptionClaims,
selectUnreadSubscriptions,
} from 'lbryinc';
import { doPushDrawerStack } from 'redux/actions/drawer';
import { doPushDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
import { doSetClientSetting, doSetSortByItem, doSetTimeItem } from 'redux/actions/settings';
import { makeSelectClientSetting, selectSortByItem, selectTimeItem } from 'redux/selectors/settings';
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)),
removeUnreadSubscriptions: () => dispatch(doRemoveUnreadSubscriptions()),
setClientSetting: (key, value) => dispatch(doSetClientSetting(key, value)),
setPlayerVisible: () => dispatch(doSetPlayerVisible(false)),
setSortByItem: item => dispatch(doSetSortByItem(item)),
setTimeItem: item => dispatch(doSetTimeItem(item)),
});
export default connect(
select,
perform
perform,
)(DiscoverPage);
+24 -41
View File
@@ -37,29 +37,6 @@ class DiscoverPage extends React.PureComponent {
};
componentDidMount() {
// Track the total time taken if this is the first launch
AsyncStorage.getItem('firstLaunchTime').then(startTime => {
if (startTime !== null && !isNaN(parseInt(startTime, 10))) {
// We don't need this value anymore once we've retrieved it
AsyncStorage.removeItem('firstLaunchTime');
// We know this is the first app launch because firstLaunchTime is set and it"s a valid number
const start = parseInt(startTime, 10);
const now = moment().unix();
const delta = now - start;
AsyncStorage.getItem('firstLaunchSuspended').then(suspended => {
AsyncStorage.removeItem('firstLaunchSuspended');
const appSuspended = suspended === 'true';
if (NativeModules.Firebase) {
NativeModules.Firebase.track('first_run_time', {
total_seconds: delta,
app_suspended: appSuspended,
});
}
});
}
});
const { sortByItem, fetchRewardedContent, fileList, followedTags } = this.props;
this.buildTagCollection(followedTags);
@@ -86,9 +63,13 @@ class DiscoverPage extends React.PureComponent {
}
onComponentFocused = () => {
const { pushDrawerStack } = this.props;
// pushDrawerStack();
const { pushDrawerStack, setPlayerVisible, currentRoute } = this.props;
if (currentRoute === Constants.DRAWER_ROUTE_DISCOVER) {
pushDrawerStack();
}
NativeModules.Firebase.setCurrentScreen('Your tags');
setPlayerVisible();
};
handleSortByItemSelected = item => {
@@ -135,7 +116,7 @@ class DiscoverPage extends React.PureComponent {
Alert.alert(
__('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 +132,7 @@ class DiscoverPage extends React.PureComponent {
},
},
],
{ cancelable: false }
{ cancelable: false },
);
}
}
@@ -289,25 +270,27 @@ class DiscoverPage extends React.PureComponent {
);
render() {
const { navigation, sortByItem, timeItem } = this.props;
const { currentRoute, navigation, sortByItem, timeItem } = this.props;
const { orderBy, showModalTagSelector, showSortPicker, showTimePicker } = this.state;
return (
<View style={discoverStyle.container}>
<UriBar navigation={navigation} belowOverlay={showModalTagSelector} />
<SectionList
ListHeaderComponent={this.sectionListHeader}
ListFooterComponent={this.sectionListFooter}
style={discoverStyle.scrollContainer}
contentContainerStyle={discoverStyle.scrollPadding}
initialNumToRender={4}
maxToRenderPerBatch={4}
removeClippedSubviews
renderItem={this.renderSectionListItem}
renderSectionHeader={this.renderSectionHeader}
sections={this.buildSections()}
keyExtractor={(item, index) => item}
/>
{currentRoute !== Constants.ROUTE_FILE && currentRoute !== Constants.DRAWER_ROUTE_FILE_VIEW && (
<SectionList
ListHeaderComponent={this.sectionListHeader}
ListFooterComponent={this.sectionListFooter}
style={discoverStyle.scrollContainer}
contentContainerStyle={discoverStyle.scrollPadding}
initialNumToRender={4}
maxToRenderPerBatch={4}
removeClippedSubviews
renderItem={this.renderSectionListItem}
renderSectionHeader={this.renderSectionHeader}
sections={this.buildSections()}
keyExtractor={(item, index) => item}
/>
)}
{!showModalTagSelector && !showSortPicker && !showTimePicker && (
<FloatingWalletBalance navigation={navigation} />
)}
+8 -4
View File
@@ -79,7 +79,7 @@ class DownloadsPage extends React.PureComponent {
const { claims, fileInfos } = this.props;
const claimUris = claims.map(claim => normalizeURI(`${claim.name}#${claim.claim_id}`));
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: () => {
const uris = Object.keys(selectedClaimsMap);
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);
});
this.onExitSelectionMode();
@@ -135,7 +139,7 @@ class DownloadsPage extends React.PureComponent {
],
{
cancelable: true,
}
},
);
};
@@ -184,7 +188,7 @@ class DownloadsPage extends React.PureComponent {
this.handleSelectItem(item, claim);
} else {
// 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)}
+5 -12
View File
@@ -9,7 +9,6 @@ import {
doDeletePurchasedUri,
doResolveUri,
doResolveUris,
doSearch,
doSendTip,
doToast,
makeSelectIsUriResolving,
@@ -19,7 +18,6 @@ import {
makeSelectContentPositionForUri,
makeSelectContentTypeForUri,
makeSelectMetadataForUri,
makeSelectRecommendedContentForUri,
makeSelectStreamingUrlForUri,
makeSelectThumbnailForUri,
makeSelectTitleForUri,
@@ -29,8 +27,6 @@ import {
selectPurchasedUris,
selectFailedPurchaseUris,
selectPurchaseUriErrorMessage,
selectResolvingUris,
selectIsSearching,
} from 'lbry-redux';
import {
doClaimEligiblePurchaseRewards,
@@ -44,7 +40,7 @@ import {
import { doDeleteFile, doStopDownloadingFile } from 'redux/actions/file';
import { doPushDrawerStack, doPopDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
import { doToggleFullscreenMode } from 'redux/actions/settings';
import { selectDrawerStack } from 'redux/selectors/drawer';
import { selectDrawerStack, makeSelectPlayerVisible } from 'redux/selectors/drawer';
import FilePage from './view';
const select = (state, props) => {
@@ -64,6 +60,7 @@ const select = (state, props) => {
fileInfo: makeSelectFileInfoForUri(contentUri)(state),
rewardedContentClaimIds: selectRewardContentClaimIds(state, selectProps),
channelUri: makeSelectChannelForClaimUri(contentUri, true)(state),
isPlayerVisible: makeSelectPlayerVisible(uri)(state), // use navigation uri for this selector
position: makeSelectContentPositionForUri(contentUri)(state),
purchasedUris: selectPurchasedUris(state),
failedPurchaseUris: selectFailedPurchaseUris(state),
@@ -72,9 +69,6 @@ const select = (state, props) => {
streamingUrl: makeSelectStreamingUrlForUri(contentUri)(state),
thumbnail: makeSelectThumbnailForUri(contentUri)(state),
title: makeSelectTitleForUri(contentUri)(state),
recommendedContent: makeSelectRecommendedContentForUri(contentUri)(state),
resolvingUris: selectResolvingUris(state),
isSearchingRecommendContent: selectIsSearching(state),
viewCount: makeSelectViewCountForUri(contentUri)(state),
};
};
@@ -88,7 +82,7 @@ const perform = dispatch => ({
fetchFileInfo: uri => dispatch(doFetchFileInfo(uri)),
fetchCostInfo: uri => dispatch(doFetchCostInfoForUri(uri)),
fetchMyClaims: () => dispatch(doFetchClaimListMine()),
fetchChannelListMine: () => dispatch(doFetchChannelListMine()),
fetchChannelListMine: () => dispatch(doFetchChannelListMine(1, 99999, true)),
fetchViewCount: claimId => dispatch(doFetchViewCount(claimId)),
fileGet: (uri, saveFile) => dispatch(doFileGet(uri, saveFile)),
notify: data => dispatch(doToast(data)),
@@ -98,15 +92,14 @@ const perform = dispatch => ({
deletePurchasedUri: uri => dispatch(doDeletePurchasedUri(uri)),
resolveUri: uri => dispatch(doResolveUri(uri)),
resolveUris: uris => dispatch(doResolveUris(uris)),
searchRecommended: query => dispatch(doSearch(query, 20, undefined, true)),
sendTip: (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)),
toggleFullscreenMode: mode => dispatch(doToggleFullscreenMode(mode)),
});
export default connect(
select,
perform
perform,
)(FilePage);
+547 -300
View File
File diff suppressed because it is too large. Load diff
+46
View File
@@ -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(1, 99999, true)),
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);
+244
View File
@@ -0,0 +1,244 @@
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';
import { fetchReferralCode, logPublish } from 'utils/helper';
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 => {
fetchReferralCode(
response => {
if (response && response.length > 0) {
// only need to use the first referral code.
// inviteLink will be updated after channels are loaded (if the user has created at least one channel)
this.setState({ inviteLink: `https://lbry.tv/$/invite/${response[0]}` });
}
fetchChannelListMine();
},
error => {
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];
logPublish(channel);
this.setState({ channelName, inviteLink: this.getLinkForChannel(channel) });
}
}
};
getLinkForChannel = channel => {
const parsedUrl = channel.canonical_url ? parseURI(channel.canonical_url) : parseURI(channel.permanent_url);
const { claimId, claimName } = parsedUrl;
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];
logPublish(firstChannel);
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;
+3 -1
View File
@@ -1,6 +1,7 @@
import { connect } from 'react-redux';
import {
doPublish,
doFetchClaimListMine,
doResolveUri,
doToast,
doUpdatePublishForm,
@@ -27,6 +28,7 @@ const select = state => ({
const perform = dispatch => ({
notify: data => dispatch(doToast(data)),
clearPublishFormState: () => dispatch(doClearPublishFormState()),
fetchMyClaims: () => dispatch(doFetchClaimListMine()),
pendingPublishSuccess: pendingClaim => dispatch(doPendingPublishSuccess(pendingClaim)),
updatePublishForm: value => dispatch(doUpdatePublishForm(value)),
updatePublishFormState: data => dispatch(doUpdatePublishFormState(data)),
@@ -39,5 +41,5 @@ const perform = dispatch => ({
export default connect(
select,
perform
perform,
)(PublishPage);
+128 -32
View File
@@ -16,6 +16,7 @@ import {
} from 'react-native';
import { FlatGrid } from 'react-native-super-grid';
import {
Lbry,
isNameValid,
batchActions,
buildURI,
@@ -46,7 +47,7 @@ import Tag from 'component/tag';
import TagSearch from 'component/tagSearch';
import UriBar from 'component/uriBar';
import publishStyle from 'styles/publish';
import { navigateToUri, logPublish, uploadImageAsset } from 'utils/helper';
import { navigateToUri, navigateBack, logPublish, uploadImageAsset } from 'utils/helper';
const languages = {
en: 'English',
@@ -139,6 +140,9 @@ class PublishPage extends React.PureComponent {
// other
publishStarted: false,
storagePermissionRequired: false,
hasReturnedBack: false,
returnUrl: null,
};
didFocusListener;
@@ -160,6 +164,8 @@ class PublishPage extends React.PureComponent {
DeviceEventEmitter.removeListener('onAllGalleryThumbnailsChecked', this.handleAllGalleryThumbnailsChecked);
DeviceEventEmitter.removeListener('onDocumentPickerFilePicked', this.onFilePicked);
DeviceEventEmitter.removeListener('onDocumentPickerCanceled', this.onPickerCanceled);
DeviceEventEmitter.removeListener('onStoragePermissionGranted', this.handleStoragePermissionGranted);
DeviceEventEmitter.removeListener('onStoragePermissionRefused', this.handleStoragePermissionRefused);
}
handleGalleryThumbnailChecked = evt => {
@@ -182,28 +188,57 @@ class PublishPage extends React.PureComponent {
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 = () => {
const { balance, hasFormState, pushDrawerStack, setPlayerVisible, navigation } = this.props;
const { balance, fetchMyClaims, hasFormState, pushDrawerStack, setPlayerVisible, navigation } = this.props;
NativeModules.Firebase.setCurrentScreen('Publish').then(result => {
pushDrawerStack(Constants.DRAWER_ROUTE_PUBLISH, navigation.state.params ? navigation.state.params : null);
setPlayerVisible();
DeviceEventEmitter.addListener('onStoragePermissionGranted', this.handleStoragePermissionGranted);
DeviceEventEmitter.addListener('onStoragePermissionRefused', this.handleStoragePermissionRefused);
NativeModules.Gallery.canUseCamera().then(canUseCamera => this.setState({ canUseCamera }));
NativeModules.Gallery.getThumbnailPath().then(thumbnailPath => this.setState({ thumbnailPath }));
this.setState(
{
loadingVideos: true,
},
() => {
NativeModules.Gallery.getVideos().then(videos => this.setState({ videos, loadingVideos: false }));
fetchMyClaims();
NativeModules.UtilityModule.canReadWriteStorage().then(canReadWrite => {
if (!canReadWrite) {
this.setState({ storagePermissionRequired: true }, () =>
NativeModules.UtilityModule.requestStoragePermission(),
);
} else {
// Can only load videos when the storage permission is granted
this.loadVideos();
}
);
});
// Check if this is an edit action
let isEditMode = false,
vanityUrlSet = false;
if (navigation.state.params) {
const { displayForm, editMode, claimToEdit, vanityUrl } = navigation.state.params;
const { displayForm, editMode, claimToEdit, vanityUrl, returnUrl } = navigation.state.params;
if (editMode) {
this.prepareEdit(claimToEdit);
isEditMode = true;
@@ -217,6 +252,7 @@ class PublishPage extends React.PureComponent {
vanityUrl: claimName,
});
}
this.setState({ returnUrl });
}
if (!isEditMode && hasFormState) {
@@ -288,7 +324,7 @@ class PublishPage extends React.PureComponent {
this.handleChannelChange(channelName);
}
pushDrawerStack(Constants.DRAWER_ROUTE_PUBLISH_FORM);
}
},
);
};
@@ -324,7 +360,7 @@ class PublishPage extends React.PureComponent {
};
handlePublishPressed = () => {
const { balance, notify, publish, updatePublishForm } = this.props;
const { balance, myClaims, notify, publish, updatePublishForm } = this.props;
const {
editMode,
bid,
@@ -356,18 +392,34 @@ class PublishPage extends React.PureComponent {
}
if (!title || title.trim().length === 0) {
notify({ message: __('Please provide a title') });
notify({ message: __('Please provide a title'), isError: true });
return;
}
if (!name) {
notify({ message: __('Please specify an address where people can find your content.') });
notify({ message: __('Please specify an address where people can find your content.'), isError: true });
return;
}
if (!isNameValid(name, false)) {
notify({ message: __('Your content address contains invalid characters.'), isError: true });
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) {
// sanity check. normally shouldn't happen
notify({ message: __('No file selected. Please select a video or take a photo before publishing.') });
notify({
message: __('No file selected. Please select a video or take a photo before publishing.'),
isError: true,
});
return;
}
@@ -423,7 +475,15 @@ class PublishPage extends React.PureComponent {
}
componentWillReceiveProps(nextProps) {
const { currentRoute: prevRoute, drawerStack: prevDrawerStack, notify, updatePublishFormState } = this.props;
const {
currentRoute: prevRoute,
drawerStack: prevDrawerStack,
popDrawerStack,
setPlayerVisible,
navigation,
notify,
updatePublishFormState,
} = this.props;
const { currentRoute, drawerStack, publishFormValues } = nextProps;
if (Constants.DRAWER_ROUTE_PUBLISH === currentRoute && currentRoute !== prevRoute) {
@@ -437,6 +497,11 @@ class PublishPage extends React.PureComponent {
) {
// navigated back from the form
this.showSelector();
if (!this.state.hasReturnedBack && this.state.returnUrl) {
this.setState({ hasReturnedBack: true }, () => {
navigateBack(navigation, drawerStack, popDrawerStack, setPlayerVisible);
});
}
}
}
@@ -456,7 +521,7 @@ class PublishPage extends React.PureComponent {
() => {
this.handleNameChange(this.state.name);
pushDrawerStack(Constants.DRAWER_ROUTE_PUBLISH_FORM);
}
},
);
}
@@ -510,7 +575,7 @@ class PublishPage extends React.PureComponent {
clearPublishFormState();
// reset thumbnail
updatePublishForm({ thumbnail: null });
}
},
);
}
@@ -537,7 +602,7 @@ class PublishPage extends React.PureComponent {
},
() => {
NativeModules.UtilityModule.openDocumentPicker('*/*');
}
},
);
};
@@ -583,12 +648,12 @@ class PublishPage extends React.PureComponent {
() => {
// upload a new thumbnail
uploadImageAsset(fileUrl, this.handleThumbnailUploadSuccess, this.handleThumbnailUploadFailure);
}
},
);
}
} else {
// 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 });
}
};
@@ -634,7 +699,7 @@ class PublishPage extends React.PureComponent {
videoRecordingMode: false,
recordingVideo: false,
},
() => pushDrawerStack(Constants.DRAWER_ROUTE_PUBLISH_FORM)
() => pushDrawerStack(Constants.DRAWER_ROUTE_PUBLISH_FORM),
);
});
}
@@ -658,7 +723,7 @@ class PublishPage extends React.PureComponent {
showCameraOverlay: false,
videoRecordingMode: false,
},
() => pushDrawerStack(Constants.DRAWER_ROUTE_PUBLISH)
() => pushDrawerStack(Constants.DRAWER_ROUTE_PUBLISH),
);
});
}
@@ -777,8 +842,8 @@ class PublishPage extends React.PureComponent {
uploadImageAsset(
this.getFilePathFromUri(uri),
this.handleThumbnailUploadSuccess,
this.handleThumbnailUploadFailure
)
this.handleThumbnailUploadFailure,
),
);
}
} else if (mediaType === 'image' || mediaType === 'video') {
@@ -791,7 +856,7 @@ class PublishPage extends React.PureComponent {
this.setState({ currentThumbnailUri: `file://${path}`, updatingThumbnailUri: false });
if (!this.state.uploadedThumbnailUri) {
this.setState({ uploadThumbnailStarted: true }, () =>
uploadImageAsset(path, this.handleThumbnailUploadSuccess, this.handleThumbnailUploadFailure)
uploadImageAsset(path, this.handleThumbnailUploadSuccess, this.handleThumbnailUploadFailure),
);
}
})
@@ -817,7 +882,7 @@ class PublishPage extends React.PureComponent {
},
() => {
this.handleNameChange(this.state.name);
}
},
);
}
};
@@ -881,10 +946,33 @@ class PublishPage extends React.PureComponent {
},
() => {
NativeModules.UtilityModule.openDocumentPicker('image/*');
}
},
);
};
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() {
const { balance, navigation, notify, publishFormValues } = this.props;
const {
@@ -894,6 +982,7 @@ class PublishPage extends React.PureComponent {
currentPhase,
checkedThumbnails,
loadingVideos,
storagePermissionRequired,
thumbnailPath,
videos,
} = this.state;
@@ -935,13 +1024,20 @@ class PublishPage extends React.PureComponent {
</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}>
<ActivityIndicator size="small" color={Colors.NextLbryGreen} />
<Text style={publishStyle.loadingText}>{__('Please wait while we load your videos...')}</Text>
</View>
)}
{!loadingVideos && (!videos || videos.length === 0) && (
{!storagePermissionRequired && !loadingVideos && (!videos || videos.length === 0) && (
<View style={publishStyle.relativeCentered}>
<Text style={publishStyle.noVideos}>
{__('We could not find any videos on your device. Take a photo or record a video to get started.')}
@@ -1112,7 +1208,7 @@ class PublishPage extends React.PureComponent {
{__('The address where people can find your content (ex. lbry://myvideo). ')}
{this.state.editMode &&
__(
'You cannot change this address while editing your content. If you wish to use a new address, please republish the content.'
'You cannot change this address while editing your content. If you wish to use a new address, please republish the content.',
)}
</Text>
@@ -1262,7 +1358,7 @@ class PublishPage extends React.PureComponent {
</View>
<Text style={publishStyle.successText}>
{__(
'Your content will be live in a few minutes. In the mean time, feel free to publish more content or explore the app.'
'Your content will be live in a few minutes. In the mean time, feel free to publish more content or explore the app.',
)}
</Text>
</View>
+33 -2
View File
@@ -11,6 +11,10 @@ import RewardEnrolment from 'component/rewardEnrolment';
import UriBar from 'component/uriBar';
import rewardStyle from 'styles/reward';
const FILTER_ALL = 'all';
const FILTER_AVAILABLE = 'available';
const FILTER_CLAIMED = 'claimed';
class RewardsPage extends React.PureComponent {
state = {
isEmailVerified: false,
@@ -19,6 +23,7 @@ class RewardsPage extends React.PureComponent {
verifyRequestStarted: false,
revealVerification: true,
firstRewardClaimed: false,
currentFilter: FILTER_AVAILABLE,
};
scrollView = null;
@@ -182,8 +187,13 @@ class RewardsPage extends React.PureComponent {
});
};
setFilter = filter => {
this.setState({ currentFilter: filter });
};
render() {
const { user, navigation } = this.props;
const { currentFilter } = this.state;
return (
<View style={rewardStyle.container}>
@@ -197,8 +207,29 @@ class RewardsPage extends React.PureComponent {
style={rewardStyle.scrollContainer}
contentContainerStyle={rewardStyle.scrollContentContainer}
>
{this.renderUnclaimedRewards()}
{this.renderClaimedRewards()}
<View style={rewardStyle.filterHeader}>
<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>
)}
</View>
+17 -9
View File
@@ -1,40 +1,48 @@
import { connect } from 'react-redux';
import {
doClaimSearch,
doSearch,
doResolveUris,
doResolvedSearch,
doUpdateSearchQuery,
makeSelectResolvedSearchResults,
makeSelectResolvedSearchResultsLastPageReached,
makeSelectSearchUris,
selectClaimSearchByQuery,
selectIsSearching,
selectResolvingUris,
selectSearchValue,
makeSelectQueryWithOptions,
selectSearchUrisByQuery,
} from 'lbry-redux';
import { doPushDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
import { selectCurrentRoute } from 'redux/selectors/drawer';
import { selectShowNsfw } from 'redux/selectors/settings';
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
import SearchPage from './view';
const numSearchResults = 25;
const select = state => ({
claimSearchByQuery: selectClaimSearchByQuery(state),
currentRoute: selectCurrentRoute(state),
isSearching: selectIsSearching(state),
query: selectSearchValue(state),
uris: makeSelectSearchUris(makeSelectQueryWithOptions(null, numSearchResults)(state))(state),
urisByQuery: selectSearchUrisByQuery(state),
resolvingUris: selectResolvingUris(state),
showNsfwContent: selectShowNsfw(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 => ({
search: query => dispatch(doSearch(query, numSearchResults)),
search: (query, from, nsfw) => dispatch(doResolvedSearch(query, Constants.DEFAULT_PAGE_SIZE, from, false, {}, nsfw)),
claimSearch: options => dispatch(doClaimSearch(options)),
updateSearchQuery: query => dispatch(doUpdateSearchQuery(query)),
pushDrawerStack: () => dispatch(doPushDrawerStack(Constants.DRAWER_ROUTE_SEARCH)),
pushDrawerStack: (routeName, params) => dispatch(doPushDrawerStack(routeName, params)),
resolveUris: uris => dispatch(doResolveUris(uris)),
setPlayerVisible: () => dispatch(doSetPlayerVisible(false)),
});
export default connect(
select,
perform
perform,
)(SearchPage);
+92 -24
View File
@@ -15,17 +15,23 @@ import Colors from 'styles/colors';
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
import PageHeader from 'component/pageHeader';
import FileListItem from 'component/fileListItem';
import ClaimResultItem from 'component/claimResultItem';
import FloatingWalletBalance from 'component/floatingWalletBalance';
import UriBar from 'component/uriBar';
import searchStyle from 'styles/search';
const softLimit = 500;
class SearchPage extends React.PureComponent {
state = {
currentQuery: null,
currentFrom: 0,
currentUri: null,
showTagResult: false,
claimSearchRun: false,
claimSearchOptions: null,
resultsResolved: false,
tagResultDisplayed: false,
};
static navigationOptions = {
@@ -46,20 +52,23 @@ class SearchPage extends React.PureComponent {
}
onComponentFocused = () => {
const { pushDrawerStack, setPlayerVisible, query, search } = this.props;
pushDrawerStack();
const { pushDrawerStack, setPlayerVisible, navigation, query, search, showNsfwContent } = this.props;
setPlayerVisible();
pushDrawerStack(Constants.DRAWER_ROUTE_SEARCH, navigation.state.params ? navigation.state.params : null);
NativeModules.Firebase.setCurrentScreen('Search').then(result => {
const searchQuery = query || this.getSearchQuery();
if (searchQuery && searchQuery.trim().length > 0) {
this.setState({
currentFrom: 0,
currentQuery: searchQuery,
currentUri: isURIValid(searchQuery) ? normalizeURI(searchQuery) : null,
claimSearchOptions: null,
claimSearchRun: false,
showTagResult: false,
resultsResolved: false,
tagResultDisplayed: false,
});
search(searchQuery);
search(searchQuery, 0, showNsfwContent);
}
});
};
@@ -69,8 +78,8 @@ class SearchPage extends React.PureComponent {
}
componentWillReceiveProps(nextProps) {
const { currentRoute, query } = nextProps;
const { currentRoute: prevRoute, search } = this.props;
const { currentRoute, query, isSearching } = nextProps;
const { currentRoute: prevRoute, search, isSearching: prevIsSearching, showNsfwContent } = this.props;
if (Constants.DRAWER_ROUTE_SEARCH === currentRoute && currentRoute !== prevRoute) {
this.onComponentFocused();
@@ -78,10 +87,43 @@ class SearchPage extends React.PureComponent {
if (query && query.trim().length > 0 && query !== this.state.currentQuery) {
this.setState({
currentFrom: 0,
currentQuery: query,
currentUri: isURIValid(query) ? normalizeURI(query) : null,
resultsResolved: false,
tagResultDisplayed: false,
});
search(query);
search(query, 0, showNsfwContent);
}
}
allContentResolved(props) {
const { uris, resolvingUris } = props;
if (!this.state.resultsResolved) {
return false;
}
if (uris) {
let allResolved = true;
uris.forEach(uri => {
allResolved = allResolved && !resolvingUris.includes(uri);
});
return allResolved;
}
return false;
}
/* shouldComponentUpdate(nextProps) {
const { isSearching, uris } = this.props;
return (isSearching && (!uris || uris.length === 0)) || (!isSearching && this.allContentResolved(this.props));
} */
componentDidUpdate() {
const { claimSearchByQuery } = this.props;
if (this.state.claimSearchRun && this.state.claimSearchOptions && !this.state.tagResultDisplayed) {
const claimSearchKey = createNormalizedClaimSearchKey(this.state.claimSearchOptions);
const claimSearchUris = claimSearchByQuery[claimSearchKey];
this.setState({ showTagResult: claimSearchUris && claimSearchUris.length > 0, tagResultDisplayed: true });
}
}
@@ -94,14 +136,18 @@ class SearchPage extends React.PureComponent {
}
handleSearchSubmitted = keywords => {
const { search } = this.props;
const { search, showNsfwContent } = this.props;
this.setState({
currentUri: isURIValid(keywords) ? normalizeURI(keywords) : null,
currentFrom: 0,
currentQuery: keywords,
claimSearchOptions: null,
claimSearchRun: false,
showTagResult: false,
resultsResolved: false,
tagResultDisplayed: false,
});
search(keywords);
search(keywords, 0, showNsfwContent);
};
listEmptyComponent = () => {
@@ -115,27 +161,20 @@ class SearchPage extends React.PureComponent {
);
};
listHeaderComponent = showTagResult => {
const { navigation, claimSearch, claimSearchByQuery } = this.props;
listHeaderComponent = (showTagResult, query) => {
const { navigation, claimSearch } = this.props;
const { currentUri } = this.state;
const query = this.getSearchQuery();
const canBeTag = query && query.trim().length > 0 && isURIValid(query);
if (canBeTag && !this.state.claimSearchRun) {
const options = {
any_tags: [query],
any_tags: [query.toLowerCase()],
page: 1,
no_totals: true,
};
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 (
<View>
<FileListItem uri={currentUri} featuredResult style={searchStyle.featuredResultItem} navigation={navigation} />
@@ -154,14 +193,29 @@ class SearchPage extends React.PureComponent {
navigation.navigate({ routeName: Constants.DRAWER_ROUTE_TAG, key: `tagPage`, params: { tag: tag.toLowerCase() } });
};
handleVerticalEndReached = () => {
// fetch more results
const { lastPageReached, results, search, showNsfwContent, 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, showNsfwContent);
});
}
};
render() {
const { isSearching, navigation, query, uris, urisByQuery } = this.props;
const { isSearching, navigation, query, results } = this.props;
return (
<View style={searchStyle.container}>
<UriBar value={query} navigation={navigation} onSearchSubmitted={this.handleSearchSubmitted} />
{isSearching && (
{isSearching && this.state.currentFrom === 0 && (
<View style={searchStyle.busyContainer}>
<ActivityIndicator size="large" color={Colors.NextLbryGreen} style={searchStyle.loading} />
</View>
@@ -172,17 +226,31 @@ class SearchPage extends React.PureComponent {
style={searchStyle.scrollContainer}
contentContainerStyle={searchStyle.scrollPadding}
keyboardShouldPersistTaps={'handled'}
data={uris}
keyExtractor={(item, index) => item}
data={results}
keyExtractor={(item, index) => item.claimId}
initialNumToRender={10}
maxToRenderPerBatch={20}
onEndReached={this.handleVerticalEndReached}
onEndReachedThreshold={0.2}
removeClippedSubviews
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 }) => (
<FileListItem key={item} uri={item} style={searchStyle.resultItem} 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} />
</View>
);
+5 -3
View File
@@ -4,22 +4,25 @@ import {
doAuthenticate,
doBlackListedOutpointsSubscribe,
doFilteredOutpointsSubscribe,
doCheckSubscriptionsInit,
doFetchMySubscriptions,
doFetchRewardedContent,
doGetSync,
doUserEmailToVerify,
doUserEmailVerify,
doUserEmailVerifyFailure,
selectAuthenticationIsPending,
selectUser,
selectEmailToVerify,
} from 'lbryinc';
import { doSetClientSetting } from 'redux/actions/settings';
import { selectLastRouteInStack } from 'redux/selectors/drawer';
import SplashScreen from './view';
const select = state => ({
authIsPending: selectAuthenticationIsPending(state),
user: selectUser(state),
emailToVerify: selectEmailToVerify(state),
lastRouteInStack: selectLastRouteInStack(state),
});
const perform = dispatch => ({
@@ -27,7 +30,6 @@ const perform = dispatch => ({
balanceSubscribe: () => dispatch(doBalanceSubscribe()),
blacklistedOutpointsSubscribe: () => dispatch(doBlackListedOutpointsSubscribe()),
filteredOutpointsSubscribe: () => dispatch(doFilteredOutpointsSubscribe()),
checkSubscriptionsInit: () => dispatch(doCheckSubscriptionsInit()),
fetchRewardedContent: () => dispatch(doFetchRewardedContent()),
fetchSubscriptions: callback => dispatch(doFetchMySubscriptions(callback)),
getSync: (password, callback) => dispatch(doGetSync(password, callback)),
@@ -42,5 +44,5 @@ const perform = dispatch => ({
export default connect(
select,
perform
perform,
)(SplashScreen);
+40 -51
View File
@@ -1,5 +1,5 @@
import React from 'react';
import { Lbry, doPreferenceGet } from 'lbry-redux';
import { Lbry, doPreferenceGet, isURIValid } from 'lbry-redux';
import { Lbryio } from 'lbryinc';
import { ActivityIndicator, DeviceEventEmitter, Linking, NativeModules, Platform, Text, View } from 'react-native';
import { NavigationActions, StackActions } from 'react-navigation';
@@ -11,7 +11,7 @@ import Button from 'component/button';
import ProgressBar from 'component/progressBar';
import PropTypes from 'prop-types';
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 RNFS from 'react-native-fs';
@@ -43,7 +43,7 @@ class SplashScreen extends React.PureComponent {
}
navigateToMain = () => {
const { navigation, notify, verifyUserEmail, verifyUserEmailFailure } = this.props;
const { lastRouteInStack, navigation, notify, verifyUserEmail, verifyUserEmailFailure } = this.props;
const resetAction = StackActions.reset({
index: 0,
actions: [NavigationActions.navigate({ routeName: 'Main' })],
@@ -55,31 +55,21 @@ class SplashScreen extends React.PureComponent {
? navigation.state.params.launchUrl
: this.state.launchUrl;
if (launchUrl) {
if (launchUrl.startsWith('lbry://?verify=')) {
let verification = {};
try {
verification = JSON.parse(atob(launchUrl.substring(15)));
} catch (error) {
console.log(error);
navigateToUri(navigation, transformUrl(launchUrl));
} else if (lastRouteInStack) {
// no launch url, check if there's a last route in stack to navigate to.
const { route, params } = lastRouteInStack;
if (route) {
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));
}
}
// splash screen is done at this point, next page to be displayed will be user-interactable
NativeModules.Firebase.logLaunchTiming();
};
componentWillReceiveProps(nextProps) {
@@ -94,9 +84,9 @@ class SplashScreen extends React.PureComponent {
NativeModules.UtilityModule.getSecureValue(Constants.KEY_WALLET_PASSWORD).then(walletPassword => {
getSync(walletPassword, () => {
this.getUserSettings();
this.navigateToMain();
});
});
this.navigateToMain();
return;
}
@@ -130,39 +120,38 @@ class SplashScreen extends React.PureComponent {
authenticate,
balanceSubscribe,
blacklistedOutpointsSubscribe,
checkSubscriptionsInit,
filteredOutpointsSubscribe,
getSync,
updateBlockHeight,
user,
} = this.props;
Lbry.resolve({ urls: 'lbry://one' }).then(() => {
// Leave the splash screen
balanceSubscribe();
blacklistedOutpointsSubscribe();
filteredOutpointsSubscribe();
checkSubscriptionsInit();
// Lbry.resolve({ urls: 'lbry://one' }).then(() => {
// Leave the splash screen
balanceSubscribe();
blacklistedOutpointsSubscribe();
filteredOutpointsSubscribe();
if (user && user.id && user.has_verified_email) {
// user already authenticated
NativeModules.UtilityModule.getSecureValue(Constants.KEY_WALLET_PASSWORD).then(walletPassword => {
getSync(walletPassword, () => {
this.getUserSettings();
this.navigateToMain();
});
if (user && user.id && user.has_verified_email) {
// user already authenticated
NativeModules.UtilityModule.getSecureValue(Constants.KEY_WALLET_PASSWORD).then(walletPassword => {
getSync(walletPassword, () => {
this.getUserSettings();
});
} else {
NativeModules.VersionInfo.getAppVersion().then(appVersion => {
this.setState({ shouldAuthenticate: true });
});
this.navigateToMain();
} else {
NativeModules.VersionInfo.getAppVersion().then(appVersion => {
this.setState({ shouldAuthenticate: true }, () => {
NativeModules.Firebase.getMessagingToken()
.then(firebaseToken => {
authenticate(appVersion, Platform.OS, firebaseToken);
})
.catch(() => authenticate(appVersion, Platform.OS));
});
}
});
});
}
// });
};
handleAccountUnlockFailed() {
@@ -200,8 +189,8 @@ class SplashScreen extends React.PureComponent {
Lbry.wallet_unlock({ password: password || '' }).then(unlocked => {
if (unlocked) {
this.setState({
message: __('Testing network'),
details: __('Waiting for name resolution'),
message: __('Authenticating'),
details: __('Waiting for authentication'),
});
this.finishSplashScreen();
} else {
@@ -210,8 +199,8 @@ class SplashScreen extends React.PureComponent {
});
} else {
this.setState({
message: __('Testing network'),
details: __('Waiting for name resolution'),
message: __('Authenticating'),
details: __('Waiting for authentication'),
});
this.finishSplashScreen();
}
@@ -315,8 +304,8 @@ class SplashScreen extends React.PureComponent {
this.setState(
{
accountUnlockFailed: false,
message: __('Testing network'),
details: __('Waiting for name resolution'),
message: __('Authenticating'),
details: __('Waiting for authentication'),
},
() => this.finishSplashScreen(),
);
+4 -1
View File
@@ -115,7 +115,10 @@ class SubscriptionsPage extends React.PureComponent {
unsubscribeShortChannelUrls = () => {
// this should only have to happen once
const { subscribedChannels, channelUnsubscribe } = this.props;
const badSubs = subscribedChannels.filter(sub => sub.uri.split('#')[1].length < 5);
const badSubs = subscribedChannels.filter(sub => {
const parts = sub.uri.split('#');
return parts.length === 1 || parts[1].length < 5;
});
if (badSubs.length > 0) {
badSubs.forEach(sub => channelUnsubscribe(sub));
}
@@ -34,6 +34,7 @@ class PhoneVerifyPage extends React.PureComponent {
codeVerifyStarted: false,
codeVerifySuccessful: false,
countryCode: null,
countryPickerVisible: false,
newPhoneAdded: false,
number: null,
phoneVerifyFailed: false,
@@ -125,15 +126,15 @@ class PhoneVerifyPage extends React.PureComponent {
};
onPressFlag = () => {
if (this.picker) {
this.picker.openModal();
}
this.setState({ countryPickerVisible: true });
};
selectCountry(country) {
selectCountry = country => {
this.phoneInput.selectCountry(country.cca2.toLowerCase());
this.setState({ cca2: country.cca2 });
}
this.setState({ cca2: country.cca2, countryPickerVisible: false }, () => {
this.phoneInput.focus();
});
};
handleChangeText = text => {
this.setState({ verificationCode: text });
@@ -233,17 +234,17 @@ class PhoneVerifyPage extends React.PureComponent {
</View>
<CountryPicker
ref={picker => {
this.picker = picker;
}}
cca2={this.state.cca2}
filterable
onChange={value => this.selectCountry(value)}
showCallingCode
countryCode={this.state.cca2}
withAlphaFilter
withFilter
withFlag
withFlagButton={false}
withCallingCode
withModal
onSelect={this.selectCountry}
translation="eng"
>
<View />
</CountryPicker>
modalProps={{ visible: this.state.countryPickerVisible }}
/>
</View>
);
}
+2
View File
@@ -3,6 +3,7 @@ import { NativeModules, ScrollView, Text, View } from 'react-native';
import TransactionListRecent from 'component/transactionListRecent';
import WalletAddress from 'component/walletAddress';
import WalletBalance from 'component/walletBalance';
import WalletBalanceExtra from 'component/walletBalanceExtra';
import WalletSend from 'component/walletSend';
import WalletRewardsDriver from 'component/walletRewardsDriver';
import WalletSignIn from 'component/walletSignIn';
@@ -90,6 +91,7 @@ class WalletPage extends React.PureComponent {
>
{!rewardsNotInterested && (!balance || balance === 0) && <WalletRewardsDriver navigation={navigation} />}
<WalletBalance />
<WalletBalanceExtra />
<WalletAddress />
<WalletSend />
<TransactionListRecent navigation={navigation} />
+14 -4
View File
@@ -1,18 +1,28 @@
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
export const doPushDrawerStack = (routeName, params) => dispatch =>
export const doPushDrawerStack = (routeName, params) => dispatch => {
dispatch({
type: Constants.ACTION_PUSH_DRAWER_STACK,
data: { routeName, params },
});
export const doPopDrawerStack = () => dispatch =>
if (window.persistor) {
window.persistor.flush();
}
};
export const doPopDrawerStack = () => dispatch => {
dispatch({
type: Constants.ACTION_POP_DRAWER_STACK,
});
export const doSetPlayerVisible = visible => dispatch =>
if (window.persistor) {
window.persistor.flush();
}
};
export const doSetPlayerVisible = (visible, uri) => dispatch =>
dispatch({
type: Constants.ACTION_SET_PLAYER_VISIBLE,
data: { visible },
data: { visible, uri },
});
+18 -16
View File
@@ -59,22 +59,24 @@ export function doCompleteDownload(uri, outpoint, fileInfo) {
export function doStopDownloadingFile(uri, fileInfo) {
return dispatch => {
let params = { status: 'stop' };
if (fileInfo.sd_hash) {
params.sd_hash = fileInfo.sd_hash;
}
if (fileInfo.stream_hash) {
params.stream_hash = fileInfo.stream_hash;
}
if (fileInfo) {
if (fileInfo.sd_hash) {
params.sd_hash = fileInfo.sd_hash;
}
if (fileInfo.stream_hash) {
params.stream_hash = fileInfo.stream_hash;
}
Lbry.file_set_status(params).then(() => {
dispatch({
type: ACTIONS.DOWNLOADING_CANCELED,
data: { uri, outpoint: fileInfo.outpoint },
Lbry.file_set_status(params).then(() => {
dispatch({
type: ACTIONS.DOWNLOADING_CANCELED,
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
/*const myClaimsOutpoints = selectMyClaimsOutpoints(state);
/* const myClaimsOutpoints = selectMyClaimsOutpoints(state);
if (abandonClaim && myClaimsOutpoints.indexOf(outpoint) !== -1) {
const byOutpoint = selectFileInfosByOutpoint(state);
const fileInfo = byOutpoint[outpoint];
@@ -106,7 +108,7 @@ export function doDeleteFile(outpoint, deleteFromComputer, abandonClaim) {
dispatch(doAbandonClaim(txid, nout));
}
}*/
} */
dispatch({
type: ACTIONS.FILE_DELETE,
+27 -2
View File
@@ -3,14 +3,29 @@ import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
const reducers = {};
const defaultState = {
stack: [{ route: Constants.DRAWER_ROUTE_DISCOVER, params: {} }], // Discover is always the first drawer route
lastRouteInStack: {},
playerVisible: false,
playerVisibleByUri: {},
currentRoute: null,
};
reducers[Constants.ACTION_SET_PLAYER_VISIBLE] = (state, action) =>
Object.assign({}, state, {
reducers[Constants.ACTION_SET_PLAYER_VISIBLE] = (state, action) => {
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,
playerVisibleByUri,
});
};
reducers[Constants.ACTION_PUSH_DRAWER_STACK] = (state, action) => {
const { routeName, params } = action.data;
@@ -27,24 +42,34 @@ reducers[Constants.ACTION_PUSH_DRAWER_STACK] = (state, action) => {
if (lastRoute === Constants.DRAWER_ROUTE_PUBLISH_FORM && routeName === Constants.DRAWER_ROUTE_PUBLISH) {
canPushStack = false;
}
if (routeName === Constants.DRAWER_ROUTE_DISCOVER && newStack.length === 1) {
canPushStack = false;
}
let lastRouteInStack;
if (canPushStack) {
newStack.push({ route: routeName, params });
// save the route
lastRouteInStack = { route: routeName, params };
}
return {
...state,
stack: newStack,
lastRouteInStack,
};
};
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
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 {
...state,
stack: newStack,
lastRouteInStack,
};
};
+20 -4
View File
@@ -4,14 +4,25 @@ export const selectState = state => state.drawer || {};
export const selectDrawerStack = createSelector(
selectState,
state => state.stack
state => state.stack,
);
export const selectIsPlayerVisible = createSelector(
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(
selectState,
state => {
@@ -20,10 +31,15 @@ export const selectLastDrawerRoute = createSelector(
}
return null;
}
},
);
export const selectLastRouteInStack = createSelector(
selectState,
state => state.lastRouteInStack,
);
export const selectCurrentRoute = createSelector(
selectState,
state => state.currentRoute
state => state.currentRoute,
);
+9 -9
View File
@@ -32,14 +32,14 @@ const aboutStyle = StyleSheet.create({
title: {
color: Colors.LbryGreen,
fontSize: 24,
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
marginTop: 16,
marginLeft: 12,
marginRight: 12,
marginBottom: 8,
},
paragraph: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
lineHeight: 24,
marginLeft: 12,
@@ -53,13 +53,13 @@ const aboutStyle = StyleSheet.create({
},
link: {
color: Colors.LbryGreen,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
marginBottom: 24,
},
listLink: {
color: Colors.LbryGreen,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 15,
alignSelf: 'flex-end',
},
@@ -67,30 +67,30 @@ const aboutStyle = StyleSheet.create({
alignSelf: 'stretch',
},
socialTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
marginLeft: 12,
marginRight: 12,
marginBottom: 8,
fontSize: 20,
},
releaseInfoTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
marginLeft: 12,
marginRight: 12,
marginBottom: 12,
fontSize: 20,
},
text: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 15,
},
valueText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
textAlign: 'right',
fontSize: 15,
},
lineValueText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 15,
},
});
+1 -1
View File
@@ -29,7 +29,7 @@ const buttonStyle = StyleSheet.create({
color: Colors.DarkGrey,
},
text: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
textWithIcon: {
+15 -15
View File
@@ -17,7 +17,7 @@ const channelCreatorStyle = StyleSheet.create({
backgroundColor: Colors.PageBackground,
},
channelPicker: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
height: 52,
width: '100%',
@@ -27,7 +27,7 @@ const channelCreatorStyle = StyleSheet.create({
alignItems: 'center',
},
label: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
balance: {
@@ -36,24 +36,24 @@ const channelCreatorStyle = StyleSheet.create({
marginLeft: 24,
},
balanceText: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 14,
marginLeft: 4,
},
channelNameInput: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
paddingLeft: 20,
},
bidAmountInput: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
marginLeft: 16,
textAlign: 'right',
width: 80,
},
helpText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
color: Colors.DescriptionGrey,
},
@@ -68,7 +68,7 @@ const channelCreatorStyle = StyleSheet.create({
position: 'absolute',
left: 4,
top: 13,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
buttonContainer: {
@@ -90,7 +90,7 @@ const channelCreatorStyle = StyleSheet.create({
alignSelf: 'flex-end',
},
inlineError: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
color: Colors.Red,
marginTop: 2,
@@ -151,12 +151,12 @@ const channelCreatorStyle = StyleSheet.create({
alignItems: 'center',
},
channelListTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 18,
marginBottom: 4,
},
channelListName: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
channelListAvatar: {
@@ -189,13 +189,13 @@ const channelCreatorStyle = StyleSheet.create({
marginBottom: 4,
},
textInputTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
marginBottom: -10,
marginLeft: 4,
},
inputText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
toggleContainer: {
@@ -209,7 +209,7 @@ const channelCreatorStyle = StyleSheet.create({
marginRight: 16,
},
cardTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 20,
marginBottom: 8,
},
@@ -243,7 +243,7 @@ const channelCreatorStyle = StyleSheet.create({
},
editIcon: {
color: Colors.White,
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 12,
},
uploadProgress: {
@@ -262,7 +262,7 @@ const channelCreatorStyle = StyleSheet.create({
},
uploadText: {
color: Colors.White,
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 12,
marginLeft: 4,
},
+3 -3
View File
@@ -10,7 +10,7 @@ const channelIconStyle = StyleSheet.create({
alignSelf: 'flex-start',
},
placeholderText: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 14,
},
thumbnailContainer: {
@@ -39,14 +39,14 @@ const channelIconStyle = StyleSheet.create({
justifyContent: 'center',
},
title: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
width: 80,
marginTop: 4,
textAlign: 'center',
},
autothumbCharacter: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 48,
color: Colors.White,
},
+7 -7
View File
@@ -23,7 +23,7 @@ const channelPageStyle = StyleSheet.create({
},
title: {
color: Colors.LbryGreen,
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 30,
margin: 16,
},
@@ -34,7 +34,7 @@ const channelPageStyle = StyleSheet.create({
padding: 24,
},
infoText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 20,
textAlign: 'center',
},
@@ -62,7 +62,7 @@ const channelPageStyle = StyleSheet.create({
},
channelName: {
color: Colors.White,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 18,
padding: 2,
backgroundColor: '#000000aa',
@@ -98,7 +98,7 @@ const channelPageStyle = StyleSheet.create({
justifyContent: 'flex-end',
},
tabTitle: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 14,
color: Colors.White,
},
@@ -131,12 +131,12 @@ const channelPageStyle = StyleSheet.create({
padding: 24,
},
aboutTitle: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 16,
lineHeight: 24,
},
aboutText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
lineHeight: 24,
},
@@ -182,7 +182,7 @@ const channelPageStyle = StyleSheet.create({
marginRight: 8,
},
followerCount: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
color: Colors.White,
marginTop: 2,
+9 -9
View File
@@ -6,13 +6,13 @@ const channelSelectorStyle = StyleSheet.create({
flex: 1,
},
channelPicker: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
height: 52,
width: '100%',
},
channelPickerItem: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
bidRow: {
@@ -21,7 +21,7 @@ const channelSelectorStyle = StyleSheet.create({
alignItems: 'center',
},
label: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
balance: {
@@ -30,24 +30,24 @@ const channelSelectorStyle = StyleSheet.create({
marginLeft: 24,
},
balanceText: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 14,
marginLeft: 4,
},
channelNameInput: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
paddingLeft: 20,
},
bidAmountInput: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
marginLeft: 16,
textAlign: 'right',
width: 80,
},
helpText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
},
createChannelContainer: {
@@ -59,7 +59,7 @@ const channelSelectorStyle = StyleSheet.create({
position: 'absolute',
left: 4,
top: 13,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
buttonContainer: {
@@ -80,7 +80,7 @@ const channelSelectorStyle = StyleSheet.create({
backgroundColor: Colors.NextLbryGreen,
},
inlineError: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
color: Colors.Red,
marginTop: 2,
+1 -1
View File
@@ -13,7 +13,7 @@ const claimListStyle = StyleSheet.create({
},
noContentText: {
color: Colors.DescriptionGrey,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
margin: 16,
textAlign: 'center',
+3
View File
@@ -12,6 +12,7 @@ const Colors = {
TagGreen: '#e3f6f1',
TagGrape: '#da77f255',
LightGrey: '#cccccc',
ActionGrey: '#aaaaaa',
LighterGrey: '#e5e5e5',
Orange: '#ffbb00',
Red: '#ff0000',
@@ -24,6 +25,8 @@ const Colors = {
StatsAudio: '#f6a637',
StatsImage: '#ff4a7d',
StatsOther: '#26bcf7',
ThumbnailPlaceholder: '#d5d5d5',
};
export default Colors;
+28 -22
View File
@@ -55,11 +55,11 @@ const discoverStyle = StyleSheet.create({
alignItems: 'center',
},
pageTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 24,
},
customizeLink: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
trendingContainer: {
@@ -74,7 +74,7 @@ const discoverStyle = StyleSheet.create({
flexDirection: 'row',
},
title: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 20,
textAlign: 'center',
marginLeft: 10,
@@ -95,7 +95,7 @@ const discoverStyle = StyleSheet.create({
marginBottom: 56,
},
footerTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 20,
marginBottom: 10,
},
@@ -108,7 +108,7 @@ const discoverStyle = StyleSheet.create({
marginBottom: 12,
},
categoryName: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 18,
color: Colors.Black,
},
@@ -127,7 +127,7 @@ const discoverStyle = StyleSheet.create({
justifyContent: 'center',
},
moreText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
color: Colors.White,
fontSize: 24,
},
@@ -142,18 +142,18 @@ const discoverStyle = StyleSheet.create({
justifyContent: 'center',
},
fileItemName: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
marginTop: 8,
fontSize: 14,
},
channelName: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 12,
marginTop: 4,
color: Colors.LbryGreen,
},
anonChannelName: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 12,
marginTop: 4,
color: Colors.DescriptionGrey,
@@ -166,6 +166,8 @@ const discoverStyle = StyleSheet.create({
filePriceContainer: {
backgroundColor: Colors.NextLbryGreen,
justifyContent: 'center',
alignItems: 'center',
flexDirection: 'row',
position: 'absolute',
right: 8,
top: 8,
@@ -174,11 +176,15 @@ const discoverStyle = StyleSheet.create({
borderRadius: 4,
},
filePriceText: {
fontFamily: 'Inter-UI-Bold',
fontFamily: 'Inter-Bold',
fontSize: 12,
textAlign: 'center',
color: '#0c604b',
},
filePriceIcon: {
marginRight: 2,
color: '#0c604b',
},
rightHeaderIcon: {
marginRight: 16,
},
@@ -199,7 +205,7 @@ const discoverStyle = StyleSheet.create({
color: Colors.White,
fontSize: 14,
textAlign: 'center',
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
},
rewardTitleContainer: {
alignItems: 'center',
@@ -216,11 +222,11 @@ const discoverStyle = StyleSheet.create({
flex: 0.9,
},
menuText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
titleText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
},
detailsRow: {
flexDirection: 'row',
@@ -230,7 +236,7 @@ const discoverStyle = StyleSheet.create({
marginTop: 2,
},
dateTimeText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
color: Colors.DescriptionGrey,
},
@@ -253,7 +259,7 @@ const discoverStyle = StyleSheet.create({
flex: 1,
},
tagPageTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 24,
},
tagPageClaimList: {
@@ -282,7 +288,7 @@ const discoverStyle = StyleSheet.create({
alignItems: 'center',
},
tagSortText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
marginRight: 4,
},
@@ -290,7 +296,7 @@ const discoverStyle = StyleSheet.create({
marginTop: -6,
},
pickerLabel: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
color: Colors.DescriptionGrey,
marginRight: 6,
@@ -301,7 +307,7 @@ const discoverStyle = StyleSheet.create({
marginBottom: 8,
},
menuGroupName: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
color: Colors.DescriptionGrey,
textTransform: 'uppercase',
@@ -331,7 +337,7 @@ const discoverStyle = StyleSheet.create({
},
menuItem: {
marginLeft: 8,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
signInContainer: {
@@ -347,7 +353,7 @@ const discoverStyle = StyleSheet.create({
left: 16,
},
signedInEmail: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 15,
color: Colors.White,
},
@@ -382,13 +388,13 @@ const discoverStyle = StyleSheet.create({
},
signInMenuItemText: {
color: Colors.DescriptionGrey,
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 14,
textAlign: 'center',
},
signInMenuItemButtonText: {
color: Colors.White,
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 14,
textAlign: 'center',
},
+1 -2
View File
@@ -24,14 +24,13 @@ const downloadsStyle = StyleSheet.create({
paddingLeft: 16,
paddingRight: 16,
marginTop: 16,
marginBottom: 60,
},
scrollPadding: {
marginTop: -16,
paddingBottom: 16,
},
noDownloadsText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
lineHeight: 24,
marginLeft: 16,
+1 -1
View File
@@ -30,7 +30,7 @@ const emptyStateStyle = StyleSheet.create({
message: {
marginTop: 24,
textAlign: 'center',
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 18,
lineHeight: 28,
marginBottom: 24,
+1 -1
View File
@@ -11,7 +11,7 @@ const fileDownloadButtonStyle = StyleSheet.create({
backgroundColor: Colors.LbryGreen,
},
text: {
fontFamily: 'Inter-UI-Medium',
fontFamily: 'Inter-Medium',
color: Colors.White,
fontSize: 14,
textAlign: 'center',
+3 -3
View File
@@ -10,7 +10,7 @@ const fileItemMediaStyle = StyleSheet.create({
alignItems: 'center',
},
autothumbText: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
textAlign: 'center',
color: Colors.White,
fontSize: 40,
@@ -22,7 +22,7 @@ const fileItemMediaStyle = StyleSheet.create({
},
text: {
color: '#ffffff',
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
marginTop: 8,
},
@@ -45,7 +45,7 @@ const fileItemMediaStyle = StyleSheet.create({
paddingRight: 2,
},
durationText: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 12,
color: Colors.White,
},
+57 -12
View File
@@ -22,22 +22,42 @@ const fileListStyle = StyleSheet.create({
flex: 1,
},
featuredUri: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 24,
color: Colors.White,
},
featuredTitle: {
fontFamily: 'Inter-UI-SemiBold',
fontSize: screenWidthPixels <= 720 ? 12 : 16,
fontFamily: 'Inter-SemiBold',
fontSize: screenWidthPixels <= 720 ? 11 : 16,
color: Colors.White,
},
thumbnail: {
backgroundColor: Colors.ThumbnailPlaceholder,
width: thumbnailWidth,
height: thumbnailHeight,
marginRight: screenWidthPixels <= 720 ? 10 : 12,
alignItems: '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: {
position: 'absolute',
left: 0,
@@ -49,20 +69,23 @@ const fileListStyle = StyleSheet.create({
backgroundColor: '#000000aa',
},
title: {
fontFamily: 'Inter-UI-SemiBold',
fontSize: screenWidthPixels <= 720 ? 12 : 14,
fontFamily: 'Inter-SemiBold',
fontSize: screenWidthPixels <= 720 ? 11 : 14,
},
uri: {
fontFamily: 'Inter-UI-SemiBold',
fontSize: screenWidthPixels <= 720 ? 12 : 14,
fontFamily: 'Inter-SemiBold',
fontSize: screenWidthPixels <= 720 ? 11 : 14,
marginBottom: 8,
},
publisher: {
fontFamily: 'Inter-UI-SemiBold',
fontSize: screenWidthPixels <= 720 ? 11 : 12,
fontFamily: 'Inter-SemiBold',
fontSize: screenWidthPixels <= 720 ? 10 : 12,
marginTop: screenWidthPixels <= 720 ? 1 : 3,
color: Colors.LbryGreen,
},
channelContainer: {
alignItems: 'center',
},
loading: {
position: 'absolute',
},
@@ -72,15 +95,15 @@ const fileListStyle = StyleSheet.create({
justifyContent: 'space-between',
},
infoText: {
fontFamily: 'Inter-UI-Regular',
fontSize: screenWidthPixels <= 720 ? 11 : 12,
fontFamily: 'Inter-Regular',
fontSize: screenWidthPixels <= 720 ? 10 : 12,
color: Colors.ChannelGrey,
},
downloadInfo: {
marginTop: 2,
},
progress: {
marginTop: screenWidthPixels <= 720 ? 2 : 4,
marginTop: screenWidthPixels <= 720 ? 1 : 4,
},
progressCompleted: {
backgroundColor: Colors.LbryGreen,
@@ -120,6 +143,28 @@ const fileListStyle = StyleSheet.create({
marginLeft: 4,
marginTop: 4,
},
filePriceContainer: {
backgroundColor: Colors.NextLbryGreen,
justifyContent: 'center',
alignItems: 'center',
flexDirection: 'row',
position: 'absolute',
left: thumbnailWidth - 60,
top: 4,
width: 56,
height: 24,
borderRadius: 4,
},
filePriceText: {
fontFamily: 'Inter-Bold',
fontSize: 12,
textAlign: 'center',
color: '#0c604b',
},
filePriceIcon: {
marginRight: 2,
color: '#0c604b',
},
});
export default fileListStyle;
+30 -25
View File
@@ -38,7 +38,7 @@ const filePageStyle = StyleSheet.create({
marginBottom: -17,
},
emptyClaimText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
textAlign: 'center',
fontSize: 20,
marginLeft: 24,
@@ -54,7 +54,7 @@ const filePageStyle = StyleSheet.create({
flex: 1,
},
title: {
fontFamily: 'Inter-UI-Bold',
fontFamily: 'Inter-Bold',
fontSize: 16,
flex: 18,
alignSelf: 'flex-start',
@@ -65,7 +65,6 @@ const filePageStyle = StyleSheet.create({
titleRow: {
flexDirection: 'row',
marginTop: 12,
marginBottom: 2,
marginLeft: 12,
marginRight: 12,
alignItems: 'center',
@@ -89,17 +88,17 @@ const filePageStyle = StyleSheet.create({
marginTop: 6,
},
channelName: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 14,
color: Colors.LbryGreen,
},
anonChannelName: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
color: Colors.DescriptionGrey,
},
publishDateText: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 12,
color: Colors.DescriptionGrey,
},
@@ -108,12 +107,13 @@ const filePageStyle = StyleSheet.create({
},
description: {
color: Colors.DescriptionGrey,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 13,
lineHeight: 18,
marginTop: -8,
marginLeft: 12,
marginRight: 12,
marginBottom: 16,
},
thumbnail: {
width: screenWidth,
@@ -170,6 +170,8 @@ const filePageStyle = StyleSheet.create({
filePriceContainer: {
backgroundColor: Colors.NextLbryGreen,
justifyContent: 'center',
alignItems: 'center',
flexDirection: 'row',
position: 'absolute',
right: 16,
top: 16,
@@ -178,11 +180,14 @@ const filePageStyle = StyleSheet.create({
borderRadius: 4,
},
filePriceText: {
fontFamily: 'Inter-UI-Bold',
fontFamily: 'Inter-Bold',
fontSize: 12,
textAlign: 'center',
color: '#0c604b',
},
filePriceIcon: {
marginRight: 2,
},
actions: {
flexDirection: 'row',
justifyContent: 'space-between',
@@ -230,19 +235,19 @@ const filePageStyle = StyleSheet.create({
paddingRight: 24,
},
dmcaText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 18,
lineHeight: 24,
},
dmcaLink: {
color: Colors.LbryGreen,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 18,
lineHeight: 24,
marginTop: 24,
},
infoText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 20,
textAlign: 'center',
marginLeft: 10,
@@ -289,7 +294,7 @@ const filePageStyle = StyleSheet.create({
marginBottom: 14,
},
input: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
tipAmountInput: {
@@ -311,7 +316,7 @@ const filePageStyle = StyleSheet.create({
marginTop: -8,
},
text: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
lineHeight: 24,
},
@@ -327,17 +332,16 @@ const filePageStyle = StyleSheet.create({
tagContainer: {
marginLeft: 12,
marginRight: 12,
marginTop: 16,
marginBottom: 16,
flexDirection: 'row',
},
tagTitle: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
flex: 0.2,
marginTop: 4,
},
tagList: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
flex: 0.8,
flexDirection: 'row',
flexWrap: 'wrap',
@@ -359,7 +363,7 @@ const filePageStyle = StyleSheet.create({
marginRight: 8,
},
rewardDriverText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
color: Colors.White,
fontSize: 14,
},
@@ -395,11 +399,12 @@ const filePageStyle = StyleSheet.create({
flex: 0.2,
},
largeButtonIcon: {
color: Colors.DescriptionGrey,
color: Colors.ActionGrey,
},
largeButtonText: {
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
color: Colors.ActionGrey,
fontFamily: 'Inter-Regular',
fontSize: 12,
marginTop: 4,
},
largeButtonsRow: {
@@ -426,7 +431,7 @@ const filePageStyle = StyleSheet.create({
},
unsupportedContentFilename: {
color: Colors.LbryGreen,
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 16,
},
unsupportedContentImage: {
@@ -435,11 +440,11 @@ const filePageStyle = StyleSheet.create({
marginRight: 24,
},
unsupportedContentTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 20,
},
unsupportedContentText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
marginTop: 4,
},
@@ -447,7 +452,7 @@ const filePageStyle = StyleSheet.create({
marginTop: 16,
},
viewCount: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
color: Colors.DescriptionGrey,
marginLeft: 12,
@@ -459,7 +464,7 @@ const filePageStyle = StyleSheet.create({
marginLeft: 24,
},
balanceText: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 14,
marginLeft: 4,
},
+12 -12
View File
@@ -17,7 +17,7 @@ const firstRunStyle = StyleSheet.create({
backgroundColor: Colors.LbryGreen,
},
title: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 40,
marginLeft: 32,
marginRight: 32,
@@ -25,7 +25,7 @@ const firstRunStyle = StyleSheet.create({
color: Colors.White,
},
paragraph: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 18,
lineHeight: 24,
marginLeft: 32,
@@ -34,7 +34,7 @@ const firstRunStyle = StyleSheet.create({
color: Colors.White,
},
spacedParagraph: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 18,
lineHeight: 28,
marginLeft: 32,
@@ -43,7 +43,7 @@ const firstRunStyle = StyleSheet.create({
color: Colors.White,
},
infoParagraph: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
lineHeight: 20,
marginLeft: 32,
@@ -55,7 +55,7 @@ const firstRunStyle = StyleSheet.create({
marginTop: 36,
},
rowParagraph: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
lineHeight: 24,
color: Colors.White,
@@ -67,7 +67,7 @@ const firstRunStyle = StyleSheet.create({
marginRight: 8,
},
emailInput: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 24,
lineHeight: 24,
marginLeft: 32,
@@ -76,7 +76,7 @@ const firstRunStyle = StyleSheet.create({
textAlign: 'center',
},
passwordInput: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 24,
lineHeight: 24,
marginLeft: 32,
@@ -102,7 +102,7 @@ const firstRunStyle = StyleSheet.create({
actionButton: {
backgroundColor: Colors.White,
alignSelf: 'center',
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
paddingLeft: 16,
paddingRight: 16,
@@ -114,18 +114,18 @@ const firstRunStyle = StyleSheet.create({
paddingRight: 32,
},
buttonText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 18,
color: Colors.White,
},
smallButtonText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
color: Colors.White,
marginBottom: -2,
},
smallLeftButtonText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
color: Colors.White,
marginBottom: 6,
@@ -183,7 +183,7 @@ const firstRunStyle = StyleSheet.create({
},
passwordWarningText: {
color: Colors.NextLbryGreen,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
centered: {
+3 -3
View File
@@ -42,12 +42,12 @@ const floatingButtonStyle = StyleSheet.create({
},
text: {
color: Colors.White,
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 16,
},
bottomRight: {
right: 10,
bottom: 10,
right: 0,
bottom: 0,
},
rewardIcon: {
color: Colors.White,
+150
View File
@@ -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;
+32 -4
View File
@@ -56,13 +56,41 @@ const mediaPlayerStyle = StyleSheet.create({
height: '100%',
},
playerControlsContainer: {
backgroundColor: '#00000020',
backgroundColor: '#00000040',
flex: 1,
alignItems: 'center',
justifyContent: 'center',
},
playPauseButton: {
midControls: {
flex: 1,
flexDirection: 'row',
height: 64,
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,
height: 64,
alignItems: 'center',
@@ -78,7 +106,7 @@ const mediaPlayerStyle = StyleSheet.create({
bottom: 14,
},
elapsedDuration: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
position: 'absolute',
left: 8,
bottom: 24,
@@ -86,7 +114,7 @@ const mediaPlayerStyle = StyleSheet.create({
color: '#ffffff',
},
totalDuration: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
position: 'absolute',
right: 48,
bottom: 24,
+2 -2
View File
@@ -29,7 +29,7 @@ const modalPickerStyle = StyleSheet.create({
padding: 12,
},
title: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 12,
marginTop: 4,
textTransform: 'uppercase',
@@ -54,7 +54,7 @@ const modalPickerStyle = StyleSheet.create({
itemLabel: {
marginLeft: 8,
alignSelf: 'flex-start',
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
itemSelected: {
+1 -1
View File
@@ -42,7 +42,7 @@ const modalTagSelectorStyle = StyleSheet.create({
marginBottom: 12,
},
title: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 24,
},
buttons: {
+6 -6
View File
@@ -6,7 +6,7 @@ const modalTipStyle = StyleSheet.create({
padding: 16,
},
title: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 24,
},
row: {
@@ -19,7 +19,7 @@ const modalTipStyle = StyleSheet.create({
marginRight: 24,
},
tipAmountInput: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
alignSelf: 'flex-start',
textAlign: 'right',
@@ -27,7 +27,7 @@ const modalTipStyle = StyleSheet.create({
letterSpacing: 1,
},
currency: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
marginLeft: 4,
},
@@ -49,7 +49,7 @@ const modalTipStyle = StyleSheet.create({
marginLeft: 24,
},
balanceText: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 14,
marginLeft: 4,
},
@@ -57,12 +57,12 @@ const modalTipStyle = StyleSheet.create({
marginTop: 4,
},
infoText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
color: Colors.DescriptionGrey,
},
learnMoreLink: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
color: Colors.LbryGreen,
},
+1 -1
View File
@@ -42,7 +42,7 @@ const pageHeaderStyle = StyleSheet.create({
flexDirection: 'row',
},
titleText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: Platform.OS === 'ios' ? 17 : 20,
fontWeight: Platform.OS === 'ios' ? '700' : '500',
color: 'rgba(0, 0, 0, .9)',
+22 -22
View File
@@ -23,7 +23,7 @@ const publishStyle = StyleSheet.create({
height: 90,
},
inputText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
card: {
@@ -57,7 +57,7 @@ const publishStyle = StyleSheet.create({
alignSelf: 'flex-end',
},
cardTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 20,
marginBottom: 8,
},
@@ -84,7 +84,7 @@ const publishStyle = StyleSheet.create({
},
actionText: {
color: Colors.White,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
marginTop: 8,
},
@@ -119,12 +119,12 @@ const publishStyle = StyleSheet.create({
},
priceInput: {
width: 80,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
textAlign: 'right',
},
currency: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
},
cardRow: {
flex: 1,
@@ -155,12 +155,12 @@ const publishStyle = StyleSheet.create({
},
loadingText: {
color: Colors.White,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
marginLeft: 8,
},
listEmptyText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
titleRow: {
@@ -168,7 +168,7 @@ const publishStyle = StyleSheet.create({
justifyContent: 'space-between',
},
cardText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
cameraPreview: {
@@ -192,12 +192,12 @@ const publishStyle = StyleSheet.create({
padding: 16,
},
successTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 28,
marginBottom: 16,
},
successText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
marginBottom: 16,
lineHeight: 20,
@@ -211,7 +211,7 @@ const publishStyle = StyleSheet.create({
successUrl: {
flex: 0.9,
fontSize: 32,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
color: Colors.NextLbryGreen,
marginRight: 16,
},
@@ -305,7 +305,7 @@ const publishStyle = StyleSheet.create({
paddingBottom: 12,
},
rewardDriverText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
color: Colors.White,
fontSize: 14,
},
@@ -325,7 +325,7 @@ const publishStyle = StyleSheet.create({
marginBottom: 4,
},
textInputTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
marginBottom: -10,
marginLeft: 4,
@@ -346,7 +346,7 @@ const publishStyle = StyleSheet.create({
},
thumbnailUploadText: {
color: Colors.White,
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 12,
marginLeft: 4,
},
@@ -357,7 +357,7 @@ const publishStyle = StyleSheet.create({
marginBottom: 16,
},
toggleText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
marginLeft: 8,
},
@@ -398,7 +398,7 @@ const publishStyle = StyleSheet.create({
padding: 16,
},
noPublishText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
publishNowButton: {
@@ -423,21 +423,21 @@ const publishStyle = StyleSheet.create({
},
noVideos: {
color: Colors.White,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
cameraInfo: {
color: Colors.White,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
warningText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
color: Colors.DescriptionGrey,
},
helpText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
color: Colors.DescriptionGrey,
},
@@ -463,7 +463,7 @@ const publishStyle = StyleSheet.create({
},
editIcon: {
color: Colors.White,
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 12,
},
balance: {
@@ -472,7 +472,7 @@ const publishStyle = StyleSheet.create({
marginLeft: 24,
},
balanceText: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 14,
marginLeft: 4,
},
+1 -1
View File
@@ -12,7 +12,7 @@ const relatedContentStyle = StyleSheet.create({
borderTopWidth: 1,
},
title: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 18,
},
itemList: {
+38 -21
View File
@@ -37,7 +37,7 @@ const rewardStyle = StyleSheet.create({
marginTop: 36,
},
enrollDescText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 18,
lineHeight: 28,
color: Colors.White,
@@ -67,36 +67,36 @@ const rewardStyle = StyleSheet.create({
paddingBottom: 16,
},
text: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
lineHeight: 24,
},
infoText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 18,
marginLeft: 12,
},
title: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 22,
marginBottom: 6,
color: Colors.LbryGreen,
},
subtitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 18,
marginBottom: 6,
color: Colors.LbryGreen,
},
subcardText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 15,
lineHeight: 20,
marginLeft: 2,
marginRight: 2,
},
subcardTextInput: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
marginTop: 2,
marginBottom: 2,
@@ -122,7 +122,7 @@ const rewardStyle = StyleSheet.create({
},
link: {
color: Colors.LbryGreen,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
textLink: {
@@ -148,21 +148,21 @@ const rewardStyle = StyleSheet.create({
alignItems: 'center',
},
rewardAmount: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 26,
textAlign: 'center',
},
rewardCurrency: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
},
rewardTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
color: Colors.LbryGreen,
marginBottom: 4,
},
rewardDescription: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
lineHeight: 18,
marginBottom: 4,
@@ -195,7 +195,7 @@ const rewardStyle = StyleSheet.create({
},
summaryText: {
color: Colors.White,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 28,
marginLeft: 12,
},
@@ -208,19 +208,19 @@ const rewardStyle = StyleSheet.create({
marginRight: 32,
},
phoneInputText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
letterSpacing: 1.3,
color: Colors.White,
},
verifyingText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
marginLeft: 12,
alignSelf: 'flex-start',
},
verificationCodeInput: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
color: Colors.White,
fontSize: 24,
letterSpacing: 12,
@@ -244,11 +244,11 @@ const rewardStyle = StyleSheet.create({
},
notInterestedLink: {
fontSize: 14,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
color: Colors.White,
},
learnMoreLink: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
color: Colors.White,
textDecorationLine: 'underline',
},
@@ -258,7 +258,7 @@ const rewardStyle = StyleSheet.create({
paddingRight: 16,
},
customCodeInput: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
letterSpacing: 1.3,
marginTop: -8,
@@ -285,7 +285,7 @@ const rewardStyle = StyleSheet.create({
verificationTitle: {
fontSize: 32,
color: Colors.White,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
marginLeft: 32,
marginRight: 32,
marginBottom: 24,
@@ -300,11 +300,28 @@ const rewardStyle = StyleSheet.create({
fontSize: 14,
},
paragraphText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
color: Colors.White,
fontSize: 12,
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;
+11 -5
View File
@@ -44,19 +44,19 @@ const searchStyle = StyleSheet.create({
backgroundColor: Colors.DarkerGrey,
},
tagResultTitle: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 24,
color: Colors.White,
},
tagResultDescription: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
color: Colors.VeryLightGrey,
},
searchInput: {
width: '100%',
height: '100%',
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
noResults: {
@@ -67,19 +67,25 @@ const searchStyle = StyleSheet.create({
alignItems: 'center',
},
noResultsText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
marginTop: 16,
marginLeft: 16,
marginRight: 16,
},
boldText: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 16,
},
loading: {
position: 'absolute',
},
moreLoading: {
width: '100%',
height: 48,
alignItems: 'center',
justifyContent: 'center',
},
});
export default searchStyle;
+5 -5
View File
@@ -38,23 +38,23 @@ const settingsStyle = StyleSheet.create({
},
label: {
fontSize: 14,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
lineHeight: 18,
},
description: {
color: '#aaaaaa',
fontSize: 12,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
lineHeight: 18,
},
sectionTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 20,
marginBottom: 4,
},
sectionDescription: {
color: '#aaaaaa',
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
lineHeight: 18,
marginBottom: 8,
@@ -66,7 +66,7 @@ const settingsStyle = StyleSheet.create({
width: '85%',
},
languagePickerItem: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
pickerRow: {
+5 -5
View File
@@ -8,14 +8,14 @@ const splashStyle = StyleSheet.create({
backgroundColor: Colors.LbryGreen,
},
title: {
fontFamily: 'Inter-UI-Bold',
fontFamily: 'Inter-Bold',
fontSize: 64,
textAlign: 'center',
marginBottom: 48,
color: Colors.White,
},
errorTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 28,
marginBottom: 24,
marginLeft: 24,
@@ -23,7 +23,7 @@ const splashStyle = StyleSheet.create({
color: Colors.White,
},
paragraph: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
lineHeight: 24,
marginBottom: 20,
@@ -48,7 +48,7 @@ const splashStyle = StyleSheet.create({
width: '50%',
},
details: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
marginLeft: 16,
marginRight: 16,
@@ -56,7 +56,7 @@ const splashStyle = StyleSheet.create({
textAlign: 'center',
},
message: {
fontFamily: 'Inter-UI-Bold',
fontFamily: 'Inter-Bold',
fontSize: 18,
color: Colors.White,
marginLeft: 16,
+5 -5
View File
@@ -16,16 +16,16 @@ const storageStatsStyle = StyleSheet.create({
padding: 16,
},
totalSize: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 36,
},
annotation: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
marginTop: -4,
},
statsText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
distributionBar: {
@@ -57,12 +57,12 @@ const storageStatsStyle = StyleSheet.create({
height: 16,
},
legendText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
flex: 0.3,
},
legendSize: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
flex: 0.6,
textAlign: 'right',
+14 -12
View File
@@ -37,7 +37,7 @@ const subscriptionsStyle = StyleSheet.create({
paddingTop: 24,
},
infoText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
marginTop: 8,
marginBottom: 8,
@@ -57,7 +57,7 @@ const subscriptionsStyle = StyleSheet.create({
marginTop: 16,
},
contentText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
marginLeft: 24,
marginRight: 24,
@@ -96,7 +96,7 @@ const subscriptionsStyle = StyleSheet.create({
justifyContent: 'center',
},
fileItemName: {
fontFamily: 'Inter-UI-Bold',
fontFamily: 'Inter-Bold',
marginTop: 8,
fontSize: 18,
},
@@ -109,7 +109,7 @@ const subscriptionsStyle = StyleSheet.create({
borderBottomWidth: 1,
},
channelTitle: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 20,
marginLeft: 24,
marginTop: 16,
@@ -136,16 +136,16 @@ const subscriptionsStyle = StyleSheet.create({
color: Colors.LbryGreen,
},
inactiveMode: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
},
activeMode: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
},
claimList: {
flex: 1,
},
pageTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 24,
},
titleRow: {
@@ -171,7 +171,7 @@ const subscriptionsStyle = StyleSheet.create({
marginRight: 24,
},
tagSortText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
marginRight: 4,
},
@@ -199,6 +199,8 @@ const subscriptionsStyle = StyleSheet.create({
height: 70,
borderRadius: 140,
overflow: 'hidden',
alignItems: 'center',
justifyContent: 'center',
},
suggestedItemThumbnail: {
width: '100%',
@@ -216,13 +218,13 @@ const subscriptionsStyle = StyleSheet.create({
top: 0,
},
suggestedItemTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
marginBottom: 4,
width: '85%',
},
suggestedItemName: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 14,
marginBottom: 4,
color: Colors.LbryGreen,
@@ -233,7 +235,7 @@ const subscriptionsStyle = StyleSheet.create({
flexWrap: 'wrap',
},
suggestedSubTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 20,
marginLeft: 16,
marginRight: 16,
@@ -251,7 +253,7 @@ const subscriptionsStyle = StyleSheet.create({
alignItems: 'center',
},
suggestedLink: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
modalContainer: {
+3 -3
View File
@@ -7,7 +7,7 @@ const tagStyle = StyleSheet.create({
marginBottom: 4,
},
tagSearchInput: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
content: {
@@ -22,7 +22,7 @@ const tagStyle = StyleSheet.create({
marginRight: 8,
},
text: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
marginRight: 8,
},
@@ -34,7 +34,7 @@ const tagStyle = StyleSheet.create({
marginTop: 8,
},
nsfwTagsTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
marginBottom: 4,
},
+5 -5
View File
@@ -24,29 +24,29 @@ const transactionListStyle = StyleSheet.create({
alignSelf: 'stretch',
},
text: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
link: {
color: Colors.LbryGreen,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
amount: {
textAlign: 'right',
},
smallText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
color: '#aaaaaa',
},
smallLink: {
color: Colors.LbryGreen,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
},
noTransactions: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
textAlign: 'center',
padding: 16,
color: '#aaaaaa',
+4 -4
View File
@@ -29,7 +29,7 @@ const uriBarStyle = StyleSheet.create({
borderRadius: 24,
paddingLeft: 12,
paddingRight: 12,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
lineHeight: 18,
flex: 17,
@@ -65,11 +65,11 @@ const uriBarStyle = StyleSheet.create({
flex: 1,
},
itemText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
itemDesc: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
color: Colors.UriDescBlue,
},
@@ -107,7 +107,7 @@ const uriBarStyle = StyleSheet.create({
alignItems: 'center',
},
itemCount: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 20,
marginLeft: 30,
},
+71 -26
View File
@@ -26,12 +26,17 @@ const walletStyle = StyleSheet.create({
flexDirection: 'row',
},
address: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
letterSpacing: 0.8,
borderWidth: 1,
borderRadius: 16,
borderStyle: 'dashed',
borderColor: '#cccccc',
borderColor: '#e1e1e1',
backgroundColor: '#f9f9f9',
padding: 8,
paddingTop: 8,
paddingLeft: 8,
paddingRight: 8,
paddingBottom: 6,
width: '85%',
},
button: {
@@ -64,12 +69,12 @@ const walletStyle = StyleSheet.create({
margin: 16,
},
title: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 20,
marginBottom: 24,
},
transactionsTitle: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 20,
},
transactionsHeader: {
@@ -81,16 +86,16 @@ const walletStyle = StyleSheet.create({
borderBottomColor: '#eeeeee',
},
text: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
link: {
color: Colors.LbryGreen,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
smallText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
},
balanceCard: {
@@ -98,6 +103,12 @@ const walletStyle = StyleSheet.create({
marginLeft: 16,
marginRight: 16,
},
balanceExtraCard: {
backgroundColor: Colors.White,
marginLeft: 16,
marginRight: 16,
padding: 16,
},
balanceBackground: {
position: 'absolute',
alignSelf: 'stretch',
@@ -106,14 +117,14 @@ const walletStyle = StyleSheet.create({
},
balanceTitle: {
color: Colors.White,
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 20,
marginLeft: 16,
marginTop: 16,
},
balanceCaption: {
color: '#caedB9',
fontFamily: 'Inter-UI-Medium',
fontFamily: 'Inter-Medium',
fontSize: 14,
marginLeft: 16,
marginTop: 8,
@@ -121,7 +132,7 @@ const walletStyle = StyleSheet.create({
},
balance: {
color: Colors.White,
fontFamily: 'Inter-UI-Bold',
fontFamily: 'Inter-Bold',
fontSize: 36,
marginLeft: 16,
marginBottom: 16,
@@ -132,19 +143,19 @@ const walletStyle = StyleSheet.create({
marginLeft: 24,
},
balanceText: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 14,
marginLeft: 4,
},
infoText: {
color: '#aaaaaa',
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
padding: 16,
textAlign: 'center',
},
input: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
amountInput: {
@@ -167,14 +178,14 @@ const walletStyle = StyleSheet.create({
},
warningParagraph: {
color: Colors.White,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
lineHeight: 24,
marginBottom: 16,
},
warningText: {
color: Colors.White,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
lineHeight: 24,
marginBottom: 8,
@@ -186,6 +197,7 @@ const walletStyle = StyleSheet.create({
paddingRight: 18,
},
currency: {
fontFamily: 'Inter-Regular',
alignSelf: 'flex-start',
fontSize: 12,
marginTop: 16,
@@ -217,7 +229,7 @@ const walletStyle = StyleSheet.create({
},
rewardDriverText: {
color: Colors.White,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
lineHeight: 16,
},
@@ -232,7 +244,7 @@ const walletStyle = StyleSheet.create({
marginRight: 16,
},
syncDriverTitle: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 20,
paddingLeft: 16,
marginTop: 16,
@@ -242,7 +254,7 @@ const walletStyle = StyleSheet.create({
},
syncDriverLink: {
color: Colors.LbryGreen,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
actionRow: {
@@ -286,11 +298,11 @@ const walletStyle = StyleSheet.create({
justifyContent: 'flex-end',
},
labelText: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 16,
},
valueText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
rightLink: {
@@ -311,7 +323,7 @@ const walletStyle = StyleSheet.create({
},
loadingText: {
color: '#aaaaaa',
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
marginLeft: 8,
},
@@ -326,11 +338,11 @@ const walletStyle = StyleSheet.create({
},
continueLink: {
fontSize: 14,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
color: Colors.White,
},
learnMoreLink: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
color: Colors.NextLbryGreen,
},
signInButton: {
@@ -348,7 +360,7 @@ const walletStyle = StyleSheet.create({
marginTop: 36,
},
onboardingText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 18,
lineHeight: 28,
color: Colors.White,
@@ -358,9 +370,42 @@ const walletStyle = StyleSheet.create({
},
signInTitle: {
color: Colors.White,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 28,
},
walletExtraRow: {
flexDirection: 'row',
},
walletExtraCol: {
flex: 0.5,
paddingLeft: 24,
},
walletExtraBalance: {
fontFamily: 'Inter-SemiBold',
fontSize: 28,
},
balanceRow: {
flexDirection: 'row',
alignItems: 'center',
},
walletExtraCaption: {
fontFamily: 'Inter-Medium',
fontSize: 14,
},
walletExtraCurrency: {
fontFamily: 'Inter-Regular',
fontSize: 12,
marginTop: 8,
marginLeft: 4,
},
walletExtraTopMargin: {
marginTop: 16,
},
walletExtraIcon: {
position: 'absolute',
left: 0,
top: 0,
},
});
export default walletStyle;
+64 -10
View File
@@ -10,6 +10,8 @@ const specialRouteMap = {
about: Constants.DRAWER_ROUTE_ABOUT,
allContent: Constants.DRAWER_ROUTE_TRENDING,
channels: Constants.DRAWER_ROUTE_CHANNEL_CREATOR,
invite: Constants.DRAWER_ROUTE_INVITES,
invites: Constants.DRAWER_ROUTE_INVITES,
library: Constants.DRAWER_ROUTE_MY_LBRY,
publish: Constants.DRAWER_ROUTE_PUBLISH,
publishes: Constants.DRAWER_ROUTE_PUBLISHES,
@@ -54,9 +56,10 @@ export function dispatchNavigateToUri(dispatch, nav, uri, isNavigatingBack, full
if (!isNavigatingBack) {
dispatch(doPushDrawerStack(uri));
dispatch(doSetPlayerVisible(true));
}
dispatch(doSetPlayerVisible(false));
if (nav && nav.routes && nav.routes.length > 0 && nav.routes[0].routeName === 'Main') {
const mainRoute = nav.routes[0];
const discoverRoute = mainRoute.routes[0];
@@ -113,7 +116,7 @@ function parseUriVars(vars) {
return uriVars;
}
export function navigateToUri(navigation, uri, additionalParams, isNavigatingBack, fullUri) {
export function navigateToUri(navigation, uri, additionalParams, isNavigatingBack, fullUri, setPlayerVisible) {
if (!navigation) {
return;
}
@@ -135,6 +138,10 @@ export function navigateToUri(navigation, uri, additionalParams, isNavigatingBac
uriVars = parseUriVars(uriVarsStr);
}
if (setPlayerVisible) {
setPlayerVisible(false);
}
const { store } = window;
const params = Object.assign({ uri, uriVars, fullUri: fullUri }, additionalParams);
if (navigation.state.routeName === 'File') {
@@ -142,7 +149,6 @@ export function navigateToUri(navigation, uri, additionalParams, isNavigatingBac
navigation.dispatch(stackAction);
if (store && store.dispatch && !isNavigatingBack) {
store.dispatch(doPushDrawerStack(uri));
store.dispatch(doSetPlayerVisible(true));
}
return;
}
@@ -150,11 +156,10 @@ export function navigateToUri(navigation, uri, additionalParams, isNavigatingBac
navigation.navigate({ routeName: 'File', key: uri, params });
if (store && store.dispatch && !isNavigatingBack) {
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) {
// inner file_view (web / image view) is handled differently
if (popDrawerStack) {
@@ -167,11 +172,16 @@ export function navigateBack(navigation, drawerStack, popDrawerStack) {
popDrawerStack();
}
if (setPlayerVisible) {
setPlayerVisible(false);
}
const target = drawerStack[drawerStack.length > 1 ? drawerStack.length - 2 : 0];
const { route, params } = target;
navigation.goBack(navigation.state.key);
if (!DrawerRoutes.includes(route) && !InnerDrawerRoutes.includes(route) && isURIValid(route)) {
navigateToUri(navigation, route, null, true);
navigateToUri(navigation, route, null, true, null, setPlayerVisible);
} else {
let targetRoute = route;
let targetParams = params;
@@ -179,7 +189,7 @@ export function navigateBack(navigation, drawerStack, popDrawerStack) {
if (Constants.DRAWER_ROUTE_CHANNEL_CREATOR_FORM === route) {
targetRoute = Constants.DRAWER_ROUTE_CHANNEL_CREATOR;
} else if (Constants.DRAWER_ROUTE_PUBLISH_FORM === route) {
targetRoute = Constants.DRAWER_ROUTE_PUBLISH_FORM;
targetRoute = Constants.DRAWER_ROUTE_PUBLISH;
}
if (targetParams) {
@@ -194,13 +204,21 @@ export function navigateBack(navigation, drawerStack, popDrawerStack) {
}
export function dispatchNavigateBack(dispatch, nav, drawerStack) {
if (drawerStack[drawerStack.length - 1].route === Constants.DRAWER_ROUTE_FILE_VIEW) {
// inner file_view (web / image view) is handled differently
const currentRoute = drawerStack[drawerStack.length - 1].route;
if (
[
Constants.DRAWER_ROUTE_FILE_VIEW,
Constants.DRAWER_ROUTE_CHANNEL_CREATOR_FORM,
Constants.DRAWER_ROUTE_PUBLISH_FORM,
].includes(currentRoute)
) {
// inner routes are handled a little differently
dispatch(doPopDrawerStack());
return;
}
dispatch(doPopDrawerStack());
dispatch(doSetPlayerVisible(false));
const target = drawerStack[drawerStack.length > 1 ? drawerStack.length - 2 : 0];
const { route } = target;
@@ -215,7 +233,7 @@ export function dispatchNavigateBack(dispatch, nav, drawerStack) {
if (Constants.DRAWER_ROUTE_CHANNEL_CREATOR_FORM === route) {
targetRoute = Constants.DRAWER_ROUTE_CHANNEL_CREATOR;
} else if (Constants.DRAWER_ROUTE_PUBLISH_FORM === route) {
targetRoute = Constants.DRAWER_ROUTE_PUBLISH_FORM;
targetRoute = Constants.DRAWER_ROUTE_PUBLISH;
}
if (targetParams) {
@@ -370,3 +388,39 @@ export function uploadImageAsset(filePath, success, failure) {
export function formatLbryUrlForWeb(url) {
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;
}
export function fetchReferralCode(successCallback, errorCallback) {
Lbryio.call('user_referral_code', 'list')
.then(response => {
if (successCallback) {
successCallback(response);
}
})
.catch(err => {
if (errorCallback) {
errorCallback(err);
}
});
}