Compare commits
27
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8ae6b88410 | ||
|
|
a32c7f32f8 | ||
|
|
c1f73c2766 | ||
|
|
67723813cc | ||
|
|
80b12a2cc8 | ||
|
|
48ce7e9d9e | ||
|
|
696ff616f7 | ||
|
|
94050e5e6d | ||
|
|
d52436e8d4 | ||
|
|
f231741789 | ||
|
|
dd7f1e82ba | ||
|
|
17b381de71 | ||
|
|
53f143f232 | ||
|
|
c58aecb35e | ||
|
|
8b4f1de951 | ||
|
|
daa4f5c5dc | ||
|
|
6ae9632fb9 | ||
|
|
c33cf47397 | ||
|
|
e0fa80f640 | ||
|
|
0e65d526d8 | ||
|
|
86e5bcf7e0 | ||
|
|
e9858f85e8 | ||
|
|
0b43454adc | ||
|
|
d69c1931ac | ||
|
|
970b53ffdc | ||
|
|
372a572ee6 | ||
|
|
01eb112888 |
No files matched your search
@@ -0,0 +1,247 @@
|
|||||||
|
{
|
||||||
|
"Please wait while we get some things ready...": "Please wait while we get some things ready...",
|
||||||
|
"Welcome to LBRY.": "Welcome to LBRY.",
|
||||||
|
"LBRY is a community-controlled content platform where you can find and publish videos, music, books, and more.": "LBRY is a community-controlled content platform where you can find and publish videos, music, books, and more.",
|
||||||
|
"Continue": "Continue",
|
||||||
|
"Setup account": "Setup account",
|
||||||
|
"A lbry.tv account allows you to earn rewards, backup your wallet, and keep everything in sync.": "A lbry.tv account allows you to earn rewards, backup your wallet, and keep everything in sync.",
|
||||||
|
"This information is disclosed only to LBRY, Inc. and not to the LBRY network.": "This information is disclosed only to LBRY, Inc. and not to the LBRY network.",
|
||||||
|
"No, thanks": "No, thanks",
|
||||||
|
"Use LBRY": "Use LBRY",
|
||||||
|
"Are you sure?": "Are you sure?",
|
||||||
|
"Without an account, you will not receive rewards, sync and backup services, or security updates.": "Without an account, you will not receive rewards, sync and backup services, or security updates.",
|
||||||
|
"I understand that by uninstalling LBRY I will lose any balances or published content with no recovery option if it is not backed up manually (see wallet page)": "I understand that by uninstalling LBRY I will lose any balances or published content with no recovery option if it is not backed up manually (see wallet page)",
|
||||||
|
"Starting up": "Starting up",
|
||||||
|
"Connecting": "Connecting",
|
||||||
|
"Testing network": "Testing network",
|
||||||
|
"Waiting for name resolution": "Waiting for name resolution",
|
||||||
|
"Search movies, music, and more": "Search movies, music, and more",
|
||||||
|
"Your Tags": "Your Tags",
|
||||||
|
"Trending": "Trending",
|
||||||
|
"Customize": "Customize",
|
||||||
|
"Sign In": "Sign In",
|
||||||
|
"SIGN IN": "SIGN IN",
|
||||||
|
"Find content": "Find content",
|
||||||
|
"Subscriptions": "Subscriptions",
|
||||||
|
"All Content": "All Content",
|
||||||
|
"Your content": "Your content",
|
||||||
|
"Channels": "Channels",
|
||||||
|
"Library": "Library",
|
||||||
|
"Publishes": "Publishes",
|
||||||
|
"New Publish": "New Publish",
|
||||||
|
"Wallet": "Wallet",
|
||||||
|
"Rewards": "Rewards",
|
||||||
|
"Settings": "Settings",
|
||||||
|
"About": "About",
|
||||||
|
"All tags you follow": "All tags you follow",
|
||||||
|
"More tags you follow": "More tags you follow",
|
||||||
|
"FREE": "FREE",
|
||||||
|
"more": "more",
|
||||||
|
"You have not created a channel.\nStart now by creating a new channel!": "You have not created a channel.\nStart now by creating a new channel!",
|
||||||
|
"Create a channel": "Create a channel",
|
||||||
|
"CONTENT": "CONTENT",
|
||||||
|
"ABOUT": "ABOUT",
|
||||||
|
"Follow": "Follow",
|
||||||
|
"No content to display at this time. Please check back later.": "No content to display at this time. Please check back later.",
|
||||||
|
"New": "New",
|
||||||
|
"Share": "Share",
|
||||||
|
"Tip": "Tip",
|
||||||
|
"Report": "Report",
|
||||||
|
"Fetching cost info...": "Fetching cost info...",
|
||||||
|
"Play": "Play",
|
||||||
|
"Connecting...": "Connecting...",
|
||||||
|
"Related Content": "Related Content",
|
||||||
|
"Loading...": "Loading...",
|
||||||
|
"Content Freedom": "Content Freedom",
|
||||||
|
"LBRY is a free, open, and community-run digital marketplace. It is a decentralized peer-to-peer content distribution platform for creators to upload and share content, and earn LBRY credits for their effort. Users will be able to find a wide selection of videos, music, ebooks and other digital content they are interested in.": "LBRY is a free, open, and community-run digital marketplace. It is a decentralized peer-to-peer content distribution platform for creators to upload and share content, and earn LBRY credits for their effort. Users will be able to find a wide selection of videos, music, ebooks and other digital content they are interested in.",
|
||||||
|
"What is LBRY?": "What is LBRY?",
|
||||||
|
"Android App Basics": "Android App Basics",
|
||||||
|
"Frequently Asked Questions": "Frequently Asked Questions",
|
||||||
|
"Get Social": "Get Social",
|
||||||
|
"You can interact with the LBRY team and members of the community on Discord, Facebook, Instagram, Twitter or Reddit.": "You can interact with the LBRY team and members of the community on Discord, Facebook, Instagram, Twitter or Reddit.",
|
||||||
|
"App info": "App info",
|
||||||
|
"App version": "App version",
|
||||||
|
"LBRY SDK": "LBRY SDK",
|
||||||
|
"Platform": "Platform",
|
||||||
|
"Installation ID": "Installation ID",
|
||||||
|
"Logs": "Logs",
|
||||||
|
"Send log": "Send log",
|
||||||
|
"Account Recommended": "Account Recommended",
|
||||||
|
"Without an account, you assume all responsibility for securing your wallet and LBRY data.": "Without an account, you assume all responsibility for securing your wallet and LBRY data.",
|
||||||
|
"Skip Account": "Skip Account",
|
||||||
|
"Sign Up": "Sign Up",
|
||||||
|
"Blockchain Sync": "Blockchain Sync",
|
||||||
|
"Catching up with the blockchain (%progress%%)": "Catching up with the blockchain (%progress%%)",
|
||||||
|
"Network Loading": "Network Loading",
|
||||||
|
"Initializing LBRY service": "Initializing LBRY service",
|
||||||
|
"%amount% available credits": "%amount% available credits",
|
||||||
|
"LBRY credits allow you to purchase content, publish content, and influence the network.": "LBRY credits allow you to purchase content, publish content, and influence the network.",
|
||||||
|
"You get credits for free for providing an email address and taking other basic actions.": "You get credits for free for providing an email address and taking other basic actions.",
|
||||||
|
"Learn more": "Learn more",
|
||||||
|
"Not interested": "Not interested",
|
||||||
|
"Get started": "Get started",
|
||||||
|
"Get %amount% free credits after creating an account.": "Get %amount% free credits after creating an account.",
|
||||||
|
"Balance": "Balance",
|
||||||
|
"You currently have": "You currently have",
|
||||||
|
"Receive Credits": "Receive Credits",
|
||||||
|
"Use this wallet address to receive credits sent by another user (or yourself).": "Use this wallet address to receive credits sent by another user (or yourself).",
|
||||||
|
"Get new address": "Get new address",
|
||||||
|
"You can generate a new address at any time, and any previous addresses will continue to work. Using multiple addresses can be helpful for keeping track of incoming payments from multiple sources.": "You can generate a new address at any time, and any previous addresses will continue to work. Using multiple addresses can be helpful for keeping track of incoming payments from multiple sources.",
|
||||||
|
"Send Credits": "Send Credits",
|
||||||
|
"Recipient address": "Recipient address",
|
||||||
|
"Amount": "Amount",
|
||||||
|
"Send": "Send",
|
||||||
|
"Recent Transactions": "Recent Transactions",
|
||||||
|
"View All": "View All",
|
||||||
|
"Looks like you don't have any recent transactions.": "Looks like you don't have any recent transactions.",
|
||||||
|
"Wallet Sync": "Wallet Sync",
|
||||||
|
"Sync status": "Sync status",
|
||||||
|
"Off": "Off",
|
||||||
|
"Manual backup": "Manual backup",
|
||||||
|
"Sync FAQ": "Sync FAQ",
|
||||||
|
"Fetching transactions...": "Fetching transactions...",
|
||||||
|
"Anonymous": "Anonymous",
|
||||||
|
"Delete": "Delete",
|
||||||
|
"Title": "Title",
|
||||||
|
"Channel": "Channel",
|
||||||
|
"Deposit": "Deposit",
|
||||||
|
"This LBC remains yours. It is a deposit to reserve the name and can be undone at any time.": "This LBC remains yours. It is a deposit to reserve the name and can be undone at any time.",
|
||||||
|
"Show optional fields": "Show optional fields",
|
||||||
|
"Cancel": "Cancel",
|
||||||
|
"Create": "Create",
|
||||||
|
"Channel creation requires credits.": "Channel creation requires credits.",
|
||||||
|
"Tap here to get some for free.": "Tap here to get some for free.",
|
||||||
|
"%balance% available": "%balance% available",
|
||||||
|
"Bal: %balance%": "Bal: %balance%",
|
||||||
|
"Send a tip": "Send a tip",
|
||||||
|
"Record": "Record",
|
||||||
|
"Take a photo": "Take a photo",
|
||||||
|
"Upload a file": "Upload a file",
|
||||||
|
"Please wait while we load your videos...": "Please wait while we load your videos...",
|
||||||
|
"Description": "Description",
|
||||||
|
"Tags": "Tags",
|
||||||
|
"Price": "Price",
|
||||||
|
"Your content will be free. Press the toggle to set a price.": "Your content will be free. Press the toggle to set a price.",
|
||||||
|
"Content address": "Content address",
|
||||||
|
"The address where people can find your content (ex. lbry://myvideo). ": "The address where people can find your content (ex. lbry://myvideo). ",
|
||||||
|
"This LBC remains yours and the deposit can be undone at any time.": "This LBC remains yours and the deposit can be undone at any time.",
|
||||||
|
"Show extra fields": "Show extra fields",
|
||||||
|
"Publish": "Publish",
|
||||||
|
"Publishing requires credits.": "Publishing requires credits.",
|
||||||
|
"Search for more tags": "Search for more tags",
|
||||||
|
"Mature tags": "Mature tags",
|
||||||
|
"Publish anonymously": "Publish anonymously",
|
||||||
|
"Create a channel...": "Create a channel...",
|
||||||
|
"Uploading thumbnail...": "Uploading thumbnail...",
|
||||||
|
"Channel name": "Channel name",
|
||||||
|
"Deposit cannot be higher than your balance": "Deposit cannot be higher than your balance",
|
||||||
|
"There are no results to display for \"%query%\". Please try a different search term.": "There are no results to display for \"%query%\". Please try a different search term.",
|
||||||
|
"Nothing here. Publish something!": "Nothing here. Publish something!",
|
||||||
|
"Explore content for this tag": "Explore content for this tag",
|
||||||
|
"URL does not include name.": "URL does not include name.",
|
||||||
|
"Loading decentralized data...": "Loading decentralized data...",
|
||||||
|
"View": "View",
|
||||||
|
"Additional Options": "Additional Options",
|
||||||
|
"Language": "Language",
|
||||||
|
"English": "English",
|
||||||
|
"Chinese": "Chinese",
|
||||||
|
"French": "French",
|
||||||
|
"German": "German",
|
||||||
|
"Japanese": "Japanese",
|
||||||
|
"Russian": "Russian",
|
||||||
|
"Spanish": "Spanish",
|
||||||
|
"Indonesian": "Indonesian",
|
||||||
|
"Italian": "Italian",
|
||||||
|
"Dutch": "Dutch",
|
||||||
|
"Turkish": "Turkish",
|
||||||
|
"Polish": "Polish",
|
||||||
|
"Malay": "Malay",
|
||||||
|
"Portuguese": "Portuguese",
|
||||||
|
"Vietnamese": "Vietnamese",
|
||||||
|
"Thai": "Thai",
|
||||||
|
"Arabic": "Arabic",
|
||||||
|
"Czech": "Czech",
|
||||||
|
"Croatian": "Croatian",
|
||||||
|
"Cambodian": "Cambodian",
|
||||||
|
"Korean": "Korean",
|
||||||
|
"Norwegian": "Norwegian",
|
||||||
|
"Romanian": "Romanian",
|
||||||
|
"Hindi": "Hindi",
|
||||||
|
"Greek": "Greek",
|
||||||
|
"License": "License",
|
||||||
|
"None": "None",
|
||||||
|
"Public Domain": "Public Domain",
|
||||||
|
"Copyrighted...": "Copyrighted...",
|
||||||
|
"Other...": "Other...",
|
||||||
|
"Hide extra fields": "Hide extra fields",
|
||||||
|
"Download": "Download",
|
||||||
|
"%progress%% complete": "%progress%% complete",
|
||||||
|
"Email": "Email",
|
||||||
|
"Please provide an email address.": "Please provide an email address.",
|
||||||
|
"An email has been sent to": "An email has been sent to",
|
||||||
|
"Please click the link in the message to complete signing in.": "Please click the link in the message to complete signing in.",
|
||||||
|
"Resend": "Resend",
|
||||||
|
"Edit": "Edit",
|
||||||
|
"Your email address was successfully verified.": "Your email address was successfully verified.",
|
||||||
|
"password": "password",
|
||||||
|
"Please enter a password to secure your account and wallet.": "Please enter a password to secure your account and wallet.",
|
||||||
|
"Retrieving your account information...": "Retrieving your account information...",
|
||||||
|
"Please enter the password you used to secure your wallet.": "Please enter the password you used to secure your wallet.",
|
||||||
|
"Note: for wallet security purposes, LBRY is unable to reset your password.": "Note: for wallet security purposes, LBRY is unable to reset your password.",
|
||||||
|
"On": "On",
|
||||||
|
"Connected email": "Connected email",
|
||||||
|
"Address copied": "Address copied",
|
||||||
|
"Unlocking account": "Unlocking account",
|
||||||
|
"Decrypting wallet": "Decrypting wallet",
|
||||||
|
"used": "used",
|
||||||
|
"Stats": "Stats",
|
||||||
|
"Channels you follow": "Channels you follow",
|
||||||
|
"Suggested": "Suggested",
|
||||||
|
"ALL": "ALL",
|
||||||
|
"Customize your tags": "Customize your tags",
|
||||||
|
"Done": "Done",
|
||||||
|
"Unfollow": "Unfollow",
|
||||||
|
"This content is Not Safe For Work. To view adult content, please change your Settings.": "This content is Not Safe For Work. To view adult content, please change your Settings.",
|
||||||
|
"No views": "No views",
|
||||||
|
"%view% views": "%view% views",
|
||||||
|
"Content": "Content",
|
||||||
|
"Enable background media playback": "Enable background media playback",
|
||||||
|
"Enable this option to play audio or video in the background when the app is suspended.": "Enable this option to play audio or video in the background when the app is suspended.",
|
||||||
|
"Choose language": "Choose language",
|
||||||
|
"Use device language": "Use device language",
|
||||||
|
"Gujarati": "Gujarati",
|
||||||
|
"Show mature content": "Show mature content",
|
||||||
|
"Notifications": "Notifications",
|
||||||
|
"Choose the notifications you would like to receive.": "Choose the notifications you would like to receive.",
|
||||||
|
"Content Interests": "Content Interests",
|
||||||
|
"Search": "Search",
|
||||||
|
"Show URL suggestions": "Show URL suggestions",
|
||||||
|
"Other": "Other",
|
||||||
|
"Keep the SDK background service running after closing the app": "Keep the SDK background service running after closing the app",
|
||||||
|
"Enable this option for quicker app launch and to keep the synchronisation with the blockchain up to date.": "Enable this option for quicker app launch and to keep the synchronisation with the blockchain up to date.",
|
||||||
|
"There's nothing here yet.\nPlease check back later.": "There's nothing here yet.\nPlease check back later.",
|
||||||
|
"%follower% followers": "%follower% followers",
|
||||||
|
"Are you sure you want to tip %amount% credits": "Are you sure you want to tip %amount% credits",
|
||||||
|
"Send tip": "Send tip",
|
||||||
|
"No": "No",
|
||||||
|
"Yes": "Yes",
|
||||||
|
"History": "History",
|
||||||
|
"/wallet": "/wallet",
|
||||||
|
"Are you sure you want to tip %amount% credit": "Are you sure you want to tip %amount% credit",
|
||||||
|
"Enjoying LBRY?": "Enjoying LBRY?",
|
||||||
|
"Are you enjoying your experience with the LBRY app? You can leave a review for us on the Play Store.": "Are you enjoying your experience with the LBRY app? You can leave a review for us on the Play Store.",
|
||||||
|
"Never ask again": "Never ask again",
|
||||||
|
"Maybe later": "Maybe later",
|
||||||
|
"Rate app": "Rate app",
|
||||||
|
"This will appear as a tip for %content%, which will boost its ability to be discovered while active.": "This will appear as a tip for %content%, which will boost its ability to be discovered while active.",
|
||||||
|
"Learn more.": "Learn more.",
|
||||||
|
"Send a tip to %channel%": "Send a tip to %channel%",
|
||||||
|
"The transaction URL could not be opened": "The transaction URL could not be opened",
|
||||||
|
"Show All": "Show All",
|
||||||
|
"Fetching rewards...": "Fetching rewards...",
|
||||||
|
"Custom Code": "Custom Code",
|
||||||
|
"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!"
|
||||||
|
}
|
||||||
Generated
+9
-4
@@ -5640,8 +5640,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lbry-redux": {
|
"lbry-redux": {
|
||||||
"version": "github:lbryio/lbry-redux#9b11cfed62af7f0f8eb6fa3c88a1f8d2cce46afc",
|
"version": "github:lbryio/lbry-redux#abe90e0665cfad3fb8853501ec058c5d1f0d9cc8",
|
||||||
"from": "github:lbryio/lbry-redux#9b11cfed62af7f0f8eb6fa3c88a1f8d2cce46afc",
|
"from": "github:lbryio/lbry-redux#abe90e0665cfad3fb8853501ec058c5d1f0d9cc8",
|
||||||
"requires": {
|
"requires": {
|
||||||
"proxy-polyfill": "0.1.6",
|
"proxy-polyfill": "0.1.6",
|
||||||
"reselect": "^3.0.0",
|
"reselect": "^3.0.0",
|
||||||
@@ -5649,8 +5649,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lbryinc": {
|
"lbryinc": {
|
||||||
"version": "github:lbryio/lbryinc#9ffb883cc11e36d55a729c65b70c405a4a56d35e",
|
"version": "github:lbryio/lbryinc#053ca52f4f7f9bf8eb62a3581b183671a475ad1c",
|
||||||
"from": "github:lbryio/lbryinc#9ffb883cc11e36d55a729c65b70c405a4a56d35e",
|
"from": "github:lbryio/lbryinc#053ca52f4f7f9bf8eb62a3581b183671a475ad1c",
|
||||||
"requires": {
|
"requires": {
|
||||||
"reselect": "^3.0.0"
|
"reselect": "^3.0.0"
|
||||||
}
|
}
|
||||||
@@ -8186,6 +8186,11 @@
|
|||||||
"debounce": "^1.2.0"
|
"debounce": "^1.2.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"react-native-snackbar": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/react-native-snackbar/-/react-native-snackbar-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-VOpF7/fUdv32zVH+CW542wpFYGtvAw+nFVloJu0HJWGeClB6V/GcxgAADQOEReOw91RnQkr+bZk0aEf4UXZ64w=="
|
||||||
|
},
|
||||||
"react-native-speedometer": {
|
"react-native-speedometer": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/react-native-speedometer/-/react-native-speedometer-1.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/react-native-speedometer/-/react-native-speedometer-1.0.3.tgz",
|
||||||
|
|||||||
+3
-2
@@ -12,8 +12,8 @@
|
|||||||
"base-64": "^0.1.0",
|
"base-64": "^0.1.0",
|
||||||
"@expo/vector-icons": "^8.1.0",
|
"@expo/vector-icons": "^8.1.0",
|
||||||
"gfycat-style-urls": "^1.0.3",
|
"gfycat-style-urls": "^1.0.3",
|
||||||
"lbry-redux": "lbryio/lbry-redux#9b11cfed62af7f0f8eb6fa3c88a1f8d2cce46afc",
|
"lbry-redux": "lbryio/lbry-redux#abe90e0665cfad3fb8853501ec058c5d1f0d9cc8",
|
||||||
"lbryinc": "lbryio/lbryinc#9ffb883cc11e36d55a729c65b70c405a4a56d35e",
|
"lbryinc": "lbryio/lbryinc#053ca52f4f7f9bf8eb62a3581b183671a475ad1c",
|
||||||
"lodash": ">=4.17.11",
|
"lodash": ">=4.17.11",
|
||||||
"merge": ">=1.2.1",
|
"merge": ">=1.2.1",
|
||||||
"moment": "^2.22.1",
|
"moment": "^2.22.1",
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
"react-native-password-strength-meter": "^0.0.2",
|
"react-native-password-strength-meter": "^0.0.2",
|
||||||
"react-native-phone-input": "lbryio/react-native-phone-input",
|
"react-native-phone-input": "lbryio/react-native-phone-input",
|
||||||
"react-native-reanimated": "1.2.0",
|
"react-native-reanimated": "1.2.0",
|
||||||
|
"react-native-snackbar": "1.0.2",
|
||||||
"react-native-super-grid": "^3.0.4",
|
"react-native-super-grid": "^3.0.4",
|
||||||
"react-native-vector-icons": "^6.6.0",
|
"react-native-vector-icons": "^6.6.0",
|
||||||
"react-native-video": "lbryio/react-native-video#exoplayer-lbry-android",
|
"react-native-video": "lbryio/react-native-video#exoplayer-lbry-android",
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ import {
|
|||||||
selectHashChanged,
|
selectHashChanged,
|
||||||
selectUser,
|
selectUser,
|
||||||
} from 'lbryinc';
|
} from 'lbryinc';
|
||||||
|
import { doStartDownload, doUpdateDownload, doCompleteDownload } from 'redux/actions/file';
|
||||||
import { makeSelectClientSetting, selectFullscreenMode } from 'redux/selectors/settings';
|
import { makeSelectClientSetting, selectFullscreenMode } from 'redux/selectors/settings';
|
||||||
import { decode as atob } from 'base-64';
|
import { decode as atob } from 'base-64';
|
||||||
import { dispatchNavigateBack, dispatchNavigateToUri, transformUrl } from 'utils/helper';
|
import { dispatchNavigateBack, dispatchNavigateToUri, transformUrl } from 'utils/helper';
|
||||||
@@ -62,6 +63,7 @@ import NavigationButton from 'component/navigationButton';
|
|||||||
import discoverStyle from 'styles/discover';
|
import discoverStyle from 'styles/discover';
|
||||||
import searchStyle from 'styles/search';
|
import searchStyle from 'styles/search';
|
||||||
import SearchRightHeaderIcon from 'component/searchRightHeaderIcon';
|
import SearchRightHeaderIcon from 'component/searchRightHeaderIcon';
|
||||||
|
import Snackbar from 'react-native-snackbar';
|
||||||
|
|
||||||
const SYNC_GET_INTERVAL = 1000 * 60 * 5; // every 5 minutes
|
const SYNC_GET_INTERVAL = 1000 * 60 * 5; // every 5 minutes
|
||||||
|
|
||||||
@@ -310,6 +312,10 @@ class AppWithNavigationState extends React.Component {
|
|||||||
this.emailVerifyCheckInterval = setInterval(() => this.checkEmailVerification(), 5000);
|
this.emailVerifyCheckInterval = setInterval(() => this.checkEmailVerification(), 5000);
|
||||||
Linking.addEventListener('url', this._handleUrl);
|
Linking.addEventListener('url', this._handleUrl);
|
||||||
|
|
||||||
|
DeviceEventEmitter.addListener('onDownloadStarted', this.handleDownloadStarted);
|
||||||
|
DeviceEventEmitter.addListener('onDownloadUpdated', this.handleDownloadUpdated);
|
||||||
|
DeviceEventEmitter.addListener('onDownloadCompleted', this.handleDownloadCompleted);
|
||||||
|
|
||||||
// call /sync/get with interval
|
// call /sync/get with interval
|
||||||
this.syncGetInterval = setInterval(() => {
|
this.syncGetInterval = setInterval(() => {
|
||||||
this.setState({ syncHashChanged: false }); // reset local state
|
this.setState({ syncHashChanged: false }); // reset local state
|
||||||
@@ -344,7 +350,29 @@ class AppWithNavigationState extends React.Component {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
handleDownloadStarted = evt => {
|
||||||
|
const { dispatch } = this.props;
|
||||||
|
const { uri, outpoint, fileInfo } = evt;
|
||||||
|
dispatch(doStartDownload(uri, outpoint, fileInfo));
|
||||||
|
};
|
||||||
|
|
||||||
|
handleDownloadUpdated = evt => {
|
||||||
|
const { dispatch } = this.props;
|
||||||
|
const { uri, outpoint, fileInfo, progress } = evt;
|
||||||
|
dispatch(doUpdateDownload(uri, outpoint, fileInfo, progress));
|
||||||
|
};
|
||||||
|
|
||||||
|
handleDownloadCompleted = evt => {
|
||||||
|
const { dispatch } = this.props;
|
||||||
|
const { uri, outpoint, fileInfo } = evt;
|
||||||
|
dispatch(doCompleteDownload(uri, outpoint, fileInfo));
|
||||||
|
};
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
|
DeviceEventEmitter.removeListener('onDownloadStarted', this.handleDownloadStarted);
|
||||||
|
DeviceEventEmitter.removeListener('onDownloadUpdated', this.handleDownloadUpdated);
|
||||||
|
DeviceEventEmitter.removeListener('onDownloadCompleted', this.handleDownloadCompleted);
|
||||||
|
|
||||||
AppState.removeEventListener('change', this._handleAppStateChange);
|
AppState.removeEventListener('change', this._handleAppStateChange);
|
||||||
BackHandler.removeEventListener('hardwareBackPress');
|
BackHandler.removeEventListener('hardwareBackPress');
|
||||||
Linking.removeEventListener('url', this._handleUrl);
|
Linking.removeEventListener('url', this._handleUrl);
|
||||||
@@ -364,7 +392,7 @@ class AppWithNavigationState extends React.Component {
|
|||||||
this.setState({ verifyPending: false });
|
this.setState({ verifyPending: false });
|
||||||
|
|
||||||
NativeModules.Firebase.track('email_verified', { email: user.primary_email });
|
NativeModules.Firebase.track('email_verified', { email: user.primary_email });
|
||||||
ToastAndroid.show(__('Your email address was successfully verified.'), ToastAndroid.LONG);
|
Snackbar.show({ title: __('Your email address was successfully verified.'), duration: Snackbar.LENGTH_LONG });
|
||||||
|
|
||||||
// get user settings after email verification
|
// get user settings after email verification
|
||||||
this.getUserSettings();
|
this.getUserSettings();
|
||||||
@@ -381,7 +409,7 @@ class AppWithNavigationState extends React.Component {
|
|||||||
const { toast, emailToVerify, emailVerifyPending, emailVerifyErrorMessage, user } = nextProps;
|
const { toast, emailToVerify, emailVerifyPending, emailVerifyErrorMessage, user } = nextProps;
|
||||||
|
|
||||||
if (toast) {
|
if (toast) {
|
||||||
const { message } = toast;
|
const { message, isError } = toast;
|
||||||
let currentDisplayType;
|
let currentDisplayType;
|
||||||
if (!currentDisplayType && message) {
|
if (!currentDisplayType && message) {
|
||||||
// default to toast if no display type set and there is a message specified
|
// default to toast if no display type set and there is a message specified
|
||||||
@@ -389,7 +417,14 @@ class AppWithNavigationState extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (currentDisplayType === 'toast') {
|
if (currentDisplayType === 'toast') {
|
||||||
ToastAndroid.show(message, ToastAndroid.LONG);
|
const props = {
|
||||||
|
title: message,
|
||||||
|
duration: Snackbar.LENGTH_LONG,
|
||||||
|
};
|
||||||
|
if (isError) {
|
||||||
|
props.backgroundColor = Colors.Red;
|
||||||
|
}
|
||||||
|
Snackbar.show(props);
|
||||||
}
|
}
|
||||||
|
|
||||||
dispatch(doDismissToast());
|
dispatch(doDismissToast());
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { CLAIM_VALUES, isNameValid } from 'lbry-redux';
|
import { CLAIM_VALUES, formatCredits, isNameValid } from 'lbry-redux';
|
||||||
import { ActivityIndicator, NativeModules, Picker, Text, TextInput, TouchableOpacity, View } from 'react-native';
|
import { ActivityIndicator, NativeModules, Picker, Text, TextInput, TouchableOpacity, View } from 'react-native';
|
||||||
import { logPublish } from 'utils/helper';
|
import { logPublish } from 'utils/helper';
|
||||||
import Button from 'component/button';
|
import Button from 'component/button';
|
||||||
@@ -14,6 +14,7 @@ export default class ChannelSelector extends React.PureComponent {
|
|||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
|
creditsInputFocused: false,
|
||||||
currentSelectedValue: Constants.ITEM_ANONYMOUS,
|
currentSelectedValue: Constants.ITEM_ANONYMOUS,
|
||||||
newChannelName: '',
|
newChannelName: '',
|
||||||
newChannelBid: 0.1,
|
newChannelBid: 0.1,
|
||||||
@@ -188,7 +189,7 @@ export default class ChannelSelector extends React.PureComponent {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const channel = this.state.addingChannel ? 'new' : this.props.channel;
|
const channel = this.state.addingChannel ? 'new' : this.props.channel;
|
||||||
const { enabled, fetchingChannels, channels = [] } = this.props;
|
const { balance, enabled, fetchingChannels, channels = [] } = this.props;
|
||||||
const pickerItems = [Constants.ITEM_ANONYMOUS, Constants.ITEM_CREATE_A_CHANNEL].concat(
|
const pickerItems = [Constants.ITEM_ANONYMOUS, Constants.ITEM_CREATE_A_CHANNEL].concat(
|
||||||
channels ? channels.map(ch => ch.name) : []
|
channels ? channels.map(ch => ch.name) : []
|
||||||
);
|
);
|
||||||
@@ -244,11 +245,19 @@ export default class ChannelSelector extends React.PureComponent {
|
|||||||
style={channelSelectorStyle.bidAmountInput}
|
style={channelSelectorStyle.bidAmountInput}
|
||||||
value={String(newChannelBid)}
|
value={String(newChannelBid)}
|
||||||
onChangeText={this.handleNewChannelBidChange}
|
onChangeText={this.handleNewChannelBidChange}
|
||||||
|
onFocus={() => this.setState({ creditsInputFocused: true })}
|
||||||
|
onBlur={() => this.setState({ creditsInputFocused: false })}
|
||||||
placeholder={'0.00'}
|
placeholder={'0.00'}
|
||||||
keyboardType={'number-pad'}
|
keyboardType={'number-pad'}
|
||||||
underlineColorAndroid={Colors.NextLbryGreen}
|
underlineColorAndroid={Colors.NextLbryGreen}
|
||||||
/>
|
/>
|
||||||
<Text style={channelSelectorStyle.currency}>LBC</Text>
|
<Text style={channelSelectorStyle.currency}>LBC</Text>
|
||||||
|
<View style={channelSelectorStyle.balance}>
|
||||||
|
{this.state.creditsInputFocused && <Icon name="coins" size={12} />}
|
||||||
|
{this.state.creditsInputFocused && (
|
||||||
|
<Text style={channelSelectorStyle.balanceText}>{formatCredits(parseFloat(balance), 1, true)}</Text>
|
||||||
|
)}
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<Text style={channelSelectorStyle.helpText}>
|
<Text style={channelSelectorStyle.helpText}>
|
||||||
{__('This LBC remains yours. It is a deposit to reserve the name and can be undone at any time.')}
|
{__('This LBC remains yours. It is a deposit to reserve the name and can be undone at any time.')}
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ class ClaimList extends React.PureComponent {
|
|||||||
renderMorePlaceholder = () => {
|
renderMorePlaceholder = () => {
|
||||||
return (
|
return (
|
||||||
<TouchableOpacity style={discoverStyle.fileItemMore} onPress={this.onMorePressed}>
|
<TouchableOpacity style={discoverStyle.fileItemMore} onPress={this.onMorePressed}>
|
||||||
<Text style={discoverStyle.moreText}>more</Text>
|
<Text style={discoverStyle.moreText}>{__('more')}</Text>
|
||||||
<Icon style={discoverStyle.moreIcon} name={'angle-double-down'} color={Colors.White} size={16} />
|
<Icon style={discoverStyle.moreIcon} name={'angle-double-down'} color={Colors.White} size={16} />
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ class CustomRewardCard extends React.PureComponent<Props> {
|
|||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
style={rewardStyle.redeemButton}
|
style={rewardStyle.redeemButton}
|
||||||
text={'Redeem'}
|
text={__('Redeem')}
|
||||||
disabled={!this.state.rewardCode || this.state.rewardCode.trim().length === 0 || rewardIsPending}
|
disabled={!this.state.rewardCode || this.state.rewardCode.trim().length === 0 || rewardIsPending}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
if (!rewardIsPending) {
|
if (!rewardIsPending) {
|
||||||
|
|||||||
@@ -11,11 +11,6 @@ class FileDownloadButton extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
|
||||||
// this.checkAvailability(nextProps.uri);
|
|
||||||
// this.restartDownload(nextProps);
|
|
||||||
}
|
|
||||||
|
|
||||||
restartDownload(props) {
|
restartDownload(props) {
|
||||||
const { downloading, fileInfo, uri, restartDownload } = props;
|
const { downloading, fileInfo, uri, restartDownload } = props;
|
||||||
|
|
||||||
@@ -45,12 +40,13 @@ class FileDownloadButton extends React.PureComponent {
|
|||||||
doPause,
|
doPause,
|
||||||
style,
|
style,
|
||||||
openFile,
|
openFile,
|
||||||
|
onFileActionPress,
|
||||||
onButtonLayout,
|
onButtonLayout,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
if ((fileInfo && !fileInfo.stopped) || loading || downloading) {
|
if ((fileInfo && !fileInfo.stopped) || loading || downloading) {
|
||||||
const progress = fileInfo && fileInfo.written_bytes ? (fileInfo.written_bytes / fileInfo.total_bytes) * 100 : 0,
|
const progress = fileInfo && fileInfo.written_bytes ? (fileInfo.written_bytes / fileInfo.total_bytes) * 100 : 0,
|
||||||
label = fileInfo ? progress.toFixed(0) + '% complete' : __('Connecting...');
|
label = fileInfo ? __('%progress%% complete', { progress: progress.toFixed(0) }) : __('Connecting...');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={[style, fileDownloadButtonStyle.container]}>
|
<View style={[style, fileDownloadButtonStyle.container]}>
|
||||||
@@ -72,21 +68,7 @@ class FileDownloadButton extends React.PureComponent {
|
|||||||
text={isPlayable ? __('Play') : isViewable ? __('View') : __('Download')}
|
text={isPlayable ? __('Play') : isViewable ? __('View') : __('Download')}
|
||||||
onLayout={onButtonLayout}
|
onLayout={onButtonLayout}
|
||||||
style={[style, fileDownloadButtonStyle.container]}
|
style={[style, fileDownloadButtonStyle.container]}
|
||||||
onPress={() => {
|
onPress={onFileActionPress}
|
||||||
if (NativeModules.Firebase) {
|
|
||||||
NativeModules.Firebase.track('purchase_uri', { uri: uri });
|
|
||||||
}
|
|
||||||
purchaseUri(uri, costInfo, !isPlayable);
|
|
||||||
if (NativeModules.UtilityModule) {
|
|
||||||
NativeModules.UtilityModule.checkDownloads();
|
|
||||||
}
|
|
||||||
if (isPlayable && onPlay) {
|
|
||||||
this.props.onPlay();
|
|
||||||
}
|
|
||||||
if (isViewable && onView) {
|
|
||||||
this.props.onView();
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
} else if (fileInfo && fileInfo.download_path) {
|
} else if (fileInfo && fileInfo.download_path) {
|
||||||
|
|||||||
@@ -158,7 +158,13 @@ class FileListItem extends React.PureComponent {
|
|||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
{fileInfo && fileInfo.completed && fileInfo.download_path && (
|
{fileInfo && fileInfo.completed && fileInfo.download_path && (
|
||||||
<Icon style={fileListStyle.downloadedIcon} solid color={Colors.NextLbryGreen} name={'folder'} size={16} />
|
<Icon
|
||||||
|
style={featuredResult ? fileListStyle.featuredDownloadedIcon : fileListStyle.downloadedIcon}
|
||||||
|
solid
|
||||||
|
color={Colors.NextLbryGreen}
|
||||||
|
name={'folder'}
|
||||||
|
size={16}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
<View style={fileListStyle.detailsContainer}>
|
<View style={fileListStyle.detailsContainer}>
|
||||||
{featuredResult && (
|
{featuredResult && (
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
import { connect } from 'react-redux';
|
||||||
|
import { doSendTip, doToast, selectBalance } from 'lbry-redux';
|
||||||
|
import ModalTipView from './view';
|
||||||
|
|
||||||
|
const select = state => ({
|
||||||
|
balance: selectBalance(state),
|
||||||
|
});
|
||||||
|
|
||||||
|
const perform = dispatch => ({
|
||||||
|
notify: data => dispatch(doToast(data)),
|
||||||
|
sendTip: (amount, claimId, isSupport, successCallback, errorCallback) =>
|
||||||
|
dispatch(doSendTip(amount, claimId, isSupport, successCallback, errorCallback)),
|
||||||
|
});
|
||||||
|
|
||||||
|
export default connect(
|
||||||
|
select,
|
||||||
|
perform
|
||||||
|
)(ModalTipView);
|
||||||
@@ -0,0 +1,148 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { ActivityIndicator, Alert, Text, TextInput, TouchableOpacity, View } from 'react-native';
|
||||||
|
import { formatCredits } from 'lbry-redux';
|
||||||
|
import modalStyle from 'styles/modal';
|
||||||
|
import modalTipStyle from 'styles/modalTip';
|
||||||
|
import Button from 'component/button';
|
||||||
|
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';
|
||||||
|
|
||||||
|
export default class ModalTipView extends React.PureComponent {
|
||||||
|
tipAmountInput = null;
|
||||||
|
|
||||||
|
state = {
|
||||||
|
creditsInputFocused: false,
|
||||||
|
sendTipStarted: false,
|
||||||
|
tipAmount: null,
|
||||||
|
};
|
||||||
|
|
||||||
|
handleSendTip = () => {
|
||||||
|
const { claim, balance, notify, onSendTipFailed, onSendTipSuccessful, sendTip } = this.props;
|
||||||
|
const { tipAmount } = this.state;
|
||||||
|
|
||||||
|
if (tipAmount > balance) {
|
||||||
|
notify({
|
||||||
|
message: 'Insufficient credits',
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const amount = parseInt(tipAmount, 10);
|
||||||
|
const message =
|
||||||
|
amount === 1
|
||||||
|
? __('Please confirm you want to tip %amount% credit', { amount })
|
||||||
|
: __('Please confirm you want to tip %amount% credits', { amount });
|
||||||
|
|
||||||
|
Alert.alert(
|
||||||
|
__('Send Tip'),
|
||||||
|
message,
|
||||||
|
[
|
||||||
|
{ text: __('No') },
|
||||||
|
{
|
||||||
|
text: __('Yes'),
|
||||||
|
onPress: () => {
|
||||||
|
this.setState({ sendTipStarted: true }, () =>
|
||||||
|
sendTip(
|
||||||
|
tipAmount,
|
||||||
|
claim.claim_id,
|
||||||
|
false,
|
||||||
|
() => {
|
||||||
|
// success
|
||||||
|
this.setState({ tipAmount: null, sendTipStarted: false });
|
||||||
|
if (onSendTipSuccessful) onSendTipSuccessful();
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
// error
|
||||||
|
if (onSendTipFailed) onSendTipFailed();
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
{ cancelable: true }
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { balance, channelName, contentName, onCancelPress, onOverlayPress } = this.props;
|
||||||
|
const canSendTip = this.state.tipAmount > 0;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<TouchableOpacity style={modalStyle.overlay} activeOpacity={1} onPress={onOverlayPress}>
|
||||||
|
<TouchableOpacity style={modalStyle.container} activeOpacity={1}>
|
||||||
|
<View
|
||||||
|
style={modalTipStyle.container}
|
||||||
|
onLayout={() => {
|
||||||
|
if (this.tipAmountInput) {
|
||||||
|
this.tipAmountInput.focus();
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Text style={modalTipStyle.title} numberOfLines={1}>
|
||||||
|
{channelName ? __('Send a tip to %channel%', { channel: channelName }) : __('Send a tip')}
|
||||||
|
</Text>
|
||||||
|
|
||||||
|
<View style={modalTipStyle.row}>
|
||||||
|
<View style={modalTipStyle.amountRow}>
|
||||||
|
<TextInput
|
||||||
|
editable={!this.state.sendTipStarted}
|
||||||
|
ref={ref => (this.tipAmountInput = ref)}
|
||||||
|
onChangeText={value => this.setState({ tipAmount: value })}
|
||||||
|
underlineColorAndroid={Colors.NextLbryGreen}
|
||||||
|
keyboardType={'numeric'}
|
||||||
|
onFocus={() => this.setState({ creditsInputFocused: true })}
|
||||||
|
onBlur={() => this.setState({ creditsInputFocused: false })}
|
||||||
|
placeholder={'0'}
|
||||||
|
value={this.state.tipAmount}
|
||||||
|
selectTextOnFocus
|
||||||
|
style={modalTipStyle.tipAmountInput}
|
||||||
|
/>
|
||||||
|
<Text style={modalTipStyle.currency}>LBC</Text>
|
||||||
|
<View style={modalTipStyle.balance}>
|
||||||
|
{this.state.creditsInputFocused && <Icon name="coins" size={12} />}
|
||||||
|
{this.state.creditsInputFocused && (
|
||||||
|
<Text style={modalTipStyle.balanceText}>{formatCredits(parseFloat(balance), 1, true)}</Text>
|
||||||
|
)}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
{this.state.sendTipStarted && <ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />}
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<View style={modalTipStyle.info}>
|
||||||
|
<Text style={modalTipStyle.infoText}>
|
||||||
|
{__(
|
||||||
|
'This will appear as a tip for %content%, which will boost its ability to be discovered while active.',
|
||||||
|
{ content: contentName }
|
||||||
|
)}{' '}
|
||||||
|
<Link
|
||||||
|
style={modalTipStyle.learnMoreLink}
|
||||||
|
text={__('Learn more.')}
|
||||||
|
href={'https://lbry.com/faq/tipping'}
|
||||||
|
/>
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<View style={modalTipStyle.buttonRow}>
|
||||||
|
<Link
|
||||||
|
style={modalTipStyle.cancelTipLink}
|
||||||
|
text={__('Cancel')}
|
||||||
|
onPress={() => {
|
||||||
|
if (onCancelPress) onCancelPress();
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Button
|
||||||
|
text={__('Send')}
|
||||||
|
style={modalTipStyle.button}
|
||||||
|
disabled={!canSendTip || this.state.sendTipStarted}
|
||||||
|
onPress={this.handleSendTip}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
</TouchableOpacity>
|
||||||
|
</TouchableOpacity>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,18 +8,11 @@ import fileListStyle from 'styles/fileList';
|
|||||||
import relatedContentStyle from 'styles/relatedContent';
|
import relatedContentStyle from 'styles/relatedContent';
|
||||||
|
|
||||||
export default class RelatedContent extends React.PureComponent {
|
export default class RelatedContent extends React.PureComponent {
|
||||||
state = {
|
componentDidMount() {
|
||||||
urlsResolved: false,
|
|
||||||
};
|
|
||||||
|
|
||||||
componentDidUpdate(prevProps) {
|
|
||||||
const { resolveUris, recommendedContent } = this.props;
|
const { resolveUris, recommendedContent } = this.props;
|
||||||
|
if (recommendedContent && recommendedContent.length > 0) {
|
||||||
if (recommendedContent && recommendedContent.length > 0 && !this.state.urisResolved) {
|
// batch resolve the uris
|
||||||
this.setState({ urisResolved: true }, () => {
|
resolveUris(recommendedContent);
|
||||||
// batch resolve the uris
|
|
||||||
resolveUris(recommendedContent);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28,7 +21,7 @@ export default class RelatedContent extends React.PureComponent {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={relatedContentStyle.container}>
|
<View style={relatedContentStyle.container}>
|
||||||
<Text style={relatedContentStyle.title}>Related Content</Text>
|
<Text style={relatedContentStyle.title}>{__('Related Content')}</Text>
|
||||||
{recommendedContent &&
|
{recommendedContent &&
|
||||||
recommendedContent
|
recommendedContent
|
||||||
.filter(recommendedUri => recommendedUri !== normalizeURI(fullUri))
|
.filter(recommendedUri => recommendedUri !== normalizeURI(fullUri))
|
||||||
|
|||||||
@@ -35,7 +35,10 @@ class RewardEnrolment extends React.Component {
|
|||||||
<View style={rewardStyle.enrollContainer}>
|
<View style={rewardStyle.enrollContainer}>
|
||||||
<View style={rewardStyle.summaryRow}>
|
<View style={rewardStyle.summaryRow}>
|
||||||
<Icon name="award" size={36} color={Colors.White} />
|
<Icon name="award" size={36} color={Colors.White} />
|
||||||
<Text style={rewardStyle.summaryText}>{unclaimedRewardAmount} available credits</Text>
|
<Text style={rewardStyle.summaryText}>
|
||||||
|
{unclaimedRewardAmount === 1 && __('%amount% available credit', { amount: unclaimedRewardAmount })}
|
||||||
|
{unclaimedRewardAmount !== 1 && __('%amount% available credits', { amount: unclaimedRewardAmount })}
|
||||||
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View style={rewardStyle.onboarding}>
|
<View style={rewardStyle.onboarding}>
|
||||||
|
|||||||
@@ -75,10 +75,10 @@ class StorageStatsCard extends React.PureComponent {
|
|||||||
<View style={[storageStatsStyle.row, storageStatsStyle.totalSizeContainer]}>
|
<View style={[storageStatsStyle.row, storageStatsStyle.totalSizeContainer]}>
|
||||||
<View style={storageStatsStyle.summary}>
|
<View style={storageStatsStyle.summary}>
|
||||||
<Text style={storageStatsStyle.totalSize}>{formatBytes(this.state.totalBytes, 2)}</Text>
|
<Text style={storageStatsStyle.totalSize}>{formatBytes(this.state.totalBytes, 2)}</Text>
|
||||||
<Text style={storageStatsStyle.annotation}>used</Text>
|
<Text style={storageStatsStyle.annotation}>{__('used')}</Text>
|
||||||
</View>
|
</View>
|
||||||
<View style={[storageStatsStyle.row, storageStatsStyle.toggleStatsContainer]}>
|
<View style={[storageStatsStyle.row, storageStatsStyle.toggleStatsContainer]}>
|
||||||
<Text style={storageStatsStyle.statsText}>Stats</Text>
|
<Text style={storageStatsStyle.statsText}>{__('Stats')}</Text>
|
||||||
<Switch
|
<Switch
|
||||||
style={storageStatsStyle.statsToggle}
|
style={storageStatsStyle.statsToggle}
|
||||||
value={this.state.showStats}
|
value={this.state.showStats}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ export default class TagSearch extends React.PureComponent {
|
|||||||
<TextInput
|
<TextInput
|
||||||
editable={editable}
|
editable={editable}
|
||||||
style={tagStyle.searchInput}
|
style={tagStyle.searchInput}
|
||||||
placeholder={'Search for more tags'}
|
placeholder={__('Search for more tags')}
|
||||||
underlineColorAndroid={Colors.NextLbryGreen}
|
underlineColorAndroid={Colors.NextLbryGreen}
|
||||||
value={this.state.tag}
|
value={this.state.tag}
|
||||||
numberOfLines={1}
|
numberOfLines={1}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class TransactionListRecent extends React.PureComponent<Props> {
|
|||||||
return (
|
return (
|
||||||
<View style={walletStyle.transactionsCard}>
|
<View style={walletStyle.transactionsCard}>
|
||||||
<View style={[walletStyle.row, walletStyle.transactionsHeader]}>
|
<View style={[walletStyle.row, walletStyle.transactionsHeader]}>
|
||||||
<Text style={walletStyle.transactionsTitle}>Recent Transactions</Text>
|
<Text style={walletStyle.transactionsTitle}>{__('Recent Transactions')}</Text>
|
||||||
<Link style={walletStyle.link} navigation={navigation} text={__('View All')} href={'#TransactionHistory'} />
|
<Link style={walletStyle.link} navigation={navigation} text={__('View All')} href={'#TransactionHistory'} />
|
||||||
</View>
|
</View>
|
||||||
{fetchingTransactions && <Text style={walletStyle.infoText}>{__('Fetching transactions...')}</Text>}
|
{fetchingTransactions && <Text style={walletStyle.infoText}>{__('Fetching transactions...')}</Text>}
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
// @flow
|
// @flow
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { regexAddress } from 'lbry-redux';
|
import { formatCredits, regexAddress } from 'lbry-redux';
|
||||||
import { Alert, Clipboard, TextInput, Text, View } from 'react-native';
|
import { Alert, Clipboard, TextInput, Text, View } from 'react-native';
|
||||||
import Button from 'component/button';
|
import Button from 'component/button';
|
||||||
import Colors from 'styles/colors';
|
import Colors from 'styles/colors';
|
||||||
|
import Icon from 'react-native-vector-icons/FontAwesome5';
|
||||||
import walletStyle from 'styles/wallet';
|
import walletStyle from 'styles/wallet';
|
||||||
|
|
||||||
type DraftTransaction = {
|
type DraftTransaction = {
|
||||||
@@ -24,6 +25,7 @@ class WalletSend extends React.PureComponent<Props> {
|
|||||||
address: null,
|
address: null,
|
||||||
addressChanged: false,
|
addressChanged: false,
|
||||||
addressValid: false,
|
addressValid: false,
|
||||||
|
creditsInputFocused: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
componentWillUpdate(nextProps) {
|
componentWillUpdate(nextProps) {
|
||||||
@@ -118,6 +120,8 @@ class WalletSend extends React.PureComponent<Props> {
|
|||||||
<TextInput
|
<TextInput
|
||||||
ref={ref => (this.amountInput = ref)}
|
ref={ref => (this.amountInput = ref)}
|
||||||
onChangeText={value => this.setState({ amount: value })}
|
onChangeText={value => this.setState({ amount: value })}
|
||||||
|
onFocus={() => this.setState({ creditsInputFocused: true })}
|
||||||
|
onBlur={() => this.setState({ creditsInputFocused: false })}
|
||||||
keyboardType={'numeric'}
|
keyboardType={'numeric'}
|
||||||
placeholder={'0'}
|
placeholder={'0'}
|
||||||
underlineColorAndroid={Colors.NextLbryGreen}
|
underlineColorAndroid={Colors.NextLbryGreen}
|
||||||
@@ -125,9 +129,15 @@ class WalletSend extends React.PureComponent<Props> {
|
|||||||
style={[walletStyle.input, walletStyle.amountInput]}
|
style={[walletStyle.input, walletStyle.amountInput]}
|
||||||
/>
|
/>
|
||||||
<Text style={[walletStyle.text, walletStyle.currency]}>LBC</Text>
|
<Text style={[walletStyle.text, walletStyle.currency]}>LBC</Text>
|
||||||
|
<View style={walletStyle.balanceFocus}>
|
||||||
|
{this.state.creditsInputFocused && <Icon name="coins" size={12} />}
|
||||||
|
{this.state.creditsInputFocused && (
|
||||||
|
<Text style={walletStyle.balanceText}>{formatCredits(parseFloat(balance), 1, true)}</Text>
|
||||||
|
)}
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<Button
|
<Button
|
||||||
text={'Send'}
|
text={__('Send')}
|
||||||
style={[walletStyle.button, walletStyle.sendButton]}
|
style={[walletStyle.button, walletStyle.sendButton]}
|
||||||
disabled={!canSend}
|
disabled={!canSend}
|
||||||
onPress={this.handleSend}
|
onPress={this.handleSend}
|
||||||
|
|||||||
@@ -29,14 +29,12 @@ class WalletSignIn extends React.Component {
|
|||||||
return (
|
return (
|
||||||
<View style={walletStyle.signInContainer}>
|
<View style={walletStyle.signInContainer}>
|
||||||
<View style={walletStyle.signInSummaryRow}>
|
<View style={walletStyle.signInSummaryRow}>
|
||||||
<Text style={walletStyle.signInTitle}>Account Recommended</Text>
|
<Text style={walletStyle.signInTitle}>{__('Account Recommended')}</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View style={walletStyle.onboarding}>
|
<View style={walletStyle.onboarding}>
|
||||||
<Text style={walletStyle.onboardingText}>
|
<Text style={walletStyle.onboardingText}>
|
||||||
{__(
|
{__('A lbry.tv account allows you to earn rewards, backup your wallet, and keep everything in sync.')}
|
||||||
'An account with LBRY Inc. allows you to earn rewards, backup your wallet, and keep everything synced.'
|
|
||||||
)}
|
|
||||||
{'\n\n'}
|
{'\n\n'}
|
||||||
{__('Without an account, you assume all responsibility for securing your wallet and LBRY data.')}
|
{__('Without an account, you assume all responsibility for securing your wallet and LBRY data.')}
|
||||||
</Text>
|
</Text>
|
||||||
|
|||||||
+6
-1
@@ -95,6 +95,7 @@ const Constants = {
|
|||||||
FULL_ROUTE_NAME_WALLET: 'WalletStack',
|
FULL_ROUTE_NAME_WALLET: 'WalletStack',
|
||||||
|
|
||||||
ROUTE_FILE: 'File',
|
ROUTE_FILE: 'File',
|
||||||
|
DRAWER_ROUTE_FILE_VIEW: 'FileView',
|
||||||
|
|
||||||
ITEM_CREATE_A_CHANNEL: 'Create a channel...',
|
ITEM_CREATE_A_CHANNEL: 'Create a channel...',
|
||||||
ITEM_ANONYMOUS: 'Publish anonymously',
|
ITEM_ANONYMOUS: 'Publish anonymously',
|
||||||
@@ -167,4 +168,8 @@ export const DrawerRoutes = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
// sub-pages for main routes
|
// sub-pages for main routes
|
||||||
export const InnerDrawerRoutes = [Constants.DRAWER_ROUTE_CHANNEL_CREATOR_FORM, Constants.DRAWER_ROUTE_PUBLISH_FORM];
|
export const InnerDrawerRoutes = [
|
||||||
|
Constants.DRAWER_ROUTE_CHANNEL_CREATOR_FORM,
|
||||||
|
Constants.DRAWER_ROUTE_PUBLISH_FORM,
|
||||||
|
Constants.DRAWER_ROUTE_FILE_VIEW,
|
||||||
|
];
|
||||||
+4
-3
@@ -52,8 +52,9 @@ function checkMessageAndSave(message, messagesFilePath) {
|
|||||||
); */
|
); */
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
if (err) {
|
if (err && !isProduction) {
|
||||||
throw err;
|
// only do this when not in production
|
||||||
|
console.error(err);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -74,6 +75,6 @@ export function __(message, tokens) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return translatedMessage.replace(/%([^%]+)%/g, function($1, $2) {
|
return translatedMessage.replace(/%([^%]+)%/g, function($1, $2) {
|
||||||
return tokens[$2] || $2;
|
return tokens.hasOwnProperty($2) ? tokens[$2] : $2;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
+3
-1
@@ -27,6 +27,7 @@ import {
|
|||||||
homepageReducer,
|
homepageReducer,
|
||||||
rewardsReducer,
|
rewardsReducer,
|
||||||
selectUserVerifiedEmail,
|
selectUserVerifiedEmail,
|
||||||
|
statsReducer,
|
||||||
subscriptionsReducer,
|
subscriptionsReducer,
|
||||||
syncReducer,
|
syncReducer,
|
||||||
userReducer,
|
userReducer,
|
||||||
@@ -56,7 +57,7 @@ window.__ = __;
|
|||||||
|
|
||||||
const globalExceptionHandler = (error, isFatal) => {
|
const globalExceptionHandler = (error, isFatal) => {
|
||||||
if (error && NativeModules.Firebase) {
|
if (error && NativeModules.Firebase) {
|
||||||
NativeModules.Firebase.logException(isFatal, error.message ? error.message : 'No message', JSON.stringify(error));
|
NativeModules.Firebase.logException(!!isFatal, error.message ? error.message : 'No message', JSON.stringify(error));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
setJSExceptionHandler(globalExceptionHandler, true);
|
setJSExceptionHandler(globalExceptionHandler, true);
|
||||||
@@ -140,6 +141,7 @@ const reducers = persistCombineReducers(persistOptions, {
|
|||||||
rewards: rewardsReducer,
|
rewards: rewardsReducer,
|
||||||
settings: settingsReducer,
|
settings: settingsReducer,
|
||||||
search: searchReducer,
|
search: searchReducer,
|
||||||
|
stats: statsReducer,
|
||||||
subscriptions: subscriptionsReducer,
|
subscriptions: subscriptionsReducer,
|
||||||
sync: syncReducer,
|
sync: syncReducer,
|
||||||
tags: tagsReducer,
|
tags: tagsReducer,
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ class AboutPage extends React.PureComponent {
|
|||||||
<View style={aboutStyle.container}>
|
<View style={aboutStyle.container}>
|
||||||
<PageHeader title={'About LBRY'} onBackPressed={() => navigateBack(navigation, drawerStack, popDrawerStack)} />
|
<PageHeader title={'About LBRY'} onBackPressed={() => navigateBack(navigation, drawerStack, popDrawerStack)} />
|
||||||
<ScrollView style={aboutStyle.scrollContainer}>
|
<ScrollView style={aboutStyle.scrollContainer}>
|
||||||
<Text style={aboutStyle.title}>Content Freedom</Text>
|
<Text style={aboutStyle.title}>{__('Content Freedom')}</Text>
|
||||||
<Text style={aboutStyle.paragraph}>
|
<Text style={aboutStyle.paragraph}>
|
||||||
{__(
|
{__(
|
||||||
'LBRY is a free, open, and community-run digital marketplace. It is a decentralized peer-to-peer content distribution platform for creators to upload and share content, and earn LBRY credits for their effort. Users will be able to find a wide selection of videos, music, ebooks and other digital content they are interested in.'
|
'LBRY is a free, open, and community-run digital marketplace. It is a decentralized peer-to-peer content distribution platform for creators to upload and share content, and earn LBRY credits for their effort. Users will be able to find a wide selection of videos, music, ebooks and other digital content they are interested in.'
|
||||||
@@ -85,7 +85,7 @@ class AboutPage extends React.PureComponent {
|
|||||||
<Link style={aboutStyle.link} href="https://lbry.com/faq/android-basics" text={__('Android App Basics')} />
|
<Link style={aboutStyle.link} href="https://lbry.com/faq/android-basics" text={__('Android App Basics')} />
|
||||||
<Link style={aboutStyle.link} href="https://lbry.com/faq" text={__('Frequently Asked Questions')} />
|
<Link style={aboutStyle.link} href="https://lbry.com/faq" text={__('Frequently Asked Questions')} />
|
||||||
</View>
|
</View>
|
||||||
<Text style={aboutStyle.socialTitle}>Get Social</Text>
|
<Text style={aboutStyle.socialTitle}>{__('Get Social')}</Text>
|
||||||
<Text style={aboutStyle.paragraph}>
|
<Text style={aboutStyle.paragraph}>
|
||||||
{__(
|
{__(
|
||||||
'You can interact with the LBRY team and members of the community on Discord, Facebook, Instagram, Twitter or Reddit.'
|
'You can interact with the LBRY team and members of the community on Discord, Facebook, Instagram, Twitter or Reddit.'
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { doAbandonClaim, doFetchChannelListMine, makeSelectClaimForUri, selectMyChannelClaims } from 'lbry-redux';
|
import { doAbandonClaim, doFetchChannelListMine, makeSelectClaimForUri, selectMyChannelClaims } from 'lbry-redux';
|
||||||
|
import { doFetchSubCount, makeSelectSubCountForUri } from 'lbryinc';
|
||||||
import { doPopDrawerStack } from 'redux/actions/drawer';
|
import { doPopDrawerStack } from 'redux/actions/drawer';
|
||||||
import { doSetSortByItem, doSetTimeItem } from 'redux/actions/settings';
|
import { doSetSortByItem, doSetTimeItem } from 'redux/actions/settings';
|
||||||
import { selectDrawerStack } from 'redux/selectors/drawer';
|
import { selectDrawerStack } from 'redux/selectors/drawer';
|
||||||
@@ -11,12 +12,14 @@ const select = (state, props) => ({
|
|||||||
claim: makeSelectClaimForUri(props.uri)(state),
|
claim: makeSelectClaimForUri(props.uri)(state),
|
||||||
drawerStack: selectDrawerStack(state),
|
drawerStack: selectDrawerStack(state),
|
||||||
sortByItem: selectSortByItem(state),
|
sortByItem: selectSortByItem(state),
|
||||||
|
subCount: makeSelectSubCountForUri(props.uri)(state),
|
||||||
timeItem: selectTimeItem(state),
|
timeItem: selectTimeItem(state),
|
||||||
});
|
});
|
||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
abandonClaim: (txid, nout) => dispatch(doAbandonClaim(txid, nout)),
|
abandonClaim: (txid, nout) => dispatch(doAbandonClaim(txid, nout)),
|
||||||
fetchChannelListMine: () => dispatch(doFetchChannelListMine()),
|
fetchChannelListMine: () => dispatch(doFetchChannelListMine()),
|
||||||
|
fetchSubCount: claimId => dispatch(doFetchSubCount(claimId)),
|
||||||
popDrawerStack: () => dispatch(doPopDrawerStack()),
|
popDrawerStack: () => dispatch(doPopDrawerStack()),
|
||||||
setSortByItem: item => dispatch(doSetSortByItem(item)),
|
setSortByItem: item => dispatch(doSetSortByItem(item)),
|
||||||
setTimeItem: item => dispatch(doSetTimeItem(item)),
|
setTimeItem: item => dispatch(doSetTimeItem(item)),
|
||||||
|
|||||||
+44
-15
@@ -23,6 +23,7 @@ import EmptyStateView from 'component/emptyStateView';
|
|||||||
import Icon from 'react-native-vector-icons/FontAwesome5';
|
import Icon from 'react-native-vector-icons/FontAwesome5';
|
||||||
import Link from 'component/link';
|
import Link from 'component/link';
|
||||||
import ModalPicker from 'component/modalPicker';
|
import ModalPicker from 'component/modalPicker';
|
||||||
|
import ModalTipView from 'component/modalTipView';
|
||||||
import PageHeader from 'component/pageHeader';
|
import PageHeader from 'component/pageHeader';
|
||||||
import SubscribeButton from 'component/subscribeButton';
|
import SubscribeButton from 'component/subscribeButton';
|
||||||
import SubscribeNotificationButton from 'component/subscribeNotificationButton';
|
import SubscribeNotificationButton from 'component/subscribeNotificationButton';
|
||||||
@@ -36,8 +37,10 @@ class ChannelPage extends React.PureComponent {
|
|||||||
autoStyle: null,
|
autoStyle: null,
|
||||||
showSortPicker: false,
|
showSortPicker: false,
|
||||||
showTimePicker: false,
|
showTimePicker: false,
|
||||||
|
showTipView: false,
|
||||||
orderBy: ['release_time'], // sort by new by default
|
orderBy: ['release_time'], // sort by new by default
|
||||||
activeTab: Constants.CONTENT_TAB,
|
activeTab: Constants.CONTENT_TAB,
|
||||||
|
currentSortByItem: Constants.CLAIM_SEARCH_SORT_BY_ITEMS[1], // should always default to sorting channel pages by new
|
||||||
};
|
};
|
||||||
|
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
@@ -48,16 +51,17 @@ class ChannelPage extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
const { fetchChannelListMine, setSortByItem } = this.props;
|
const { claim, fetchChannelListMine, fetchSubCount } = this.props;
|
||||||
NativeModules.Firebase.setCurrentScreen('Channel');
|
NativeModules.Firebase.setCurrentScreen('Channel');
|
||||||
setSortByItem(Constants.CLAIM_SEARCH_SORT_BY_ITEMS[1]); // sort by newest first
|
|
||||||
fetchChannelListMine();
|
fetchChannelListMine();
|
||||||
|
if (claim) {
|
||||||
|
fetchSubCount(claim.claim_id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleSortByItemSelected = item => {
|
handleSortByItemSelected = item => {
|
||||||
const { setSortByItem } = this.props;
|
// sort by specific only to this component state
|
||||||
setSortByItem(item);
|
this.setState({ currentSortByItem: item, orderBy: getOrderBy(item), showSortPicker: false });
|
||||||
this.setState({ orderBy: getOrderBy(item), showSortPicker: false });
|
|
||||||
};
|
};
|
||||||
|
|
||||||
handleTimeItemSelected = item => {
|
handleTimeItemSelected = item => {
|
||||||
@@ -67,17 +71,18 @@ class ChannelPage extends React.PureComponent {
|
|||||||
};
|
};
|
||||||
|
|
||||||
listHeader = () => {
|
listHeader = () => {
|
||||||
const { sortByItem, timeItem } = this.props;
|
const { timeItem } = this.props;
|
||||||
|
const { currentSortByItem } = this.state;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={channelPageStyle.listHeader}>
|
<View style={channelPageStyle.listHeader}>
|
||||||
<View style={discoverStyle.pickerRow}>
|
<View style={discoverStyle.pickerRow}>
|
||||||
<View style={discoverStyle.leftPickerRow}>
|
<View style={discoverStyle.leftPickerRow}>
|
||||||
<TouchableOpacity style={discoverStyle.tagSortBy} onPress={() => this.setState({ showSortPicker: true })}>
|
<TouchableOpacity style={discoverStyle.tagSortBy} onPress={() => this.setState({ showSortPicker: true })}>
|
||||||
<Text style={discoverStyle.tagSortText}>{__(sortByItem.label.split(' ')[0])}</Text>
|
<Text style={discoverStyle.tagSortText}>{__(currentSortByItem.label.split(' ')[0])}</Text>
|
||||||
<Icon style={discoverStyle.tagSortIcon} name={'sort-down'} size={14} />
|
<Icon style={discoverStyle.tagSortIcon} name={'sort-down'} size={14} />
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
{Constants.SORT_BY_TOP === sortByItem.name && (
|
{Constants.SORT_BY_TOP === currentSortByItem.name && (
|
||||||
<TouchableOpacity style={discoverStyle.tagTime} onPress={() => this.setState({ showTimePicker: true })}>
|
<TouchableOpacity style={discoverStyle.tagTime} onPress={() => this.setState({ showTimePicker: true })}>
|
||||||
<Text style={discoverStyle.tagSortText}>{__(timeItem.label)}</Text>
|
<Text style={discoverStyle.tagSortText}>{__(timeItem.label)}</Text>
|
||||||
<Icon style={discoverStyle.tagSortIcon} name={'sort-down'} size={14} />
|
<Icon style={discoverStyle.tagSortIcon} name={'sort-down'} size={14} />
|
||||||
@@ -173,6 +178,10 @@ class ChannelPage extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
onTipPressed = () => {
|
||||||
|
this.setState({ showTipView: true });
|
||||||
|
};
|
||||||
|
|
||||||
onSharePressed = () => {
|
onSharePressed = () => {
|
||||||
const { claim } = this.props;
|
const { claim } = this.props;
|
||||||
if (claim) {
|
if (claim) {
|
||||||
@@ -207,9 +216,9 @@ class ChannelPage extends React.PureComponent {
|
|||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { channels, claim, navigation, uri, drawerStack, popDrawerStack, sortByItem, timeItem } = this.props;
|
const { channels, claim, navigation, uri, drawerStack, popDrawerStack, subCount, timeItem } = this.props;
|
||||||
const { name, permanent_url: permanentUrl } = claim;
|
const { name, permanent_url: permanentUrl } = claim;
|
||||||
const { autoStyle, showSortPicker, showTimePicker } = this.state;
|
const { autoStyle, currentSortByItem, showSortPicker, showTimePicker, showTipView } = this.state;
|
||||||
const ownedChannel = channels ? channels.map(channel => channel.permanent_url).includes(permanentUrl) : false;
|
const ownedChannel = channels ? channels.map(channel => channel.permanent_url).includes(permanentUrl) : false;
|
||||||
|
|
||||||
let thumbnailUrl,
|
let thumbnailUrl,
|
||||||
@@ -252,6 +261,10 @@ class ChannelPage extends React.PureComponent {
|
|||||||
|
|
||||||
<View style={channelPageStyle.channelHeader}>
|
<View style={channelPageStyle.channelHeader}>
|
||||||
<Text style={channelPageStyle.channelName}>{title && title.trim().length > 0 ? title : name}</Text>
|
<Text style={channelPageStyle.channelName}>{title && title.trim().length > 0 ? title : name}</Text>
|
||||||
|
<Text style={[channelPageStyle.followerCount, subCount >= 1 ? channelPageStyle.followerCountBg : null]}>
|
||||||
|
{subCount === 1 && __('%follower% follower', { follower: subCount })}
|
||||||
|
{subCount > 1 && __('%follower% followers', { follower: subCount })}
|
||||||
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View style={[channelPageStyle.avatarImageContainer, autoStyle]}>
|
<View style={[channelPageStyle.avatarImageContainer, autoStyle]}>
|
||||||
@@ -271,7 +284,7 @@ class ChannelPage extends React.PureComponent {
|
|||||||
style={channelPageStyle.actionButton}
|
style={channelPageStyle.actionButton}
|
||||||
theme={'light'}
|
theme={'light'}
|
||||||
icon={'edit'}
|
icon={'edit'}
|
||||||
text={'Edit'}
|
text={__('Edit')}
|
||||||
onPress={this.onEditPressed}
|
onPress={this.onEditPressed}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@@ -280,7 +293,7 @@ class ChannelPage extends React.PureComponent {
|
|||||||
style={[channelPageStyle.actionButton, channelPageStyle.deleteButton]}
|
style={[channelPageStyle.actionButton, channelPageStyle.deleteButton]}
|
||||||
theme={'light'}
|
theme={'light'}
|
||||||
icon={'trash-alt'}
|
icon={'trash-alt'}
|
||||||
text={'Delete'}
|
text={__('Delete')}
|
||||||
onPress={this.onDeletePressed}
|
onPress={this.onDeletePressed}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@@ -290,6 +303,12 @@ class ChannelPage extends React.PureComponent {
|
|||||||
icon={'share-alt'}
|
icon={'share-alt'}
|
||||||
onPress={this.onSharePressed}
|
onPress={this.onSharePressed}
|
||||||
/>
|
/>
|
||||||
|
<Button
|
||||||
|
style={[channelPageStyle.actionButton, channelPageStyle.tipButton]}
|
||||||
|
theme={'light'}
|
||||||
|
icon={'gift'}
|
||||||
|
onPress={this.onTipPressed}
|
||||||
|
/>
|
||||||
{!ownedChannel && <SubscribeButton style={channelPageStyle.subscribeButton} uri={fullUri} name={name} />}
|
{!ownedChannel && <SubscribeButton style={channelPageStyle.subscribeButton} uri={fullUri} name={name} />}
|
||||||
{false && !ownedChannel && (
|
{false && !ownedChannel && (
|
||||||
<SubscribeNotificationButton
|
<SubscribeNotificationButton
|
||||||
@@ -306,14 +325,14 @@ class ChannelPage extends React.PureComponent {
|
|||||||
style={channelPageStyle.tab}
|
style={channelPageStyle.tab}
|
||||||
onPress={() => this.setState({ activeTab: Constants.CONTENT_TAB })}
|
onPress={() => this.setState({ activeTab: Constants.CONTENT_TAB })}
|
||||||
>
|
>
|
||||||
<Text style={channelPageStyle.tabTitle}>CONTENT</Text>
|
<Text style={channelPageStyle.tabTitle}>{__('CONTENT')}</Text>
|
||||||
{Constants.CONTENT_TAB === this.state.activeTab && <View style={channelPageStyle.activeTabHint} />}
|
{Constants.CONTENT_TAB === this.state.activeTab && <View style={channelPageStyle.activeTabHint} />}
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
style={channelPageStyle.tab}
|
style={channelPageStyle.tab}
|
||||||
onPress={() => this.setState({ activeTab: Constants.ABOUT_TAB })}
|
onPress={() => this.setState({ activeTab: Constants.ABOUT_TAB })}
|
||||||
>
|
>
|
||||||
<Text style={channelPageStyle.tabTitle}>ABOUT</Text>
|
<Text style={channelPageStyle.tabTitle}>{__('ABOUT')}</Text>
|
||||||
{Constants.ABOUT_TAB === this.state.activeTab && <View style={channelPageStyle.activeTabHint} />}
|
{Constants.ABOUT_TAB === this.state.activeTab && <View style={channelPageStyle.activeTabHint} />}
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
</View>
|
</View>
|
||||||
@@ -327,7 +346,7 @@ class ChannelPage extends React.PureComponent {
|
|||||||
title={__('Sort content by')}
|
title={__('Sort content by')}
|
||||||
onOverlayPress={() => this.setState({ showSortPicker: false })}
|
onOverlayPress={() => this.setState({ showSortPicker: false })}
|
||||||
onItemSelected={this.handleSortByItemSelected}
|
onItemSelected={this.handleSortByItemSelected}
|
||||||
selectedItem={sortByItem}
|
selectedItem={currentSortByItem}
|
||||||
items={Constants.CLAIM_SEARCH_SORT_BY_ITEMS}
|
items={Constants.CLAIM_SEARCH_SORT_BY_ITEMS}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@@ -340,6 +359,16 @@ class ChannelPage extends React.PureComponent {
|
|||||||
items={Constants.CLAIM_SEARCH_TIME_ITEMS}
|
items={Constants.CLAIM_SEARCH_TIME_ITEMS}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
{showTipView && (
|
||||||
|
<ModalTipView
|
||||||
|
claim={claim}
|
||||||
|
channelName={claim.name}
|
||||||
|
contentName={title}
|
||||||
|
onCancelPress={() => this.setState({ showTipView: false })}
|
||||||
|
onOverlayPress={() => this.setState({ showTipView: false })}
|
||||||
|
onSendTipSuccessful={() => this.setState({ showTipView: false })}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { CLAIM_VALUES, isNameValid, regexInvalidURI } from 'lbry-redux';
|
import { CLAIM_VALUES, formatCredits, isNameValid, regexInvalidURI } from 'lbry-redux';
|
||||||
import {
|
import {
|
||||||
ActivityIndicator,
|
ActivityIndicator,
|
||||||
Alert,
|
Alert,
|
||||||
@@ -38,6 +38,7 @@ export default class ChannelCreator extends React.PureComponent {
|
|||||||
autoStyle: null,
|
autoStyle: null,
|
||||||
canSave: true,
|
canSave: true,
|
||||||
claimId: null,
|
claimId: null,
|
||||||
|
creditsInputFocused: false,
|
||||||
currentSelectedValue: Constants.ITEM_ANONYMOUS,
|
currentSelectedValue: Constants.ITEM_ANONYMOUS,
|
||||||
currentPhase: null,
|
currentPhase: null,
|
||||||
displayName: null,
|
displayName: null,
|
||||||
@@ -960,11 +961,19 @@ export default class ChannelCreator extends React.PureComponent {
|
|||||||
style={channelCreatorStyle.bidAmountInput}
|
style={channelCreatorStyle.bidAmountInput}
|
||||||
value={String(newChannelBid)}
|
value={String(newChannelBid)}
|
||||||
onChangeText={this.handleNewChannelBidChange}
|
onChangeText={this.handleNewChannelBidChange}
|
||||||
|
onFocus={() => this.setState({ creditsInputFocused: true })}
|
||||||
|
onBlur={() => this.setState({ creditsInputFocused: false })}
|
||||||
placeholder={'0.00'}
|
placeholder={'0.00'}
|
||||||
keyboardType={'number-pad'}
|
keyboardType={'number-pad'}
|
||||||
underlineColorAndroid={Colors.NextLbryGreen}
|
underlineColorAndroid={Colors.NextLbryGreen}
|
||||||
/>
|
/>
|
||||||
<Text style={channelCreatorStyle.currency}>LBC</Text>
|
<Text style={channelCreatorStyle.currency}>LBC</Text>
|
||||||
|
<View style={channelCreatorStyle.balance}>
|
||||||
|
{this.state.creditsInputFocused && <Icon name="coins" size={12} />}
|
||||||
|
{this.state.creditsInputFocused && (
|
||||||
|
<Text style={channelCreatorStyle.balanceText}>{formatCredits(parseFloat(balance), 1, true)}</Text>
|
||||||
|
)}
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<Text style={channelCreatorStyle.helpText}>
|
<Text style={channelCreatorStyle.helpText}>
|
||||||
{__('This LBC remains yours. It is a deposit to reserve the name and can be undone at any time.')}
|
{__('This LBC remains yours. It is a deposit to reserve the name and can be undone at any time.')}
|
||||||
|
|||||||
@@ -86,11 +86,9 @@ class DiscoverPage extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onComponentFocused = () => {
|
onComponentFocused = () => {
|
||||||
const { fetchSubscriptions, pushDrawerStack } = this.props;
|
const { pushDrawerStack } = this.props;
|
||||||
// pushDrawerStack();
|
// pushDrawerStack();
|
||||||
NativeModules.Firebase.setCurrentScreen('Your tags').then(result => {
|
NativeModules.Firebase.setCurrentScreen('Your tags');
|
||||||
fetchSubscriptions();
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
handleSortByItemSelected = item => {
|
handleSortByItemSelected = item => {
|
||||||
@@ -123,46 +121,6 @@ class DiscoverPage extends React.PureComponent {
|
|||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
componentDidUpdate(prevProps, prevState) {
|
|
||||||
const { unreadSubscriptions, enabledChannelNotifications } = this.props;
|
|
||||||
|
|
||||||
const utility = NativeModules.UtilityModule;
|
|
||||||
const hasUnread =
|
|
||||||
prevProps.unreadSubscriptions &&
|
|
||||||
prevProps.unreadSubscriptions.length !== unreadSubscriptions.length &&
|
|
||||||
unreadSubscriptions.length > 0;
|
|
||||||
|
|
||||||
if (hasUnread) {
|
|
||||||
unreadSubscriptions.map(({ channel, uris }) => {
|
|
||||||
const { claimName: channelName } = parseURI(channel);
|
|
||||||
|
|
||||||
// check if notifications are enabled for the channel
|
|
||||||
if (enabledChannelNotifications.includes(channelName)) {
|
|
||||||
uris.forEach(uri => {
|
|
||||||
Lbry.resolve({ urls: uri }).then(result => {
|
|
||||||
const sub = result[uri];
|
|
||||||
|
|
||||||
if (sub && sub.value) {
|
|
||||||
const { source, title, thumbnail } = sub.value;
|
|
||||||
const isPlayable =
|
|
||||||
source && source.media_type && ['audio', 'video'].includes(source.media_type.substring(0, 5));
|
|
||||||
if (title) {
|
|
||||||
utility.showNotificationForContent(
|
|
||||||
uri,
|
|
||||||
title,
|
|
||||||
channelName,
|
|
||||||
thumbnail ? thumbnail.url : null,
|
|
||||||
isPlayable
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
showRatingReminder = () => {
|
showRatingReminder = () => {
|
||||||
const { ratingReminderDisabled, ratingReminderLastShown, setClientSetting } = this.props;
|
const { ratingReminderDisabled, ratingReminderLastShown, setClientSetting } = this.props;
|
||||||
|
|
||||||
|
|||||||
+11
-11
@@ -8,6 +8,7 @@ import {
|
|||||||
doPurchaseUri,
|
doPurchaseUri,
|
||||||
doDeletePurchasedUri,
|
doDeletePurchasedUri,
|
||||||
doResolveUri,
|
doResolveUri,
|
||||||
|
doResolveUris,
|
||||||
doSearch,
|
doSearch,
|
||||||
doSendTip,
|
doSendTip,
|
||||||
doToast,
|
doToast,
|
||||||
@@ -28,23 +29,20 @@ import {
|
|||||||
selectPurchasedUris,
|
selectPurchasedUris,
|
||||||
selectFailedPurchaseUris,
|
selectFailedPurchaseUris,
|
||||||
selectPurchaseUriErrorMessage,
|
selectPurchaseUriErrorMessage,
|
||||||
|
selectResolvingUris,
|
||||||
selectIsSearching,
|
selectIsSearching,
|
||||||
} from 'lbry-redux';
|
} from 'lbry-redux';
|
||||||
import {
|
import {
|
||||||
doClaimEligiblePurchaseRewards,
|
doClaimEligiblePurchaseRewards,
|
||||||
doFetchCostInfoForUri,
|
doFetchCostInfoForUri,
|
||||||
|
doFetchViewCount,
|
||||||
makeSelectCostInfoForUri,
|
makeSelectCostInfoForUri,
|
||||||
|
makeSelectViewCountForUri,
|
||||||
selectRewardContentClaimIds,
|
selectRewardContentClaimIds,
|
||||||
selectBlackListedOutpoints,
|
selectBlackListedOutpoints,
|
||||||
} from 'lbryinc';
|
} from 'lbryinc';
|
||||||
import {
|
import { doDeleteFile, doStopDownloadingFile } from 'redux/actions/file';
|
||||||
doStartDownload,
|
import { doPushDrawerStack, doPopDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
|
||||||
doUpdateDownload,
|
|
||||||
doCompleteDownload,
|
|
||||||
doDeleteFile,
|
|
||||||
doStopDownloadingFile,
|
|
||||||
} from 'redux/actions/file';
|
|
||||||
import { doPopDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
|
|
||||||
import { doToggleFullscreenMode } from 'redux/actions/settings';
|
import { doToggleFullscreenMode } from 'redux/actions/settings';
|
||||||
import { selectDrawerStack } from 'redux/selectors/drawer';
|
import { selectDrawerStack } from 'redux/selectors/drawer';
|
||||||
import FilePage from './view';
|
import FilePage from './view';
|
||||||
@@ -75,7 +73,9 @@ const select = (state, props) => {
|
|||||||
thumbnail: makeSelectThumbnailForUri(contentUri)(state),
|
thumbnail: makeSelectThumbnailForUri(contentUri)(state),
|
||||||
title: makeSelectTitleForUri(contentUri)(state),
|
title: makeSelectTitleForUri(contentUri)(state),
|
||||||
recommendedContent: makeSelectRecommendedContentForUri(contentUri)(state),
|
recommendedContent: makeSelectRecommendedContentForUri(contentUri)(state),
|
||||||
|
resolvingUris: selectResolvingUris(state),
|
||||||
isSearchingRecommendContent: selectIsSearching(state),
|
isSearchingRecommendContent: selectIsSearching(state),
|
||||||
|
viewCount: makeSelectViewCountForUri(contentUri)(state),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -89,20 +89,20 @@ const perform = dispatch => ({
|
|||||||
fetchCostInfo: uri => dispatch(doFetchCostInfoForUri(uri)),
|
fetchCostInfo: uri => dispatch(doFetchCostInfoForUri(uri)),
|
||||||
fetchMyClaims: () => dispatch(doFetchClaimListMine()),
|
fetchMyClaims: () => dispatch(doFetchClaimListMine()),
|
||||||
fetchChannelListMine: () => dispatch(doFetchChannelListMine()),
|
fetchChannelListMine: () => dispatch(doFetchChannelListMine()),
|
||||||
|
fetchViewCount: claimId => dispatch(doFetchViewCount(claimId)),
|
||||||
fileGet: (uri, saveFile) => dispatch(doFileGet(uri, saveFile)),
|
fileGet: (uri, saveFile) => dispatch(doFileGet(uri, saveFile)),
|
||||||
notify: data => dispatch(doToast(data)),
|
notify: data => dispatch(doToast(data)),
|
||||||
popDrawerStack: () => dispatch(doPopDrawerStack()),
|
popDrawerStack: () => dispatch(doPopDrawerStack()),
|
||||||
|
pushDrawerStack: (routeName, params) => dispatch(doPushDrawerStack(routeName, params)),
|
||||||
purchaseUri: (uri, costInfo, saveFile) => dispatch(doPurchaseUri(uri, costInfo, saveFile)),
|
purchaseUri: (uri, costInfo, saveFile) => dispatch(doPurchaseUri(uri, costInfo, saveFile)),
|
||||||
deletePurchasedUri: uri => dispatch(doDeletePurchasedUri(uri)),
|
deletePurchasedUri: uri => dispatch(doDeletePurchasedUri(uri)),
|
||||||
resolveUri: uri => dispatch(doResolveUri(uri)),
|
resolveUri: uri => dispatch(doResolveUri(uri)),
|
||||||
|
resolveUris: uris => dispatch(doResolveUris(uris)),
|
||||||
searchRecommended: query => dispatch(doSearch(query, 20, undefined, true)),
|
searchRecommended: query => dispatch(doSearch(query, 20, undefined, true)),
|
||||||
sendTip: (amount, claimId, isSupport, successCallback, errorCallback) =>
|
sendTip: (amount, claimId, isSupport, successCallback, errorCallback) =>
|
||||||
dispatch(doSendTip(amount, claimId, isSupport, successCallback, errorCallback)),
|
dispatch(doSendTip(amount, claimId, isSupport, successCallback, errorCallback)),
|
||||||
setPlayerVisible: () => dispatch(doSetPlayerVisible(true)),
|
setPlayerVisible: () => dispatch(doSetPlayerVisible(true)),
|
||||||
stopDownload: (uri, fileInfo) => dispatch(doStopDownloadingFile(uri, fileInfo)),
|
stopDownload: (uri, fileInfo) => dispatch(doStopDownloadingFile(uri, fileInfo)),
|
||||||
startDownload: (uri, outpoint, fileInfo) => dispatch(doStartDownload(uri, outpoint, fileInfo)),
|
|
||||||
updateDownload: (uri, outpoint, fileInfo, progress) => dispatch(doUpdateDownload(uri, outpoint, fileInfo, progress)),
|
|
||||||
completeDownload: (uri, outpoint, fileInfo) => dispatch(doCompleteDownload(uri, outpoint, fileInfo)),
|
|
||||||
toggleFullscreenMode: mode => dispatch(doToggleFullscreenMode(mode)),
|
toggleFullscreenMode: mode => dispatch(doToggleFullscreenMode(mode)),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
+573
-526
File diff suppressed because it is too large.
Load diff
@@ -113,7 +113,7 @@ class WalletPage extends React.PureComponent {
|
|||||||
// only display this view if it's not a new user (or auto-login has been attempted once)
|
// only display this view if it's not a new user (or auto-login has been attempted once)
|
||||||
content = (
|
content = (
|
||||||
<View onLayout={onWalletViewLayout}>
|
<View onLayout={onWalletViewLayout}>
|
||||||
<Text style={firstRunStyle.title}>Password</Text>
|
<Text style={firstRunStyle.title}>{__('Password')}</Text>
|
||||||
<Text style={firstRunStyle.paragraph}>
|
<Text style={firstRunStyle.paragraph}>
|
||||||
{hasSyncedWallet
|
{hasSyncedWallet
|
||||||
? __('Please enter the password you used to secure your wallet.')
|
? __('Please enter the password you used to secure your wallet.')
|
||||||
@@ -146,15 +146,6 @@ class WalletPage extends React.PureComponent {
|
|||||||
<Icon name={this.state.revealPassword ? 'eye-slash' : 'eye'} size={16} style={firstRunStyle.revealIcon} />
|
<Icon name={this.state.revealPassword ? 'eye-slash' : 'eye'} size={16} style={firstRunStyle.revealIcon} />
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
</View>
|
</View>
|
||||||
{(!this.state.password || this.state.password.trim().length === 0) && (
|
|
||||||
<View style={firstRunStyle.passwordWarning}>
|
|
||||||
<Text style={firstRunStyle.passwordWarningText}>
|
|
||||||
{hasSyncedWallet
|
|
||||||
? __('If you did not provide a password, please press Use LBRY to continue.')
|
|
||||||
: __('You can proceed without a password, but this is not recommended.')}
|
|
||||||
</Text>
|
|
||||||
</View>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{(!hasSyncedWallet && this.state.password && this.state.password.trim().length) > 0 && (
|
{(!hasSyncedWallet && this.state.password && this.state.password.trim().length) > 0 && (
|
||||||
<View style={firstRunStyle.passwordStrength}>
|
<View style={firstRunStyle.passwordStrength}>
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ class WelcomePage extends React.PureComponent {
|
|||||||
} else {
|
} else {
|
||||||
content = (
|
content = (
|
||||||
<View onLayout={onWelcomePageLayout}>
|
<View onLayout={onWelcomePageLayout}>
|
||||||
<Text style={firstRunStyle.title}>Welcome to LBRY.</Text>
|
<Text style={firstRunStyle.title}>{__('Welcome to LBRY.')}</Text>
|
||||||
<Text style={firstRunStyle.paragraph}>
|
<Text style={firstRunStyle.paragraph}>
|
||||||
{__(
|
{__(
|
||||||
'LBRY is a community-controlled content platform where you can find and publish videos, music, books, and more.'
|
'LBRY is a community-controlled content platform where you can find and publish videos, music, books, and more.'
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ class FirstRunScreen extends React.PureComponent {
|
|||||||
emailCollectTracked: false,
|
emailCollectTracked: false,
|
||||||
emailSubmitted: false,
|
emailSubmitted: false,
|
||||||
enterPasswordTracked: false,
|
enterPasswordTracked: false,
|
||||||
|
autoLoginTried: false,
|
||||||
isFirstRun: false,
|
isFirstRun: false,
|
||||||
launchUrl: null,
|
launchUrl: null,
|
||||||
languageLoaded: false,
|
languageLoaded: false,
|
||||||
@@ -38,7 +39,6 @@ class FirstRunScreen extends React.PureComponent {
|
|||||||
walletPassword: '',
|
walletPassword: '',
|
||||||
syncApplyStarted: false,
|
syncApplyStarted: false,
|
||||||
syncApplyCompleted: false,
|
syncApplyCompleted: false,
|
||||||
language: null,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
@@ -126,8 +126,16 @@ class FirstRunScreen extends React.PureComponent {
|
|||||||
|
|
||||||
if (this.state.syncApplyStarted && !syncApplyIsPending) {
|
if (this.state.syncApplyStarted && !syncApplyIsPending) {
|
||||||
if (syncApplyErrorMessage && syncApplyErrorMessage.trim().length > 0) {
|
if (syncApplyErrorMessage && syncApplyErrorMessage.trim().length > 0) {
|
||||||
notify({ message: __(syncApplyErrorMessage), isError: true });
|
if (this.state.autoLoginTried) {
|
||||||
this.setState({ showBottomContainer: true, syncApplyStarted: false, syncApplyCompleted: false });
|
// don't show the error message for auto-login if it fails
|
||||||
|
notify({ message: __(syncApplyErrorMessage), isError: true });
|
||||||
|
}
|
||||||
|
this.setState({
|
||||||
|
autoLoginTried: true,
|
||||||
|
showBottomContainer: true,
|
||||||
|
syncApplyStarted: false,
|
||||||
|
syncApplyCompleted: false,
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
this.setState({ syncApplyCompleted: true });
|
this.setState({ syncApplyCompleted: true });
|
||||||
// password successfully verified
|
// password successfully verified
|
||||||
@@ -220,7 +228,13 @@ class FirstRunScreen extends React.PureComponent {
|
|||||||
handleContinuePressed = () => {
|
handleContinuePressed = () => {
|
||||||
const { notify, user, hasSyncedWallet } = this.props;
|
const { notify, user, hasSyncedWallet } = this.props;
|
||||||
const pageIndex = FirstRunScreen.pages.indexOf(this.state.currentPage);
|
const pageIndex = FirstRunScreen.pages.indexOf(this.state.currentPage);
|
||||||
if (Constants.FIRST_RUN_PAGE_WALLET === this.state.currentPage) {
|
|
||||||
|
if (Constants.FIRST_RUN_PAGE_WELCOME === this.state.currentPage) {
|
||||||
|
// only show the welcome screen on first run
|
||||||
|
this.closeFinalPage();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* if (Constants.FIRST_RUN_PAGE_WALLET === this.state.currentPage) {
|
||||||
// do apply sync to check if the password is valid
|
// do apply sync to check if the password is valid
|
||||||
if (hasSyncedWallet) {
|
if (hasSyncedWallet) {
|
||||||
this.checkWalletPassword();
|
this.checkWalletPassword();
|
||||||
@@ -248,7 +262,7 @@ class FirstRunScreen extends React.PureComponent {
|
|||||||
} else {
|
} else {
|
||||||
this.showNextPage();
|
this.showNextPage();
|
||||||
}
|
}
|
||||||
}
|
} */
|
||||||
};
|
};
|
||||||
|
|
||||||
handleEmailCollectPageContinue() {
|
handleEmailCollectPageContinue() {
|
||||||
@@ -301,7 +315,7 @@ class FirstRunScreen extends React.PureComponent {
|
|||||||
onEmailChanged = email => {
|
onEmailChanged = email => {
|
||||||
this.setState({ email });
|
this.setState({ email });
|
||||||
if (Constants.FIRST_RUN_PAGE_EMAIL_COLLECT === this.state.currentPage) {
|
if (Constants.FIRST_RUN_PAGE_EMAIL_COLLECT === this.state.currentPage) {
|
||||||
this.setState({ showSkip: !email || email.trim().length === 0 });
|
this.setState({ showSkip: !email || typeof email !== 'string' || email.trim().length === 0 });
|
||||||
} else {
|
} else {
|
||||||
this.setState({ showSkip: false });
|
this.setState({ showSkip: false });
|
||||||
}
|
}
|
||||||
@@ -492,7 +506,12 @@ class FirstRunScreen extends React.PureComponent {
|
|||||||
{Constants.FIRST_RUN_PAGE_SKIP_ACCOUNT !== this.state.currentPage &&
|
{Constants.FIRST_RUN_PAGE_SKIP_ACCOUNT !== this.state.currentPage &&
|
||||||
Constants.FIRST_RUN_PAGE_EMAIL_VERIFY !== this.state.currentPage && (
|
Constants.FIRST_RUN_PAGE_EMAIL_VERIFY !== this.state.currentPage && (
|
||||||
<Text style={firstRunStyle.buttonText}>
|
<Text style={firstRunStyle.buttonText}>
|
||||||
{Constants.FIRST_RUN_PAGE_WALLET === this.state.currentPage ? __('Use LBRY') : __('Continue')} »
|
{[Constants.FIRST_RUN_PAGE_WALLET, Constants.FIRST_RUN_PAGE_WELCOME].includes(
|
||||||
|
this.state.currentPage
|
||||||
|
)
|
||||||
|
? __('Use LBRY')
|
||||||
|
: __('Continue')}{' '}
|
||||||
|
»
|
||||||
</Text>
|
</Text>
|
||||||
)}
|
)}
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import {
|
|||||||
isNameValid,
|
isNameValid,
|
||||||
batchActions,
|
batchActions,
|
||||||
buildURI,
|
buildURI,
|
||||||
|
formatCredits,
|
||||||
normalizeURI,
|
normalizeURI,
|
||||||
parseURI,
|
parseURI,
|
||||||
regexInvalidURI,
|
regexInvalidURI,
|
||||||
@@ -83,6 +84,7 @@ class PublishPage extends React.PureComponent {
|
|||||||
state = {
|
state = {
|
||||||
canPublish: true,
|
canPublish: true,
|
||||||
canUseCamera: false,
|
canUseCamera: false,
|
||||||
|
creditsInputFocused: false,
|
||||||
documentPickerOpen: false,
|
documentPickerOpen: false,
|
||||||
editMode: false,
|
editMode: false,
|
||||||
titleFocused: false,
|
titleFocused: false,
|
||||||
@@ -1133,8 +1135,16 @@ class PublishPage extends React.PureComponent {
|
|||||||
keyboardType={'numeric'}
|
keyboardType={'numeric'}
|
||||||
value={String(this.state.bid)}
|
value={String(this.state.bid)}
|
||||||
onChangeText={this.handleBidChange}
|
onChangeText={this.handleBidChange}
|
||||||
|
onFocus={() => this.setState({ creditsInputFocused: true })}
|
||||||
|
onBlur={() => this.setState({ creditsInputFocused: false })}
|
||||||
/>
|
/>
|
||||||
<Text style={publishStyle.currency}>LBC</Text>
|
<Text style={publishStyle.currency}>LBC</Text>
|
||||||
|
<View style={publishStyle.balance}>
|
||||||
|
{this.state.creditsInputFocused && <Icon name="coins" size={12} />}
|
||||||
|
{this.state.creditsInputFocused && (
|
||||||
|
<Text style={publishStyle.balanceText}>{formatCredits(parseFloat(balance), 1, true)}</Text>
|
||||||
|
)}
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<Text style={publishStyle.helpText}>
|
<Text style={publishStyle.helpText}>
|
||||||
{__('This LBC remains yours and the deposit can be undone at any time.')}
|
{__('This LBC remains yours and the deposit can be undone at any time.')}
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ class RewardsPage extends React.PureComponent {
|
|||||||
if (this.state.isEmailVerified && this.state.isIdentityVerified && !this.state.isRewardApproved) {
|
if (this.state.isEmailVerified && this.state.isIdentityVerified && !this.state.isRewardApproved) {
|
||||||
return (
|
return (
|
||||||
<View style={[rewardStyle.card, rewardStyle.verification]}>
|
<View style={[rewardStyle.card, rewardStyle.verification]}>
|
||||||
<Text style={rewardStyle.title}>Manual Reward Verification</Text>
|
<Text style={rewardStyle.title}>{__('Manual Reward Verification')}</Text>
|
||||||
<Text style={rewardStyle.text}>
|
<Text style={rewardStyle.text}>
|
||||||
__('You need to be manually verified before you can start claiming rewards.') Please request to be verified
|
__('You need to be manually verified before you can start claiming rewards.') Please request to be verified
|
||||||
on the{' '}
|
on the{' '}
|
||||||
|
|||||||
@@ -109,8 +109,7 @@ class SearchPage extends React.PureComponent {
|
|||||||
return (
|
return (
|
||||||
<View style={searchStyle.noResults}>
|
<View style={searchStyle.noResults}>
|
||||||
<Text style={searchStyle.noResultsText}>
|
<Text style={searchStyle.noResultsText}>
|
||||||
There are no results to display for <Text style={searchStyle.boldText}>{query}</Text>. Please try a different
|
{__('There are no results to display for "%query%". Please try a different search term.', { query })}
|
||||||
search term.
|
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
|||||||
+30
-22
@@ -89,33 +89,41 @@ class SettingsPage extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check the local filesystem for the language first? Or download remote strings first?
|
// check the local filesystem for the language first? Or download remote strings first?
|
||||||
|
if (language === 'en') {
|
||||||
|
// don't attempt to download English
|
||||||
|
NativeModules.UtilityModule.setNativeStringSetting(SETTINGS.LANGUAGE, language);
|
||||||
|
|
||||||
// download and save the language file
|
// update state and client setting
|
||||||
this.setState({ downloadingLanguage: true }, () => {
|
window.language = language;
|
||||||
fetch('https://lbry.com/i18n/get/lbry-mobile/app-strings/' + language + '.json')
|
setClientSetting(SETTINGS.LANGUAGE, value);
|
||||||
.then(r => r.json())
|
} else {
|
||||||
.then(j => {
|
// download and save the language file
|
||||||
window.i18n_messages[language] = j;
|
this.setState({ downloadingLanguage: true }, () => {
|
||||||
|
fetch('https://lbry.com/i18n/get/lbry-mobile/app-strings/' + language + '.json')
|
||||||
|
.then(r => r.json())
|
||||||
|
.then(j => {
|
||||||
|
window.i18n_messages[language] = j;
|
||||||
|
|
||||||
// write the language file to the filesystem
|
// write the language file to the filesystem
|
||||||
const langFilePath = RNFS.ExternalDirectoryPath + '/' + language + '.json';
|
const langFilePath = RNFS.ExternalDirectoryPath + '/' + language + '.json';
|
||||||
RNFS.writeFile(langFilePath, JSON.stringify(j), 'utf8');
|
RNFS.writeFile(langFilePath, JSON.stringify(j), 'utf8');
|
||||||
|
|
||||||
// save the setting outside redux because when the first component mounts, the redux value isn't loaded yet
|
// save the setting outside redux because when the first component mounts, the redux value isn't loaded yet
|
||||||
// so we have to load it from native settings
|
// so we have to load it from native settings
|
||||||
NativeModules.UtilityModule.setNativeStringSetting(SETTINGS.LANGUAGE, value);
|
NativeModules.UtilityModule.setNativeStringSetting(SETTINGS.LANGUAGE, language);
|
||||||
|
|
||||||
// update state and client setting
|
// update state and client setting
|
||||||
window.language = language;
|
window.language = language;
|
||||||
setClientSetting(SETTINGS.LANGUAGE, value);
|
setClientSetting(SETTINGS.LANGUAGE, value);
|
||||||
|
|
||||||
this.setState({ downloadingLanguage: false });
|
this.setState({ downloadingLanguage: false });
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
notify({ message: __('Failed to load %language% translations.', { language: language }), isError: true });
|
notify({ message: __('Failed to load %language% translations.', { language: language }), isError: true });
|
||||||
this.setState({ downloadingLanguage: false });
|
this.setState({ downloadingLanguage: false });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
handleBackPressed = () => {
|
handleBackPressed = () => {
|
||||||
|
|||||||
@@ -170,7 +170,6 @@ class SplashScreen extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_updateStatusCallback(status) {
|
_updateStatusCallback(status) {
|
||||||
console.log(status);
|
|
||||||
const { fetchSubscriptions, getSync, setClientSetting } = this.props;
|
const { fetchSubscriptions, getSync, setClientSetting } = this.props;
|
||||||
const startupStatus = status.startup_status;
|
const startupStatus = status.startup_status;
|
||||||
const walletStatus = status.wallet;
|
const walletStatus = status.wallet;
|
||||||
@@ -222,7 +221,7 @@ class SplashScreen extends React.PureComponent {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const headerSyncProgress = walletStatus.headers_synchronization_progress;
|
const headerSyncProgress = walletStatus ? walletStatus.headers_synchronization_progress : null;
|
||||||
if (headerSyncProgress && headerSyncProgress < 100) {
|
if (headerSyncProgress && headerSyncProgress < 100) {
|
||||||
this.setState({
|
this.setState({
|
||||||
isDownloadingHeaders: true,
|
isDownloadingHeaders: true,
|
||||||
@@ -236,7 +235,7 @@ class SplashScreen extends React.PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (headerSyncProgress < 100) {
|
if (headerSyncProgress < 100) {
|
||||||
const downloadProgress = headerSyncProgress || 0;
|
const downloadProgress = isNaN(parseInt(headerSyncProgress, 10)) ? '0' : headerSyncProgress || '0';
|
||||||
this.setState({
|
this.setState({
|
||||||
message: __('Blockchain Sync'),
|
message: __('Blockchain Sync'),
|
||||||
details: __('Catching up with the blockchain (%progress%%)', { progress: downloadProgress }),
|
details: __('Catching up with the blockchain (%progress%%)', { progress: downloadProgress }),
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import {
|
import {
|
||||||
|
doChannelUnsubscribe,
|
||||||
doFetchMySubscriptions,
|
doFetchMySubscriptions,
|
||||||
doSetViewMode,
|
doSetViewMode,
|
||||||
doFetchRecommendedSubscriptions,
|
doFetchRecommendedSubscriptions,
|
||||||
@@ -36,6 +37,7 @@ const select = state => ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
|
channelUnsubscribe: subscription => dispatch(doChannelUnsubscribe(subscription)),
|
||||||
doFetchMySubscriptions: () => dispatch(doFetchMySubscriptions()),
|
doFetchMySubscriptions: () => dispatch(doFetchMySubscriptions()),
|
||||||
doFetchRecommendedSubscriptions: () => dispatch(doFetchRecommendedSubscriptions()),
|
doFetchRecommendedSubscriptions: () => dispatch(doFetchRecommendedSubscriptions()),
|
||||||
doSetViewMode: viewMode => dispatch(doSetViewMode(viewMode)),
|
doSetViewMode: viewMode => dispatch(doSetViewMode(viewMode)),
|
||||||
|
|||||||
@@ -82,6 +82,8 @@ class SubscriptionsPage extends React.PureComponent {
|
|||||||
if (Constants.DRAWER_ROUTE_SUBSCRIPTIONS === currentRoute && currentRoute !== prevRoute) {
|
if (Constants.DRAWER_ROUTE_SUBSCRIPTIONS === currentRoute && currentRoute !== prevRoute) {
|
||||||
this.onComponentFocused();
|
this.onComponentFocused();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.unsubscribeShortChannelUrls();
|
||||||
}
|
}
|
||||||
|
|
||||||
handleSortByItemSelected = item => {
|
handleSortByItemSelected = item => {
|
||||||
@@ -109,6 +111,16 @@ class SubscriptionsPage extends React.PureComponent {
|
|||||||
return [Constants.ALL_PLACEHOLDER].concat(channelUris);
|
return [Constants.ALL_PLACEHOLDER].concat(channelUris);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Added in 0.12.1. Can be dropped on or after 1 Feb 2020.
|
||||||
|
unsubscribeShortChannelUrls = () => {
|
||||||
|
// this should only have to happen once
|
||||||
|
const { subscribedChannels, channelUnsubscribe } = this.props;
|
||||||
|
const badSubs = subscribedChannels.filter(sub => sub.uri.split('#')[1].length < 5);
|
||||||
|
if (badSubs.length > 0) {
|
||||||
|
badSubs.forEach(sub => channelUnsubscribe(sub));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
suggestedChannels,
|
suggestedChannels,
|
||||||
@@ -243,7 +255,7 @@ class SubscriptionsPage extends React.PureComponent {
|
|||||||
title={__('Sort content by')}
|
title={__('Sort content by')}
|
||||||
onOverlayPress={() => this.setState({ showSortPicker: false })}
|
onOverlayPress={() => this.setState({ showSortPicker: false })}
|
||||||
onItemSelected={this.handleSortByItemSelected}
|
onItemSelected={this.handleSortByItemSelected}
|
||||||
selectedItem={this.state.currentSortByItem}
|
selectedItem={currentSortByItem}
|
||||||
items={Constants.CLAIM_SEARCH_SORT_BY_ITEMS}
|
items={Constants.CLAIM_SEARCH_SORT_BY_ITEMS}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ class SyncVerifyPage extends React.PureComponent {
|
|||||||
revealPassword: false,
|
revealPassword: false,
|
||||||
autoPassword: false,
|
autoPassword: false,
|
||||||
autoLoginAttempted: false,
|
autoLoginAttempted: false,
|
||||||
|
autoLoginTried: false,
|
||||||
autoLoginFlow: true,
|
autoLoginFlow: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -67,8 +68,10 @@ class SyncVerifyPage extends React.PureComponent {
|
|||||||
|
|
||||||
if (this.state.syncApplyStarted && !syncApplyIsPending) {
|
if (this.state.syncApplyStarted && !syncApplyIsPending) {
|
||||||
if (syncApplyErrorMessage && syncApplyErrorMessage.trim().length > 0) {
|
if (syncApplyErrorMessage && syncApplyErrorMessage.trim().length > 0) {
|
||||||
notify({ message: __(syncApplyErrorMessage), isError: true });
|
if (this.state.autoLoginTried) {
|
||||||
this.setState({ syncApplyStarted: false, autoLoginFlow: false });
|
notify({ message: __(syncApplyErrorMessage), isError: true });
|
||||||
|
}
|
||||||
|
this.setState({ autoLoginTried: true, syncApplyStarted: false, autoLoginFlow: false });
|
||||||
} else {
|
} else {
|
||||||
// password successfully verified
|
// password successfully verified
|
||||||
this.setState({ syncApplyCompleted: true });
|
this.setState({ syncApplyCompleted: true });
|
||||||
@@ -194,16 +197,6 @@ class SyncVerifyPage extends React.PureComponent {
|
|||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{(!this.state.password || this.state.password.trim().length === 0) && (
|
|
||||||
<View style={firstRunStyle.passwordWarning}>
|
|
||||||
<Text style={firstRunStyle.passwordWarningText}>
|
|
||||||
{hasSyncedWallet
|
|
||||||
? __('If you did not provide a password, please press Use LBRY to continue.')
|
|
||||||
: __('You can proceed without a password, but this is not recommended.')}
|
|
||||||
</Text>
|
|
||||||
</View>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{(!hasSyncedWallet && this.state.password && this.state.password.trim().length) > 0 && (
|
{(!hasSyncedWallet && this.state.password && this.state.password.trim().length) > 0 && (
|
||||||
<View style={firstRunStyle.passwordStrength}>
|
<View style={firstRunStyle.passwordStrength}>
|
||||||
<BarPasswordStrengthDisplay
|
<BarPasswordStrengthDisplay
|
||||||
|
|||||||
@@ -30,6 +30,16 @@ const channelCreatorStyle = StyleSheet.create({
|
|||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-UI-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
},
|
},
|
||||||
|
balance: {
|
||||||
|
alignItems: 'center',
|
||||||
|
flexDirection: 'row',
|
||||||
|
marginLeft: 24,
|
||||||
|
},
|
||||||
|
balanceText: {
|
||||||
|
fontFamily: 'Inter-UI-SemiBold',
|
||||||
|
fontSize: 14,
|
||||||
|
marginLeft: 4,
|
||||||
|
},
|
||||||
channelNameInput: {
|
channelNameInput: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-UI-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
|
|||||||
@@ -64,6 +64,8 @@ const channelPageStyle = StyleSheet.create({
|
|||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-UI-Regular',
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
|
padding: 2,
|
||||||
|
backgroundColor: '#000000aa',
|
||||||
},
|
},
|
||||||
subscribeButtonContainer: {
|
subscribeButtonContainer: {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
@@ -145,7 +147,7 @@ const channelPageStyle = StyleSheet.create({
|
|||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
left: 24,
|
left: 24,
|
||||||
bottom: -40,
|
bottom: -24,
|
||||||
zIndex: 100,
|
zIndex: 100,
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
@@ -176,6 +178,20 @@ const channelPageStyle = StyleSheet.create({
|
|||||||
marginLeft: 8,
|
marginLeft: 8,
|
||||||
marginRight: 8,
|
marginRight: 8,
|
||||||
},
|
},
|
||||||
|
tipButton: {
|
||||||
|
marginRight: 8,
|
||||||
|
},
|
||||||
|
followerCount: {
|
||||||
|
fontFamily: 'Inter-UI-Regular',
|
||||||
|
fontSize: 12,
|
||||||
|
color: Colors.White,
|
||||||
|
marginTop: 2,
|
||||||
|
padding: 2,
|
||||||
|
flexWrap: 'wrap',
|
||||||
|
},
|
||||||
|
followerCountBg: {
|
||||||
|
backgroundColor: '#000000aa',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export default channelPageStyle;
|
export default channelPageStyle;
|
||||||
@@ -24,6 +24,16 @@ const channelSelectorStyle = StyleSheet.create({
|
|||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-UI-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
},
|
},
|
||||||
|
balance: {
|
||||||
|
alignItems: 'center',
|
||||||
|
flexDirection: 'row',
|
||||||
|
marginLeft: 24,
|
||||||
|
},
|
||||||
|
balanceText: {
|
||||||
|
fontFamily: 'Inter-UI-SemiBold',
|
||||||
|
fontSize: 14,
|
||||||
|
marginLeft: 4,
|
||||||
|
},
|
||||||
channelNameInput: {
|
channelNameInput: {
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-UI-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
|
|||||||
@@ -94,6 +94,11 @@ const fileListStyle = StyleSheet.create({
|
|||||||
top: 8,
|
top: 8,
|
||||||
left: 8,
|
left: 8,
|
||||||
},
|
},
|
||||||
|
featuredDownloadedIcon: {
|
||||||
|
position: 'absolute',
|
||||||
|
left: 16,
|
||||||
|
top: 16,
|
||||||
|
},
|
||||||
fileItem: {
|
fileItem: {
|
||||||
marginLeft: 24,
|
marginLeft: 24,
|
||||||
marginRight: 24,
|
marginRight: 24,
|
||||||
|
|||||||
+30
-5
@@ -277,6 +277,7 @@ const filePageStyle = StyleSheet.create({
|
|||||||
amountRow: {
|
amountRow: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
flex: 0.75,
|
flex: 0.75,
|
||||||
|
alignItems: 'center',
|
||||||
},
|
},
|
||||||
button: {
|
button: {
|
||||||
backgroundColor: Colors.LbryGreen,
|
backgroundColor: Colors.LbryGreen,
|
||||||
@@ -299,9 +300,7 @@ const filePageStyle = StyleSheet.create({
|
|||||||
letterSpacing: 1,
|
letterSpacing: 1,
|
||||||
},
|
},
|
||||||
currency: {
|
currency: {
|
||||||
alignSelf: 'flex-start',
|
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
marginTop: 15,
|
|
||||||
marginLeft: 4,
|
marginLeft: 4,
|
||||||
},
|
},
|
||||||
descriptionToggle: {
|
descriptionToggle: {
|
||||||
@@ -381,10 +380,19 @@ const filePageStyle = StyleSheet.create({
|
|||||||
backButtonIcon: {
|
backButtonIcon: {
|
||||||
color: Colors.White,
|
color: Colors.White,
|
||||||
},
|
},
|
||||||
|
sharedLargeButton: {
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
flex: 0.2,
|
||||||
|
},
|
||||||
|
innerLargeButton: {
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
},
|
||||||
largeButton: {
|
largeButton: {
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
marginRight: 48,
|
flex: 0.2,
|
||||||
},
|
},
|
||||||
largeButtonIcon: {
|
largeButtonIcon: {
|
||||||
color: Colors.DescriptionGrey,
|
color: Colors.DescriptionGrey,
|
||||||
@@ -397,8 +405,8 @@ const filePageStyle = StyleSheet.create({
|
|||||||
largeButtonsRow: {
|
largeButtonsRow: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
marginLeft: 20,
|
marginLeft: 16,
|
||||||
marginRight: 20,
|
marginRight: 16,
|
||||||
marginTop: 12,
|
marginTop: 12,
|
||||||
marginBottom: 12,
|
marginBottom: 12,
|
||||||
},
|
},
|
||||||
@@ -438,6 +446,23 @@ const filePageStyle = StyleSheet.create({
|
|||||||
relatedLoading: {
|
relatedLoading: {
|
||||||
marginTop: 16,
|
marginTop: 16,
|
||||||
},
|
},
|
||||||
|
viewCount: {
|
||||||
|
fontFamily: 'Inter-UI-Regular',
|
||||||
|
fontSize: 12,
|
||||||
|
color: Colors.DescriptionGrey,
|
||||||
|
marginLeft: 12,
|
||||||
|
marginRight: 12,
|
||||||
|
},
|
||||||
|
balance: {
|
||||||
|
alignItems: 'center',
|
||||||
|
flexDirection: 'row',
|
||||||
|
marginLeft: 24,
|
||||||
|
},
|
||||||
|
balanceText: {
|
||||||
|
fontFamily: 'Inter-UI-SemiBold',
|
||||||
|
fontSize: 14,
|
||||||
|
marginLeft: 4,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export default filePageStyle;
|
export default filePageStyle;
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
import { StyleSheet } from 'react-native';
|
||||||
|
import Colors from './colors';
|
||||||
|
|
||||||
|
const modalTipStyle = StyleSheet.create({
|
||||||
|
container: {
|
||||||
|
padding: 16,
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
fontFamily: 'Inter-UI-Regular',
|
||||||
|
fontSize: 24,
|
||||||
|
},
|
||||||
|
row: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
flex: 1,
|
||||||
|
},
|
||||||
|
amountRow: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
alignItems: 'center',
|
||||||
|
marginRight: 24,
|
||||||
|
},
|
||||||
|
tipAmountInput: {
|
||||||
|
fontFamily: 'Inter-UI-Regular',
|
||||||
|
fontSize: 14,
|
||||||
|
alignSelf: 'flex-start',
|
||||||
|
textAlign: 'right',
|
||||||
|
width: 80,
|
||||||
|
letterSpacing: 1,
|
||||||
|
},
|
||||||
|
currency: {
|
||||||
|
fontFamily: 'Inter-UI-Regular',
|
||||||
|
fontSize: 12,
|
||||||
|
marginLeft: 4,
|
||||||
|
},
|
||||||
|
buttonRow: {
|
||||||
|
alignItems: 'center',
|
||||||
|
flexDirection: 'row',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
marginTop: 16,
|
||||||
|
},
|
||||||
|
button: {
|
||||||
|
backgroundColor: Colors.LbryGreen,
|
||||||
|
},
|
||||||
|
cancelTipLink: {
|
||||||
|
color: Colors.Grey,
|
||||||
|
},
|
||||||
|
balance: {
|
||||||
|
alignItems: 'center',
|
||||||
|
flexDirection: 'row',
|
||||||
|
marginLeft: 24,
|
||||||
|
},
|
||||||
|
balanceText: {
|
||||||
|
fontFamily: 'Inter-UI-SemiBold',
|
||||||
|
fontSize: 14,
|
||||||
|
marginLeft: 4,
|
||||||
|
},
|
||||||
|
info: {
|
||||||
|
marginTop: 4,
|
||||||
|
},
|
||||||
|
infoText: {
|
||||||
|
fontFamily: 'Inter-UI-Regular',
|
||||||
|
fontSize: 14,
|
||||||
|
color: Colors.DescriptionGrey,
|
||||||
|
},
|
||||||
|
learnMoreLink: {
|
||||||
|
fontFamily: 'Inter-UI-Regular',
|
||||||
|
fontSize: 14,
|
||||||
|
color: Colors.LbryGreen,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export default modalTipStyle;
|
||||||
@@ -466,6 +466,16 @@ const publishStyle = StyleSheet.create({
|
|||||||
fontFamily: 'Inter-UI-SemiBold',
|
fontFamily: 'Inter-UI-SemiBold',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
},
|
},
|
||||||
|
balance: {
|
||||||
|
alignItems: 'center',
|
||||||
|
flexDirection: 'row',
|
||||||
|
marginLeft: 24,
|
||||||
|
},
|
||||||
|
balanceText: {
|
||||||
|
fontFamily: 'Inter-UI-SemiBold',
|
||||||
|
fontSize: 14,
|
||||||
|
marginLeft: 4,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export default publishStyle;
|
export default publishStyle;
|
||||||
@@ -126,6 +126,16 @@ const walletStyle = StyleSheet.create({
|
|||||||
marginLeft: 16,
|
marginLeft: 16,
|
||||||
marginBottom: 16,
|
marginBottom: 16,
|
||||||
},
|
},
|
||||||
|
balanceFocus: {
|
||||||
|
alignItems: 'center',
|
||||||
|
flexDirection: 'row',
|
||||||
|
marginLeft: 24,
|
||||||
|
},
|
||||||
|
balanceText: {
|
||||||
|
fontFamily: 'Inter-UI-SemiBold',
|
||||||
|
fontSize: 14,
|
||||||
|
marginLeft: 4,
|
||||||
|
},
|
||||||
infoText: {
|
infoText: {
|
||||||
color: '#aaaaaa',
|
color: '#aaaaaa',
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-UI-Regular',
|
||||||
|
|||||||
@@ -155,6 +155,14 @@ export function navigateToUri(navigation, uri, additionalParams, isNavigatingBac
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function navigateBack(navigation, drawerStack, popDrawerStack) {
|
export function navigateBack(navigation, drawerStack, popDrawerStack) {
|
||||||
|
if (drawerStack[drawerStack.length - 1].route === Constants.DRAWER_ROUTE_FILE_VIEW) {
|
||||||
|
// inner file_view (web / image view) is handled differently
|
||||||
|
if (popDrawerStack) {
|
||||||
|
popDrawerStack();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (popDrawerStack) {
|
if (popDrawerStack) {
|
||||||
popDrawerStack();
|
popDrawerStack();
|
||||||
}
|
}
|
||||||
@@ -186,6 +194,12 @@ export function navigateBack(navigation, drawerStack, popDrawerStack) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function dispatchNavigateBack(dispatch, nav, drawerStack) {
|
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
|
||||||
|
dispatch(doPopDrawerStack());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
dispatch(doPopDrawerStack());
|
dispatch(doPopDrawerStack());
|
||||||
|
|
||||||
const target = drawerStack[drawerStack.length > 1 ? drawerStack.length - 2 : 0];
|
const target = drawerStack[drawerStack.length > 1 ? drawerStack.length - 2 : 0];
|
||||||
|
|||||||
Reference in new issue
Block a user