Compare commits

..
104 changed files with 3241 additions and 6768 deletions

No files matched your search

-1
View File
@@ -10,7 +10,6 @@
"__": true
},
"rules": {
"no-console": 2,
"no-multi-spaces": 0,
"new-cap": 0,
"prefer-promise-reject-errors": 0,
-4
View File
@@ -1,7 +1,3 @@
if (__DEV__) {
import('./reactotron').then(() => console.log('Reactotron Configured'));
}
import LBRYApp from './src/index';
export default LBRYApp;
-308
View File
@@ -1,308 +0,0 @@
{
"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!",
"%follower% follower": "%follower% follower",
"Authenticating": "Authenticating",
"Waiting for authentication": "Waiting for authentication",
"Delete file": "Delete file",
"Are you sure you want to remove this file from your device?": "Are you sure you want to remove this file from your device?",
"Following": "Following",
"Update mailing preferences": "Update mailing preferences",
"Please confirm you want to tip %amount% credits": "Please confirm you want to tip %amount% credits",
"Send Tip": "Send Tip",
"You do not have any\ndownloaded content on this device.": "You do not have any\ndownloaded content on this device.",
"%view% view": "%view% view",
"No channel name after @.": "No channel name after @.",
"Loading transactions...": "Loading transactions...",
"Pending": "Pending",
"Phone Number": "Phone Number",
"Please provide a phone number to prevent fraud.": "Please provide a phone number to prevent fraud.",
"Send verification text": "Send verification text",
"Open": "Open",
"for": "for",
"Everyone": "Everyone",
"Suggested channels": "Suggested channels",
"You might also like": "You might also like",
"Publish something new": "Publish something new",
"Filter for": "Filter for",
"Tags you follow": "Tags you follow",
"Sort content by": "Sort content by",
"Trending content": "Trending content",
"New content": "New content",
"Top content": "Top content",
"Top": "Top",
"Past week": "Past week",
"It looks like you have not\npublished any content to LBRY yet.": "It looks like you have not\npublished any content to LBRY yet.",
"Stop": "Stop",
"Unsupported Content": "Unsupported Content",
"all tags you follow": "all tags you follow",
"Send LBC": "Send LBC",
"from": "from",
"This file cannot be displayed in the LBRY app.": "This file cannot be displayed in the LBRY app.",
"Please press the Play button.": "Please press the Play button.",
"Stop download": "Stop download",
"Are you sure you want to stop downloading this file?": "Are you sure you want to stop downloading this file?",
"The download will stop momentarily. You do not need to wait to discover something else.": "The download will stop momentarily. You do not need to wait to discover something else.",
"Connection Failure": "Connection Failure",
"We could not establish a connection to the SDK. Your data connection may be preventing LBRY from connecting. Contact hello@lbry.com if you think this is a software bug.": "We could not establish a connection to the SDK. Your data connection may be preventing LBRY from connecting. Contact hello@lbry.com if you think this is a software bug.",
"%num% block behind": "%num% block behind",
"Delete files": "Delete files",
"Are you sure you want to delete the selected content?": "Are you sure you want to delete the selected content?",
"We could not find any videos on your device. Take a photo or record a video to get started.": "We could not find any videos on your device. Take a photo or record a video to get started.",
"You have already published to the specified content address. Please enter a new address.": "You have already published to the specified content address. Please enter a new address.",
"Camera": "Camera",
"Please grant access to make use of your camera": "Please grant access to make use of your camera",
"OK": "OK",
"Audio": "Audio",
"Please grant access to record audio": "Please grant access to record audio",
"Camera not authorized": "Camera not authorized",
"There's nothing at this location.": "There's nothing at this location.",
"Publish something here": "Publish something here",
"This content cannot be viewed at this time. Please try again in a bit.": "This content cannot be viewed at this time. Please try again in a bit.",
"Download file": "Download file",
"Save %title% (%size%) to your device": "Save %title% (%size%) to your device",
"Save \"%title%\" (%size%) to your device": "Save \"%title%\" (%size%) to your device"
}
+1874 -3619
View File
File diff suppressed because it is too large. Load diff
+22 -32
View File
@@ -12,56 +12,49 @@
"base-64": "^0.1.0",
"@expo/vector-icons": "^8.1.0",
"gfycat-style-urls": "^1.0.3",
"lbry-redux": "lbryio/lbry-redux#c910cd2b80b165843a81fdf6ce96094429b94ec8",
"lbryinc": "lbryio/lbryinc#053ca52f4f7f9bf8eb62a3581b183671a475ad1c",
"lbry-redux": "lbryio/lbry-redux#9b11cfed62af7f0f8eb6fa3c88a1f8d2cce46afc",
"lbryinc": "lbryio/lbryinc#9ffb883cc11e36d55a729c65b70c405a4a56d35e",
"lodash": ">=4.17.11",
"merge": ">=1.2.1",
"moment": "^2.22.1",
"react": "16.9.0",
"react-native": "0.61.5",
"react": "16.8.6",
"react-native": "0.59.10",
"@react-native-community/async-storage": "^1.5.1",
"@react-native-community/masked-view": "^0.1.5",
"react-native-camera": "^3.15.0",
"react-native-country-picker-modal": "^1.10.0",
"react-native-exception-handler": "2.10.8",
"react-native-fast-image": "^7.0.2",
"react-native-camera": "^2.11.1",
"react-native-country-picker-modal": "^0.6.2",
"react-native-exception-handler": "2.9.0",
"react-native-fast-image": "^6.1.1",
"react-native-fs": "^2.13.3",
"react-native-gesture-handler": "1.5.2",
"react-native-gesture-handler": "1.3.0",
"react-native-image-zoom-viewer": "^2.2.5",
"react-native-password-strength-meter": "^0.0.2",
"react-native-phone-input": "lbryio/react-native-phone-input",
"react-native-progress-circle": "2.1.0",
"react-native-reanimated": "1.4.0",
"react-native-safe-area-context": "^0.6.2",
"react-native-snackbar": "2.0.4",
"react-native-reanimated": "1.2.0",
"react-native-super-grid": "^3.0.4",
"react-native-vector-icons": "^6.6.0",
"react-native-video": "lbryio/react-native-video#7992ff945872f9bd00a3736d9ff1318f343abf47",
"react-native-webview": "^8.0.2",
"react-navigation": "^4.0.10",
"react-navigation-drawer": "^2.3.3",
"react-native-video": "lbryio/react-native-video#exoplayer-lbry-android",
"react-navigation": "^3.11.0",
"react-navigation-drawer": "^1.4.0",
"react-navigation-redux-helpers": "^3.0.2",
"react-navigation-tabs": "^2.7.0",
"react-navigation-stack": "^1.10.3",
"react-navigation-stack": "^1.8.1",
"react-redux": "^5.0.3",
"redux": "^4.0.4",
"redux-persist": "^6.0.0",
"redux-persist-filesystem-storage": "^2.1.0",
"redux-persist": "^5.10.0",
"redux-persist-filesystem-storage": "^1.3.2",
"redux-persist-transform-compress": "^4.2.0",
"redux-persist-transform-filter": "0.0.18",
"redux-thunk": "^2.3.0",
"rn-fetch-blob": "0.12.0",
"seedrandom": "3.0.3",
"showdown": "1.9.1"
"rn-fetch-blob": "0.10.15",
"seedrandom": "3.0.3"
},
"devDependencies": {
"@babel/core": "^7.6.2",
"@babel/core": "^7.5.4",
"babel-eslint": "10.0.2",
"@babel/plugin-proposal-object-rest-spread": "^7.5.4",
"babel-preset-env": "^1.6.1",
"babel-preset-stage-2": "^6.18.0",
"babel-plugin-module-resolver": "^3.1.1",
"eslint": "^6.5.1",
"eslint": "^5.16.0",
"eslint-config-standard": "^12.0.0",
"eslint-config-standard-jsx": "^6.0.2",
"eslint-plugin-flowtype": "^2.46.1",
@@ -73,11 +66,8 @@
"flow-babel-webpack-plugin": "^1.1.1",
"husky": "^0.14.3",
"lint-staged": "^7.0.4",
"metro-react-native-babel-preset": "^0.56.0",
"metro-react-native-babel-preset": "^0.55.0",
"prettier": "^1.11.1",
"@react-native-community/eslint-config": "^0.0.5",
"react-devtools": "^3.6.3",
"reactotron-react-native": "4.0.2",
"reactotron-redux": "3.1.2"
"react-devtools": "^3.6.3"
}
}
-12
View File
@@ -1,12 +0,0 @@
import AsyncStorage from '@react-native-community/async-storage';
import Reactotron from 'reactotron-react-native';
import { reactotronRedux } from 'reactotron-redux';
const reactotron = Reactotron
.setAsyncStorageHandler(AsyncStorage) // AsyncStorage would either come from `react-native` or `@react-native-community/async-storage` depending on where you get it from
.configure() // controls connection & communication settings
.useReactNative() // add all built-in react native plugins
.use(reactotronRedux())
.connect();
export default reactotron;
+12 -74
View File
@@ -38,15 +38,7 @@ import {
ToastAndroid,
} from 'react-native';
import { selectDrawerStack } from 'redux/selectors/drawer';
import {
ACTIONS,
SETTINGS,
doDismissToast,
doPopulateSharedUserState,
doPreferenceGet,
doToast,
selectToast,
} from 'lbry-redux';
import { SETTINGS, doDismissToast, doPopulateSharedUserState, doPreferenceGet, doToast, selectToast } from 'lbry-redux';
import {
Lbryio,
doGetSync,
@@ -59,7 +51,6 @@ import {
selectHashChanged,
selectUser,
} from 'lbryinc';
import { doStartDownload, doUpdateDownload, doCompleteDownload } from 'redux/actions/file';
import { makeSelectClientSetting, selectFullscreenMode } from 'redux/selectors/settings';
import { decode as atob } from 'base-64';
import { dispatchNavigateBack, dispatchNavigateToUri, transformUrl } from 'utils/helper';
@@ -71,7 +62,6 @@ import NavigationButton from 'component/navigationButton';
import discoverStyle from 'styles/discover';
import searchStyle from 'styles/search';
import SearchRightHeaderIcon from 'component/searchRightHeaderIcon';
import Snackbar from 'react-native-snackbar';
const SYNC_GET_INTERVAL = 1000 * 60 * 5; // every 5 minutes
@@ -116,7 +106,7 @@ const discoverStack = createStackNavigator(
{
headerMode: 'screen',
transitionConfig: () => ({ screenInterpolator: () => null }),
},
}
);
discoverStack.navigationOptions = ({ navigation }) => {
@@ -150,7 +140,7 @@ const walletStack = createStackNavigator(
{
headerMode: 'screen',
transitionConfig: () => ({ screenInterpolator: () => null }),
},
}
);
const drawerIconSize = 18;
@@ -233,18 +223,17 @@ const drawer = createDrawerNavigator(
},
},
{
drawerWidth: 299,
drawerWidth: 300,
drawerBackgroundColor: 'transparent',
headerMode: 'none',
backBehavior: 'none',
unmountInactiveRoutes: true,
contentComponent: DrawerContent,
overlayColor: 'rgba(0, 0, 0, 0.7)',
contentOptions: {
activeTintColor: Colors.LbryGreen,
labelStyle: discoverStyle.menuText,
},
},
}
);
const mainStackNavigator = new createStackNavigator(
@@ -273,7 +262,7 @@ const mainStackNavigator = new createStackNavigator(
},
{
headerMode: 'none',
},
}
);
export const AppNavigator = mainStackNavigator;
@@ -312,7 +301,7 @@ class AppWithNavigationState extends React.Component {
}
return false;
}.bind(this),
}.bind(this)
);
}
@@ -321,11 +310,6 @@ class AppWithNavigationState extends React.Component {
this.emailVerifyCheckInterval = setInterval(() => this.checkEmailVerification(), 5000);
Linking.addEventListener('url', this._handleUrl);
DeviceEventEmitter.addListener('onDownloadAborted', this.handleDownloadAborted);
DeviceEventEmitter.addListener('onDownloadStarted', this.handleDownloadStarted);
DeviceEventEmitter.addListener('onDownloadUpdated', this.handleDownloadUpdated);
DeviceEventEmitter.addListener('onDownloadCompleted', this.handleDownloadCompleted);
// call /sync/get with interval
this.syncGetInterval = setInterval(() => {
this.setState({ syncHashChanged: false }); // reset local state
@@ -356,50 +340,11 @@ class AppWithNavigationState extends React.Component {
},
error => {
/* failed */
},
}
);
};
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));
};
handleDownloadAborted = evt => {
const { dispatch } = this.props;
const { uri, outpoint } = evt;
dispatch({
type: ACTIONS.DOWNLOADING_CANCELED,
data: { uri, outpoint },
});
dispatch({
type: ACTIONS.FILE_DELETE,
data: {
outpoint,
},
});
};
componentWillUnmount() {
DeviceEventEmitter.removeListener('onDownloadAborted', this.handleDownloadAborted);
DeviceEventEmitter.removeListener('onDownloadStarted', this.handleDownloadStarted);
DeviceEventEmitter.removeListener('onDownloadUpdated', this.handleDownloadUpdated);
DeviceEventEmitter.removeListener('onDownloadCompleted', this.handleDownloadCompleted);
AppState.removeEventListener('change', this._handleAppStateChange);
BackHandler.removeEventListener('hardwareBackPress');
Linking.removeEventListener('url', this._handleUrl);
@@ -419,7 +364,7 @@ class AppWithNavigationState extends React.Component {
this.setState({ verifyPending: false });
NativeModules.Firebase.track('email_verified', { email: user.primary_email });
Snackbar.show({ title: __('Your email address was successfully verified.'), duration: Snackbar.LENGTH_LONG });
ToastAndroid.show(__('Your email address was successfully verified.'), ToastAndroid.LONG);
// get user settings after email verification
this.getUserSettings();
@@ -436,7 +381,7 @@ class AppWithNavigationState extends React.Component {
const { toast, emailToVerify, emailVerifyPending, emailVerifyErrorMessage, user } = nextProps;
if (toast) {
const { message, isError } = toast;
const { message } = toast;
let currentDisplayType;
if (!currentDisplayType && message) {
// default to toast if no display type set and there is a message specified
@@ -444,14 +389,7 @@ class AppWithNavigationState extends React.Component {
}
if (currentDisplayType === 'toast') {
const props = {
title: message,
duration: Snackbar.LENGTH_LONG,
};
if (isError) {
props.backgroundColor = Colors.Red;
}
Snackbar.show(props);
ToastAndroid.show(message, ToastAndroid.LONG);
}
dispatch(doDismissToast());
@@ -546,7 +484,7 @@ class AppWithNavigationState extends React.Component {
dispatch(
doToast({
message: 'Invalid Verification URI',
}),
})
);
}
} else {
+1 -1
View File
@@ -51,7 +51,7 @@ export default class ChannelIconItem extends React.PureComponent {
<TouchableOpacity style={channelIconStyle.container} onPress={onPress}>
{isResolvingUri && (
<View style={channelIconStyle.centered}>
<ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />
<ActivityIndicator size={'small'} color={Colors.LbryGreen} />
</View>
)}
<View
+4 -13
View File
@@ -1,5 +1,5 @@
import React from 'react';
import { CLAIM_VALUES, formatCredits, isNameValid } from 'lbry-redux';
import { CLAIM_VALUES, isNameValid } from 'lbry-redux';
import { ActivityIndicator, NativeModules, Picker, Text, TextInput, TouchableOpacity, View } from 'react-native';
import { logPublish } from 'utils/helper';
import Button from 'component/button';
@@ -14,7 +14,6 @@ export default class ChannelSelector extends React.PureComponent {
super(props);
this.state = {
creditsInputFocused: false,
currentSelectedValue: Constants.ITEM_ANONYMOUS,
newChannelName: '',
newChannelBid: 0.1,
@@ -189,9 +188,9 @@ export default class ChannelSelector extends React.PureComponent {
render() {
const channel = this.state.addingChannel ? 'new' : this.props.channel;
const { balance, enabled, fetchingChannels, channels = [] } = this.props;
const { enabled, fetchingChannels, channels = [] } = this.props;
const pickerItems = [Constants.ITEM_ANONYMOUS, Constants.ITEM_CREATE_A_CHANNEL].concat(
channels ? channels.map(ch => ch.name) : [],
channels ? channels.map(ch => ch.name) : []
);
const {
@@ -245,26 +244,18 @@ export default class ChannelSelector extends React.PureComponent {
style={channelSelectorStyle.bidAmountInput}
value={String(newChannelBid)}
onChangeText={this.handleNewChannelBidChange}
onFocus={() => this.setState({ creditsInputFocused: true })}
onBlur={() => this.setState({ creditsInputFocused: false })}
placeholder={'0.00'}
keyboardType={'number-pad'}
underlineColorAndroid={Colors.NextLbryGreen}
/>
<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>
<Text style={channelSelectorStyle.helpText}>
{__('This LBC remains yours. It is a deposit to reserve the name and can be undone at any time.')}
</Text>
<View style={channelSelectorStyle.buttonContainer}>
{creatingChannel && <ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />}
{creatingChannel && <ActivityIndicator size={'small'} color={Colors.LbryGreen} />}
{!creatingChannel && (
<View style={channelSelectorStyle.buttons}>
<Link style={channelSelectorStyle.cancelLink} text={__('Cancel')} onPress={this.handleCreateCancel} />
+1 -1
View File
@@ -147,7 +147,7 @@ class ClaimList extends React.PureComponent {
renderMorePlaceholder = () => {
return (
<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} />
</TouchableOpacity>
);
-42
View File
@@ -1,42 +0,0 @@
import { connect } from 'react-redux';
import {
doResolveUri,
makeSelectClaimForUri,
makeSelectMetadataForUri,
makeSelectFileInfoForUri,
makeSelectIsUriResolving,
makeSelectClaimIsNsfw,
makeSelectShortUrlForUri,
makeSelectTitleForUri,
makeSelectThumbnailForUri,
} from 'lbry-redux';
import { doSetPlayerVisible } from 'redux/actions/drawer';
import { selectBlackListedOutpoints, selectFilteredOutpoints, selectRewardContentClaimIds } from 'lbryinc';
import { selectShowNsfw } from 'redux/selectors/settings';
import ClaimResultItem from './view';
const select = (state, props) => ({
blackListedOutpoints: selectBlackListedOutpoints(state),
claim: makeSelectClaimForUri(props.uri)(state),
fileInfo: makeSelectFileInfoForUri(props.uri)(state),
filteredOutpoints: selectFilteredOutpoints(state),
isDownloaded: !!makeSelectFileInfoForUri(props.uri)(state),
metadata: makeSelectMetadataForUri(props.uri)(state),
nsfw: makeSelectClaimIsNsfw(props.uri)(state),
isResolvingUri: makeSelectIsUriResolving(props.uri)(state),
obscureNsfw: !selectShowNsfw(state),
rewardedContentClaimIds: selectRewardContentClaimIds(state),
shortUrl: makeSelectShortUrlForUri(props.uri)(state),
title: makeSelectTitleForUri(props.uri)(state),
thumbnail: makeSelectThumbnailForUri(props.uri)(state),
});
const perform = dispatch => ({
resolveUri: uri => dispatch(doResolveUri(uri)),
setPlayerVisible: (visible, uri) => dispatch(doSetPlayerVisible(visible, uri)),
});
export default connect(
select,
perform,
)(ClaimResultItem);
-176
View File
@@ -1,176 +0,0 @@
import React from 'react';
import { normalizeURI, parseURI } from 'lbry-redux';
import { ActivityIndicator, Platform, Text, TouchableOpacity, View } from 'react-native';
import { navigateToUri, getDownloadProgress, getStorageForFileInfo } from 'utils/helper';
import Colors from 'styles/colors';
import ChannelIconItem from 'component/channelIconItem';
import channelIconStyle from 'styles/channelIcon';
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
import DateTime from 'component/dateTime';
import FastImage from 'react-native-fast-image';
import FileItemMedia from 'component/fileItemMedia';
import FilePrice from 'component/filePrice';
import Icon from 'react-native-vector-icons/FontAwesome5';
import Link from 'component/link';
import NsfwOverlay from 'component/nsfwOverlay';
import ProgressBar from 'component/progressBar';
import fileListStyle from 'styles/fileList';
import seedrandom from 'seedrandom';
class ClaimResultItem extends React.PureComponent {
state = {
autoStyle: null,
};
componentDidMount() {
const { result } = this.props;
if (!result || !result.name || !result.claimId) {
this.setState({
autoStyle:
ChannelIconItem.AUTO_THUMB_STYLES[Math.floor(Math.random() * ChannelIconItem.AUTO_THUMB_STYLES.length)],
});
} else {
// result property set, use deterministic random style
const rng = seedrandom(normalizeURI(`${result.name}#${result.claimId}`));
const index = Math.floor(rng.quick() * ChannelIconItem.AUTO_THUMB_STYLES.length);
this.setState({ autoStyle: ChannelIconItem.AUTO_THUMB_STYLES[index] });
}
}
onPressHandler = () => {
const { autoplay, navigation, result, setPlayerVisible } = this.props;
const { claimId, name } = result;
const url = normalizeURI(`${name}#${claimId}`);
navigateToUri(navigation, url, { autoplay }, false, url, setPlayerVisible);
};
render() {
const { fileInfo, navigation, obscureNsfw, result, rewardedContentClaimIds, setPlayerVisible, style } = this.props;
const {
channel,
channel_claim_id: channelClaimId,
claimId,
duration,
fee,
name,
nsfw,
release_time: releaseTime,
thumbnail_url: thumbnailUrl,
title,
} = result;
const isChannel = name && name.startsWith('@');
const hasThumbnail = !!thumbnailUrl;
const obscure = obscureNsfw && nsfw;
const url = normalizeURI(`${name}#${claimId}`);
const hasChannel = !!channel;
const channelUrl = hasChannel ? normalizeURI(`${channel}#${channelClaimId}`) : null;
const isRewardContent = rewardedContentClaimIds.includes(claimId);
return (
<View style={style}>
<TouchableOpacity
style={[style, isChannel ? fileListStyle.channelContainer : null]}
onPress={this.onPressHandler}
>
{!isChannel && (
<FileItemMedia
style={fileListStyle.thumbnail}
duration={duration}
resizeMode="cover"
title={title || name || normalizeURI(url).substring(7)}
thumbnail={thumbnailUrl}
/>
)}
{isChannel && (
<View style={fileListStyle.channelThumbnailView}>
<View style={[fileListStyle.channelThumbnailContainer, this.state.autoStyle]}>
{hasThumbnail && (
<FastImage
style={fileListStyle.channelThumbnail}
resizeMode={FastImage.resizeMode.cover}
source={{ uri: thumbnailUrl }}
/>
)}
{!hasThumbnail && (
<Text style={channelIconStyle.autothumbCharacter}>
{title ? title.substring(0, 1).toUpperCase() : name.substring(1, 2).toUpperCase()}
</Text>
)}
</View>
</View>
)}
{fileInfo && fileInfo.completed && fileInfo.download_path && (
<Icon style={fileListStyle.downloadedIcon} solid color={Colors.NextLbryGreen} name={'folder'} size={16} />
)}
<FilePrice
cost={fee ? parseFloat(fee) / 100000000 : 0}
uri={url}
style={fileListStyle.filePriceContainer}
iconStyle={fileListStyle.filePriceIcon}
textStyle={fileListStyle.filePriceText}
/>
<View style={fileListStyle.detailsContainer}>
{(title || name) && (
<View style={fileListStyle.titleContainer}>
<Text style={fileListStyle.title} numberOfLines={3}>
{title || name}
</Text>
{isRewardContent && <Icon style={fileListStyle.rewardIcon} name="award" size={12} />}
</View>
)}
{(hasChannel || isChannel) && (
<Link
style={fileListStyle.publisher}
text={isChannel ? name : channel}
onPress={() => {
navigateToUri(
navigation,
normalizeURI(isChannel ? url : channelUrl),
null,
false,
isChannel ? url : channelUrl,
setPlayerVisible,
);
}}
/>
)}
<View style={fileListStyle.info}>
{fileInfo && !isNaN(fileInfo.written_bytes) && fileInfo.written_bytes > 0 && (
<Text style={fileListStyle.infoText}>{getStorageForFileInfo(fileInfo)}</Text>
)}
<DateTime
style={fileListStyle.publishInfo}
textStyle={fileListStyle.infoText}
timeAgo
date={releaseTime}
/>
</View>
{fileInfo && fileInfo.download_path && (
<View style={fileListStyle.downloadInfo}>
{!fileInfo.completed && (
<ProgressBar
borderRadius={3}
color={Colors.NextLbryGreen}
height={3}
style={fileListStyle.progress}
progress={getDownloadProgress(fileInfo)}
/>
)}
</View>
)}
</View>
</TouchableOpacity>
{obscure && <NsfwOverlay onPress={() => navigation.navigate({ routeName: 'Settings', key: 'settingsPage' })} />}
</View>
);
}
}
export default ClaimResultItem;
+1 -1
View File
@@ -74,7 +74,7 @@ class CustomRewardCard extends React.PureComponent<Props> {
/>
<Button
style={rewardStyle.redeemButton}
text={__('Redeem')}
text={'Redeem'}
disabled={!this.state.rewardCode || this.state.rewardCode.trim().length === 0 || rewardIsPending}
onPress={() => {
if (!rewardIsPending) {
+1 -1
View File
@@ -10,7 +10,7 @@ import discoverStyle from 'styles/discover';
const groupedMenuItems = {
'Find content': [
{ icon: 'hashtag', label: 'Your Tags', route: Constants.DRAWER_ROUTE_DISCOVER },
{ icon: 'heart', solid: true, label: 'Following', route: Constants.DRAWER_ROUTE_SUBSCRIPTIONS },
{ icon: 'heart', solid: true, label: 'Subscriptions', route: Constants.DRAWER_ROUTE_SUBSCRIPTIONS },
{ icon: 'globe-americas', label: 'All Content', route: Constants.DRAWER_ROUTE_TRENDING },
],
'Your content': [
+33 -14
View File
@@ -11,6 +11,11 @@ class FileDownloadButton extends React.PureComponent {
}
}
componentWillReceiveProps(nextProps) {
// this.checkAvailability(nextProps.uri);
// this.restartDownload(nextProps);
}
restartDownload(props) {
const { downloading, fileInfo, uri, restartDownload } = props;
@@ -30,6 +35,7 @@ class FileDownloadButton extends React.PureComponent {
fileInfo,
downloading,
uri,
purchaseUri,
costInfo,
isPlayable,
isViewable,
@@ -39,23 +45,12 @@ class FileDownloadButton extends React.PureComponent {
doPause,
style,
openFile,
onFileActionPress,
onButtonLayout,
} = this.props;
if (fileInfo && fileInfo.download_path && fileInfo.completed) {
return (
<TouchableOpacity
onLayout={onButtonLayout}
style={[style, fileDownloadButtonStyle.container]}
onPress={openFile}
>
<Text style={fileDownloadButtonStyle.text}>{isViewable ? __('View') : __('Open')}</Text>
</TouchableOpacity>
);
} else if ((fileInfo && !fileInfo.stopped) || loading || downloading) {
if ((fileInfo && !fileInfo.stopped) || loading || downloading) {
const progress = fileInfo && fileInfo.written_bytes ? (fileInfo.written_bytes / fileInfo.total_bytes) * 100 : 0,
label = fileInfo ? __('%progress%% complete', { progress: progress.toFixed(0) }) : __('Connecting...');
label = fileInfo ? progress.toFixed(0) + '% complete' : __('Connecting...');
return (
<View style={[style, fileDownloadButtonStyle.container]}>
@@ -77,9 +72,33 @@ class FileDownloadButton extends React.PureComponent {
text={isPlayable ? __('Play') : isViewable ? __('View') : __('Download')}
onLayout={onButtonLayout}
style={[style, fileDownloadButtonStyle.container]}
onPress={onFileActionPress}
onPress={() => {
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) {
return (
<TouchableOpacity
onLayout={onButtonLayout}
style={[style, fileDownloadButtonStyle.container]}
onPress={openFile}
>
<Text style={fileDownloadButtonStyle.text}>{isViewable ? __('View') : __('Open')}</Text>
</TouchableOpacity>
);
}
return null;
+1 -3
View File
@@ -10,7 +10,6 @@ import {
makeSelectClaimIsNsfw,
makeSelectShortUrlForUri,
} from 'lbry-redux';
import { doSetPlayerVisible } from 'redux/actions/drawer';
import { selectBlackListedOutpoints, selectFilteredOutpoints, selectRewardContentClaimIds } from 'lbryinc';
import { selectShowNsfw } from 'redux/selectors/settings';
import FileItem from './view';
@@ -32,10 +31,9 @@ const select = (state, props) => ({
const perform = dispatch => ({
resolveUri: uri => dispatch(doResolveUri(uri)),
setPlayerVisible: (visible, uri) => dispatch(doSetPlayerVisible(visible, uri)),
});
export default connect(
select,
perform,
perform
)(FileItem);
+2 -9
View File
@@ -56,7 +56,6 @@ class FileItem extends React.PureComponent {
obscureNsfw,
showDetails,
compactView,
setPlayerVisible,
titleBeforeThumbnail,
} = this.props;
@@ -108,12 +107,7 @@ class FileItem extends React.PureComponent {
<Icon style={discoverStyle.downloadedIcon} solid color={Colors.NextLbryGreen} name={'folder'} size={16} />
)}
{!compactView && (!fileInfo || !fileInfo.completed || !fileInfo.download_path) && (
<FilePrice
uri={uri}
style={discoverStyle.filePriceContainer}
iconStyle={discoverStyle.filePriceIcon}
textStyle={discoverStyle.filePriceText}
/>
<FilePrice uri={uri} style={discoverStyle.filePriceContainer} textStyle={discoverStyle.filePriceText} />
)}
{!compactView && (
<View style={isRewardContent ? discoverStyle.rewardTitleContainer : null}>
@@ -135,8 +129,7 @@ class FileItem extends React.PureComponent {
normalizeURI(shortChannelUri || fullChannelUri),
null,
false,
fullChannelUri,
setPlayerVisible,
fullChannelUri
);
}}
/>
+2 -3
View File
@@ -61,7 +61,6 @@ class FileItemMedia extends React.PureComponent {
let style = this.props.style;
const { duration, isResolvingUri, thumbnail, title, resizeMode } = this.props;
const atStyle = this.state.autoThumbStyle;
const hasDuration = !!duration;
if (this.isThumbnailValid(thumbnail) && !this.state.imageLoadFailed) {
if (style == null) {
@@ -76,7 +75,7 @@ class FileItemMedia extends React.PureComponent {
resizeMode={this.getFastImageResizeMode(resizeMode)}
style={fileItemMediaStyle.image}
/>
{duration > 0 && (
{duration && (
<VideoDuration
duration={duration}
style={fileItemMediaStyle.duration}
@@ -105,7 +104,7 @@ class FileItemMedia extends React.PureComponent {
.toUpperCase()}
</Text>
)}
{duration > 0 && (
{duration && (
<VideoDuration
duration={duration}
style={fileItemMediaStyle.duration}
+1 -3
View File
@@ -10,7 +10,6 @@ import {
makeSelectTitleForUri,
makeSelectThumbnailForUri,
} from 'lbry-redux';
import { doSetPlayerVisible } from 'redux/actions/drawer';
import { selectBlackListedOutpoints, selectFilteredOutpoints, selectRewardContentClaimIds } from 'lbryinc';
import { selectShowNsfw } from 'redux/selectors/settings';
import FileListItem from './view';
@@ -33,10 +32,9 @@ const select = (state, props) => ({
const perform = dispatch => ({
resolveUri: uri => dispatch(doResolveUri(uri)),
setPlayerVisible: (visible, uri) => dispatch(doSetPlayerVisible(visible, uri)),
});
export default connect(
select,
perform,
perform
)(FileListItem);
+39 -73
View File
@@ -1,15 +1,11 @@
import React from 'react';
import { normalizeURI, parseURI } from 'lbry-redux';
import { ActivityIndicator, Platform, Text, TouchableOpacity, View } from 'react-native';
import { navigateToUri, getDownloadProgress, getStorageForFileInfo } from 'utils/helper';
import { navigateToUri, formatBytes } from 'utils/helper';
import Colors from 'styles/colors';
import ChannelIconItem from 'component/channelIconItem';
import channelIconStyle from 'styles/channelIcon';
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
import DateTime from 'component/dateTime';
import FastImage from 'react-native-fast-image';
import FileItemMedia from 'component/fileItemMedia';
import FilePrice from 'component/filePrice';
import Icon from 'react-native-vector-icons/FontAwesome5';
import Link from 'component/link';
import NsfwOverlay from 'component/nsfwOverlay';
@@ -18,10 +14,27 @@ import fileListStyle from 'styles/fileList';
class FileListItem extends React.PureComponent {
state = {
autoStyle: null,
url: null,
};
getStorageForFileInfo = fileInfo => {
if (!fileInfo.completed) {
const written = formatBytes(fileInfo.written_bytes);
const total = formatBytes(fileInfo.total_bytes);
return `(${written} / ${total})`;
}
return formatBytes(fileInfo.written_bytes);
};
formatTitle = title => {
if (!title) {
return title;
}
return title.length > 80 ? title.substring(0, 77).trim() + '...' : title;
};
getDownloadProgress = fileInfo => {
return Math.ceil((fileInfo.written_bytes / fileInfo.total_bytes) * 100);
};
@@ -31,16 +44,11 @@ class FileListItem extends React.PureComponent {
if (!claim && !batchResolve) {
resolveUri(uri);
}
this.setState({
autoStyle:
ChannelIconItem.AUTO_THUMB_STYLES[Math.floor(Math.random() * ChannelIconItem.AUTO_THUMB_STYLES.length)],
});
}
componentDidUpdate() {
const { claim, resolveUri, uri, batchResolve } = this.props;
if (!claim && uri !== this.state.url && !batchResolve) {
const { claim, resolveUri, uri } = this.props;
if (!claim && uri !== this.state.url) {
this.setState({ url: uri }, () => resolveUri(uri));
}
}
@@ -80,7 +88,6 @@ class FileListItem extends React.PureComponent {
onPress,
navigation,
rewardedContentClaimIds,
setPlayerVisible,
thumbnail,
hideChannel,
onLongPress,
@@ -127,13 +134,10 @@ class FileListItem extends React.PureComponent {
return null;
}
const isChannel = name && name.startsWith('@');
const hasThumbnail = !!thumbnail;
return (
<View style={style}>
<TouchableOpacity
style={[style, isChannel ? fileListStyle.channelContainer : null]}
style={style}
onPress={this.onPressHandler}
onLongPress={() => {
if (onLongPress) {
@@ -141,55 +145,21 @@ class FileListItem extends React.PureComponent {
}
}}
>
{!isChannel && (
<FileItemMedia
style={fileListStyle.thumbnail}
duration={duration}
resizeMode="cover"
title={title || name || normalizeURI(uri).substring(7)}
thumbnail={thumbnail}
/>
)}
{isChannel && (
<View style={fileListStyle.channelThumbnailView}>
<View style={[fileListStyle.channelThumbnailContainer, this.state.autoStyle]}>
{hasThumbnail && (
<FastImage
style={fileListStyle.channelThumbnail}
resizeMode={FastImage.resizeMode.cover}
source={{ uri: thumbnail }}
/>
)}
{!hasThumbnail && (
<Text style={channelIconStyle.autothumbCharacter}>
{title ? title.substring(0, 1).toUpperCase() : claim.name.substring(1, 2).toUpperCase()}
</Text>
)}
</View>
</View>
)}
<FileItemMedia
style={fileListStyle.thumbnail}
duration={duration}
resizeMode="cover"
title={title || name || normalizeURI(uri).substring(7)}
thumbnail={thumbnail}
/>
{selected && (
<View style={fileListStyle.selectedOverlay}>
<Icon name={'check-circle'} solid color={Colors.NextLbryGreen} size={32} />
</View>
)}
{fileInfo && fileInfo.completed && fileInfo.download_path && (
<Icon
style={featuredResult ? fileListStyle.featuredDownloadedIcon : fileListStyle.downloadedIcon}
solid
color={Colors.NextLbryGreen}
name={'folder'}
size={16}
/>
<Icon style={fileListStyle.downloadedIcon} solid color={Colors.NextLbryGreen} name={'folder'} size={16} />
)}
<FilePrice
uri={uri}
style={fileListStyle.filePriceContainer}
iconStyle={fileListStyle.filePriceIcon}
textStyle={fileListStyle.filePriceText}
/>
<View style={fileListStyle.detailsContainer}>
{featuredResult && (
<Text style={fileListStyle.featuredUri} numberOfLines={1}>
@@ -202,7 +172,7 @@ class FileListItem extends React.PureComponent {
{!title && !name && <Text style={fileListStyle.uri}>{uri}</Text>}
{!title && !name && (
<View style={fileListStyle.row}>
<ActivityIndicator size={'small'} color={featuredResult ? Colors.White : Colors.NextLbryGreen} />
<ActivityIndicator size={'small'} color={featuredResult ? Colors.White : Colors.LbryGreen} />
</View>
)}
</View>
@@ -210,11 +180,8 @@ class FileListItem extends React.PureComponent {
{(title || name) && (
<View style={fileListStyle.titleContainer}>
<Text
style={featuredResult ? fileListStyle.featuredTitle : fileListStyle.title}
numberOfLines={hideChannel ? 4 : 3}
>
{title || name}
<Text style={featuredResult ? fileListStyle.featuredTitle : fileListStyle.title}>
{this.formatTitle(title) || this.formatTitle(name)}
</Text>
{isRewardContent && <Icon style={fileListStyle.rewardIcon} name="award" size={12} />}
</View>
@@ -226,18 +193,17 @@ class FileListItem extends React.PureComponent {
</View>
)}
{(channel || isChannel) && !hideChannel && (
{channel && !hideChannel && (
<Link
style={fileListStyle.publisher}
text={isChannel ? name : channel}
text={channel}
onPress={() => {
navigateToUri(
navigation,
normalizeURI(isChannel ? uri : shortChannelUri || fullChannelUri),
normalizeURI(shortChannelUri || fullChannelUri),
null,
false,
isChannel ? claim && claim.permanent_url : fullChannelUri,
setPlayerVisible,
fullChannelUri
);
}}
/>
@@ -245,7 +211,7 @@ class FileListItem extends React.PureComponent {
<View style={fileListStyle.info}>
{fileInfo && !isNaN(fileInfo.written_bytes) && fileInfo.written_bytes > 0 && (
<Text style={fileListStyle.infoText}>{getStorageForFileInfo(fileInfo)}</Text>
<Text style={fileListStyle.infoText}>{this.getStorageForFileInfo(fileInfo)}</Text>
)}
<DateTime style={fileListStyle.publishInfo} textStyle={fileListStyle.infoText} timeAgo uri={uri} />
</View>
@@ -258,7 +224,7 @@ class FileListItem extends React.PureComponent {
color={Colors.NextLbryGreen}
height={3}
style={fileListStyle.progress}
progress={getDownloadProgress(fileInfo)}
progress={this.getDownloadProgress(fileInfo)}
/>
)}
</View>
+23 -21
View File
@@ -2,7 +2,6 @@ import React from 'react';
import PropTypes from 'prop-types';
import { Text, View } from 'react-native';
import { formatCredits, formatFullPrice } from 'lbry-redux';
import Icon from 'react-native-vector-icons/FontAwesome5';
class CreditAmount extends React.PureComponent {
static propTypes = {
@@ -63,27 +62,25 @@ class CreditAmount extends React.PureComponent {
}
}
return (
<Text style={style} numberOfLines={1}>
{amountText}
</Text>
);
/* {this.props.isEstimate ? (
<span
className="credit-amount__estimate"
title={__('This is an estimate and does not include data fees')}
>
*
</span>
) : null} */
return <Text style={style}>{amountText}</Text>;
}
}
class FilePrice extends React.PureComponent {
componentWillMount() {
const { cost } = this.props;
if (isNaN(parseFloat(cost))) {
this.fetchCost(this.props);
}
this.fetchCost(this.props);
}
componentWillReceiveProps(nextProps) {
const { cost } = this.props;
if (isNaN(parseFloat(cost))) {
this.fetchCost(nextProps);
}
this.fetchCost(nextProps);
}
fetchCost(props) {
@@ -95,25 +92,30 @@ class FilePrice extends React.PureComponent {
}
render() {
const { cost, costInfo, look = 'indicator', showFullPrice = false, style, iconStyle, textStyle } = this.props;
const { costInfo, look = 'indicator', showFullPrice = false, style, textStyle } = this.props;
const isEstimate = costInfo ? !costInfo.includesData : null;
const amount = cost ? parseFloat(cost) : costInfo ? parseFloat(costInfo.cost) : 0;
if (isNaN(amount) || amount === 0) {
return null;
if (!costInfo) {
return (
<View style={style}>
<Text style={textStyle}>???</Text>
</View>
);
}
return (
<View style={style}>
<Icon name="coins" size={9} style={iconStyle} />
<CreditAmount
style={textStyle}
label={false}
amount={amount}
amount={parseFloat(costInfo.cost)}
isEstimate={isEstimate}
showFree
showFullPrice={showFullPrice}
/>
>
???
</CreditAmount>
</View>
);
}
+7 -26
View File
@@ -341,12 +341,6 @@ class MediaPlayer extends React.PureComponent {
this.setState({ paused: true }, this.updateBackgroundMediaNotification);
};
handleSeek = time => {
const { currentTime } = this.state;
const newTime = currentTime + time;
this.seekTo(newTime);
};
updateBackgroundMediaNotification = () => {
this.handlePausedState();
const { backgroundPlayEnabled } = this.props;
@@ -368,26 +362,14 @@ class MediaPlayer extends React.PureComponent {
<Icon name={'arrow-left'} size={18} style={mediaPlayerStyle.backButtonIcon} />
</TouchableOpacity>
<View style={mediaPlayerStyle.midControls}>
<TouchableOpacity style={mediaPlayerStyle.rewind10} onPress={() => this.handleSeek(-10)}>
<Icon name="undo" size={24} color={Colors.White} />
<Text style={[mediaPlayerStyle.midControlText, mediaPlayerStyle.leftMidControlText]}>10</Text>
</TouchableOpacity>
<TouchableOpacity style={mediaPlayerStyle.playPauseButton} onPress={this.togglePlay}>
{this.state.paused && <Icon name="play" size={40} color={Colors.White} />}
{!this.state.paused && <Icon name="pause" size={40} color={Colors.White} />}
</TouchableOpacity>
<TouchableOpacity style={mediaPlayerStyle.forward10} onPress={() => this.handleSeek(10)}>
<Icon name="redo" size={24} color={Colors.White} />
<Text style={[mediaPlayerStyle.midControlText, mediaPlayerStyle.rightMidControlText]}>10</Text>
</TouchableOpacity>
</View>
<TouchableOpacity style={mediaPlayerStyle.playPauseButton} onPress={this.togglePlay}>
{this.state.paused && <Icon name="play" size={40} color="#ffffff" />}
{!this.state.paused && <Icon name="pause" size={40} color="#ffffff" />}
</TouchableOpacity>
<TouchableOpacity style={mediaPlayerStyle.toggleFullscreenButton} onPress={this.toggleFullscreenMode}>
{this.state.fullscreenMode && <Icon name="compress" size={16} color={Colors.White} />}
{!this.state.fullscreenMode && <Icon name="expand" size={16} color={Colors.White} />}
{this.state.fullscreenMode && <Icon name="compress" size={16} color="#ffffff" />}
{!this.state.fullscreenMode && <Icon name="expand" size={16} color="#ffffff" />}
</TouchableOpacity>
<Text style={mediaPlayerStyle.elapsedDuration}>{this.formatTime(this.state.currentTime)}</Text>
@@ -439,7 +421,7 @@ class MediaPlayer extends React.PureComponent {
const seekerCircleStyle = [this.state.seeking ? mediaPlayerStyle.bigSeekerCircle : mediaPlayerStyle.seekerCircle];
if (!this.state.seeking) {
seekerCircleStyle.push(
this.state.fullscreenMode ? mediaPlayerStyle.seekerCircleTopFs : mediaPlayerStyle.seekerCircleTop,
this.state.fullscreenMode ? mediaPlayerStyle.seekerCircleTopFs : mediaPlayerStyle.seekerCircleTop
);
}
@@ -458,7 +440,6 @@ class MediaPlayer extends React.PureComponent {
}}
resizeMode={this.state.resizeMode}
playInBackground={this.state.backgroundPlayEnabled}
playWhenInactive={this.state.backgroundPlayEnabled}
style={mediaPlayerStyle.player}
rate={this.state.rate}
volume={this.state.volume}
-18
View File
@@ -1,18 +0,0 @@
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);
-148
View File
@@ -1,148 +0,0 @@
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>
);
}
}
+5 -10
View File
@@ -1,30 +1,25 @@
import { connect } from 'react-redux';
import {
doResolveUris,
doResolvedSearch,
makeSelectClaimForUri,
makeSelectResolvedRecommendedContentForUri,
selectResolvingUris,
makeSelectRecommendedContentForUri,
makeSelectTitleForUri,
selectIsSearching,
} from 'lbry-redux';
import RelatedContent from './view';
const RESULT_SIZE = 16;
const select = (state, props) => ({
claim: makeSelectClaimForUri(props.uri)(state),
recommendedContent: makeSelectRecommendedContentForUri(props.uri)(state),
title: makeSelectTitleForUri(props.uri)(state),
isSearching: selectIsSearching(state),
recommendedContent: makeSelectResolvedRecommendedContentForUri(props.uri, RESULT_SIZE)(state),
resolvingUris: selectResolvingUris(state),
});
const perform = dispatch => ({
resolveUris: uris => dispatch(doResolveUris(uris)),
searchRecommended: (query, claimId) =>
dispatch(doResolvedSearch(query, RESULT_SIZE, undefined, true, { related_to: claimId }, false)),
});
export default connect(
select,
perform,
perform
)(RelatedContent);
+26 -23
View File
@@ -4,41 +4,44 @@ import { normalizeURI } from 'lbry-redux';
import { navigateToUri } from 'utils/helper';
import Colors from 'styles/colors';
import FileListItem from 'component/fileListItem';
import ClaimResultItem from 'component/claimResultItem';
import fileListStyle from 'styles/fileList';
import relatedContentStyle from 'styles/relatedContent';
export default class RelatedContent extends React.PureComponent {
componentDidMount() {
const { title, claimId, searchRecommended } = this.props;
if (title && claimId) {
searchRecommended(title, claimId);
state = {
urlsResolved: false,
};
componentDidUpdate(prevProps) {
const { resolveUris, recommendedContent } = this.props;
if (recommendedContent && recommendedContent.length > 0 && !this.state.urisResolved) {
this.setState({ urisResolved: true }, () => {
// batch resolve the uris
resolveUris(recommendedContent);
});
}
}
shouldComponentUpdate(nextProps, nextState) {
const { isSearching, recommendedContent } = nextProps;
return isSearching || (!isSearching && recommendedContent && recommendedContent.length > 0);
}
render() {
const { isSearching, recommendedContent, navigation, uri, fullUri } = this.props;
const { recommendedContent, navigation, uri, fullUri } = this.props;
return (
<View style={relatedContentStyle.container}>
<Text style={relatedContentStyle.title}>{__('Related Content')}</Text>
{isSearching && <ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />}
<Text style={relatedContentStyle.title}>Related Content</Text>
{recommendedContent &&
recommendedContent.map(result => (
<ClaimResultItem
style={fileListStyle.item}
uri={result ? normalizeURI(`${result.name}#${result.claimId}`) : null}
key={result.claimId}
result={result}
navigation={navigation}
autoplay
/>
))}
recommendedContent
.filter(recommendedUri => recommendedUri !== normalizeURI(fullUri))
.map(recommendedUri => (
<FileListItem
style={fileListStyle.item}
key={recommendedUri}
uri={recommendedUri}
batchResolve
navigation={navigation}
autoplay
/>
))}
</View>
);
}
+1 -4
View File
@@ -35,10 +35,7 @@ class RewardEnrolment extends React.Component {
<View style={rewardStyle.enrollContainer}>
<View style={rewardStyle.summaryRow}>
<Icon name="award" size={36} color={Colors.White} />
<Text style={rewardStyle.summaryText}>
{unclaimedRewardAmount === 1 && __('%amount% available credit', { amount: unclaimedRewardAmount })}
{unclaimedRewardAmount !== 1 && __('%amount% available credits', { amount: unclaimedRewardAmount })}
</Text>
<Text style={rewardStyle.summaryText}>{unclaimedRewardAmount} available credits</Text>
</View>
<View style={rewardStyle.onboarding}>
+2 -2
View File
@@ -75,10 +75,10 @@ class StorageStatsCard extends React.PureComponent {
<View style={[storageStatsStyle.row, storageStatsStyle.totalSizeContainer]}>
<View style={storageStatsStyle.summary}>
<Text style={storageStatsStyle.totalSize}>{formatBytes(this.state.totalBytes, 2)}</Text>
<Text style={storageStatsStyle.annotation}>{__('used')}</Text>
<Text style={storageStatsStyle.annotation}>used</Text>
</View>
<View style={[storageStatsStyle.row, storageStatsStyle.toggleStatsContainer]}>
<Text style={storageStatsStyle.statsText}>{__('Stats')}</Text>
<Text style={storageStatsStyle.statsText}>Stats</Text>
<Switch
style={storageStatsStyle.statsToggle}
value={this.state.showStats}
@@ -3,8 +3,6 @@ import { buildURI, normalizeURI } from 'lbry-redux';
import { ActivityIndicator, FlatList, Image, Text, View } from 'react-native';
import { navigateToUri } from 'utils/helper';
import Colors from 'styles/colors';
import ChannelIconItem from 'component/channelIconItem';
import channelIconStyle from 'styles/channelIcon';
import discoverStyle from 'styles/discover';
import FileItem from 'component/fileItem';
import SubscribeButton from 'component/subscribeButton';
@@ -13,20 +11,11 @@ import Link from 'component/link';
import Tag from 'component/tag';
class SuggestedSubscriptionItem extends React.PureComponent {
state = {
autoStyle: null,
};
componentDidMount() {
const { claim, uri, resolveUri } = this.props;
if (!claim) {
resolveUri(uri);
}
this.setState({
autoStyle:
ChannelIconItem.AUTO_THUMB_STYLES[Math.floor(Math.random() * ChannelIconItem.AUTO_THUMB_STYLES.length)],
});
}
render() {
@@ -39,26 +28,22 @@ class SuggestedSubscriptionItem extends React.PureComponent {
}
}
const hasThumbnail = !!thumbnail;
if (isResolvingUri) {
return (
<View style={subscriptionsStyle.itemLoadingContainer}>
<ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />
<ActivityIndicator size={'small'} color={Colors.LbryGreen} />
</View>
);
}
return (
<View style={subscriptionsStyle.suggestedItem}>
<View style={[subscriptionsStyle.suggestedItemThumbnailContainer, this.state.autoStyle]}>
{hasThumbnail && (
<Image style={subscriptionsStyle.suggestedItemThumbnail} resizeMode={'cover'} source={{ uri: thumbnail }} />
)}
{!hasThumbnail && (
<Text style={channelIconStyle.autothumbCharacter}>
{title ? title.substring(0, 1).toUpperCase() : claim ? claim.name.substring(1, 2).toUpperCase() : ''}
</Text>
)}
<View style={subscriptionsStyle.suggestedItemThumbnailContainer}>
<Image
style={subscriptionsStyle.suggestedItemThumbnail}
resizeMode={'cover'}
source={thumbnail ? { uri: thumbnail } : require('../../assets/default_avatar.jpg')}
/>
</View>
<View style={subscriptionsStyle.suggestedItemDetails}>
+1 -1
View File
@@ -74,7 +74,7 @@ export default class TagSearch extends React.PureComponent {
<TextInput
editable={editable}
style={tagStyle.searchInput}
placeholder={__('Search for more tags')}
placeholder={'Search for more tags'}
underlineColorAndroid={Colors.NextLbryGreen}
value={this.state.tag}
numberOfLines={1}
+1 -1
View File
@@ -26,7 +26,7 @@ class TransactionListRecent extends React.PureComponent<Props> {
return (
<View style={walletStyle.transactionsCard}>
<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'} />
</View>
{fetchingTransactions && <Text style={walletStyle.infoText}>{__('Fetching transactions...')}</Text>}
+1 -3
View File
@@ -6,7 +6,6 @@ import {
selectSearchSuggestions,
SETTINGS,
} from 'lbry-redux';
import { doSetPlayerVisible } from 'redux/actions/drawer';
import { selectCurrentRoute } from 'redux/selectors/drawer';
import { makeSelectClientSetting } from 'redux/selectors/settings';
import UriBar from './view';
@@ -25,10 +24,9 @@ const select = state => {
const perform = dispatch => ({
updateSearchQuery: query => dispatch(doUpdateSearchQuery(query)),
setPlayerVisible: (visible, uri) => dispatch(doSetPlayerVisible(visible, uri)),
});
export default connect(
select,
perform,
perform
)(UriBar);
+30 -45
View File
@@ -18,20 +18,18 @@ class UriBar extends React.PureComponent {
keyboardDidHideListener = null;
changeTextTimeout = -1;
state = {
changeTextTimeout: null,
currentValue: null,
inputText: null,
focused: false,
keyboardHeight: 0,
selection: undefined,
};
componentDidMount() {
this.keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', this._keyboardDidShow);
this.keyboardDidHideListener = Keyboard.addListener('keyboardDidHide', this._keyboardDidHide);
this.setState({ selection: { start: 0, end: 0 } });
this.setSelection();
}
componentWillUnmount() {
@@ -53,14 +51,15 @@ class UriBar extends React.PureComponent {
}
handleChangeText = text => {
this.setState({ selection: undefined });
const newValue = text || '';
clearTimeout(this.changeTextTimeout);
clearTimeout(this.state.changeTextTimeout);
const { updateSearchQuery, onSearchSubmitted, showUriBarSuggestions, navigation } = this.props;
this.changeTextTimeout = -1;
updateSearchQuery(text);
let timeout = -1;
if (!showUriBarSuggestions) {
this.changeTextTimeout = setTimeout(() => {
timeout = setTimeout(() => {
if (text.trim().length === 0) {
// don't do anything if the text is empty
return;
@@ -68,7 +67,6 @@ class UriBar extends React.PureComponent {
if (!text.startsWith('lbry://')) {
// not a URI input, so this is a search, perform a direct search
updateSearchQuery(text);
if (onSearchSubmitted) {
onSearchSubmitted(text);
} else {
@@ -76,14 +74,12 @@ class UriBar extends React.PureComponent {
}
}
}, UriBar.INPUT_TIMEOUT);
} else {
updateSearchQuery(text);
}
this.setState({ inputText: newValue, currentValue: newValue });
this.setState({ inputText: newValue, currentValue: newValue, changeTextTimeout: timeout });
};
handleItemPress = item => {
const { navigation, onSearchSubmitted, setPlayerVisible, updateSearchQuery } = this.props;
const { navigation, onSearchSubmitted, updateSearchQuery } = this.props;
const { type, value } = item;
Keyboard.dismiss();
@@ -112,7 +108,7 @@ class UriBar extends React.PureComponent {
});
} else {
const uri = normalizeURI(value);
navigateToUri(navigation, uri, null, false, null, setPlayerVisible);
navigateToUri(navigation, uri);
}
};
@@ -127,8 +123,14 @@ class UriBar extends React.PureComponent {
this.setState({ focused: false, keyboardHeight: 0 });
};
setSelection() {
if (this.textInput) {
this.textInput.setNativeProps({ selection: { start: 0, end: 0 } });
}
}
handleSubmitEditing = () => {
const { navigation, onSearchSubmitted, setPlayerVisible, updateSearchQuery } = this.props;
const { navigation, onSearchSubmitted, updateSearchQuery } = this.props;
if (this.state.inputText) {
let inputText = this.state.inputText,
inputTextIsUrl = false;
@@ -137,7 +139,7 @@ class UriBar extends React.PureComponent {
// if it's a URI (lbry://...), open the file page
if (transformedUrl && isURIValid(transformedUrl)) {
inputTextIsUrl = true;
navigateToUri(navigation, transformedUrl, null, false, null, setPlayerVisible);
navigateToUri(navigation, transformedUrl);
}
}
@@ -157,31 +159,9 @@ class UriBar extends React.PureComponent {
}
};
handleFocus = () => {
this.setState(
{
focused: true,
},
() => {
this.setState({
selection: { start: 0, end: this.state.currentValue ? this.state.currentValue.length : 0 },
});
},
);
};
handleTouchStart = () => {
if (this.state.focused) {
this.setState({ selection: null });
}
};
handleBlur = () => {
this.setState({
focused: false,
selection: { start: 0, end: 0 },
});
};
onSearchPageBlurred() {
this.setState({ currenValueSet: false });
}
render() {
const {
@@ -270,10 +250,12 @@ class UriBar extends React.PureComponent {
ref={ref => {
this.textInput = ref;
}}
onTouchStart={this.handleTouchStart}
autoCorrect={false}
style={uriBarStyle.uriText}
selection={this.state.selection}
onLayout={() => {
this.setSelection();
}}
selectTextOnFocus
placeholder={__('Search movies, music, and more')}
underlineColorAndroid={'transparent'}
numberOfLines={1}
@@ -282,8 +264,11 @@ class UriBar extends React.PureComponent {
returnKeyType={'go'}
inlineImageLeft={'baseline_search_black_24'}
inlineImagePadding={16}
onFocus={this.handleFocus}
onBlur={this.handleBlur}
onFocus={() => this.setState({ focused: true })}
onBlur={() => {
this.setState({ focused: false });
this.setSelection();
}}
onChangeText={this.handleChangeText}
onSubmitEditing={this.handleSubmitEditing}
/>
+1 -2
View File
@@ -1,10 +1,9 @@
import { connect } from 'react-redux';
import { selectUnclaimedRewardValue, selectUser } from 'lbryinc';
import { selectUnclaimedRewardValue } from 'lbryinc';
import WalletRewardsDriver from './view';
const select = state => ({
unclaimedRewardAmount: selectUnclaimedRewardValue(state),
user: selectUser(state),
});
export default connect(select)(WalletRewardsDriver);
+5 -21
View File
@@ -5,31 +5,15 @@ import walletStyle from 'styles/wallet';
class WalletRewardsDriver extends React.PureComponent<Props> {
render() {
const { navigation, unclaimedRewardAmount, user } = this.props;
const signedIn = user && user.has_verified_email;
const { navigation, unclaimedRewardAmount } = this.props;
return (
<TouchableOpacity style={walletStyle.rewardDriverCard} onPress={() => navigation.navigate('Rewards')}>
<Icon name="award" size={16} style={walletStyle.rewardIcon} />
{signedIn && (
<Text style={walletStyle.rewardDriverText}>
{unclaimedRewardAmount === 0 && __('Free credits available in rewards.')}
{unclaimedRewardAmount === 1 &&
__('%amount% free credit available in rewards.', { amount: unclaimedRewardAmount })}
{unclaimedRewardAmount > 1 &&
__('%amount% free credits available in rewards.', { amount: unclaimedRewardAmount })}{' '}
{__('Tap to learn more.')}
</Text>
)}
{!signedIn && (
<Text style={walletStyle.rewardDriverText}>
{unclaimedRewardAmount === 1 &&
__('Get %amount% free credit after creating an account.', { amount: unclaimedRewardAmount })}
{unclaimedRewardAmount !== 1 &&
__('Get %amount% free credits after creating an account.', { amount: unclaimedRewardAmount })}
</Text>
)}
<Text style={walletStyle.rewardDriverText}>
Get {unclaimedRewardAmount > 0 ? unclaimedRewardAmount : ''} free credit
{unclaimedRewardAmount === 1 ? '' : 's'} after creating an account.
</Text>
</TouchableOpacity>
);
}
+4 -18
View File
@@ -1,10 +1,9 @@
// @flow
import React from 'react';
import { formatCredits, regexAddress } from 'lbry-redux';
import { regexAddress } from 'lbry-redux';
import { Alert, Clipboard, TextInput, Text, View } from 'react-native';
import Button from 'component/button';
import Colors from 'styles/colors';
import Icon from 'react-native-vector-icons/FontAwesome5';
import walletStyle from 'styles/wallet';
type DraftTransaction = {
@@ -25,7 +24,6 @@ class WalletSend extends React.PureComponent<Props> {
address: null,
addressChanged: false,
addressValid: false,
creditsInputFocused: false,
};
componentWillUpdate(nextProps) {
@@ -38,10 +36,9 @@ class WalletSend extends React.PureComponent<Props> {
handleSend = () => {
const { balance, sendToAddress, notify } = this.props;
const { address, amount } = this.state;
if (address && (!regexAddress.test(address) || address.substring(0, 1) === 'r')) {
if (address && !regexAddress.test(address)) {
notify({
message: __('The recipient address is not a valid LBRY address.'),
isError: true,
});
return;
}
@@ -49,7 +46,6 @@ class WalletSend extends React.PureComponent<Props> {
if (amount > balance) {
notify({
message: __('Insufficient credits'),
isError: true,
});
return;
}
@@ -74,7 +70,6 @@ class WalletSend extends React.PureComponent<Props> {
const { notify } = this.props;
notify({
message: __('The recipient address is not a valid LBRY address.'),
isError: true,
});
}
};
@@ -100,10 +95,9 @@ class WalletSend extends React.PureComponent<Props> {
this.setState({
address: value,
addressChanged: true,
addressValid: value.trim().length === 0 || (regexAddress.test(value) && !value.startsWith('r')),
addressValid: value.trim().length === 0 || regexAddress.test(value),
})
}
numberOfLines={1}
onBlur={this.handleAddressInputBlur}
onSubmitEditing={this.handleAddressInputSubmit}
placeholder={'bbFxRyXXXXXXXXXXXZD8nE7XTLUxYnddTs'}
@@ -124,8 +118,6 @@ class WalletSend extends React.PureComponent<Props> {
<TextInput
ref={ref => (this.amountInput = ref)}
onChangeText={value => this.setState({ amount: value })}
onFocus={() => this.setState({ creditsInputFocused: true })}
onBlur={() => this.setState({ creditsInputFocused: false })}
keyboardType={'numeric'}
placeholder={'0'}
underlineColorAndroid={Colors.NextLbryGreen}
@@ -133,15 +125,9 @@ class WalletSend extends React.PureComponent<Props> {
style={[walletStyle.input, walletStyle.amountInput]}
/>
<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>
<Button
text={__('Send')}
text={'Send'}
style={[walletStyle.button, walletStyle.sendButton]}
disabled={!canSend}
onPress={this.handleSend}
+4 -2
View File
@@ -29,12 +29,14 @@ class WalletSignIn extends React.Component {
return (
<View style={walletStyle.signInContainer}>
<View style={walletStyle.signInSummaryRow}>
<Text style={walletStyle.signInTitle}>{__('Account Recommended')}</Text>
<Text style={walletStyle.signInTitle}>Account Recommended</Text>
</View>
<View style={walletStyle.onboarding}>
<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'}
{__('Without an account, you assume all responsibility for securing your wallet and LBRY data.')}
</Text>
+2 -9
View File
@@ -64,8 +64,6 @@ const Constants = {
ACTION_CLEAR_PUBLISH_FORM_STATE: 'CLEAR_PUBLISH_FORM_STATE',
ACTION_CLEAR_CHANNEL_FORM_STATE: 'CLEAR_CHANNEL_FORM_STATE',
ACTION_SET_EXPLICIT_NAVIGATE_BACK: 'SET_EXPLICIT_NAVIGATE_BACK',
ACTION_FULLSCREEN_MODE_TOGGLED: 'FULLSCREEN_MODE_TOGGLED',
ORIENTATION_HORIZONTAL: 'horizontal',
@@ -97,7 +95,6 @@ const Constants = {
FULL_ROUTE_NAME_WALLET: 'WalletStack',
ROUTE_FILE: 'File',
DRAWER_ROUTE_FILE_VIEW: 'FileView',
ITEM_CREATE_A_CHANNEL: 'Create a channel...',
ITEM_ANONYMOUS: 'Publish anonymously',
@@ -136,7 +133,7 @@ const Constants = {
ORDER_BY_EFFECTIVE_AMOUNT: 'effective_amount',
DEFAULT_PAGE_SIZE: 20,
DEFAULT_PAGE_SIZE: 10,
ALL_PLACEHOLDER: '_all',
@@ -170,8 +167,4 @@ export const DrawerRoutes = [
];
// sub-pages for main routes
export const InnerDrawerRoutes = [
Constants.DRAWER_ROUTE_CHANNEL_CREATOR_FORM,
Constants.DRAWER_ROUTE_PUBLISH_FORM,
Constants.DRAWER_ROUTE_FILE_VIEW,
];
export const InnerDrawerRoutes = [Constants.DRAWER_ROUTE_CHANNEL_CREATOR_FORM, Constants.DRAWER_ROUTE_PUBLISH_FORM];
+3 -4
View File
@@ -52,9 +52,8 @@ function checkMessageAndSave(message, messagesFilePath) {
); */
})
.catch(err => {
if (err && !isProduction) {
// only do this when not in production
console.error(err);
if (err) {
throw err;
}
});
}
@@ -75,6 +74,6 @@ export function __(message, tokens) {
}
return translatedMessage.replace(/%([^%]+)%/g, function($1, $2) {
return tokens.hasOwnProperty($2) ? tokens[$2] : $2;
return tokens[$2] || $2;
});
}
+6 -11
View File
@@ -27,7 +27,6 @@ import {
homepageReducer,
rewardsReducer,
selectUserVerifiedEmail,
statsReducer,
subscriptionsReducer,
syncReducer,
userReducer,
@@ -42,7 +41,6 @@ import AppWithNavigationState, {
} from 'component/AppNavigator';
import { REHYDRATE, PURGE, persistCombineReducers, persistStore } from 'redux-persist';
import { __ } from 'i18n';
import reactotron from '../reactotron';
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
import getStoredStateMigrateV4 from 'redux-persist/lib/integration/getStoredStateMigrateV4';
import FilesystemStorage from 'redux-persist-filesystem-storage';
@@ -58,7 +56,7 @@ window.__ = __;
const globalExceptionHandler = (error, isFatal) => {
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);
@@ -95,7 +93,6 @@ const compressor = createCompressor();
const authFilter = createFilter('auth', ['authToken']);
const blockedFilter = createFilter('blocked', ['blockedChannels']);
const contentFilter = createFilter('content', ['positions']);
const drawerFilter = createFilter('drawer', ['lastRouteInStack']);
const saveClaimsFilter = createFilter('claims', ['claimsByUri']);
const subscriptionsFilter = createFilter('subscriptions', ['enabledChannelNotifications', 'subscriptions', 'latest']);
const settingsFilter = createFilter('settings', ['clientSettings']);
@@ -103,13 +100,12 @@ const tagsFilter = createFilter('tags', ['followedTags']);
const walletFilter = createFilter('wallet', ['receiveAddress']);
const v4PersistOptions = {
whitelist: ['auth', 'blocked', 'claims', 'drawer', 'content', 'subscriptions', 'settings', 'tags', 'wallet'],
whitelist: ['auth', 'blocked', 'claims', 'content', 'subscriptions', 'settings', 'tags', 'wallet'],
// Order is important. Needs to be compressed last or other transforms can't
// read the data
transforms: [
authFilter,
blockedFilter,
drawerFilter,
saveClaimsFilter,
subscriptionsFilter,
settingsFilter,
@@ -144,7 +140,6 @@ const reducers = persistCombineReducers(persistOptions, {
rewards: rewardsReducer,
settings: settingsReducer,
search: searchReducer,
stats: statsReducer,
subscriptions: subscriptionsReducer,
sync: syncReducer,
tags: tagsReducer,
@@ -182,7 +177,7 @@ const sharedStateCallback = ({ dispatch, getState }) => {
const emailVerified = selectUserVerifiedEmail(state);
if (syncEnabled && emailVerified) {
NativeModules.UtilityModule.getSecureValue(Constants.KEY_WALLET_PASSWORD).then(password =>
dispatch(doGetSync(password)),
dispatch(doGetSync(password))
);
}
};
@@ -198,13 +193,13 @@ const composeEnhancers = compose;
const store = createStore(
enableBatching(reducers),
{}, // initial state,
composeEnhancers(applyMiddleware(...middleware), reactotron.createEnhancer()),
composeEnhancers(applyMiddleware(...middleware))
);
window.store = store;
const persistor = persistStore(store, null, err => {
const persistor = persistStore(store, persistOptions, err => {
if (err) {
// console.log('Unable to load saved SETTINGS');
console.log('Unable to load saved SETTINGS');
}
});
window.persistor = persistor;
+2 -2
View File
@@ -74,7 +74,7 @@ class AboutPage extends React.PureComponent {
<View style={aboutStyle.container}>
<PageHeader title={'About LBRY'} onBackPressed={() => navigateBack(navigation, drawerStack, popDrawerStack)} />
<ScrollView style={aboutStyle.scrollContainer}>
<Text style={aboutStyle.title}>{__('Content Freedom')}</Text>
<Text style={aboutStyle.title}>Content Freedom</Text>
<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.'
@@ -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" text={__('Frequently Asked Questions')} />
</View>
<Text style={aboutStyle.socialTitle}>{__('Get Social')}</Text>
<Text style={aboutStyle.socialTitle}>Get Social</Text>
<Text style={aboutStyle.paragraph}>
{__(
'You can interact with the LBRY team and members of the community on Discord, Facebook, Instagram, Twitter or Reddit.'
-3
View File
@@ -1,6 +1,5 @@
import { connect } from 'react-redux';
import { doAbandonClaim, doFetchChannelListMine, makeSelectClaimForUri, selectMyChannelClaims } from 'lbry-redux';
import { doFetchSubCount, makeSelectSubCountForUri } from 'lbryinc';
import { doPopDrawerStack } from 'redux/actions/drawer';
import { doSetSortByItem, doSetTimeItem } from 'redux/actions/settings';
import { selectDrawerStack } from 'redux/selectors/drawer';
@@ -12,14 +11,12 @@ const select = (state, props) => ({
claim: makeSelectClaimForUri(props.uri)(state),
drawerStack: selectDrawerStack(state),
sortByItem: selectSortByItem(state),
subCount: makeSelectSubCountForUri(props.uri)(state),
timeItem: selectTimeItem(state),
});
const perform = dispatch => ({
abandonClaim: (txid, nout) => dispatch(doAbandonClaim(txid, nout)),
fetchChannelListMine: () => dispatch(doFetchChannelListMine()),
fetchSubCount: claimId => dispatch(doFetchSubCount(claimId)),
popDrawerStack: () => dispatch(doPopDrawerStack()),
setSortByItem: item => dispatch(doSetSortByItem(item)),
setTimeItem: item => dispatch(doSetTimeItem(item)),
+17 -47
View File
@@ -23,7 +23,6 @@ import EmptyStateView from 'component/emptyStateView';
import Icon from 'react-native-vector-icons/FontAwesome5';
import Link from 'component/link';
import ModalPicker from 'component/modalPicker';
import ModalTipView from 'component/modalTipView';
import PageHeader from 'component/pageHeader';
import SubscribeButton from 'component/subscribeButton';
import SubscribeNotificationButton from 'component/subscribeNotificationButton';
@@ -37,10 +36,8 @@ class ChannelPage extends React.PureComponent {
autoStyle: null,
showSortPicker: false,
showTimePicker: false,
showTipView: false,
orderBy: ['release_time'], // sort by new by default
activeTab: Constants.CONTENT_TAB,
currentSortByItem: Constants.CLAIM_SEARCH_SORT_BY_ITEMS[1], // should always default to sorting channel pages by new
};
componentWillMount() {
@@ -51,17 +48,16 @@ class ChannelPage extends React.PureComponent {
}
componentDidMount() {
const { claim, fetchChannelListMine, fetchSubCount } = this.props;
const { fetchChannelListMine, setSortByItem } = this.props;
NativeModules.Firebase.setCurrentScreen('Channel');
setSortByItem(Constants.CLAIM_SEARCH_SORT_BY_ITEMS[1]); // sort by newest first
fetchChannelListMine();
if (claim) {
fetchSubCount(claim.claim_id);
}
}
handleSortByItemSelected = item => {
// sort by specific only to this component state
this.setState({ currentSortByItem: item, orderBy: getOrderBy(item), showSortPicker: false });
const { setSortByItem } = this.props;
setSortByItem(item);
this.setState({ orderBy: getOrderBy(item), showSortPicker: false });
};
handleTimeItemSelected = item => {
@@ -71,18 +67,17 @@ class ChannelPage extends React.PureComponent {
};
listHeader = () => {
const { timeItem } = this.props;
const { currentSortByItem } = this.state;
const { sortByItem, timeItem } = this.props;
return (
<View style={channelPageStyle.listHeader}>
<View style={discoverStyle.pickerRow}>
<View style={discoverStyle.leftPickerRow}>
<TouchableOpacity style={discoverStyle.tagSortBy} onPress={() => this.setState({ showSortPicker: true })}>
<Text style={discoverStyle.tagSortText}>{__(currentSortByItem.label.split(' ')[0])}</Text>
<Text style={discoverStyle.tagSortText}>{__(sortByItem.label.split(' ')[0])}</Text>
<Icon style={discoverStyle.tagSortIcon} name={'sort-down'} size={14} />
</TouchableOpacity>
{Constants.SORT_BY_TOP === currentSortByItem.name && (
{Constants.SORT_BY_TOP === sortByItem.name && (
<TouchableOpacity style={discoverStyle.tagTime} onPress={() => this.setState({ showTimePicker: true })}>
<Text style={discoverStyle.tagSortText}>{__(timeItem.label)}</Text>
<Icon style={discoverStyle.tagSortIcon} name={'sort-down'} size={14} />
@@ -173,14 +168,9 @@ class ChannelPage extends React.PureComponent {
const { permanent_url: permanentUrl } = claim;
navigation.navigate({
routeName: Constants.DRAWER_ROUTE_CHANNEL_CREATOR,
params: { editChannelUrl: permanentUrl, returnUrl: permanentUrl },
params: { editChannelUrl: permanentUrl },
});
}
this.onEditPressed = null;
};
onTipPressed = () => {
this.setState({ showTipView: true });
};
onSharePressed = () => {
@@ -211,15 +201,15 @@ class ChannelPage extends React.PureComponent {
},
},
],
{ cancelable: true },
{ cancelable: true }
);
}
};
render() {
const { channels, claim, navigation, uri, drawerStack, popDrawerStack, subCount, timeItem } = this.props;
const { channels, claim, navigation, uri, drawerStack, popDrawerStack, sortByItem, timeItem } = this.props;
const { name, permanent_url: permanentUrl } = claim;
const { autoStyle, currentSortByItem, showSortPicker, showTimePicker, showTipView } = this.state;
const { autoStyle, showSortPicker, showTimePicker } = this.state;
const ownedChannel = channels ? channels.map(channel => channel.permanent_url).includes(permanentUrl) : false;
let thumbnailUrl,
@@ -262,10 +252,6 @@ class ChannelPage extends React.PureComponent {
<View style={channelPageStyle.channelHeader}>
<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 style={[channelPageStyle.avatarImageContainer, autoStyle]}>
@@ -285,7 +271,7 @@ class ChannelPage extends React.PureComponent {
style={channelPageStyle.actionButton}
theme={'light'}
icon={'edit'}
text={__('Edit')}
text={'Edit'}
onPress={this.onEditPressed}
/>
)}
@@ -294,7 +280,7 @@ class ChannelPage extends React.PureComponent {
style={[channelPageStyle.actionButton, channelPageStyle.deleteButton]}
theme={'light'}
icon={'trash-alt'}
text={__('Delete')}
text={'Delete'}
onPress={this.onDeletePressed}
/>
)}
@@ -304,12 +290,6 @@ class ChannelPage extends React.PureComponent {
icon={'share-alt'}
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} />}
{false && !ownedChannel && (
<SubscribeNotificationButton
@@ -326,14 +306,14 @@ class ChannelPage extends React.PureComponent {
style={channelPageStyle.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} />}
</TouchableOpacity>
<TouchableOpacity
style={channelPageStyle.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} />}
</TouchableOpacity>
</View>
@@ -347,7 +327,7 @@ class ChannelPage extends React.PureComponent {
title={__('Sort content by')}
onOverlayPress={() => this.setState({ showSortPicker: false })}
onItemSelected={this.handleSortByItemSelected}
selectedItem={currentSortByItem}
selectedItem={sortByItem}
items={Constants.CLAIM_SEARCH_SORT_BY_ITEMS}
/>
)}
@@ -360,16 +340,6 @@ class ChannelPage extends React.PureComponent {
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>
);
}
+2 -8
View File
@@ -13,12 +13,7 @@ import {
doToast,
} from 'lbry-redux';
import { doGetSync } from 'lbryinc';
import {
doPushDrawerStack,
doPopDrawerStack,
doSetPlayerVisible,
doSetExplicitNavigateBack,
} from 'redux/actions/drawer';
import { doPushDrawerStack, doPopDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
import { doUpdateChannelFormState, doClearChannelFormState } from 'redux/actions/form';
import { selectDrawerStack } from 'redux/selectors/drawer';
import { selectChannelFormState, selectHasChannelFormState } from 'redux/selectors/form';
@@ -49,10 +44,9 @@ const perform = dispatch => ({
pushDrawerStack: (routeName, params) => dispatch(doPushDrawerStack(routeName, params)),
popDrawerStack: () => dispatch(doPopDrawerStack()),
setPlayerVisible: () => dispatch(doSetPlayerVisible(false)),
setExplicitNavigateBack: flag => dispatch(doSetExplicitNavigateBack(flag)),
});
export default connect(
select,
perform,
perform
)(ChannelCreator);
+16 -78
View File
@@ -1,5 +1,5 @@
import React from 'react';
import { CLAIM_VALUES, Lbry, formatCredits, isNameValid, regexInvalidURI } from 'lbry-redux';
import { CLAIM_VALUES, isNameValid, regexInvalidURI } from 'lbry-redux';
import {
ActivityIndicator,
Alert,
@@ -14,14 +14,13 @@ import {
TouchableOpacity,
View,
} from 'react-native';
import { navigateBack, navigateToUri, logPublish, uploadImageAsset } from 'utils/helper';
import { navigateToUri, logPublish, uploadImageAsset } from 'utils/helper';
import Button from 'component/button';
import ChannelIconItem from 'component/channelIconItem';
import ChannelRewardsDriver from 'component/channelRewardsDriver';
import Colors from 'styles/colors';
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
import EmptyStateView from 'component/emptyStateView';
import FastImage from 'react-native-fast-image';
import FloatingWalletBalance from 'component/floatingWalletBalance';
import Icon from 'react-native-vector-icons/FontAwesome5';
import Link from 'component/link';
@@ -37,10 +36,8 @@ export default class ChannelCreator extends React.PureComponent {
state = {
autoStyle: null,
returnUrl: null,
canSave: true,
claimId: null,
creditsInputFocused: false,
currentSelectedValue: Constants.ITEM_ANONYMOUS,
currentPhase: null,
displayName: null,
@@ -78,7 +75,6 @@ export default class ChannelCreator extends React.PureComponent {
descriptionFocused: false,
websiteFocused: false,
emailFocused: false,
hasReturnedBack: false,
};
didFocusListener;
@@ -120,14 +116,7 @@ export default class ChannelCreator extends React.PureComponent {
};
componentWillReceiveProps(nextProps) {
const {
currentRoute: prevRoute,
drawerStack: prevDrawerStack,
popDrawerStack,
setPlayerVisible,
navigation,
notify,
} = this.props;
const { currentRoute: prevRoute, drawerStack: prevDrawerStack, notify } = this.props;
const { currentRoute, drawerStack, updatingChannel, updateChannelError } = nextProps;
if (Constants.DRAWER_ROUTE_CHANNEL_CREATOR === currentRoute && currentRoute !== prevRoute) {
@@ -151,11 +140,6 @@ export default class ChannelCreator extends React.PureComponent {
) {
// navigated back from the form
this.setState({ currentPhase: Constants.PHASE_LIST });
if (!this.state.hasReturnedBack && this.state.returnUrl) {
this.setState({ hasReturnedBack: true }, () => {
navigateBack(navigation, drawerStack, popDrawerStack, setPlayerVisible);
});
}
}
}
@@ -185,12 +169,11 @@ export default class ChannelCreator extends React.PureComponent {
let isEditMode = false;
if (navigation.state.params) {
const { editChannelUrl, displayForm, returnUrl } = navigation.state.params;
const { editChannelUrl, displayForm } = navigation.state.params;
if (editChannelUrl) {
isEditMode = true;
this.setState({ editChannelUrl, currentPhase: Constants.PHASE_CREATE });
}
this.setState({ returnUrl });
}
if (!isEditMode && hasFormState) {
@@ -241,9 +224,9 @@ export default class ChannelCreator extends React.PureComponent {
error => {
notify({ message: `The image could not be uploaded: ${error}` });
this.setState({ uploadingImage: false });
},
}
);
},
}
);
} else {
// could not determine the file path
@@ -505,12 +488,12 @@ export default class ChannelCreator extends React.PureComponent {
claim_id: claimId,
amount: newChannelBid,
},
optionalParams,
optionalParams
);
this.setState({ updateChannelStarted: true }, () => updateChannel(params));
} else {
this.setState({ creatingChannel: true }, () =>
createChannel(channelName, newChannelBid, optionalParams).then(success, failure),
createChannel(channelName, newChannelBid, optionalParams).then(success, failure)
);
}
};
@@ -543,7 +526,7 @@ export default class ChannelCreator extends React.PureComponent {
avatarImagePickerOpen: false,
coverImagePickerOpen: true,
},
() => this.checkStoragePermission(),
() => NativeModules.UtilityModule.openDocumentPicker('image/*')
);
};
@@ -559,7 +542,7 @@ export default class ChannelCreator extends React.PureComponent {
avatarImagePickerOpen: true,
coverImagePickerOpen: false,
},
() => this.checkStoragePermission(),
() => NativeModules.UtilityModule.openDocumentPicker('image/*')
);
};
@@ -689,7 +672,7 @@ export default class ChannelCreator extends React.PureComponent {
},
},
],
{ cancelable: true },
{ cancelable: true }
);
};
@@ -765,42 +748,6 @@ export default class ChannelCreator extends React.PureComponent {
this.addOrRemoveItem(channel);
};
checkStoragePermission = () => {
// check if we the permission to write to external storage has been granted
NativeModules.UtilityModule.canReadWriteStorage().then(canReadWrite => {
if (!canReadWrite) {
// request permission
NativeModules.UtilityModule.requestStoragePermission();
} else {
NativeModules.UtilityModule.openDocumentPicker('image/*');
}
});
};
handleStoragePermissionGranted = () => {
// update the configured download folder
NativeModules.UtilityModule.getDownloadDirectory().then(downloadDirectory => {
Lbry.settings_set({
key: 'download_dir',
value: downloadDirectory,
})
.then(() => {})
.catch(() => {});
});
// open picker for images
NativeModules.UtilityModule.openDocumentPicker('image/*');
};
handleStoragePermissionRefused = () => {
const { notify } = this.props;
notify({
message: __('Pictures from your device cannot be used because the permission to read storage was not granted.'),
isError: true,
});
this.setState({ avatarImagePickerOpen: false, coverImagePickerOpen: false });
};
render() {
const { abandoningClaimIds, balance, fetchingChannels, updatingChannel, channels = [], navigation } = this.props;
const {
@@ -883,9 +830,9 @@ export default class ChannelCreator extends React.PureComponent {
>
<View style={[channelCreatorStyle.channelListAvatar, itemAutoStyle]}>
{itemThumbnailUrl && (
<FastImage
<Image
style={channelCreatorStyle.avatarImage}
resizeMode={FastImage.resizeMode.cover}
resizeMode={'cover'}
source={{ uri: itemThumbnailUrl }}
/>
)}
@@ -920,7 +867,7 @@ export default class ChannelCreator extends React.PureComponent {
style={channelCreatorStyle.coverImage}
resizeMode={'cover'}
source={
!!coverImageUrl && coverImageUrl.trim().length > 0
coverImageUrl !== null && coverImageUrl.trim().length > 0
? { uri: coverImageUrl }
: require('../../assets/default_channel_cover.png')
}
@@ -939,15 +886,14 @@ export default class ChannelCreator extends React.PureComponent {
<View style={[channelCreatorStyle.avatarImageContainer, autoStyle]}>
<TouchableOpacity style={channelCreatorStyle.avatarTouchArea} onPress={this.onAvatarImagePress}>
{!!thumbnailUrl && thumbnailUrl.trim().length > 0 && (
{thumbnailUrl !== null && thumbnailUrl.trim().length > 0 && (
<Image
style={channelCreatorStyle.avatarImage}
resizeMode={'cover'}
source={{ uri: thumbnailUrl }}
/>
)}
{(!!thumbnailUrl || (!!thumbnailUrl && thumbnailUrl.trim().length === 0)) &&
newChannelName.length > 0 && (
{(thumbnailUrl === null || thumbnailUrl.trim().length === 0) && newChannelName.length > 0 && (
<Text style={channelIconStyle.autothumbCharacter}>
{newChannelName.substring(0, 1).toUpperCase()}
</Text>
@@ -1014,19 +960,11 @@ export default class ChannelCreator extends React.PureComponent {
style={channelCreatorStyle.bidAmountInput}
value={String(newChannelBid)}
onChangeText={this.handleNewChannelBidChange}
onFocus={() => this.setState({ creditsInputFocused: true })}
onBlur={() => this.setState({ creditsInputFocused: false })}
placeholder={'0.00'}
keyboardType={'number-pad'}
underlineColorAndroid={Colors.NextLbryGreen}
/>
<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>
<Text style={channelCreatorStyle.helpText}>
{__('This LBC remains yours. It is a deposit to reserve the name and can be undone at any time.')}
+2 -3
View File
@@ -11,7 +11,7 @@ import {
selectSubscriptionClaims,
selectUnreadSubscriptions,
} from 'lbryinc';
import { doPushDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
import { doPushDrawerStack } from 'redux/actions/drawer';
import { doSetClientSetting, doSetSortByItem, doSetTimeItem } from 'redux/actions/settings';
import { makeSelectClientSetting, selectSortByItem, selectTimeItem } from 'redux/selectors/settings';
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
@@ -41,12 +41,11 @@ const perform = dispatch => ({
pushDrawerStack: () => dispatch(doPushDrawerStack(Constants.DRAWER_ROUTE_DISCOVER)),
removeUnreadSubscriptions: () => dispatch(doRemoveUnreadSubscriptions()),
setClientSetting: (key, value) => dispatch(doSetClientSetting(key, value)),
setPlayerVisible: () => dispatch(doSetPlayerVisible(false)),
setSortByItem: item => dispatch(doSetSortByItem(item)),
setTimeItem: item => dispatch(doSetTimeItem(item)),
});
export default connect(
select,
perform,
perform
)(DiscoverPage);
+47 -9
View File
@@ -86,13 +86,11 @@ class DiscoverPage extends React.PureComponent {
}
onComponentFocused = () => {
const { pushDrawerStack, setPlayerVisible, currentRoute } = this.props;
if (currentRoute === Constants.DRAWER_ROUTE_DISCOVER) {
pushDrawerStack();
}
NativeModules.Firebase.setCurrentScreen('Your tags');
setPlayerVisible();
const { fetchSubscriptions, pushDrawerStack } = this.props;
// pushDrawerStack();
NativeModules.Firebase.setCurrentScreen('Your tags').then(result => {
fetchSubscriptions();
});
};
handleSortByItemSelected = item => {
@@ -125,6 +123,46 @@ class DiscoverPage extends React.PureComponent {
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 = () => {
const { ratingReminderDisabled, ratingReminderLastShown, setClientSetting } = this.props;
@@ -139,7 +177,7 @@ class DiscoverPage extends React.PureComponent {
Alert.alert(
__('Enjoying LBRY?'),
__(
'Are you enjoying your experience with the LBRY app? You can leave a review for us on the Play Store.',
'Are you enjoying your experience with the LBRY app? You can leave a review for us on the Play Store.'
),
[
{
@@ -155,7 +193,7 @@ class DiscoverPage extends React.PureComponent {
},
},
],
{ cancelable: false },
{ cancelable: false }
);
}
}
+4 -8
View File
@@ -79,7 +79,7 @@ class DownloadsPage extends React.PureComponent {
const { claims, fileInfos } = this.props;
const claimUris = claims.map(claim => normalizeURI(`${claim.name}#${claim.claim_id}`));
return fileInfos.filter(
fileInfo => !claimUris.includes(normalizeURI(`${fileInfo.claim_name}#${fileInfo.claim_id}`)),
fileInfo => !claimUris.includes(normalizeURI(`${fileInfo.claim_name}#${fileInfo.claim_id}`))
);
};
@@ -125,11 +125,7 @@ class DownloadsPage extends React.PureComponent {
onPress: () => {
const uris = Object.keys(selectedClaimsMap);
uris.forEach(uri => {
const { txid, nout, name, claim_id: claimId } = selectedClaimsMap[uri];
if (name && claimId) {
NativeModules.UtilityModule.deleteDownload(normalizeURI(`${name}#${claimId}`));
}
const { txid, nout } = selectedClaimsMap[uri];
deleteFile(`${txid}:${nout}`, true);
});
this.onExitSelectionMode();
@@ -139,7 +135,7 @@ class DownloadsPage extends React.PureComponent {
],
{
cancelable: true,
},
}
);
};
@@ -188,7 +184,7 @@ class DownloadsPage extends React.PureComponent {
this.handleSelectItem(item, claim);
} else {
// TODO: when shortUrl is available for my claims, navigate to that URL instead
navigateToUri(navigation, item, { autoplay: true }, false, null);
navigateToUri(navigation, item, { autoplay: true });
}
}}
onLongPress={claim => this.handleItemLongPress(item, claim)}
+18 -13
View File
@@ -8,7 +8,7 @@ import {
doPurchaseUri,
doDeletePurchasedUri,
doResolveUri,
doResolveUris,
doSearch,
doSendTip,
doToast,
makeSelectIsUriResolving,
@@ -18,6 +18,7 @@ import {
makeSelectContentPositionForUri,
makeSelectContentTypeForUri,
makeSelectMetadataForUri,
makeSelectRecommendedContentForUri,
makeSelectStreamingUrlForUri,
makeSelectThumbnailForUri,
makeSelectTitleForUri,
@@ -32,16 +33,20 @@ import {
import {
doClaimEligiblePurchaseRewards,
doFetchCostInfoForUri,
doFetchViewCount,
makeSelectCostInfoForUri,
makeSelectViewCountForUri,
selectRewardContentClaimIds,
selectBlackListedOutpoints,
} from 'lbryinc';
import { doDeleteFile, doStopDownloadingFile } from 'redux/actions/file';
import { doPushDrawerStack, doPopDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
import {
doStartDownload,
doUpdateDownload,
doCompleteDownload,
doDeleteFile,
doStopDownloadingFile,
} from 'redux/actions/file';
import { doPopDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
import { doToggleFullscreenMode } from 'redux/actions/settings';
import { selectDrawerStack, makeSelectPlayerVisible } from 'redux/selectors/drawer';
import { selectDrawerStack } from 'redux/selectors/drawer';
import FilePage from './view';
const select = (state, props) => {
@@ -61,7 +66,6 @@ const select = (state, props) => {
fileInfo: makeSelectFileInfoForUri(contentUri)(state),
rewardedContentClaimIds: selectRewardContentClaimIds(state, selectProps),
channelUri: makeSelectChannelForClaimUri(contentUri, true)(state),
isPlayerVisible: makeSelectPlayerVisible(uri)(state), // use navigation uri for this selector
position: makeSelectContentPositionForUri(contentUri)(state),
purchasedUris: selectPurchasedUris(state),
failedPurchaseUris: selectFailedPurchaseUris(state),
@@ -70,8 +74,8 @@ const select = (state, props) => {
streamingUrl: makeSelectStreamingUrlForUri(contentUri)(state),
thumbnail: makeSelectThumbnailForUri(contentUri)(state),
title: makeSelectTitleForUri(contentUri)(state),
recommendedContent: makeSelectRecommendedContentForUri(contentUri)(state),
isSearchingRecommendContent: selectIsSearching(state),
viewCount: makeSelectViewCountForUri(contentUri)(state),
};
};
@@ -85,23 +89,24 @@ const perform = dispatch => ({
fetchCostInfo: uri => dispatch(doFetchCostInfoForUri(uri)),
fetchMyClaims: () => dispatch(doFetchClaimListMine()),
fetchChannelListMine: () => dispatch(doFetchChannelListMine()),
fetchViewCount: claimId => dispatch(doFetchViewCount(claimId)),
fileGet: (uri, saveFile) => dispatch(doFileGet(uri, saveFile)),
notify: data => dispatch(doToast(data)),
popDrawerStack: () => dispatch(doPopDrawerStack()),
pushDrawerStack: (routeName, params) => dispatch(doPushDrawerStack(routeName, params)),
purchaseUri: (uri, costInfo, saveFile) => dispatch(doPurchaseUri(uri, costInfo, saveFile)),
deletePurchasedUri: uri => dispatch(doDeletePurchasedUri(uri)),
resolveUri: uri => dispatch(doResolveUri(uri)),
resolveUris: uris => dispatch(doResolveUris(uris)),
searchRecommended: query => dispatch(doSearch(query, 20, undefined, true)),
sendTip: (amount, claimId, isSupport, successCallback, errorCallback) =>
dispatch(doSendTip(amount, claimId, isSupport, successCallback, errorCallback)),
setPlayerVisible: (visible, uri) => dispatch(doSetPlayerVisible(visible, uri)),
setPlayerVisible: () => dispatch(doSetPlayerVisible(true)),
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)),
});
export default connect(
select,
perform,
perform
)(FilePage);
+511 -769
View File
File diff suppressed because it is too large. Load diff
+10 -1
View File
@@ -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)
content = (
<View onLayout={onWalletViewLayout}>
<Text style={firstRunStyle.title}>{__('Password')}</Text>
<Text style={firstRunStyle.title}>Password</Text>
<Text style={firstRunStyle.paragraph}>
{hasSyncedWallet
? __('Please enter the password you used to secure your wallet.')
@@ -146,6 +146,15 @@ class WalletPage extends React.PureComponent {
<Icon name={this.state.revealPassword ? 'eye-slash' : 'eye'} size={16} style={firstRunStyle.revealIcon} />
</TouchableOpacity>
</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 && (
<View style={firstRunStyle.passwordStrength}>
+1 -1
View File
@@ -103,7 +103,7 @@ class WelcomePage extends React.PureComponent {
} else {
content = (
<View onLayout={onWelcomePageLayout}>
<Text style={firstRunStyle.title}>{__('Welcome to LBRY.')}</Text>
<Text style={firstRunStyle.title}>Welcome to LBRY.</Text>
<Text style={firstRunStyle.paragraph}>
{__(
'LBRY is a community-controlled content platform where you can find and publish videos, music, books, and more.'
+7 -26
View File
@@ -28,7 +28,6 @@ class FirstRunScreen extends React.PureComponent {
emailCollectTracked: false,
emailSubmitted: false,
enterPasswordTracked: false,
autoLoginTried: false,
isFirstRun: false,
launchUrl: null,
languageLoaded: false,
@@ -39,6 +38,7 @@ class FirstRunScreen extends React.PureComponent {
walletPassword: '',
syncApplyStarted: false,
syncApplyCompleted: false,
language: null,
};
componentDidMount() {
@@ -126,16 +126,8 @@ class FirstRunScreen extends React.PureComponent {
if (this.state.syncApplyStarted && !syncApplyIsPending) {
if (syncApplyErrorMessage && syncApplyErrorMessage.trim().length > 0) {
if (this.state.autoLoginTried) {
// 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,
});
notify({ message: __(syncApplyErrorMessage), isError: true });
this.setState({ showBottomContainer: true, syncApplyStarted: false, syncApplyCompleted: false });
} else {
this.setState({ syncApplyCompleted: true });
// password successfully verified
@@ -228,13 +220,7 @@ class FirstRunScreen extends React.PureComponent {
handleContinuePressed = () => {
const { notify, user, hasSyncedWallet } = this.props;
const pageIndex = FirstRunScreen.pages.indexOf(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) {
if (Constants.FIRST_RUN_PAGE_WALLET === this.state.currentPage) {
// do apply sync to check if the password is valid
if (hasSyncedWallet) {
this.checkWalletPassword();
@@ -262,7 +248,7 @@ class FirstRunScreen extends React.PureComponent {
} else {
this.showNextPage();
}
} */
}
};
handleEmailCollectPageContinue() {
@@ -315,7 +301,7 @@ class FirstRunScreen extends React.PureComponent {
onEmailChanged = email => {
this.setState({ email });
if (Constants.FIRST_RUN_PAGE_EMAIL_COLLECT === this.state.currentPage) {
this.setState({ showSkip: !email || typeof email !== 'string' || email.trim().length === 0 });
this.setState({ showSkip: !email || email.trim().length === 0 });
} else {
this.setState({ showSkip: false });
}
@@ -506,12 +492,7 @@ class FirstRunScreen extends React.PureComponent {
{Constants.FIRST_RUN_PAGE_SKIP_ACCOUNT !== this.state.currentPage &&
Constants.FIRST_RUN_PAGE_EMAIL_VERIFY !== this.state.currentPage && (
<Text style={firstRunStyle.buttonText}>
{[Constants.FIRST_RUN_PAGE_WALLET, Constants.FIRST_RUN_PAGE_WELCOME].includes(
this.state.currentPage
)
? __('Use LBRY')
: __('Continue')}{' '}
»
{Constants.FIRST_RUN_PAGE_WALLET === this.state.currentPage ? __('Use LBRY') : __('Continue')} »
</Text>
)}
</TouchableOpacity>
+1 -3
View File
@@ -1,7 +1,6 @@
import { connect } from 'react-redux';
import {
doPublish,
doFetchClaimListMine,
doResolveUri,
doToast,
doUpdatePublishForm,
@@ -28,7 +27,6 @@ const select = state => ({
const perform = dispatch => ({
notify: data => dispatch(doToast(data)),
clearPublishFormState: () => dispatch(doClearPublishFormState()),
fetchMyClaims: () => dispatch(doFetchClaimListMine()),
pendingPublishSuccess: pendingClaim => dispatch(doPendingPublishSuccess(pendingClaim)),
updatePublishForm: value => dispatch(doUpdatePublishForm(value)),
updatePublishFormState: data => dispatch(doUpdatePublishFormState(data)),
@@ -41,5 +39,5 @@ const perform = dispatch => ({
export default connect(
select,
perform,
perform
)(PublishPage);
+32 -138
View File
@@ -16,11 +16,9 @@ import {
} from 'react-native';
import { FlatGrid } from 'react-native-super-grid';
import {
Lbry,
isNameValid,
batchActions,
buildURI,
formatCredits,
normalizeURI,
parseURI,
regexInvalidURI,
@@ -47,7 +45,7 @@ import Tag from 'component/tag';
import TagSearch from 'component/tagSearch';
import UriBar from 'component/uriBar';
import publishStyle from 'styles/publish';
import { navigateToUri, navigateBack, logPublish, uploadImageAsset } from 'utils/helper';
import { navigateToUri, logPublish, uploadImageAsset } from 'utils/helper';
const languages = {
en: 'English',
@@ -85,7 +83,6 @@ class PublishPage extends React.PureComponent {
state = {
canPublish: true,
canUseCamera: false,
creditsInputFocused: false,
documentPickerOpen: false,
editMode: false,
titleFocused: false,
@@ -140,9 +137,6 @@ class PublishPage extends React.PureComponent {
// other
publishStarted: false,
storagePermissionRequired: false,
hasReturnedBack: false,
returnUrl: null,
};
didFocusListener;
@@ -164,8 +158,6 @@ class PublishPage extends React.PureComponent {
DeviceEventEmitter.removeListener('onAllGalleryThumbnailsChecked', this.handleAllGalleryThumbnailsChecked);
DeviceEventEmitter.removeListener('onDocumentPickerFilePicked', this.onFilePicked);
DeviceEventEmitter.removeListener('onDocumentPickerCanceled', this.onPickerCanceled);
DeviceEventEmitter.removeListener('onStoragePermissionGranted', this.handleStoragePermissionGranted);
DeviceEventEmitter.removeListener('onStoragePermissionRefused', this.handleStoragePermissionRefused);
}
handleGalleryThumbnailChecked = evt => {
@@ -188,57 +180,28 @@ class PublishPage extends React.PureComponent {
this.setState({ ...publishFormState, advancedMode });
};
checkStoragePermission = () => {
// check if we the permission to write to external storage has been granted
NativeModules.UtilityModule.canReadWriteStorage().then(canReadWrite => {
if (!canReadWrite) {
// request permission
NativeModules.UtilityModule.requestStoragePermission();
}
});
};
loadVideos = () => {
this.setState(
{
loadingVideos: true,
storagePermissionRequired: false,
},
() => {
NativeModules.Gallery.getVideos().then(videos => this.setState({ videos, loadingVideos: false }));
},
);
};
onComponentFocused = () => {
const { balance, fetchMyClaims, hasFormState, pushDrawerStack, setPlayerVisible, navigation } = this.props;
const { balance, hasFormState, pushDrawerStack, setPlayerVisible, navigation } = this.props;
NativeModules.Firebase.setCurrentScreen('Publish').then(result => {
pushDrawerStack(Constants.DRAWER_ROUTE_PUBLISH, navigation.state.params ? navigation.state.params : null);
setPlayerVisible();
DeviceEventEmitter.addListener('onStoragePermissionGranted', this.handleStoragePermissionGranted);
DeviceEventEmitter.addListener('onStoragePermissionRefused', this.handleStoragePermissionRefused);
NativeModules.Gallery.canUseCamera().then(canUseCamera => this.setState({ canUseCamera }));
NativeModules.Gallery.getThumbnailPath().then(thumbnailPath => this.setState({ thumbnailPath }));
fetchMyClaims();
NativeModules.UtilityModule.canReadWriteStorage().then(canReadWrite => {
if (!canReadWrite) {
this.setState({ storagePermissionRequired: true }, () =>
NativeModules.UtilityModule.requestStoragePermission(),
);
} else {
// Can only load videos when the storage permission is granted
this.loadVideos();
this.setState(
{
loadingVideos: true,
},
() => {
NativeModules.Gallery.getVideos().then(videos => this.setState({ videos, loadingVideos: false }));
}
});
);
// Check if this is an edit action
let isEditMode = false,
vanityUrlSet = false;
if (navigation.state.params) {
const { displayForm, editMode, claimToEdit, vanityUrl, returnUrl } = navigation.state.params;
const { displayForm, editMode, claimToEdit, vanityUrl } = navigation.state.params;
if (editMode) {
this.prepareEdit(claimToEdit);
isEditMode = true;
@@ -252,7 +215,6 @@ class PublishPage extends React.PureComponent {
vanityUrl: claimName,
});
}
this.setState({ returnUrl });
}
if (!isEditMode && hasFormState) {
@@ -324,7 +286,7 @@ class PublishPage extends React.PureComponent {
this.handleChannelChange(channelName);
}
pushDrawerStack(Constants.DRAWER_ROUTE_PUBLISH_FORM);
},
}
);
};
@@ -360,7 +322,7 @@ class PublishPage extends React.PureComponent {
};
handlePublishPressed = () => {
const { balance, myClaims, notify, publish, updatePublishForm } = this.props;
const { balance, notify, publish, updatePublishForm } = this.props;
const {
editMode,
bid,
@@ -392,34 +354,18 @@ class PublishPage extends React.PureComponent {
}
if (!title || title.trim().length === 0) {
notify({ message: __('Please provide a title'), isError: true });
notify({ message: __('Please provide a title') });
return;
}
if (!name) {
notify({ message: __('Please specify an address where people can find your content.'), isError: true });
notify({ message: __('Please specify an address where people can find your content.') });
return;
}
if (!isNameValid(name, false)) {
notify({ message: __('Your content address contains invalid characters.'), isError: true });
return;
} else if (!editMode && myClaims && myClaims.length > 0) {
if (myClaims.some(claim => claim.name.toLowerCase() === name.trim().toLowerCase())) {
notify({
message: __('You have already published to the specified content address. Please enter a new address.'),
isError: true,
});
return;
}
}
if (!currentMedia && !editMode) {
// sanity check. normally shouldn't happen
notify({
message: __('No file selected. Please select a video or take a photo before publishing.'),
isError: true,
});
notify({ message: __('No file selected. Please select a video or take a photo before publishing.') });
return;
}
@@ -475,15 +421,7 @@ class PublishPage extends React.PureComponent {
}
componentWillReceiveProps(nextProps) {
const {
currentRoute: prevRoute,
drawerStack: prevDrawerStack,
popDrawerStack,
setPlayerVisible,
navigation,
notify,
updatePublishFormState,
} = this.props;
const { currentRoute: prevRoute, drawerStack: prevDrawerStack, notify, updatePublishFormState } = this.props;
const { currentRoute, drawerStack, publishFormValues } = nextProps;
if (Constants.DRAWER_ROUTE_PUBLISH === currentRoute && currentRoute !== prevRoute) {
@@ -497,11 +435,6 @@ class PublishPage extends React.PureComponent {
) {
// navigated back from the form
this.showSelector();
if (!this.state.hasReturnedBack && this.state.returnUrl) {
this.setState({ hasReturnedBack: true }, () => {
navigateBack(navigation, drawerStack, popDrawerStack, setPlayerVisible);
});
}
}
}
@@ -521,7 +454,7 @@ class PublishPage extends React.PureComponent {
() => {
this.handleNameChange(this.state.name);
pushDrawerStack(Constants.DRAWER_ROUTE_PUBLISH_FORM);
},
}
);
}
@@ -575,7 +508,7 @@ class PublishPage extends React.PureComponent {
clearPublishFormState();
// reset thumbnail
updatePublishForm({ thumbnail: null });
},
}
);
}
@@ -602,7 +535,7 @@ class PublishPage extends React.PureComponent {
},
() => {
NativeModules.UtilityModule.openDocumentPicker('*/*');
},
}
);
};
@@ -648,12 +581,12 @@ class PublishPage extends React.PureComponent {
() => {
// upload a new thumbnail
uploadImageAsset(fileUrl, this.handleThumbnailUploadSuccess, this.handleThumbnailUploadFailure);
},
}
);
}
} else {
// could not determine the file path
notify({ message: __('The path could not be determined. Please try a different file.'), isError: true });
notify({ message: __('The path could not be determined. Please try a different file.') });
}
};
@@ -699,7 +632,7 @@ class PublishPage extends React.PureComponent {
videoRecordingMode: false,
recordingVideo: false,
},
() => pushDrawerStack(Constants.DRAWER_ROUTE_PUBLISH_FORM),
() => pushDrawerStack(Constants.DRAWER_ROUTE_PUBLISH_FORM)
);
});
}
@@ -723,7 +656,7 @@ class PublishPage extends React.PureComponent {
showCameraOverlay: false,
videoRecordingMode: false,
},
() => pushDrawerStack(Constants.DRAWER_ROUTE_PUBLISH),
() => pushDrawerStack(Constants.DRAWER_ROUTE_PUBLISH)
);
});
}
@@ -842,8 +775,8 @@ class PublishPage extends React.PureComponent {
uploadImageAsset(
this.getFilePathFromUri(uri),
this.handleThumbnailUploadSuccess,
this.handleThumbnailUploadFailure,
),
this.handleThumbnailUploadFailure
)
);
}
} else if (mediaType === 'image' || mediaType === 'video') {
@@ -856,7 +789,7 @@ class PublishPage extends React.PureComponent {
this.setState({ currentThumbnailUri: `file://${path}`, updatingThumbnailUri: false });
if (!this.state.uploadedThumbnailUri) {
this.setState({ uploadThumbnailStarted: true }, () =>
uploadImageAsset(path, this.handleThumbnailUploadSuccess, this.handleThumbnailUploadFailure),
uploadImageAsset(path, this.handleThumbnailUploadSuccess, this.handleThumbnailUploadFailure)
);
}
})
@@ -882,7 +815,7 @@ class PublishPage extends React.PureComponent {
},
() => {
this.handleNameChange(this.state.name);
},
}
);
}
};
@@ -946,33 +879,10 @@ class PublishPage extends React.PureComponent {
},
() => {
NativeModules.UtilityModule.openDocumentPicker('image/*');
},
}
);
};
handleStoragePermissionGranted = () => {
// update the configured download folder
this.loadVideos();
NativeModules.UtilityModule.getDownloadDirectory().then(downloadDirectory => {
Lbry.settings_set({
key: 'download_dir',
value: downloadDirectory,
})
.then(() => {})
.catch(() => {});
});
};
handleStoragePermissionRefused = () => {
const { notify } = this.props;
notify({
message: __(
'Content from your device cannot be published because the permission to read storage was not granted.',
),
isError: true,
});
};
render() {
const { balance, navigation, notify, publishFormValues } = this.props;
const {
@@ -982,7 +892,6 @@ class PublishPage extends React.PureComponent {
currentPhase,
checkedThumbnails,
loadingVideos,
storagePermissionRequired,
thumbnailPath,
videos,
} = this.state;
@@ -1024,20 +933,13 @@ class PublishPage extends React.PureComponent {
</View>
</View>
</View>
{storagePermissionRequired && (
<View style={publishStyle.relativeCentered}>
<Text style={publishStyle.noVideos}>
{__('The storage permission is required to be able to display and publish your videos.')}
</Text>
</View>
)}
{!storagePermissionRequired && (loadingVideos || !allThumbnailsChecked) && (
{(loadingVideos || !allThumbnailsChecked) && (
<View style={publishStyle.loadingView}>
<ActivityIndicator size="small" color={Colors.NextLbryGreen} />
<Text style={publishStyle.loadingText}>{__('Please wait while we load your videos...')}</Text>
</View>
)}
{!storagePermissionRequired && !loadingVideos && (!videos || videos.length === 0) && (
{!loadingVideos && (!videos || videos.length === 0) && (
<View style={publishStyle.relativeCentered}>
<Text style={publishStyle.noVideos}>
{__('We could not find any videos on your device. Take a photo or record a video to get started.')}
@@ -1208,7 +1110,7 @@ class PublishPage extends React.PureComponent {
{__('The address where people can find your content (ex. lbry://myvideo). ')}
{this.state.editMode &&
__(
'You cannot change this address while editing your content. If you wish to use a new address, please republish the content.',
'You cannot change this address while editing your content. If you wish to use a new address, please republish the content.'
)}
</Text>
@@ -1231,16 +1133,8 @@ class PublishPage extends React.PureComponent {
keyboardType={'numeric'}
value={String(this.state.bid)}
onChangeText={this.handleBidChange}
onFocus={() => this.setState({ creditsInputFocused: true })}
onBlur={() => this.setState({ creditsInputFocused: false })}
/>
<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>
<Text style={publishStyle.helpText}>
{__('This LBC remains yours and the deposit can be undone at any time.')}
@@ -1358,7 +1252,7 @@ class PublishPage extends React.PureComponent {
</View>
<Text style={publishStyle.successText}>
{__(
'Your content will be live in a few minutes. In the mean time, feel free to publish more content or explore the app.',
'Your content will be live in a few minutes. In the mean time, feel free to publish more content or explore the app.'
)}
</Text>
</View>
+1 -1
View File
@@ -104,7 +104,7 @@ class RewardsPage extends React.PureComponent {
if (this.state.isEmailVerified && this.state.isIdentityVerified && !this.state.isRewardApproved) {
return (
<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}>
__('You need to be manually verified before you can start claiming rewards.') Please request to be verified
on the{' '}
+8 -14
View File
@@ -1,46 +1,40 @@
import { connect } from 'react-redux';
import {
doClaimSearch,
doResolveUris,
doResolvedSearch,
doSearch,
doUpdateSearchQuery,
makeSelectResolvedSearchResults,
makeSelectResolvedSearchResultsLastPageReached,
makeSelectSearchUris,
selectClaimSearchByQuery,
selectIsSearching,
selectResolvingUris,
selectSearchValue,
makeSelectQueryWithOptions,
selectSearchUrisByQuery,
} from 'lbry-redux';
import { doPushDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
import { selectCurrentRoute } from 'redux/selectors/drawer';
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
import SearchPage from './view';
const numSearchResults = 25;
const select = state => ({
claimSearchByQuery: selectClaimSearchByQuery(state),
currentRoute: selectCurrentRoute(state),
isSearching: selectIsSearching(state),
query: selectSearchValue(state),
resolvingUris: selectResolvingUris(state),
uris: makeSelectSearchUris(makeSelectQueryWithOptions(null, Constants.DEFAULT_PAGE_SIZE)(state))(state),
results: makeSelectResolvedSearchResults(makeSelectQueryWithOptions(null, Constants.DEFAULT_PAGE_SIZE)(state))(state),
lastPageReached: makeSelectResolvedSearchResultsLastPageReached(
makeSelectQueryWithOptions(null, Constants.DEFAULT_PAGE_SIZE)(state),
)(state),
uris: makeSelectSearchUris(makeSelectQueryWithOptions(null, numSearchResults)(state))(state),
urisByQuery: selectSearchUrisByQuery(state),
});
const perform = dispatch => ({
search: (query, from) => dispatch(doResolvedSearch(query, Constants.DEFAULT_PAGE_SIZE, from, false, {})),
search: query => dispatch(doSearch(query, numSearchResults)),
claimSearch: options => dispatch(doClaimSearch(options)),
updateSearchQuery: query => dispatch(doUpdateSearchQuery(query)),
pushDrawerStack: () => dispatch(doPushDrawerStack(Constants.DRAWER_ROUTE_SEARCH)),
resolveUris: uris => dispatch(doResolveUris(uris)),
setPlayerVisible: () => dispatch(doSetPlayerVisible(false)),
});
export default connect(
select,
perform,
perform
)(SearchPage);
+35 -103
View File
@@ -15,23 +15,17 @@ import Colors from 'styles/colors';
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
import PageHeader from 'component/pageHeader';
import FileListItem from 'component/fileListItem';
import ClaimResultItem from 'component/claimResultItem';
import FloatingWalletBalance from 'component/floatingWalletBalance';
import UriBar from 'component/uriBar';
import searchStyle from 'styles/search';
const softLimit = 500;
class SearchPage extends React.PureComponent {
state = {
currentQuery: null,
currentFrom: 0,
currentUri: null,
showTagResult: false,
claimSearchRun: false,
claimSearchOptions: null,
resultsResolved: false,
tagResultDisplayed: false,
};
static navigationOptions = {
@@ -59,16 +53,13 @@ class SearchPage extends React.PureComponent {
const searchQuery = query || this.getSearchQuery();
if (searchQuery && searchQuery.trim().length > 0) {
this.setState({
currentFrom: 0,
currentQuery: searchQuery,
currentUri: isURIValid(searchQuery) ? normalizeURI(searchQuery) : null,
claimSearchOptions: null,
claimSearchRun: false,
showTagResult: false,
resultsResolved: false,
tagResultDisplayed: false,
});
search(searchQuery, 0);
search(searchQuery);
}
});
};
@@ -78,8 +69,8 @@ class SearchPage extends React.PureComponent {
}
componentWillReceiveProps(nextProps) {
const { currentRoute, query, isSearching } = nextProps;
const { currentRoute: prevRoute, search, isSearching: prevIsSearching } = this.props;
const { currentRoute, query } = nextProps;
const { currentRoute: prevRoute, search } = this.props;
if (Constants.DRAWER_ROUTE_SEARCH === currentRoute && currentRoute !== prevRoute) {
this.onComponentFocused();
@@ -87,43 +78,10 @@ class SearchPage extends React.PureComponent {
if (query && query.trim().length > 0 && query !== this.state.currentQuery) {
this.setState({
currentFrom: 0,
currentQuery: query,
currentUri: isURIValid(query) ? normalizeURI(query) : null,
resultsResolved: false,
tagResultDisplayed: false,
});
search(query, 0);
}
}
allContentResolved(props) {
const { uris, resolvingUris } = props;
if (!this.state.resultsResolved) {
return false;
}
if (uris) {
let allResolved = true;
uris.forEach(uri => {
allResolved = allResolved && !resolvingUris.includes(uri);
});
return allResolved;
}
return false;
}
/* shouldComponentUpdate(nextProps) {
const { isSearching, uris } = this.props;
return (isSearching && (!uris || uris.length === 0)) || (!isSearching && this.allContentResolved(this.props));
} */
componentDidUpdate() {
const { claimSearchByQuery } = this.props;
if (this.state.claimSearchRun && this.state.claimSearchOptions && !this.state.tagResultDisplayed) {
const claimSearchKey = createNormalizedClaimSearchKey(this.state.claimSearchOptions);
const claimSearchUris = claimSearchByQuery[claimSearchKey];
this.setState({ showTagResult: claimSearchUris && claimSearchUris.length > 0, tagResultDisplayed: true });
search(query);
}
}
@@ -139,15 +97,11 @@ class SearchPage extends React.PureComponent {
const { search } = this.props;
this.setState({
currentUri: isURIValid(keywords) ? normalizeURI(keywords) : null,
currentFrom: 0,
currentQuery: keywords,
claimSearchOptions: null,
claimSearchRun: false,
showTagResult: false,
resultsResolved: false,
tagResultDisplayed: false,
});
search(keywords, 0);
search(keywords);
};
listEmptyComponent = () => {
@@ -155,26 +109,34 @@ class SearchPage extends React.PureComponent {
return (
<View style={searchStyle.noResults}>
<Text style={searchStyle.noResultsText}>
{__('There are no results to display for "%query%". Please try a different search term.', { query })}
There are no results to display for <Text style={searchStyle.boldText}>{query}</Text>. Please try a different
search term.
</Text>
</View>
);
};
listHeaderComponent = (showTagResult, query) => {
const { navigation, claimSearch } = this.props;
listHeaderComponent = showTagResult => {
const { navigation, claimSearch, claimSearchByQuery } = this.props;
const { currentUri } = this.state;
const query = this.getSearchQuery();
const canBeTag = query && query.trim().length > 0 && isURIValid(query);
if (canBeTag && !this.state.claimSearchRun) {
const options = {
any_tags: [query.toLowerCase()],
any_tags: [query],
page: 1,
no_totals: true,
};
this.setState({ claimSearchOptions: options, claimSearchRun: true }, () => claimSearch(options));
}
if (this.state.claimSearchRun && this.state.claimSearchOptions) {
const claimSearchKey = createNormalizedClaimSearchKey(this.state.claimSearchOptions);
const claimSearchUris = claimSearchByQuery[claimSearchKey];
this.setState({ showTagResult: claimSearchUris && claimSearchUris.length > 0 });
}
return (
<View>
<FileListItem uri={currentUri} featuredResult style={searchStyle.featuredResultItem} navigation={navigation} />
@@ -193,65 +155,35 @@ class SearchPage extends React.PureComponent {
navigation.navigate({ routeName: Constants.DRAWER_ROUTE_TAG, key: `tagPage`, params: { tag: tag.toLowerCase() } });
};
handleVerticalEndReached = () => {
// fetch more results
const { lastPageReached, results, search, isSearching } = this.props;
if (lastPageReached || (results && results.length > softLimit)) {
return;
}
if (!isSearching) {
const from = results ? results.length : 0;
this.setState({ currentFrom: from }, () => {
search(this.state.currentQuery, from);
});
}
};
render() {
const { isSearching, navigation, query, results } = this.props;
const { isSearching, navigation, query, uris, urisByQuery } = this.props;
return (
<View style={searchStyle.container}>
<UriBar value={query} navigation={navigation} onSearchSubmitted={this.handleSearchSubmitted} />
{isSearching && this.state.currentFrom === 0 && (
{isSearching && (
<View style={searchStyle.busyContainer}>
<ActivityIndicator size="large" color={Colors.NextLbryGreen} style={searchStyle.loading} />
</View>
)}
{(!isSearching || this.state.currentFrom > 0) && (
<FlatList
extraData={this.state}
style={searchStyle.scrollContainer}
contentContainerStyle={searchStyle.scrollPadding}
keyboardShouldPersistTaps={'handled'}
data={results}
keyExtractor={(item, index) => item.claimId}
initialNumToRender={10}
maxToRenderPerBatch={20}
onEndReached={this.handleVerticalEndReached}
onEndReachedThreshold={0.2}
removeClippedSubviews
ListEmptyComponent={!isSearching ? this.listEmptyComponent() : null}
ListHeaderComponent={this.listHeaderComponent(this.state.showTagResult, this.state.currentQuery)}
renderItem={({ item }) => (
<ClaimResultItem
key={item.claimId}
uri={item ? normalizeURI(`${item.name}#${item.claimId}`) : null}
result={item}
style={searchStyle.resultItem}
navigation={navigation}
/>
)}
/>
)}
{this.state.currentFrom > 0 && isSearching && (
<View style={searchStyle.moreLoading}>
<ActivityIndicator size="small" color={Colors.NextLbryGreen} />
</View>
)}
<FlatList
extraData={this.state}
style={searchStyle.scrollContainer}
contentContainerStyle={searchStyle.scrollPadding}
keyboardShouldPersistTaps={'handled'}
data={uris}
keyExtractor={(item, index) => item}
initialNumToRender={10}
maxToRenderPerBatch={20}
removeClippedSubviews
ListEmptyComponent={!isSearching ? this.listEmptyComponent() : null}
ListHeaderComponent={this.state.currentUri ? this.listHeaderComponent(this.state.showTagResult) : null}
renderItem={({ item }) => (
<FileListItem key={item} uri={item} style={searchStyle.resultItem} navigation={navigation} />
)}
/>
<FloatingWalletBalance navigation={navigation} />
</View>
);
+22 -30
View File
@@ -89,41 +89,33 @@ class SettingsPage extends React.PureComponent {
}
// 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);
// update state and client setting
window.language = language;
setClientSetting(SETTINGS.LANGUAGE, value);
} else {
// download and save the language file
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;
// download and save the language file
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
const langFilePath = RNFS.ExternalDirectoryPath + '/' + language + '.json';
RNFS.writeFile(langFilePath, JSON.stringify(j), 'utf8');
// write the language file to the filesystem
const langFilePath = RNFS.ExternalDirectoryPath + '/' + language + '.json';
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
// so we have to load it from native settings
NativeModules.UtilityModule.setNativeStringSetting(SETTINGS.LANGUAGE, language);
// 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
NativeModules.UtilityModule.setNativeStringSetting(SETTINGS.LANGUAGE, value);
// update state and client setting
window.language = language;
setClientSetting(SETTINGS.LANGUAGE, value);
// update state and client setting
window.language = language;
setClientSetting(SETTINGS.LANGUAGE, value);
this.setState({ downloadingLanguage: false });
})
.catch(e => {
notify({ message: __('Failed to load %language% translations.', { language: language }), isError: true });
this.setState({ downloadingLanguage: false });
});
});
}
this.setState({ downloadingLanguage: false });
})
.catch(e => {
notify({ message: __('Failed to load %language% translations.', { language: language }), isError: true });
this.setState({ downloadingLanguage: false });
});
});
};
handleBackPressed = () => {
+3 -3
View File
@@ -4,6 +4,7 @@ import {
doAuthenticate,
doBlackListedOutpointsSubscribe,
doFilteredOutpointsSubscribe,
doCheckSubscriptionsInit,
doFetchMySubscriptions,
doFetchRewardedContent,
doGetSync,
@@ -14,13 +15,11 @@ import {
selectEmailToVerify,
} from 'lbryinc';
import { doSetClientSetting } from 'redux/actions/settings';
import { selectLastRouteInStack } from 'redux/selectors/drawer';
import SplashScreen from './view';
const select = state => ({
user: selectUser(state),
emailToVerify: selectEmailToVerify(state),
lastRouteInStack: selectLastRouteInStack(state),
});
const perform = dispatch => ({
@@ -28,6 +27,7 @@ const perform = dispatch => ({
balanceSubscribe: () => dispatch(doBalanceSubscribe()),
blacklistedOutpointsSubscribe: () => dispatch(doBlackListedOutpointsSubscribe()),
filteredOutpointsSubscribe: () => dispatch(doFilteredOutpointsSubscribe()),
checkSubscriptionsInit: () => dispatch(doCheckSubscriptionsInit()),
fetchRewardedContent: () => dispatch(doFetchRewardedContent()),
fetchSubscriptions: callback => dispatch(doFetchMySubscriptions(callback)),
getSync: (password, callback) => dispatch(doGetSync(password, callback)),
@@ -42,5 +42,5 @@ const perform = dispatch => ({
export default connect(
select,
perform,
perform
)(SplashScreen);
+70 -56
View File
@@ -1,5 +1,5 @@
import React from 'react';
import { Lbry, doPreferenceGet, isURIValid } from 'lbry-redux';
import { Lbry, doPreferenceGet } from 'lbry-redux';
import { Lbryio } from 'lbryinc';
import { ActivityIndicator, DeviceEventEmitter, Linking, NativeModules, Platform, Text, View } from 'react-native';
import { NavigationActions, StackActions } from 'react-navigation';
@@ -11,7 +11,7 @@ import Button from 'component/button';
import ProgressBar from 'component/progressBar';
import PropTypes from 'prop-types';
import Colors from 'styles/colors';
import Constants, { DrawerRoutes, InnerDrawerRoutes } from 'constants'; // eslint-disable-line node/no-deprecated-api
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
import splashStyle from 'styles/splash';
import RNFS from 'react-native-fs';
@@ -43,7 +43,7 @@ class SplashScreen extends React.PureComponent {
}
navigateToMain = () => {
const { lastRouteInStack, navigation, notify, verifyUserEmail, verifyUserEmailFailure } = this.props;
const { navigation, notify, verifyUserEmail, verifyUserEmailFailure } = this.props;
const resetAction = StackActions.reset({
index: 0,
actions: [NavigationActions.navigate({ routeName: 'Main' })],
@@ -55,16 +55,29 @@ class SplashScreen extends React.PureComponent {
? navigation.state.params.launchUrl
: this.state.launchUrl;
if (launchUrl) {
navigateToUri(navigation, transformUrl(launchUrl));
} else if (lastRouteInStack) {
// no launch url, check if there's a last route in stack to navigate to.
const { route, params } = lastRouteInStack;
if (route) {
if (DrawerRoutes.includes(route)) {
navigation.navigate({ routeName: route, params });
} else if (!InnerDrawerRoutes.includes(route) && isURIValid(route)) {
navigateToUri(navigation, route);
if (launchUrl.startsWith('lbry://?verify=')) {
let verification = {};
try {
verification = JSON.parse(atob(launchUrl.substring(15)));
} catch (error) {
console.log(error);
}
if (verification.token && verification.recaptcha) {
AsyncStorage.setItem(Constants.KEY_SHOULD_VERIFY_EMAIL, 'true');
try {
verifyUserEmail(verification.token, verification.recaptcha);
} catch (error) {
const message = __('Invalid Verification Token');
verifyUserEmailFailure(message);
notify({ message });
}
} else {
notify({
message: __('Invalid Verification URI'),
});
}
} else {
navigateToUri(navigation, transformUrl(launchUrl));
}
}
};
@@ -81,9 +94,9 @@ class SplashScreen extends React.PureComponent {
NativeModules.UtilityModule.getSecureValue(Constants.KEY_WALLET_PASSWORD).then(walletPassword => {
getSync(walletPassword, () => {
this.getUserSettings();
this.navigateToMain();
});
});
this.navigateToMain();
return;
}
@@ -102,7 +115,7 @@ class SplashScreen extends React.PureComponent {
},
error => {
/* failed */
},
}
);
};
@@ -117,37 +130,39 @@ class SplashScreen extends React.PureComponent {
authenticate,
balanceSubscribe,
blacklistedOutpointsSubscribe,
checkSubscriptionsInit,
filteredOutpointsSubscribe,
getSync,
updateBlockHeight,
user,
} = this.props;
// Lbry.resolve({ urls: 'lbry://one' }).then(() => {
// Leave the splash screen
balanceSubscribe();
blacklistedOutpointsSubscribe();
filteredOutpointsSubscribe();
Lbry.resolve({ urls: 'lbry://one' }).then(() => {
// Leave the splash screen
balanceSubscribe();
blacklistedOutpointsSubscribe();
filteredOutpointsSubscribe();
checkSubscriptionsInit();
if (user && user.id && user.has_verified_email) {
// user already authenticated
NativeModules.UtilityModule.getSecureValue(Constants.KEY_WALLET_PASSWORD).then(walletPassword => {
getSync(walletPassword, () => {
this.getUserSettings();
if (user && user.id && user.has_verified_email) {
// user already authenticated
NativeModules.UtilityModule.getSecureValue(Constants.KEY_WALLET_PASSWORD).then(walletPassword => {
getSync(walletPassword, () => {
this.getUserSettings();
this.navigateToMain();
});
});
});
this.navigateToMain();
} else {
NativeModules.VersionInfo.getAppVersion().then(appVersion => {
this.setState({ shouldAuthenticate: true });
NativeModules.Firebase.getMessagingToken()
.then(firebaseToken => {
authenticate(appVersion, Platform.OS, firebaseToken);
})
.catch(() => authenticate(appVersion, Platform.OS));
});
}
// });
} else {
NativeModules.VersionInfo.getAppVersion().then(appVersion => {
this.setState({ shouldAuthenticate: true });
NativeModules.Firebase.getMessagingToken()
.then(firebaseToken => {
authenticate(appVersion, Platform.OS, firebaseToken);
})
.catch(() => authenticate(appVersion, Platform.OS));
});
}
});
};
handleAccountUnlockFailed() {
@@ -156,6 +171,7 @@ class SplashScreen extends React.PureComponent {
_updateStatusCallback(status) {
const { fetchSubscriptions, getSync, setClientSetting } = this.props;
const blockchainHeaders = status.blockchain_headers;
const startupStatus = status.startup_status;
const walletStatus = status.wallet;
@@ -185,8 +201,8 @@ class SplashScreen extends React.PureComponent {
Lbry.wallet_unlock({ password: password || '' }).then(unlocked => {
if (unlocked) {
this.setState({
message: __('Authenticating'),
details: __('Waiting for authentication'),
message: __('Testing network'),
details: __('Waiting for name resolution'),
});
this.finishSplashScreen();
} else {
@@ -195,8 +211,8 @@ class SplashScreen extends React.PureComponent {
});
} else {
this.setState({
message: __('Authenticating'),
details: __('Waiting for authentication'),
message: __('Testing network'),
details: __('Waiting for name resolution'),
});
this.finishSplashScreen();
}
@@ -206,11 +222,10 @@ class SplashScreen extends React.PureComponent {
return;
}
const headerSyncProgress = walletStatus ? walletStatus.headers_synchronization_progress : null;
if (headerSyncProgress && headerSyncProgress < 100) {
if (blockchainHeaders) {
this.setState({
isDownloadingHeaders: true,
headersDownloadProgress: headerSyncProgress,
isDownloadingHeaders: blockchainHeaders.downloading_headers,
headersDownloadProgress: blockchainHeaders.download_progress,
});
} else {
// set downloading flag to false if blockchain_headers isn't in the status response
@@ -219,16 +234,15 @@ class SplashScreen extends React.PureComponent {
});
}
if (headerSyncProgress < 100) {
const downloadProgress = isNaN(parseInt(headerSyncProgress, 10)) ? '0' : headerSyncProgress || '0';
if (blockchainHeaders && blockchainHeaders.downloading_headers) {
const downloadProgress = blockchainHeaders.download_progress ? blockchainHeaders.download_progress : 0;
this.setState({
message: __('Blockchain Sync'),
details: __('Catching up with the blockchain (%progress%%)', { progress: downloadProgress }),
details: `Catching up with the blockchain (${downloadProgress}%)`, // TODO: i18n tokenization
});
} else if (walletStatus && walletStatus.blocks_behind > 0) {
const behind = walletStatus.blocks_behind;
const behindText =
behind === 1 ? __('%num% block behind', { num: behind }) : __('%num% blocks behind', { num: behind });
const behindText = behind + ' block' + (behind === 1 ? '' : 's') + ' behind'; // TODO: i18n tokenization
this.setState({
message: __('Blockchain Sync'),
details: behindText,
@@ -278,7 +292,7 @@ class SplashScreen extends React.PureComponent {
isLagging: true,
message: __('Connection Failure'),
details: __(
'We could not establish a connection to the SDK. Your data connection may be preventing LBRY from connecting. Contact hello@lbry.com if you think this is a software bug.',
'We could not establish a connection to the SDK. Your data connection may be preventing LBRY from connecting. Contact hello@lbry.com if you think this is a software bug.'
),
});
});
@@ -300,10 +314,10 @@ class SplashScreen extends React.PureComponent {
this.setState(
{
accountUnlockFailed: false,
message: __('Authenticating'),
details: __('Waiting for authentication'),
message: __('Testing network'),
details: __('Waiting for name resolution'),
},
() => this.finishSplashScreen(),
() => this.finishSplashScreen()
);
};
@@ -316,12 +330,12 @@ class SplashScreen extends React.PureComponent {
<Text style={splashStyle.errorTitle}>{__('Oops! Something went wrong.')}</Text>
<Text style={splashStyle.paragraph}>
{__(
'Your wallet failed to unlock, which means you may not be able to play any videos or access your funds.',
'Your wallet failed to unlock, which means you may not be able to play any videos or access your funds.'
)}
</Text>
<Text style={splashStyle.paragraph}>
{__(
'You can try to fix this by tapping Stop on the LBRY service notification and starting the app again. If the problem continues, you may have to reinstall the app and restore your account.',
'You can try to fix this by tapping Stop on the LBRY service notification and starting the app again. If the problem continues, you may have to reinstall the app and restore your account.'
)}
</Text>
-2
View File
@@ -1,6 +1,5 @@
import { connect } from 'react-redux';
import {
doChannelUnsubscribe,
doFetchMySubscriptions,
doSetViewMode,
doFetchRecommendedSubscriptions,
@@ -37,7 +36,6 @@ const select = state => ({
});
const perform = dispatch => ({
channelUnsubscribe: subscription => dispatch(doChannelUnsubscribe(subscription)),
doFetchMySubscriptions: () => dispatch(doFetchMySubscriptions()),
doFetchRecommendedSubscriptions: () => dispatch(doFetchRecommendedSubscriptions()),
doSetViewMode: viewMode => dispatch(doSetViewMode(viewMode)),
+1 -16
View File
@@ -82,8 +82,6 @@ class SubscriptionsPage extends React.PureComponent {
if (Constants.DRAWER_ROUTE_SUBSCRIPTIONS === currentRoute && currentRoute !== prevRoute) {
this.onComponentFocused();
}
this.unsubscribeShortChannelUrls();
}
handleSortByItemSelected = item => {
@@ -111,19 +109,6 @@ class SubscriptionsPage extends React.PureComponent {
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 => {
const parts = sub.uri.split('#');
return parts.length === 1 || parts[1].length < 5;
});
if (badSubs.length > 0) {
badSubs.forEach(sub => channelUnsubscribe(sub));
}
};
render() {
const {
suggestedChannels,
@@ -258,7 +243,7 @@ class SubscriptionsPage extends React.PureComponent {
title={__('Sort content by')}
onOverlayPress={() => this.setState({ showSortPicker: false })}
onItemSelected={this.handleSortByItemSelected}
selectedItem={currentSortByItem}
selectedItem={this.state.currentSortByItem}
items={Constants.CLAIM_SEARCH_SORT_BY_ITEMS}
/>
)}
@@ -34,7 +34,6 @@ class PhoneVerifyPage extends React.PureComponent {
codeVerifyStarted: false,
codeVerifySuccessful: false,
countryCode: null,
countryPickerVisible: false,
newPhoneAdded: false,
number: null,
phoneVerifyFailed: false,
@@ -126,15 +125,15 @@ class PhoneVerifyPage extends React.PureComponent {
};
onPressFlag = () => {
this.setState({ countryPickerVisible: true });
if (this.picker) {
this.picker.openModal();
}
};
selectCountry = country => {
selectCountry(country) {
this.phoneInput.selectCountry(country.cca2.toLowerCase());
this.setState({ cca2: country.cca2, countryPickerVisible: false }, () => {
this.phoneInput.focus();
});
};
this.setState({ cca2: country.cca2 });
}
handleChangeText = text => {
this.setState({ verificationCode: text });
@@ -234,17 +233,17 @@ class PhoneVerifyPage extends React.PureComponent {
</View>
<CountryPicker
countryCode={this.state.cca2}
withAlphaFilter
withFilter
withFlag
withFlagButton={false}
withCallingCode
withModal
onSelect={this.selectCountry}
ref={picker => {
this.picker = picker;
}}
cca2={this.state.cca2}
filterable
onChange={value => this.selectCountry(value)}
showCallingCode
translation="eng"
modalProps={{ visible: this.state.countryPickerVisible }}
/>
>
<View />
</CountryPicker>
</View>
);
}
@@ -21,7 +21,6 @@ class SyncVerifyPage extends React.PureComponent {
revealPassword: false,
autoPassword: false,
autoLoginAttempted: false,
autoLoginTried: false,
autoLoginFlow: true,
};
@@ -68,10 +67,8 @@ class SyncVerifyPage extends React.PureComponent {
if (this.state.syncApplyStarted && !syncApplyIsPending) {
if (syncApplyErrorMessage && syncApplyErrorMessage.trim().length > 0) {
if (this.state.autoLoginTried) {
notify({ message: __(syncApplyErrorMessage), isError: true });
}
this.setState({ autoLoginTried: true, syncApplyStarted: false, autoLoginFlow: false });
notify({ message: __(syncApplyErrorMessage), isError: true });
this.setState({ syncApplyStarted: false, autoLoginFlow: false });
} else {
// password successfully verified
this.setState({ syncApplyCompleted: true });
@@ -197,6 +194,16 @@ class SyncVerifyPage extends React.PureComponent {
</TouchableOpacity>
</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 && (
<View style={firstRunStyle.passwordStrength}>
<BarPasswordStrengthDisplay
+2 -2
View File
@@ -11,8 +11,8 @@ export const doPopDrawerStack = () => dispatch =>
type: Constants.ACTION_POP_DRAWER_STACK,
});
export const doSetPlayerVisible = (visible, uri) => dispatch =>
export const doSetPlayerVisible = visible => dispatch =>
dispatch({
type: Constants.ACTION_SET_PLAYER_VISIBLE,
data: { visible, uri },
data: { visible },
});
+17 -19
View File
@@ -59,24 +59,22 @@ export function doCompleteDownload(uri, outpoint, fileInfo) {
export function doStopDownloadingFile(uri, fileInfo) {
return dispatch => {
let params = { status: 'stop' };
if (fileInfo) {
if (fileInfo.sd_hash) {
params.sd_hash = fileInfo.sd_hash;
}
if (fileInfo.stream_hash) {
params.stream_hash = fileInfo.stream_hash;
}
Lbry.file_set_status(params).then(() => {
dispatch({
type: ACTIONS.DOWNLOADING_CANCELED,
data: { uri, outpoint: fileInfo.outpoint },
});
// Should also delete the file after the user stops downloading
dispatch(doDeleteFile(fileInfo.outpoint, uri));
});
if (fileInfo.sd_hash) {
params.sd_hash = fileInfo.sd_hash;
}
if (fileInfo.stream_hash) {
params.stream_hash = fileInfo.stream_hash;
}
Lbry.file_set_status(params).then(() => {
dispatch({
type: ACTIONS.DOWNLOADING_CANCELED,
data: { uri, outpoint: fileInfo.outpoint },
});
// Should also delete the file after the user stops downloading
dispatch(doDeleteFile(fileInfo.outpoint, uri));
});
};
}
@@ -97,7 +95,7 @@ export function doDeleteFile(outpoint, deleteFromComputer, abandonClaim) {
});
// If the file is for a claim we published then also abandon the claim
/* const myClaimsOutpoints = selectMyClaimsOutpoints(state);
/*const myClaimsOutpoints = selectMyClaimsOutpoints(state);
if (abandonClaim && myClaimsOutpoints.indexOf(outpoint) !== -1) {
const byOutpoint = selectFileInfosByOutpoint(state);
const fileInfo = byOutpoint[outpoint];
@@ -108,7 +106,7 @@ export function doDeleteFile(outpoint, deleteFromComputer, abandonClaim) {
dispatch(doAbandonClaim(txid, nout));
}
} */
}*/
dispatch({
type: ACTIONS.FILE_DELETE,
+2 -27
View File
@@ -3,29 +3,14 @@ import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
const reducers = {};
const defaultState = {
stack: [{ route: Constants.DRAWER_ROUTE_DISCOVER, params: {} }], // Discover is always the first drawer route
lastRouteInStack: {},
playerVisible: false,
playerVisibleByUri: {},
currentRoute: null,
};
reducers[Constants.ACTION_SET_PLAYER_VISIBLE] = (state, action) => {
const { visible, uri } = action.data;
const playerVisibleByUri = Object.assign({}, state.playerVisibleByUri);
if (!uri) {
Object.keys(playerVisibleByUri).forEach(playerUri => {
playerVisibleByUri[playerUri] = visible;
});
} else {
playerVisibleByUri[uri] = visible;
}
return Object.assign({}, state, {
reducers[Constants.ACTION_SET_PLAYER_VISIBLE] = (state, action) =>
Object.assign({}, state, {
playerVisible: action.data.visible,
playerVisibleByUri,
});
};
reducers[Constants.ACTION_PUSH_DRAWER_STACK] = (state, action) => {
const { routeName, params } = action.data;
@@ -42,34 +27,24 @@ reducers[Constants.ACTION_PUSH_DRAWER_STACK] = (state, action) => {
if (lastRoute === Constants.DRAWER_ROUTE_PUBLISH_FORM && routeName === Constants.DRAWER_ROUTE_PUBLISH) {
canPushStack = false;
}
if (routeName === Constants.DRAWER_ROUTE_DISCOVER && newStack.length === 1) {
canPushStack = false;
}
let lastRouteInStack;
if (canPushStack) {
newStack.push({ route: routeName, params });
// save the route
lastRouteInStack = { route: routeName, params };
}
return {
...state,
stack: newStack,
lastRouteInStack,
};
};
reducers[Constants.ACTION_POP_DRAWER_STACK] = (state, action) => {
// We don't want to pop the Discover route, since it's always expected to be the first
const newStack = state.stack.length === 1 ? state.stack.slice() : state.stack.slice(0, state.stack.length - 1);
const lastRouteInStack = newStack && newStack.length > 0 ? newStack[newStack.length - 1] : null;
return {
...state,
stack: newStack,
lastRouteInStack,
};
};
+4 -20
View File
@@ -4,25 +4,14 @@ export const selectState = state => state.drawer || {};
export const selectDrawerStack = createSelector(
selectState,
state => state.stack,
state => state.stack
);
export const selectIsPlayerVisible = createSelector(
selectState,
state => state.playerVisible,
state => state.playerVisible
);
export const selectPlayerVisibleByUri = createSelector(
selectState,
state => state.playerVisibleByUri,
);
export const makeSelectPlayerVisible = uri =>
createSelector(
selectPlayerVisibleByUri,
byUri => (byUri ? byUri[uri] : false),
);
export const selectLastDrawerRoute = createSelector(
selectState,
state => {
@@ -31,15 +20,10 @@ export const selectLastDrawerRoute = createSelector(
}
return null;
},
);
export const selectLastRouteInStack = createSelector(
selectState,
state => state.lastRouteInStack,
}
);
export const selectCurrentRoute = createSelector(
selectState,
state => state.currentRoute,
state => state.currentRoute
);
+9 -9
View File
@@ -32,14 +32,14 @@ const aboutStyle = StyleSheet.create({
title: {
color: Colors.LbryGreen,
fontSize: 24,
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
marginTop: 16,
marginLeft: 12,
marginRight: 12,
marginBottom: 8,
},
paragraph: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
lineHeight: 24,
marginLeft: 12,
@@ -53,13 +53,13 @@ const aboutStyle = StyleSheet.create({
},
link: {
color: Colors.LbryGreen,
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
marginBottom: 24,
},
listLink: {
color: Colors.LbryGreen,
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 15,
alignSelf: 'flex-end',
},
@@ -67,30 +67,30 @@ const aboutStyle = StyleSheet.create({
alignSelf: 'stretch',
},
socialTitle: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
marginLeft: 12,
marginRight: 12,
marginBottom: 8,
fontSize: 20,
},
releaseInfoTitle: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
marginLeft: 12,
marginRight: 12,
marginBottom: 12,
fontSize: 20,
},
text: {
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
fontSize: 15,
},
valueText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
textAlign: 'right',
fontSize: 15,
},
lineValueText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 15,
},
});
+1 -1
View File
@@ -29,7 +29,7 @@ const buttonStyle = StyleSheet.create({
color: Colors.DarkGrey,
},
text: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
},
textWithIcon: {
+14 -24
View File
@@ -17,7 +17,7 @@ const channelCreatorStyle = StyleSheet.create({
backgroundColor: Colors.PageBackground,
},
channelPicker: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
height: 52,
width: '100%',
@@ -27,33 +27,23 @@ const channelCreatorStyle = StyleSheet.create({
alignItems: 'center',
},
label: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
},
balance: {
alignItems: 'center',
flexDirection: 'row',
marginLeft: 24,
},
balanceText: {
fontFamily: 'Inter-SemiBold',
fontSize: 14,
marginLeft: 4,
},
channelNameInput: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
paddingLeft: 20,
},
bidAmountInput: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
marginLeft: 16,
textAlign: 'right',
width: 80,
},
helpText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 12,
color: Colors.DescriptionGrey,
},
@@ -68,7 +58,7 @@ const channelCreatorStyle = StyleSheet.create({
position: 'absolute',
left: 4,
top: 13,
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
},
buttonContainer: {
@@ -90,7 +80,7 @@ const channelCreatorStyle = StyleSheet.create({
alignSelf: 'flex-end',
},
inlineError: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 12,
color: Colors.Red,
marginTop: 2,
@@ -151,12 +141,12 @@ const channelCreatorStyle = StyleSheet.create({
alignItems: 'center',
},
channelListTitle: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 18,
marginBottom: 4,
},
channelListName: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
},
channelListAvatar: {
@@ -189,13 +179,13 @@ const channelCreatorStyle = StyleSheet.create({
marginBottom: 4,
},
textInputTitle: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 12,
marginBottom: -10,
marginLeft: 4,
},
inputText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
},
toggleContainer: {
@@ -209,7 +199,7 @@ const channelCreatorStyle = StyleSheet.create({
marginRight: 16,
},
cardTitle: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 20,
marginBottom: 8,
},
@@ -243,7 +233,7 @@ const channelCreatorStyle = StyleSheet.create({
},
editIcon: {
color: Colors.White,
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
fontSize: 12,
},
uploadProgress: {
@@ -262,7 +252,7 @@ const channelCreatorStyle = StyleSheet.create({
},
uploadText: {
color: Colors.White,
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
fontSize: 12,
marginLeft: 4,
},
+3 -3
View File
@@ -10,7 +10,7 @@ const channelIconStyle = StyleSheet.create({
alignSelf: 'flex-start',
},
placeholderText: {
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
fontSize: 14,
},
thumbnailContainer: {
@@ -39,14 +39,14 @@ const channelIconStyle = StyleSheet.create({
justifyContent: 'center',
},
title: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 12,
width: 80,
marginTop: 4,
textAlign: 'center',
},
autothumbCharacter: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 48,
color: Colors.White,
},
+7 -23
View File
@@ -23,7 +23,7 @@ const channelPageStyle = StyleSheet.create({
},
title: {
color: Colors.LbryGreen,
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
fontSize: 30,
margin: 16,
},
@@ -34,7 +34,7 @@ const channelPageStyle = StyleSheet.create({
padding: 24,
},
infoText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 20,
textAlign: 'center',
},
@@ -62,10 +62,8 @@ const channelPageStyle = StyleSheet.create({
},
channelName: {
color: Colors.White,
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 18,
padding: 2,
backgroundColor: '#000000aa',
},
subscribeButtonContainer: {
position: 'absolute',
@@ -98,7 +96,7 @@ const channelPageStyle = StyleSheet.create({
justifyContent: 'flex-end',
},
tabTitle: {
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
fontSize: 14,
color: Colors.White,
},
@@ -131,12 +129,12 @@ const channelPageStyle = StyleSheet.create({
padding: 24,
},
aboutTitle: {
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
fontSize: 16,
lineHeight: 24,
},
aboutText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
lineHeight: 24,
},
@@ -147,7 +145,7 @@ const channelPageStyle = StyleSheet.create({
position: 'absolute',
overflow: 'hidden',
left: 24,
bottom: -24,
bottom: -40,
zIndex: 100,
alignItems: 'center',
justifyContent: 'center',
@@ -178,20 +176,6 @@ const channelPageStyle = StyleSheet.create({
marginLeft: 8,
marginRight: 8,
},
tipButton: {
marginRight: 8,
},
followerCount: {
fontFamily: 'Inter-Regular',
fontSize: 12,
color: Colors.White,
marginTop: 2,
padding: 2,
flexWrap: 'wrap',
},
followerCountBg: {
backgroundColor: '#000000aa',
},
});
export default channelPageStyle;
+8 -18
View File
@@ -6,13 +6,13 @@ const channelSelectorStyle = StyleSheet.create({
flex: 1,
},
channelPicker: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
height: 52,
width: '100%',
},
channelPickerItem: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
},
bidRow: {
@@ -21,33 +21,23 @@ const channelSelectorStyle = StyleSheet.create({
alignItems: 'center',
},
label: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
},
balance: {
alignItems: 'center',
flexDirection: 'row',
marginLeft: 24,
},
balanceText: {
fontFamily: 'Inter-SemiBold',
fontSize: 14,
marginLeft: 4,
},
channelNameInput: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
paddingLeft: 20,
},
bidAmountInput: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
marginLeft: 16,
textAlign: 'right',
width: 80,
},
helpText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 12,
},
createChannelContainer: {
@@ -59,7 +49,7 @@ const channelSelectorStyle = StyleSheet.create({
position: 'absolute',
left: 4,
top: 13,
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
},
buttonContainer: {
@@ -80,7 +70,7 @@ const channelSelectorStyle = StyleSheet.create({
backgroundColor: Colors.NextLbryGreen,
},
inlineError: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 12,
color: Colors.Red,
marginTop: 2,
+1 -1
View File
@@ -13,7 +13,7 @@ const claimListStyle = StyleSheet.create({
},
noContentText: {
color: Colors.DescriptionGrey,
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
margin: 16,
textAlign: 'center',
-3
View File
@@ -12,7 +12,6 @@ const Colors = {
TagGreen: '#e3f6f1',
TagGrape: '#da77f255',
LightGrey: '#cccccc',
ActionGrey: '#aaaaaa',
LighterGrey: '#e5e5e5',
Orange: '#ffbb00',
Red: '#ff0000',
@@ -25,8 +24,6 @@ const Colors = {
StatsAudio: '#f6a637',
StatsImage: '#ff4a7d',
StatsOther: '#26bcf7',
ThumbnailPlaceholder: '#d5d5d5',
};
export default Colors;
+22 -28
View File
@@ -55,11 +55,11 @@ const discoverStyle = StyleSheet.create({
alignItems: 'center',
},
pageTitle: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 24,
},
customizeLink: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
},
trendingContainer: {
@@ -74,7 +74,7 @@ const discoverStyle = StyleSheet.create({
flexDirection: 'row',
},
title: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 20,
textAlign: 'center',
marginLeft: 10,
@@ -95,7 +95,7 @@ const discoverStyle = StyleSheet.create({
marginBottom: 56,
},
footerTitle: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 20,
marginBottom: 10,
},
@@ -108,7 +108,7 @@ const discoverStyle = StyleSheet.create({
marginBottom: 12,
},
categoryName: {
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
fontSize: 18,
color: Colors.Black,
},
@@ -127,7 +127,7 @@ const discoverStyle = StyleSheet.create({
justifyContent: 'center',
},
moreText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
color: Colors.White,
fontSize: 24,
},
@@ -142,18 +142,18 @@ const discoverStyle = StyleSheet.create({
justifyContent: 'center',
},
fileItemName: {
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
marginTop: 8,
fontSize: 14,
},
channelName: {
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
fontSize: 12,
marginTop: 4,
color: Colors.LbryGreen,
},
anonChannelName: {
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
fontSize: 12,
marginTop: 4,
color: Colors.DescriptionGrey,
@@ -166,8 +166,6 @@ const discoverStyle = StyleSheet.create({
filePriceContainer: {
backgroundColor: Colors.NextLbryGreen,
justifyContent: 'center',
alignItems: 'center',
flexDirection: 'row',
position: 'absolute',
right: 8,
top: 8,
@@ -176,15 +174,11 @@ const discoverStyle = StyleSheet.create({
borderRadius: 4,
},
filePriceText: {
fontFamily: 'Inter-Bold',
fontFamily: 'Inter-UI-Bold',
fontSize: 12,
textAlign: 'center',
color: '#0c604b',
},
filePriceIcon: {
marginRight: 2,
color: '#0c604b',
},
rightHeaderIcon: {
marginRight: 16,
},
@@ -205,7 +199,7 @@ const discoverStyle = StyleSheet.create({
color: Colors.White,
fontSize: 14,
textAlign: 'center',
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
},
rewardTitleContainer: {
alignItems: 'center',
@@ -222,11 +216,11 @@ const discoverStyle = StyleSheet.create({
flex: 0.9,
},
menuText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
},
titleText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
},
detailsRow: {
flexDirection: 'row',
@@ -236,7 +230,7 @@ const discoverStyle = StyleSheet.create({
marginTop: 2,
},
dateTimeText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 12,
color: Colors.DescriptionGrey,
},
@@ -259,7 +253,7 @@ const discoverStyle = StyleSheet.create({
flex: 1,
},
tagPageTitle: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 24,
},
tagPageClaimList: {
@@ -288,7 +282,7 @@ const discoverStyle = StyleSheet.create({
alignItems: 'center',
},
tagSortText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
marginRight: 4,
},
@@ -296,7 +290,7 @@ const discoverStyle = StyleSheet.create({
marginTop: -6,
},
pickerLabel: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
color: Colors.DescriptionGrey,
marginRight: 6,
@@ -307,7 +301,7 @@ const discoverStyle = StyleSheet.create({
marginBottom: 8,
},
menuGroupName: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 12,
color: Colors.DescriptionGrey,
textTransform: 'uppercase',
@@ -337,7 +331,7 @@ const discoverStyle = StyleSheet.create({
},
menuItem: {
marginLeft: 8,
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
},
signInContainer: {
@@ -353,7 +347,7 @@ const discoverStyle = StyleSheet.create({
left: 16,
},
signedInEmail: {
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
fontSize: 15,
color: Colors.White,
},
@@ -388,13 +382,13 @@ const discoverStyle = StyleSheet.create({
},
signInMenuItemText: {
color: Colors.DescriptionGrey,
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
fontSize: 14,
textAlign: 'center',
},
signInMenuItemButtonText: {
color: Colors.White,
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
fontSize: 14,
textAlign: 'center',
},
+2 -1
View File
@@ -24,13 +24,14 @@ const downloadsStyle = StyleSheet.create({
paddingLeft: 16,
paddingRight: 16,
marginTop: 16,
marginBottom: 60,
},
scrollPadding: {
marginTop: -16,
paddingBottom: 16,
},
noDownloadsText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
lineHeight: 24,
marginLeft: 16,
+1 -1
View File
@@ -30,7 +30,7 @@ const emptyStateStyle = StyleSheet.create({
message: {
marginTop: 24,
textAlign: 'center',
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 18,
lineHeight: 28,
marginBottom: 24,
+1 -1
View File
@@ -11,7 +11,7 @@ const fileDownloadButtonStyle = StyleSheet.create({
backgroundColor: Colors.LbryGreen,
},
text: {
fontFamily: 'Inter-Medium',
fontFamily: 'Inter-UI-Medium',
color: Colors.White,
fontSize: 14,
textAlign: 'center',
+3 -3
View File
@@ -10,7 +10,7 @@ const fileItemMediaStyle = StyleSheet.create({
alignItems: 'center',
},
autothumbText: {
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
textAlign: 'center',
color: Colors.White,
fontSize: 40,
@@ -22,7 +22,7 @@ const fileItemMediaStyle = StyleSheet.create({
},
text: {
color: '#ffffff',
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
marginTop: 8,
},
@@ -45,7 +45,7 @@ const fileItemMediaStyle = StyleSheet.create({
paddingRight: 2,
},
durationText: {
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
fontSize: 12,
color: Colors.White,
},
+12 -62
View File
@@ -22,42 +22,22 @@ const fileListStyle = StyleSheet.create({
flex: 1,
},
featuredUri: {
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
fontSize: 24,
color: Colors.White,
},
featuredTitle: {
fontFamily: 'Inter-SemiBold',
fontSize: screenWidthPixels <= 720 ? 11 : 16,
fontFamily: 'Inter-UI-SemiBold',
fontSize: screenWidthPixels <= 720 ? 12 : 16,
color: Colors.White,
},
thumbnail: {
backgroundColor: Colors.ThumbnailPlaceholder,
width: thumbnailWidth,
height: thumbnailHeight,
marginRight: screenWidthPixels <= 720 ? 10 : 12,
alignItems: 'center',
justifyContent: 'center',
},
channelThumbnailView: {
width: thumbnailWidth,
height: thumbnailHeight,
marginRight: screenWidthPixels <= 720 ? 10 : 12,
alignItems: 'center',
justifyContent: 'center',
},
channelThumbnailContainer: {
width: thumbnailHeight, // maintain same width and height
height: thumbnailHeight,
borderRadius: 140,
overflow: 'hidden',
alignItems: 'center',
justifyContent: 'center',
},
channelThumbnail: {
width: '100%',
height: '100%',
},
selectedOverlay: {
position: 'absolute',
left: 0,
@@ -69,23 +49,20 @@ const fileListStyle = StyleSheet.create({
backgroundColor: '#000000aa',
},
title: {
fontFamily: 'Inter-SemiBold',
fontSize: screenWidthPixels <= 720 ? 11 : 14,
fontFamily: 'Inter-UI-SemiBold',
fontSize: screenWidthPixels <= 720 ? 12 : 14,
},
uri: {
fontFamily: 'Inter-SemiBold',
fontSize: screenWidthPixels <= 720 ? 11 : 14,
fontFamily: 'Inter-UI-SemiBold',
fontSize: screenWidthPixels <= 720 ? 12 : 14,
marginBottom: 8,
},
publisher: {
fontFamily: 'Inter-SemiBold',
fontSize: screenWidthPixels <= 720 ? 10 : 12,
fontFamily: 'Inter-UI-SemiBold',
fontSize: screenWidthPixels <= 720 ? 11 : 12,
marginTop: screenWidthPixels <= 720 ? 1 : 3,
color: Colors.LbryGreen,
},
channelContainer: {
alignItems: 'center',
},
loading: {
position: 'absolute',
},
@@ -95,15 +72,15 @@ const fileListStyle = StyleSheet.create({
justifyContent: 'space-between',
},
infoText: {
fontFamily: 'Inter-Regular',
fontSize: screenWidthPixels <= 720 ? 10 : 12,
fontFamily: 'Inter-UI-Regular',
fontSize: screenWidthPixels <= 720 ? 11 : 12,
color: Colors.ChannelGrey,
},
downloadInfo: {
marginTop: 2,
},
progress: {
marginTop: screenWidthPixels <= 720 ? 1 : 4,
marginTop: screenWidthPixels <= 720 ? 2 : 4,
},
progressCompleted: {
backgroundColor: Colors.LbryGreen,
@@ -117,11 +94,6 @@ const fileListStyle = StyleSheet.create({
top: 8,
left: 8,
},
featuredDownloadedIcon: {
position: 'absolute',
left: 16,
top: 16,
},
fileItem: {
marginLeft: 24,
marginRight: 24,
@@ -143,28 +115,6 @@ const fileListStyle = StyleSheet.create({
marginLeft: 4,
marginTop: 4,
},
filePriceContainer: {
backgroundColor: Colors.NextLbryGreen,
justifyContent: 'center',
alignItems: 'center',
flexDirection: 'row',
position: 'absolute',
left: thumbnailWidth - 60,
top: 4,
width: 56,
height: 24,
borderRadius: 4,
},
filePriceText: {
fontFamily: 'Inter-Bold',
fontSize: 12,
textAlign: 'center',
color: '#0c604b',
},
filePriceIcon: {
marginRight: 2,
color: '#0c604b',
},
});
export default fileListStyle;
+28 -58
View File
@@ -38,7 +38,7 @@ const filePageStyle = StyleSheet.create({
marginBottom: -17,
},
emptyClaimText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
textAlign: 'center',
fontSize: 20,
marginLeft: 24,
@@ -54,7 +54,7 @@ const filePageStyle = StyleSheet.create({
flex: 1,
},
title: {
fontFamily: 'Inter-Bold',
fontFamily: 'Inter-UI-Bold',
fontSize: 16,
flex: 18,
alignSelf: 'flex-start',
@@ -65,6 +65,7 @@ const filePageStyle = StyleSheet.create({
titleRow: {
flexDirection: 'row',
marginTop: 12,
marginBottom: 2,
marginLeft: 12,
marginRight: 12,
alignItems: 'center',
@@ -88,17 +89,17 @@ const filePageStyle = StyleSheet.create({
marginTop: 6,
},
channelName: {
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
fontSize: 14,
color: Colors.LbryGreen,
},
anonChannelName: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
color: Colors.DescriptionGrey,
},
publishDateText: {
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
fontSize: 12,
color: Colors.DescriptionGrey,
},
@@ -107,13 +108,12 @@ const filePageStyle = StyleSheet.create({
},
description: {
color: Colors.DescriptionGrey,
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 13,
lineHeight: 18,
marginTop: -8,
marginLeft: 12,
marginRight: 12,
marginBottom: 16,
},
thumbnail: {
width: screenWidth,
@@ -170,8 +170,6 @@ const filePageStyle = StyleSheet.create({
filePriceContainer: {
backgroundColor: Colors.NextLbryGreen,
justifyContent: 'center',
alignItems: 'center',
flexDirection: 'row',
position: 'absolute',
right: 16,
top: 16,
@@ -180,14 +178,11 @@ const filePageStyle = StyleSheet.create({
borderRadius: 4,
},
filePriceText: {
fontFamily: 'Inter-Bold',
fontFamily: 'Inter-UI-Bold',
fontSize: 12,
textAlign: 'center',
color: '#0c604b',
},
filePriceIcon: {
marginRight: 2,
},
actions: {
flexDirection: 'row',
justifyContent: 'space-between',
@@ -235,19 +230,19 @@ const filePageStyle = StyleSheet.create({
paddingRight: 24,
},
dmcaText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 18,
lineHeight: 24,
},
dmcaLink: {
color: Colors.LbryGreen,
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 18,
lineHeight: 24,
marginTop: 24,
},
infoText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 20,
textAlign: 'center',
marginLeft: 10,
@@ -282,7 +277,6 @@ const filePageStyle = StyleSheet.create({
amountRow: {
flexDirection: 'row',
flex: 0.75,
alignItems: 'center',
},
button: {
backgroundColor: Colors.LbryGreen,
@@ -294,7 +288,7 @@ const filePageStyle = StyleSheet.create({
marginBottom: 14,
},
input: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
},
tipAmountInput: {
@@ -305,7 +299,9 @@ const filePageStyle = StyleSheet.create({
letterSpacing: 1,
},
currency: {
alignSelf: 'flex-start',
fontSize: 12,
marginTop: 15,
marginLeft: 4,
},
descriptionToggle: {
@@ -316,7 +312,7 @@ const filePageStyle = StyleSheet.create({
marginTop: -8,
},
text: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
lineHeight: 24,
},
@@ -332,16 +328,17 @@ const filePageStyle = StyleSheet.create({
tagContainer: {
marginLeft: 12,
marginRight: 12,
marginTop: 16,
marginBottom: 16,
flexDirection: 'row',
},
tagTitle: {
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
flex: 0.2,
marginTop: 4,
},
tagList: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
flex: 0.8,
flexDirection: 'row',
flexWrap: 'wrap',
@@ -363,7 +360,7 @@ const filePageStyle = StyleSheet.create({
marginRight: 8,
},
rewardDriverText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
color: Colors.White,
fontSize: 14,
},
@@ -384,34 +381,24 @@ const filePageStyle = StyleSheet.create({
backButtonIcon: {
color: Colors.White,
},
sharedLargeButton: {
alignItems: 'center',
justifyContent: 'center',
flex: 0.2,
},
innerLargeButton: {
alignItems: 'center',
justifyContent: 'center',
},
largeButton: {
alignItems: 'center',
justifyContent: 'center',
flex: 0.2,
marginRight: 48,
},
largeButtonIcon: {
color: Colors.ActionGrey,
color: Colors.DescriptionGrey,
},
largeButtonText: {
color: Colors.ActionGrey,
fontFamily: 'Inter-Regular',
fontSize: 12,
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
marginTop: 4,
},
largeButtonsRow: {
flexDirection: 'row',
alignItems: 'center',
marginLeft: 16,
marginRight: 16,
marginLeft: 20,
marginRight: 20,
marginTop: 12,
marginBottom: 12,
},
@@ -431,7 +418,7 @@ const filePageStyle = StyleSheet.create({
},
unsupportedContentFilename: {
color: Colors.LbryGreen,
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
fontSize: 16,
},
unsupportedContentImage: {
@@ -440,34 +427,17 @@ const filePageStyle = StyleSheet.create({
marginRight: 24,
},
unsupportedContentTitle: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 20,
},
unsupportedContentText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
marginTop: 4,
},
relatedLoading: {
marginTop: 16,
},
viewCount: {
fontFamily: 'Inter-Regular',
fontSize: 12,
color: Colors.DescriptionGrey,
marginLeft: 12,
marginRight: 12,
},
balance: {
alignItems: 'center',
flexDirection: 'row',
marginLeft: 24,
},
balanceText: {
fontFamily: 'Inter-SemiBold',
fontSize: 14,
marginLeft: 4,
},
});
export default filePageStyle;
+12 -12
View File
@@ -17,7 +17,7 @@ const firstRunStyle = StyleSheet.create({
backgroundColor: Colors.LbryGreen,
},
title: {
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
fontSize: 40,
marginLeft: 32,
marginRight: 32,
@@ -25,7 +25,7 @@ const firstRunStyle = StyleSheet.create({
color: Colors.White,
},
paragraph: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 18,
lineHeight: 24,
marginLeft: 32,
@@ -34,7 +34,7 @@ const firstRunStyle = StyleSheet.create({
color: Colors.White,
},
spacedParagraph: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 18,
lineHeight: 28,
marginLeft: 32,
@@ -43,7 +43,7 @@ const firstRunStyle = StyleSheet.create({
color: Colors.White,
},
infoParagraph: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
lineHeight: 20,
marginLeft: 32,
@@ -55,7 +55,7 @@ const firstRunStyle = StyleSheet.create({
marginTop: 36,
},
rowParagraph: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
lineHeight: 24,
color: Colors.White,
@@ -67,7 +67,7 @@ const firstRunStyle = StyleSheet.create({
marginRight: 8,
},
emailInput: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 24,
lineHeight: 24,
marginLeft: 32,
@@ -76,7 +76,7 @@ const firstRunStyle = StyleSheet.create({
textAlign: 'center',
},
passwordInput: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 24,
lineHeight: 24,
marginLeft: 32,
@@ -102,7 +102,7 @@ const firstRunStyle = StyleSheet.create({
actionButton: {
backgroundColor: Colors.White,
alignSelf: 'center',
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 12,
paddingLeft: 16,
paddingRight: 16,
@@ -114,18 +114,18 @@ const firstRunStyle = StyleSheet.create({
paddingRight: 32,
},
buttonText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 18,
color: Colors.White,
},
smallButtonText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
color: Colors.White,
marginBottom: -2,
},
smallLeftButtonText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
color: Colors.White,
marginBottom: 6,
@@ -183,7 +183,7 @@ const firstRunStyle = StyleSheet.create({
},
passwordWarningText: {
color: Colors.NextLbryGreen,
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
},
centered: {
+3 -3
View File
@@ -42,12 +42,12 @@ const floatingButtonStyle = StyleSheet.create({
},
text: {
color: Colors.White,
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
fontSize: 16,
},
bottomRight: {
right: 0,
bottom: 0,
right: 10,
bottom: 10,
},
rewardIcon: {
color: Colors.White,
+4 -32
View File
@@ -56,41 +56,13 @@ const mediaPlayerStyle = StyleSheet.create({
height: '100%',
},
playerControlsContainer: {
backgroundColor: '#00000040',
backgroundColor: '#00000020',
flex: 1,
alignItems: 'center',
justifyContent: 'center',
},
midControls: {
flex: 1,
flexDirection: 'row',
height: 64,
position: 'absolute',
alignItems: 'center',
justifyContent: 'center',
},
midControlText: {
fontFamily: 'Inter-Regular',
fontSize: 10,
position: 'absolute',
top: 10,
color: Colors.White,
},
leftMidControlText: {
left: -6,
},
rightMidControlText: {
right: -6,
},
rewind10: {
marginRight: 48,
alignItems: 'center',
},
forward10: {
marginLeft: 48,
alignItems: 'center',
},
playPauseButton: {
position: 'absolute',
width: 64,
height: 64,
alignItems: 'center',
@@ -106,7 +78,7 @@ const mediaPlayerStyle = StyleSheet.create({
bottom: 14,
},
elapsedDuration: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
position: 'absolute',
left: 8,
bottom: 24,
@@ -114,7 +86,7 @@ const mediaPlayerStyle = StyleSheet.create({
color: '#ffffff',
},
totalDuration: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
position: 'absolute',
right: 48,
bottom: 24,
+2 -2
View File
@@ -29,7 +29,7 @@ const modalPickerStyle = StyleSheet.create({
padding: 12,
},
title: {
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
fontSize: 12,
marginTop: 4,
textTransform: 'uppercase',
@@ -54,7 +54,7 @@ const modalPickerStyle = StyleSheet.create({
itemLabel: {
marginLeft: 8,
alignSelf: 'flex-start',
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
},
itemSelected: {
+1 -1
View File
@@ -42,7 +42,7 @@ const modalTagSelectorStyle = StyleSheet.create({
marginBottom: 12,
},
title: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 24,
},
buttons: {
-71
View File
@@ -1,71 +0,0 @@
import { StyleSheet } from 'react-native';
import Colors from './colors';
const modalTipStyle = StyleSheet.create({
container: {
padding: 16,
},
title: {
fontFamily: 'Inter-Regular',
fontSize: 24,
},
row: {
flexDirection: 'row',
flex: 1,
},
amountRow: {
flexDirection: 'row',
alignItems: 'center',
marginRight: 24,
},
tipAmountInput: {
fontFamily: 'Inter-Regular',
fontSize: 14,
alignSelf: 'flex-start',
textAlign: 'right',
width: 80,
letterSpacing: 1,
},
currency: {
fontFamily: 'Inter-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-SemiBold',
fontSize: 14,
marginLeft: 4,
},
info: {
marginTop: 4,
},
infoText: {
fontFamily: 'Inter-Regular',
fontSize: 14,
color: Colors.DescriptionGrey,
},
learnMoreLink: {
fontFamily: 'Inter-Regular',
fontSize: 14,
color: Colors.LbryGreen,
},
});
export default modalTipStyle;
+1 -1
View File
@@ -42,7 +42,7 @@ const pageHeaderStyle = StyleSheet.create({
flexDirection: 'row',
},
titleText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: Platform.OS === 'ios' ? 17 : 20,
fontWeight: Platform.OS === 'ios' ? '700' : '500',
color: 'rgba(0, 0, 0, .9)',
+21 -31
View File
@@ -23,7 +23,7 @@ const publishStyle = StyleSheet.create({
height: 90,
},
inputText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
},
card: {
@@ -57,7 +57,7 @@ const publishStyle = StyleSheet.create({
alignSelf: 'flex-end',
},
cardTitle: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 20,
marginBottom: 8,
},
@@ -84,7 +84,7 @@ const publishStyle = StyleSheet.create({
},
actionText: {
color: Colors.White,
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
marginTop: 8,
},
@@ -119,12 +119,12 @@ const publishStyle = StyleSheet.create({
},
priceInput: {
width: 80,
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
textAlign: 'right',
},
currency: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
},
cardRow: {
flex: 1,
@@ -155,12 +155,12 @@ const publishStyle = StyleSheet.create({
},
loadingText: {
color: Colors.White,
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
marginLeft: 8,
},
listEmptyText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
},
titleRow: {
@@ -168,7 +168,7 @@ const publishStyle = StyleSheet.create({
justifyContent: 'space-between',
},
cardText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
},
cameraPreview: {
@@ -192,12 +192,12 @@ const publishStyle = StyleSheet.create({
padding: 16,
},
successTitle: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 28,
marginBottom: 16,
},
successText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
marginBottom: 16,
lineHeight: 20,
@@ -211,7 +211,7 @@ const publishStyle = StyleSheet.create({
successUrl: {
flex: 0.9,
fontSize: 32,
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
color: Colors.NextLbryGreen,
marginRight: 16,
},
@@ -305,7 +305,7 @@ const publishStyle = StyleSheet.create({
paddingBottom: 12,
},
rewardDriverText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
color: Colors.White,
fontSize: 14,
},
@@ -325,7 +325,7 @@ const publishStyle = StyleSheet.create({
marginBottom: 4,
},
textInputTitle: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 12,
marginBottom: -10,
marginLeft: 4,
@@ -346,7 +346,7 @@ const publishStyle = StyleSheet.create({
},
thumbnailUploadText: {
color: Colors.White,
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
fontSize: 12,
marginLeft: 4,
},
@@ -357,7 +357,7 @@ const publishStyle = StyleSheet.create({
marginBottom: 16,
},
toggleText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
marginLeft: 8,
},
@@ -398,7 +398,7 @@ const publishStyle = StyleSheet.create({
padding: 16,
},
noPublishText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
},
publishNowButton: {
@@ -423,21 +423,21 @@ const publishStyle = StyleSheet.create({
},
noVideos: {
color: Colors.White,
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
},
cameraInfo: {
color: Colors.White,
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
},
warningText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
color: Colors.DescriptionGrey,
},
helpText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 12,
color: Colors.DescriptionGrey,
},
@@ -463,19 +463,9 @@ const publishStyle = StyleSheet.create({
},
editIcon: {
color: Colors.White,
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
fontSize: 12,
},
balance: {
alignItems: 'center',
flexDirection: 'row',
marginLeft: 24,
},
balanceText: {
fontFamily: 'Inter-SemiBold',
fontSize: 14,
marginLeft: 4,
},
});
export default publishStyle;
+1 -1
View File
@@ -12,7 +12,7 @@ const relatedContentStyle = StyleSheet.create({
borderTopWidth: 1,
},
title: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 18,
},
itemList: {
+21 -21
View File
@@ -37,7 +37,7 @@ const rewardStyle = StyleSheet.create({
marginTop: 36,
},
enrollDescText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 18,
lineHeight: 28,
color: Colors.White,
@@ -67,36 +67,36 @@ const rewardStyle = StyleSheet.create({
paddingBottom: 16,
},
text: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
lineHeight: 24,
},
infoText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 18,
marginLeft: 12,
},
title: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 22,
marginBottom: 6,
color: Colors.LbryGreen,
},
subtitle: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 18,
marginBottom: 6,
color: Colors.LbryGreen,
},
subcardText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 15,
lineHeight: 20,
marginLeft: 2,
marginRight: 2,
},
subcardTextInput: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
marginTop: 2,
marginBottom: 2,
@@ -122,7 +122,7 @@ const rewardStyle = StyleSheet.create({
},
link: {
color: Colors.LbryGreen,
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
},
textLink: {
@@ -148,21 +148,21 @@ const rewardStyle = StyleSheet.create({
alignItems: 'center',
},
rewardAmount: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 26,
textAlign: 'center',
},
rewardCurrency: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
},
rewardTitle: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
color: Colors.LbryGreen,
marginBottom: 4,
},
rewardDescription: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
lineHeight: 18,
marginBottom: 4,
@@ -195,7 +195,7 @@ const rewardStyle = StyleSheet.create({
},
summaryText: {
color: Colors.White,
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 28,
marginLeft: 12,
},
@@ -208,19 +208,19 @@ const rewardStyle = StyleSheet.create({
marginRight: 32,
},
phoneInputText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
letterSpacing: 1.3,
color: Colors.White,
},
verifyingText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
marginLeft: 12,
alignSelf: 'flex-start',
},
verificationCodeInput: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
color: Colors.White,
fontSize: 24,
letterSpacing: 12,
@@ -244,11 +244,11 @@ const rewardStyle = StyleSheet.create({
},
notInterestedLink: {
fontSize: 14,
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
color: Colors.White,
},
learnMoreLink: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
color: Colors.White,
textDecorationLine: 'underline',
},
@@ -258,7 +258,7 @@ const rewardStyle = StyleSheet.create({
paddingRight: 16,
},
customCodeInput: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
letterSpacing: 1.3,
marginTop: -8,
@@ -285,7 +285,7 @@ const rewardStyle = StyleSheet.create({
verificationTitle: {
fontSize: 32,
color: Colors.White,
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
marginLeft: 32,
marginRight: 32,
marginBottom: 24,
@@ -300,7 +300,7 @@ const rewardStyle = StyleSheet.create({
fontSize: 14,
},
paragraphText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
color: Colors.White,
fontSize: 12,
lineHeight: 16,
+5 -11
View File
@@ -44,19 +44,19 @@ const searchStyle = StyleSheet.create({
backgroundColor: Colors.DarkerGrey,
},
tagResultTitle: {
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
fontSize: 24,
color: Colors.White,
},
tagResultDescription: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
color: Colors.VeryLightGrey,
},
searchInput: {
width: '100%',
height: '100%',
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
},
noResults: {
@@ -67,25 +67,19 @@ const searchStyle = StyleSheet.create({
alignItems: 'center',
},
noResultsText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
marginTop: 16,
marginLeft: 16,
marginRight: 16,
},
boldText: {
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
fontSize: 16,
},
loading: {
position: 'absolute',
},
moreLoading: {
width: '100%',
height: 48,
alignItems: 'center',
justifyContent: 'center',
},
});
export default searchStyle;
+5 -5
View File
@@ -38,23 +38,23 @@ const settingsStyle = StyleSheet.create({
},
label: {
fontSize: 14,
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
lineHeight: 18,
},
description: {
color: '#aaaaaa',
fontSize: 12,
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
lineHeight: 18,
},
sectionTitle: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 20,
marginBottom: 4,
},
sectionDescription: {
color: '#aaaaaa',
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 12,
lineHeight: 18,
marginBottom: 8,
@@ -66,7 +66,7 @@ const settingsStyle = StyleSheet.create({
width: '85%',
},
languagePickerItem: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
},
pickerRow: {
+5 -5
View File
@@ -8,14 +8,14 @@ const splashStyle = StyleSheet.create({
backgroundColor: Colors.LbryGreen,
},
title: {
fontFamily: 'Inter-Bold',
fontFamily: 'Inter-UI-Bold',
fontSize: 64,
textAlign: 'center',
marginBottom: 48,
color: Colors.White,
},
errorTitle: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 28,
marginBottom: 24,
marginLeft: 24,
@@ -23,7 +23,7 @@ const splashStyle = StyleSheet.create({
color: Colors.White,
},
paragraph: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
lineHeight: 24,
marginBottom: 20,
@@ -48,7 +48,7 @@ const splashStyle = StyleSheet.create({
width: '50%',
},
details: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
marginLeft: 16,
marginRight: 16,
@@ -56,7 +56,7 @@ const splashStyle = StyleSheet.create({
textAlign: 'center',
},
message: {
fontFamily: 'Inter-Bold',
fontFamily: 'Inter-UI-Bold',
fontSize: 18,
color: Colors.White,
marginLeft: 16,
+5 -5
View File
@@ -16,16 +16,16 @@ const storageStatsStyle = StyleSheet.create({
padding: 16,
},
totalSize: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 36,
},
annotation: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
marginTop: -4,
},
statsText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
},
distributionBar: {
@@ -57,12 +57,12 @@ const storageStatsStyle = StyleSheet.create({
height: 16,
},
legendText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
flex: 0.3,
},
legendSize: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
flex: 0.6,
textAlign: 'right',
+12 -14
View File
@@ -37,7 +37,7 @@ const subscriptionsStyle = StyleSheet.create({
paddingTop: 24,
},
infoText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
marginTop: 8,
marginBottom: 8,
@@ -57,7 +57,7 @@ const subscriptionsStyle = StyleSheet.create({
marginTop: 16,
},
contentText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
marginLeft: 24,
marginRight: 24,
@@ -96,7 +96,7 @@ const subscriptionsStyle = StyleSheet.create({
justifyContent: 'center',
},
fileItemName: {
fontFamily: 'Inter-Bold',
fontFamily: 'Inter-UI-Bold',
marginTop: 8,
fontSize: 18,
},
@@ -109,7 +109,7 @@ const subscriptionsStyle = StyleSheet.create({
borderBottomWidth: 1,
},
channelTitle: {
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
fontSize: 20,
marginLeft: 24,
marginTop: 16,
@@ -136,16 +136,16 @@ const subscriptionsStyle = StyleSheet.create({
color: Colors.LbryGreen,
},
inactiveMode: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
},
activeMode: {
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
},
claimList: {
flex: 1,
},
pageTitle: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 24,
},
titleRow: {
@@ -171,7 +171,7 @@ const subscriptionsStyle = StyleSheet.create({
marginRight: 24,
},
tagSortText: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
marginRight: 4,
},
@@ -199,8 +199,6 @@ const subscriptionsStyle = StyleSheet.create({
height: 70,
borderRadius: 140,
overflow: 'hidden',
alignItems: 'center',
justifyContent: 'center',
},
suggestedItemThumbnail: {
width: '100%',
@@ -218,13 +216,13 @@ const subscriptionsStyle = StyleSheet.create({
top: 0,
},
suggestedItemTitle: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
marginBottom: 4,
width: '85%',
},
suggestedItemName: {
fontFamily: 'Inter-SemiBold',
fontFamily: 'Inter-UI-SemiBold',
fontSize: 14,
marginBottom: 4,
color: Colors.LbryGreen,
@@ -235,7 +233,7 @@ const subscriptionsStyle = StyleSheet.create({
flexWrap: 'wrap',
},
suggestedSubTitle: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 20,
marginLeft: 16,
marginRight: 16,
@@ -253,7 +251,7 @@ const subscriptionsStyle = StyleSheet.create({
alignItems: 'center',
},
suggestedLink: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
},
modalContainer: {
+3 -3
View File
@@ -7,7 +7,7 @@ const tagStyle = StyleSheet.create({
marginBottom: 4,
},
tagSearchInput: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
},
content: {
@@ -22,7 +22,7 @@ const tagStyle = StyleSheet.create({
marginRight: 8,
},
text: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
marginRight: 8,
},
@@ -34,7 +34,7 @@ const tagStyle = StyleSheet.create({
marginTop: 8,
},
nsfwTagsTitle: {
fontFamily: 'Inter-Regular',
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
marginBottom: 4,
},
Loaded 100 of 104 files, more files were not shown because too many files have changed in this diff. Show more