Compare commits
No commits in common. "master" and "reposts-display" have entirely different histories.
master
...
reposts-di
83 changed files with 12806 additions and 2000 deletions
.gitlab-ci.ymlandroidbundle-android.shlbry-app-strings.jsonpackage-lock.jsonpackage.jsonyarn.lock
src
component
AppNavigator.js
constants.jsindex.jschannelIconItem
claimList
claimResultItem
drawerContent
fileItem
fileListItem
floatingWalletBalance
mediaPlayer
modalRepostView
modalTipView
relatedContent
rewardCard
rewardEnrolment
sdkLoadingStatus
suggestedSubscriptionItem
suggestedSubscriptions
suggestedSubscriptionsGrid
uriBar
walletBalance
walletBalanceExtra
walletSyncDriver
page
about
channelCreator
discover
downloads
file
invites
liteFile
publish
publishes
rewards
settings
splash
subscriptions
tag
wallet
redux
styles
utils
|
@ -1,8 +0,0 @@
|
|||
stages:
|
||||
- build
|
||||
|
||||
build:
|
||||
variables:
|
||||
REACT_NATIVE_BRANCH: $CI_COMMIT_REF_NAME
|
||||
stage: build
|
||||
trigger: lbry/lbry-android
|
2
android
2
android
|
@ -1 +1 @@
|
|||
Subproject commit ff30e7f6a4358fd997a9e6d9f75bfe6959eafcb6
|
||||
Subproject commit 37b893103da874282f2bdef4a8a1bb543d2c9859
|
|
@ -1,2 +1,3 @@
|
|||
#!/bin/bash
|
||||
react-native bundle --platform android --dev false --entry-file src/index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
|
||||
|
||||
|
|
|
@ -304,23 +304,5 @@
|
|||
"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",
|
||||
"Find Channels to follow": "Find Channels to follow",
|
||||
"LBRY works better if you follow at least 5 creators you like. Sign in to show creators you follow if you already have an account.": "LBRY works better if you follow at least 5 creators you like. Sign in to show creators you follow if you already have an account.",
|
||||
"%remaining% more...": "%remaining% more...",
|
||||
"Did you know that you can earn free credits worth up to %amount%?": "Did you know that you can earn free credits worth up to %amount%?",
|
||||
"SHOW ME": "SHOW ME",
|
||||
"Convert credits to USD on Bittrex": "Convert credits to USD on Bittrex",
|
||||
"You also have": "You also have",
|
||||
"in tips": "in tips",
|
||||
"Earn more tips by uploading cool videos": "Earn more tips by uploading cool videos",
|
||||
"You staked": "You staked",
|
||||
"in your publishes": "in your publishes",
|
||||
"in your supports": "in your supports",
|
||||
"Your wallet is not currently synced with lbry.tv. You are responsible for backing up your wallet.": "Your wallet is not currently synced with lbry.tv. You are responsible for backing up your wallet.",
|
||||
"A backup of your wallet is synced with lbry.tv": "A backup of your wallet is synced with lbry.tv",
|
||||
"What does this mean?": "What does this mean?",
|
||||
"LBRY credits allow you to publish or purchase content.": "LBRY credits allow you to publish or purchase content.",
|
||||
"You can obtain free credits worth %amount% after you provide an email address.": "You can obtain free credits worth %amount% after you provide an email address.",
|
||||
"up to": "up to"
|
||||
"Save \"%title%\" (%size%) to your device": "Save \"%title%\" (%size%) to your device"
|
||||
}
|
12178
package-lock.json
generated
Normal file
12178
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -15,8 +15,8 @@
|
|||
"base-64": "^0.1.0",
|
||||
"@expo/vector-icons": "^8.1.0",
|
||||
"gfycat-style-urls": "^1.0.3",
|
||||
"lbry-redux": "lbryio/lbry-redux#69ffd110dbf3633e5847f61f008751edec033017",
|
||||
"lbryinc": "lbryio/lbryinc#667024ebb7cb207609273174ca422cee47469270",
|
||||
"lbry-redux": "lbryio/lbry-redux#9c48cce570ee8e057068c86cb6507e1b441841ee",
|
||||
"lbryinc": "lbryio/lbryinc#0dc8829a319a708f45a855765f70a193ccb72676",
|
||||
"lodash": ">=4.17.11",
|
||||
"merge": ">=1.2.1",
|
||||
"moment": "^2.22.1",
|
||||
|
@ -77,7 +77,7 @@
|
|||
"flow-babel-webpack-plugin": "^1.1.1",
|
||||
"husky": "^0.14.3",
|
||||
"lint-staged": "^7.0.4",
|
||||
"metro-react-native-babel-preset": "0.56.3",
|
||||
"metro-react-native-babel-preset": "^0.58.0",
|
||||
"prettier": "^1.11.1",
|
||||
"@react-native-community/eslint-config": "^0.0.5",
|
||||
"react-devtools": "^3.6.3",
|
||||
|
|
|
@ -5,7 +5,6 @@ import DiscoverPage from 'page/discover';
|
|||
import DownloadsPage from 'page/downloads';
|
||||
import DrawerContent from 'component/drawerContent';
|
||||
import FilePage from 'page/file';
|
||||
import LiteFilePage from 'page/liteFile';
|
||||
import FirstRunScreen from 'page/firstRun';
|
||||
import InvitesPage from 'page/invites';
|
||||
import PublishPage from 'page/publish';
|
||||
|
@ -20,7 +19,7 @@ import SubscriptionsPage from 'page/subscriptions';
|
|||
import TransactionHistoryPage from 'page/transactionHistory';
|
||||
import VerificationScreen from 'page/verification';
|
||||
import WalletPage from 'page/wallet';
|
||||
import { NavigationActions, StackActions } from 'react-navigation';
|
||||
import { NavigationActions } from 'react-navigation';
|
||||
import { createDrawerNavigator } from 'react-navigation-drawer';
|
||||
import { createStackNavigator } from 'react-navigation-stack';
|
||||
import {
|
||||
|
@ -31,7 +30,6 @@ import {
|
|||
import { connect } from 'react-redux';
|
||||
import {
|
||||
AppState,
|
||||
Alert,
|
||||
BackHandler,
|
||||
DeviceEventEmitter,
|
||||
Linking,
|
||||
|
@ -42,10 +40,8 @@ import {
|
|||
} from 'react-native';
|
||||
import { selectDrawerStack } from 'redux/selectors/drawer';
|
||||
import {
|
||||
Lbry,
|
||||
ACTIONS,
|
||||
SETTINGS,
|
||||
doBalanceSubscribe,
|
||||
doDismissToast,
|
||||
doPopulateSharedUserState,
|
||||
doPreferenceGet,
|
||||
|
@ -54,10 +50,6 @@ import {
|
|||
} from 'lbry-redux';
|
||||
import {
|
||||
Lbryio,
|
||||
rewards as REWARD_TYPES,
|
||||
doBlackListedOutpointsSubscribe,
|
||||
doClaimRewardType,
|
||||
doFilteredOutpointsSubscribe,
|
||||
doGetSync,
|
||||
doUserCheckEmailVerified,
|
||||
doUserEmailVerify,
|
||||
|
@ -81,10 +73,19 @@ import discoverStyle from 'styles/discover';
|
|||
import searchStyle from 'styles/search';
|
||||
import SearchRightHeaderIcon from 'component/searchRightHeaderIcon';
|
||||
import Snackbar from 'react-native-snackbar';
|
||||
import { doSetSdkReady } from 'redux/actions/settings';
|
||||
|
||||
const SYNC_GET_INTERVAL = 1000 * 60 * 5; // every 5 minutes
|
||||
|
||||
const menuNavigationButton = navigation => (
|
||||
<NavigationButton
|
||||
name="bars"
|
||||
size={24}
|
||||
style={discoverStyle.drawerMenuButton}
|
||||
iconStyle={discoverStyle.drawerHamburger}
|
||||
onPress={() => navigation.openDrawer()}
|
||||
/>
|
||||
);
|
||||
|
||||
const discoverStack = createStackNavigator(
|
||||
{
|
||||
Subscriptions: {
|
||||
|
@ -277,12 +278,6 @@ const mainStackNavigator = new createStackNavigator(
|
|||
drawerLockMode: 'locked-closed',
|
||||
},
|
||||
},
|
||||
LiteFile: {
|
||||
screen: LiteFilePage,
|
||||
navigationOptions: {
|
||||
drawerLockMode: 'locked-closed',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
headerMode: 'none',
|
||||
|
@ -334,7 +329,6 @@ class AppWithNavigationState extends React.Component {
|
|||
this.emailVerifyCheckInterval = setInterval(() => this.checkEmailVerification(), 5000);
|
||||
Linking.addEventListener('url', this._handleUrl);
|
||||
|
||||
DeviceEventEmitter.addListener('onSdkReady', this.handleSdkReady);
|
||||
DeviceEventEmitter.addListener('onDownloadAborted', this.handleDownloadAborted);
|
||||
DeviceEventEmitter.addListener('onDownloadStarted', this.handleDownloadStarted);
|
||||
DeviceEventEmitter.addListener('onDownloadUpdated', this.handleDownloadUpdated);
|
||||
|
@ -374,70 +368,6 @@ class AppWithNavigationState extends React.Component {
|
|||
);
|
||||
};
|
||||
|
||||
checkNewAndroidReward = () => {
|
||||
const { dispatch, doToast } = this.props;
|
||||
const claimRewardCallback = err => {
|
||||
if (err) {
|
||||
// an error occurred, do not display anything
|
||||
return;
|
||||
}
|
||||
// reward successfully claimed
|
||||
NativeModules.UtilityModule.setNativeBooleanSetting(Constants.SETTING_NEW_ANDROID_REWARD_CLAIMED, true);
|
||||
};
|
||||
|
||||
NativeModules.UtilityModule.getNativeBooleanSetting(Constants.SETTING_NEW_ANDROID_REWARD_CLAIMED, false).then(
|
||||
rewardClaimed => {
|
||||
if (!rewardClaimed) {
|
||||
dispatch(
|
||||
doClaimRewardType(REWARD_TYPES.TYPE_NEW_ANDROID, { notifyError: false, callback: claimRewardCallback }),
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
handleSdkReady = () => {
|
||||
const { dispatch } = this.props;
|
||||
dispatch(doSetSdkReady());
|
||||
dispatch(doBalanceSubscribe());
|
||||
dispatch(doBlackListedOutpointsSubscribe());
|
||||
dispatch(doFilteredOutpointsSubscribe());
|
||||
|
||||
Lbry.wallet_status().then(secureWalletStatus => {
|
||||
// For now, automatically unlock the wallet if a password is set so that downloads work
|
||||
NativeModules.UtilityModule.getSecureValue(Constants.KEY_WALLET_PASSWORD).then(password => {
|
||||
if ((secureWalletStatus.is_encrypted && !secureWalletStatus.is_locked) || secureWalletStatus.is_locked) {
|
||||
this.setState({
|
||||
message: __('Unlocking account'),
|
||||
details: __('Decrypting wallet'),
|
||||
});
|
||||
|
||||
// unlock the wallet and then finish the splash screen
|
||||
Lbry.wallet_unlock({ password: password || '' }).then(unlocked => {
|
||||
if (unlocked) {
|
||||
} else {
|
||||
// this.handleAccountUnlockFailed();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
this.checkNewAndroidReward();
|
||||
};
|
||||
|
||||
handleAccountUnlockFailed() {
|
||||
const { dispatch } = this.props;
|
||||
dispatch(
|
||||
doToast({
|
||||
message: __(
|
||||
'Your wallet failed to unlock, which means you may not be able to play any videos or access your funds. Restart the app to fix this.',
|
||||
),
|
||||
isError: true,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
handleDownloadStarted = evt => {
|
||||
const { dispatch } = this.props;
|
||||
const { uri, outpoint, fileInfo } = evt;
|
||||
|
@ -473,7 +403,6 @@ class AppWithNavigationState extends React.Component {
|
|||
};
|
||||
|
||||
componentWillUnmount() {
|
||||
DeviceEventEmitter.removeListener('onSdkReady', this.handleSdkReady);
|
||||
DeviceEventEmitter.removeListener('onDownloadAborted', this.handleDownloadAborted);
|
||||
DeviceEventEmitter.removeListener('onDownloadStarted', this.handleDownloadStarted);
|
||||
DeviceEventEmitter.removeListener('onDownloadUpdated', this.handleDownloadUpdated);
|
||||
|
|
|
@ -19,4 +19,7 @@ const perform = dispatch => ({
|
|||
resolveUri: uri => dispatch(doResolveUri(uri)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(ChannelIconItem);
|
||||
export default connect(
|
||||
select,
|
||||
perform
|
||||
)(ChannelIconItem);
|
||||
|
|
|
@ -23,4 +23,7 @@ const perform = dispatch => ({
|
|||
claimSearch: options => dispatch(doClaimSearch(options)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(ClaimList);
|
||||
export default connect(
|
||||
select,
|
||||
perform,
|
||||
)(ClaimList);
|
||||
|
|
|
@ -36,4 +36,7 @@ const perform = dispatch => ({
|
|||
setPlayerVisible: (visible, uri) => dispatch(doSetPlayerVisible(visible, uri)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(ClaimResultItem);
|
||||
export default connect(
|
||||
select,
|
||||
perform,
|
||||
)(ClaimResultItem);
|
||||
|
|
|
@ -39,14 +39,10 @@ class ClaimResultItem extends React.PureComponent {
|
|||
}
|
||||
|
||||
onPressHandler = () => {
|
||||
const { autoplay, navigation, result, urlOpenHandler, setPlayerVisible } = this.props;
|
||||
const { autoplay, navigation, result, setPlayerVisible } = this.props;
|
||||
const { claimId, name } = result;
|
||||
const url = normalizeURI(`${name}#${claimId}`);
|
||||
if (urlOpenHandler) {
|
||||
urlOpenHandler(url);
|
||||
} else {
|
||||
navigateToUri(navigation, url, { autoplay }, false, url, setPlayerVisible);
|
||||
}
|
||||
navigateToUri(navigation, url, { autoplay }, false, url, setPlayerVisible);
|
||||
};
|
||||
|
||||
render() {
|
||||
|
|
|
@ -1,19 +1,18 @@
|
|||
import { connect } from 'react-redux';
|
||||
import { doToast, selectBalance, selectMyChannelClaims } from 'lbry-redux';
|
||||
import { selectUnclaimedRewardValue, selectUser } from 'lbryinc';
|
||||
import { selectSdkReady } from 'redux/selectors/settings';
|
||||
import { doFetchChannelListMine, selectMyChannelClaims } from 'lbry-redux';
|
||||
import { selectUser } from 'lbryinc';
|
||||
import DrawerContent from './view';
|
||||
|
||||
const select = state => ({
|
||||
balance: selectBalance(state),
|
||||
channels: selectMyChannelClaims(state),
|
||||
sdkReady: selectSdkReady(state),
|
||||
unclaimedRewardAmount: selectUnclaimedRewardValue(state),
|
||||
user: selectUser(state),
|
||||
});
|
||||
|
||||
const perform = dispatch => ({
|
||||
notify: data => dispatch(doToast(data)),
|
||||
fetchChannelListMine: () => dispatch(doFetchChannelListMine(1, 99999, true)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(DrawerContent);
|
||||
export default connect(
|
||||
select,
|
||||
perform,
|
||||
)(DrawerContent);
|
||||
|
|
|
@ -6,8 +6,6 @@ import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
|||
import Icon from 'react-native-vector-icons/FontAwesome5';
|
||||
import channelIconStyle from 'styles/channelIcon';
|
||||
import discoverStyle from 'styles/discover';
|
||||
import { Lbryio } from 'lbryinc';
|
||||
import { formatUsd } from 'utils/helper';
|
||||
|
||||
const groupedMenuItems = {
|
||||
'Find content': [
|
||||
|
@ -33,27 +31,11 @@ const groupedMenuItems = {
|
|||
};
|
||||
|
||||
const groupNames = Object.keys(groupedMenuItems);
|
||||
const routesRequiringSdkReady = [
|
||||
Constants.DRAWER_ROUTE_CHANNEL_CREATOR,
|
||||
Constants.DRAWER_ROUTE_MY_LBRY,
|
||||
Constants.DRAWER_ROUTE_PUBLISHES,
|
||||
Constants.DRAWER_ROUTE_PUBLISH,
|
||||
Constants.DRAWER_ROUTE_WALLET,
|
||||
Constants.DRAWER_ROUTE_REWARDS,
|
||||
Constants.DRAWER_ROUTE_INVITES,
|
||||
];
|
||||
|
||||
class DrawerContent extends React.PureComponent {
|
||||
state = {
|
||||
usdExchangeRate: 0,
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
Lbryio.getExchangeRates().then(rates => {
|
||||
if (!isNaN(rates.LBC_USD)) {
|
||||
this.setState({ usdExchangeRate: rates.LBC_USD });
|
||||
}
|
||||
});
|
||||
const { fetchChannelListMine } = this.props;
|
||||
fetchChannelListMine();
|
||||
}
|
||||
|
||||
getAvatarImageUrl = () => {
|
||||
|
@ -80,23 +62,8 @@ class DrawerContent extends React.PureComponent {
|
|||
});
|
||||
};
|
||||
|
||||
handleItemPress = routeName => {
|
||||
const { navigation, notify, sdkReady } = this.props;
|
||||
if (!sdkReady && routesRequiringSdkReady.includes(routeName)) {
|
||||
if (navigation.closeDrawer) {
|
||||
navigation.closeDrawer();
|
||||
}
|
||||
notify({
|
||||
message: __('The background service is still initializing. Please try again when initialization is complete.'),
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
navigation.navigate({ routeName: routeName });
|
||||
};
|
||||
|
||||
render() {
|
||||
const { activeTintColor, balance, navigation, unclaimedRewardAmount, user, onItemPress } = this.props;
|
||||
const { activeTintColor, navigation, user, onItemPress } = this.props;
|
||||
const { state } = navigation;
|
||||
|
||||
const activeItemKey = state.routes[state.index] ? state.routes[state.index].key : null;
|
||||
|
@ -190,7 +157,7 @@ class DrawerContent extends React.PureComponent {
|
|||
focused ? discoverStyle.menuItemTouchAreaFocused : null,
|
||||
]}
|
||||
key={item.label}
|
||||
onPress={() => this.handleItemPress(item.route)}
|
||||
onPress={() => navigation.navigate({ routeName: item.route })}
|
||||
delayPressIn={0}
|
||||
>
|
||||
<View style={discoverStyle.menuItemIcon}>
|
||||
|
@ -203,15 +170,6 @@ class DrawerContent extends React.PureComponent {
|
|||
</View>
|
||||
<Text style={[discoverStyle.menuItem, focused ? discoverStyle.menuItemFocused : null]}>
|
||||
{__(item.label)}
|
||||
{item.label === 'Wallet' && this.state.usdExchangeRate > 0 && (
|
||||
<Text> ({formatUsd(parseFloat(balance) * parseFloat(this.state.usdExchangeRate))})</Text>
|
||||
)}
|
||||
{item.label === 'Rewards' && this.state.usdExchangeRate > 0 && (
|
||||
<Text>
|
||||
{' '}
|
||||
({formatUsd(parseFloat(unclaimedRewardAmount) * parseFloat(this.state.usdExchangeRate))})
|
||||
</Text>
|
||||
)}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
);
|
||||
|
|
|
@ -35,4 +35,7 @@ const perform = dispatch => ({
|
|||
setPlayerVisible: (visible, uri) => dispatch(doSetPlayerVisible(visible, uri)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(FileItem);
|
||||
export default connect(
|
||||
select,
|
||||
perform,
|
||||
)(FileItem);
|
||||
|
|
|
@ -70,9 +70,7 @@ class FileItem extends React.PureComponent {
|
|||
const outpointsToHide = !blackListedOutpoints
|
||||
? filteredOutpoints
|
||||
: blackListedOutpoints.concat(filteredOutpoints);
|
||||
shouldHide = outpointsToHide.some(
|
||||
outpoint => outpoint && outpoint.txid === claim.txid && outpoint.nout === claim.nout,
|
||||
);
|
||||
shouldHide = outpointsToHide.some(outpoint => outpoint.txid === claim.txid && outpoint.nout === claim.nout);
|
||||
}
|
||||
if (shouldHide) {
|
||||
// don't display blacklisted or filtered outpoints on the Your tags page
|
||||
|
|
|
@ -36,4 +36,7 @@ const perform = dispatch => ({
|
|||
setPlayerVisible: (visible, uri) => dispatch(doSetPlayerVisible(visible, uri)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(FileListItem);
|
||||
export default connect(
|
||||
select,
|
||||
perform,
|
||||
)(FileListItem);
|
||||
|
|
|
@ -99,7 +99,6 @@ class FileListItem extends React.PureComponent {
|
|||
isRewardContent,
|
||||
channelClaimId,
|
||||
fullChannelUri,
|
||||
repostUrl,
|
||||
repostChannel,
|
||||
repostChannelUrl,
|
||||
shortChannelUri,
|
||||
|
@ -115,21 +114,18 @@ class FileListItem extends React.PureComponent {
|
|||
channelClaimId = signingChannel ? signingChannel.claim_id : null;
|
||||
fullChannelUri = channelClaimId ? `${channel}#${channelClaimId}` : channel;
|
||||
shortChannelUri = signingChannel ? signingChannel.short_url : null;
|
||||
repostUrl = claim.repost_url;
|
||||
repostChannelUrl = claim.repost_channel_url;
|
||||
if (repostUrl) {
|
||||
const { claimName: repostName, channelName } = parseURI(repostUrl);
|
||||
repostChannel = channelName;
|
||||
if (repostChannelUrl) {
|
||||
const { claimName: repostChannelName } = parseURI(repostChannelUrl);
|
||||
repostChannel = repostChannelName;
|
||||
}
|
||||
isRepost = !!repostUrl;
|
||||
isRepost = !!repostChannelUrl;
|
||||
|
||||
if (blackListedOutpoints || filteredOutpoints) {
|
||||
const outpointsToHide = !blackListedOutpoints
|
||||
? filteredOutpoints
|
||||
: blackListedOutpoints.concat(filteredOutpoints);
|
||||
shouldHide = outpointsToHide.some(
|
||||
outpoint => outpoint && outpoint.txid === claim.txid && outpoint.nout === claim.nout,
|
||||
);
|
||||
shouldHide = outpointsToHide.some(outpoint => outpoint.txid === claim.txid && outpoint.nout === claim.nout);
|
||||
}
|
||||
|
||||
// TODO: hide channels on tag pages?
|
||||
|
@ -147,23 +143,10 @@ class FileListItem extends React.PureComponent {
|
|||
<View>
|
||||
{isRepost && (
|
||||
<View style={fileListStyle.repostInfo}>
|
||||
<Icon name={'retweet'} size={14} style={fileListStyle.repostIcon} />
|
||||
<Icon name={"retweet"} size={14} style={fileListStyle.repostIcon} />
|
||||
<Text style={fileListStyle.repostChannelName}>
|
||||
<Link
|
||||
text={`@${repostChannel}`}
|
||||
onPress={() =>
|
||||
navigateToUri(
|
||||
navigation,
|
||||
normalizeURI(repostChannelUrl || `@${repostChannel}`),
|
||||
null,
|
||||
false,
|
||||
null,
|
||||
false,
|
||||
)
|
||||
}
|
||||
/>{' '}
|
||||
reposted
|
||||
</Text>
|
||||
<Link text={repostChannel}
|
||||
onPress={() => navigateToUri(navigation, normalizeURI(repostChannelUrl), null, false, null, false)} /> reposted</Text>
|
||||
</View>
|
||||
)}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import { connect } from 'react-redux';
|
|||
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
||||
import { selectBalance } from 'lbry-redux';
|
||||
import { selectUnclaimedRewardValue } from 'lbryinc';
|
||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||
import Constants from 'constants';
|
||||
import FloatingWalletBalance from './view';
|
||||
|
||||
const select = state => ({
|
||||
|
@ -11,4 +11,7 @@ const select = state => ({
|
|||
rewardsNotInterested: makeSelectClientSetting(Constants.SETTING_REWARDS_NOT_INTERESTED)(state),
|
||||
});
|
||||
|
||||
export default connect(select, null)(FloatingWalletBalance);
|
||||
export default connect(
|
||||
select,
|
||||
null
|
||||
)(FloatingWalletBalance);
|
||||
|
|
|
@ -36,7 +36,7 @@ class MediaPlayer extends React.PureComponent {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
buffering: true,
|
||||
buffering: false,
|
||||
backgroundPlayEnabled: false,
|
||||
autoPaused: false,
|
||||
rate: 1,
|
||||
|
@ -45,9 +45,9 @@ class MediaPlayer extends React.PureComponent {
|
|||
resizeMode: 'contain',
|
||||
duration: 0.0,
|
||||
currentTime: 0.0,
|
||||
paused: true,
|
||||
paused: !props.autoPlay,
|
||||
fullscreenMode: false,
|
||||
areControlsVisible: false,
|
||||
areControlsVisible: true,
|
||||
controlsTimeout: -1,
|
||||
seekerOffset: 0,
|
||||
seekerPosition: 0,
|
||||
|
@ -87,9 +87,7 @@ class MediaPlayer extends React.PureComponent {
|
|||
}
|
||||
|
||||
onLoad = data => {
|
||||
const { autoPlay } = this.props;
|
||||
this.setState({
|
||||
buffering: false,
|
||||
duration: data.duration,
|
||||
});
|
||||
|
||||
|
@ -102,17 +100,13 @@ class MediaPlayer extends React.PureComponent {
|
|||
if (this.props.onMediaLoaded) {
|
||||
this.props.onMediaLoaded();
|
||||
}
|
||||
|
||||
if (autoPlay) {
|
||||
this.setState({ paused: false });
|
||||
}
|
||||
};
|
||||
|
||||
onProgress = data => {
|
||||
const { savePosition, claim } = this.props;
|
||||
|
||||
this.setState({ buffering: false, currentTime: data.currentTime });
|
||||
if (claim && data.currentTime > 0 && Math.floor(data.currentTime) % positionSaveInterval === 0) {
|
||||
if (data.currentTime > 0 && Math.floor(data.currentTime) % positionSaveInterval === 0) {
|
||||
const { claim_id: claimId, txid, nout } = claim;
|
||||
savePosition(claimId, `${txid}:${nout}`, data.currentTime);
|
||||
}
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
import { connect } from 'react-redux';
|
||||
import {
|
||||
doClearRepostError,
|
||||
doFetchChannelListMine,
|
||||
doRepost,
|
||||
doToast,
|
||||
selectBalance,
|
||||
selectMyChannelClaims,
|
||||
selectRepostError,
|
||||
selectRepostLoading,
|
||||
} from 'lbry-redux';
|
||||
import ModalRepostView from './view';
|
||||
|
||||
const select = state => ({
|
||||
balance: selectBalance(state),
|
||||
channels: selectMyChannelClaims(state),
|
||||
reposting: selectRepostLoading(state),
|
||||
error: selectRepostError(state),
|
||||
});
|
||||
|
||||
const perform = dispatch => ({
|
||||
fetchChannelListMine: () => dispatch(doFetchChannelListMine(1, 99999, true)),
|
||||
notify: data => dispatch(doToast(data)),
|
||||
repost: options => dispatch(doRepost(options)),
|
||||
clearError: () => dispatch(doClearRepostError()),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(ModalRepostView);
|
|
@ -1,204 +0,0 @@
|
|||
import React from 'react';
|
||||
import { ActivityIndicator, Alert, Text, TextInput, TouchableOpacity, View } from 'react-native';
|
||||
import { formatCredits, creditsToString } from 'lbry-redux';
|
||||
import modalStyle from 'styles/modal';
|
||||
import modalRepostStyle from 'styles/modalRepost';
|
||||
import ChannelSelector from 'component/channelSelector';
|
||||
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';
|
||||
import { logPublish } from 'utils/helper';
|
||||
|
||||
export default class ModalRepostView extends React.PureComponent {
|
||||
depositAmountInput;
|
||||
|
||||
state = {
|
||||
channelName: null,
|
||||
creditsInputFocused: false,
|
||||
depositAmount: '0.01',
|
||||
repostName: null,
|
||||
repostStarted: false,
|
||||
showAdvanced: false,
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
const { claim, fetchChannelListMine } = this.props;
|
||||
const { name } = claim;
|
||||
fetchChannelListMine();
|
||||
this.setState({ repostName: name });
|
||||
this.checkChannelSelection(this.props);
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
this.checkChannelSelection(nextProps);
|
||||
const { notify } = this.props;
|
||||
const { reposting, error } = nextProps;
|
||||
if (this.state.repostStarted && !reposting && error) {
|
||||
this.setState({ repostStarted: false });
|
||||
notify({ message: error, isError: true });
|
||||
}
|
||||
}
|
||||
|
||||
checkChannelSelection = props => {
|
||||
const { channels = [] } = props;
|
||||
if (!this.state.channelName && channels && channels.length > 0) {
|
||||
const firstChannel = channels[0];
|
||||
this.setState({ channelName: firstChannel.name });
|
||||
}
|
||||
};
|
||||
|
||||
handleChannelChange = channelName => {
|
||||
const { channels = [] } = this.props;
|
||||
if (channels && channels.length > 0) {
|
||||
const filtered = channels.filter(c => c.name === channelName);
|
||||
if (filtered.length > 0) {
|
||||
const channel = filtered[0];
|
||||
this.setState({ channelName });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
handleRepost = () => {
|
||||
const { claim, balance, notify, repost, onRepostSuccessful, channels = [], clearError } = this.props;
|
||||
const { depositAmount, repostName, channelName } = this.state;
|
||||
|
||||
if (parseInt(depositAmount, 10) > balance) {
|
||||
notify({
|
||||
message: 'Insufficient credits',
|
||||
isError: true,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
clearError();
|
||||
const channel = channels.filter(ch => ch.name === channelName)[0];
|
||||
this.setState({ repostStarted: true }, () => {
|
||||
repost({
|
||||
name: repostName,
|
||||
bid: creditsToString(depositAmount),
|
||||
channel_id: channel.claim_id,
|
||||
claim_id: claim.claim_id,
|
||||
}).then(repostClaim => {
|
||||
logPublish(repostClaim);
|
||||
this.setState({ repostStarted: false });
|
||||
notify({ message: __('The content was successfully reposted!') });
|
||||
if (onRepostSuccessful) onRepostSuccessful();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { balance, channels, reposting, title, onCancelPress, onOverlayPress } = this.props;
|
||||
const canRepost = !!this.state.channelName && !!this.state.repostName;
|
||||
const channelsLoaded = channels && channels.length > 0;
|
||||
const processing = this.state.repostStarted || reposting || !channelsLoaded;
|
||||
|
||||
return (
|
||||
<TouchableOpacity style={modalStyle.overlay} activeOpacity={1} onPress={onOverlayPress}>
|
||||
<TouchableOpacity style={modalStyle.container} activeOpacity={1}>
|
||||
<View
|
||||
style={modalRepostStyle.container}
|
||||
onLayout={() => {
|
||||
if (this.tipAmountInput) {
|
||||
this.tipAmountInput.focus();
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Text style={modalRepostStyle.title} numberOfLines={1}>
|
||||
{__('Repost %title%', { title })}
|
||||
</Text>
|
||||
<Text style={modalRepostStyle.infoText}>
|
||||
{__('Repost your favorite content to help more people discover them!')}
|
||||
</Text>
|
||||
|
||||
<Text style={modalRepostStyle.label}>{__('Channel to post on')}</Text>
|
||||
<ChannelSelector
|
||||
showAnonymous={false}
|
||||
channelName={this.state.channelName}
|
||||
onChannelChange={this.handleChannelChange}
|
||||
/>
|
||||
|
||||
{this.state.showAdvanced && (
|
||||
<View>
|
||||
<Text style={modalRepostStyle.label}>{__('Name')}</Text>
|
||||
<View style={modalRepostStyle.nameRow}>
|
||||
<TextInput
|
||||
editable={false}
|
||||
value={this.state.channelName ? `lbry://${this.state.channelName}/` : ''}
|
||||
style={modalRepostStyle.input}
|
||||
/>
|
||||
<TextInput
|
||||
editable={canRepost}
|
||||
value={this.state.repostName}
|
||||
underlineColorAndroid={Colors.NextLbryGreen}
|
||||
selectTextOnFocus
|
||||
onChangeText={value => this.setState({ repostName: value })}
|
||||
style={modalRepostStyle.input}
|
||||
/>
|
||||
</View>
|
||||
|
||||
<Text style={modalRepostStyle.label}>{__('Deposit')}</Text>
|
||||
<View style={modalRepostStyle.row}>
|
||||
<View style={modalRepostStyle.amountRow}>
|
||||
<TextInput
|
||||
editable={!this.state.repostStarted}
|
||||
ref={ref => (this.depositAmountInput = 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.depositAmount}
|
||||
selectTextOnFocus
|
||||
style={modalRepostStyle.depositAmountInput}
|
||||
/>
|
||||
<Text style={modalRepostStyle.currency}>LBC</Text>
|
||||
<View style={modalRepostStyle.balance}>
|
||||
{this.state.creditsInputFocused && <Icon name="coins" size={12} />}
|
||||
{this.state.creditsInputFocused && (
|
||||
<Text style={modalRepostStyle.balanceText}>{formatCredits(parseFloat(balance), 1, true)}</Text>
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
)}
|
||||
|
||||
<View style={modalRepostStyle.buttonRow}>
|
||||
{!processing && (
|
||||
<Link
|
||||
style={modalRepostStyle.cancelLink}
|
||||
text={__('Cancel')}
|
||||
onPress={() => {
|
||||
if (onCancelPress) onCancelPress();
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
||||
{processing && <ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />}
|
||||
|
||||
<View style={modalRepostStyle.rightButtonRow}>
|
||||
<Link
|
||||
style={modalRepostStyle.advancedLink}
|
||||
text={this.state.showAdvanced ? __('Hide advanced') : __('Show advanced')}
|
||||
onPress={() => {
|
||||
this.setState({ showAdvanced: !this.state.showAdvanced });
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
text={__('Repost')}
|
||||
style={modalRepostStyle.button}
|
||||
disabled={!canRepost || this.state.repostStarted || reposting}
|
||||
onPress={this.handleRepost}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
</TouchableOpacity>
|
||||
);
|
||||
}
|
||||
}
|
|
@ -1,11 +1,9 @@
|
|||
import { connect } from 'react-redux';
|
||||
import { doSendTip, doToast, selectBalance } from 'lbry-redux';
|
||||
import { selectSdkReady } from 'redux/selectors/settings';
|
||||
import ModalTipView from './view';
|
||||
|
||||
const select = state => ({
|
||||
balance: selectBalance(state),
|
||||
sdkReady: selectSdkReady(state),
|
||||
});
|
||||
|
||||
const perform = dispatch => ({
|
||||
|
@ -14,4 +12,7 @@ const perform = dispatch => ({
|
|||
dispatch(doSendTip(amount, claimId, isSupport, successCallback, errorCallback)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(ModalTipView);
|
||||
export default connect(
|
||||
select,
|
||||
perform
|
||||
)(ModalTipView);
|
||||
|
|
|
@ -5,6 +5,7 @@ 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';
|
||||
|
||||
|
@ -18,22 +19,12 @@ export default class ModalTipView extends React.PureComponent {
|
|||
};
|
||||
|
||||
handleSendTip = () => {
|
||||
const { claim, balance, notify, onSendTipFailed, onSendTipSuccessful, sdkReady, sendTip } = this.props;
|
||||
const { claim, balance, notify, onSendTipFailed, onSendTipSuccessful, sendTip } = this.props;
|
||||
const { tipAmount } = this.state;
|
||||
|
||||
if (!sdkReady) {
|
||||
notify({
|
||||
message: __(
|
||||
'The background service is still initializing. You can still explore and watch content during the initialization process.',
|
||||
),
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (tipAmount > balance) {
|
||||
notify({
|
||||
message: 'Insufficient credits',
|
||||
isError: true,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
@ -65,13 +56,13 @@ export default class ModalTipView extends React.PureComponent {
|
|||
() => {
|
||||
// error
|
||||
if (onSendTipFailed) onSendTipFailed();
|
||||
},
|
||||
),
|
||||
}
|
||||
)
|
||||
);
|
||||
},
|
||||
},
|
||||
],
|
||||
{ cancelable: true },
|
||||
{ cancelable: true }
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -124,7 +115,7 @@ export default class ModalTipView extends React.PureComponent {
|
|||
<Text style={modalTipStyle.infoText}>
|
||||
{__(
|
||||
'This will appear as a tip for %content%, which will boost its ability to be discovered while active.',
|
||||
{ content: contentName },
|
||||
{ content: contentName }
|
||||
)}{' '}
|
||||
<Link
|
||||
style={modalTipStyle.learnMoreLink}
|
||||
|
|
|
@ -15,13 +15,7 @@ const RESULT_SIZE = 16;
|
|||
const select = (state, props) => ({
|
||||
claim: makeSelectClaimForUri(props.uri)(state),
|
||||
isSearching: selectIsSearching(state),
|
||||
recommendedContent: makeSelectResolvedRecommendedContentForUri(
|
||||
props.uri,
|
||||
RESULT_SIZE,
|
||||
props.claimId,
|
||||
props.claimName,
|
||||
props.title,
|
||||
)(state),
|
||||
recommendedContent: makeSelectResolvedRecommendedContentForUri(props.uri, RESULT_SIZE)(state),
|
||||
resolvingUris: selectResolvingUris(state),
|
||||
showNsfwContent: selectShowNsfw(state),
|
||||
});
|
||||
|
@ -32,4 +26,7 @@ const perform = dispatch => ({
|
|||
dispatch(doResolvedSearch(query, RESULT_SIZE, undefined, true, { related_to: claimId }, nsfw)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(RelatedContent);
|
||||
export default connect(
|
||||
select,
|
||||
perform,
|
||||
)(RelatedContent);
|
||||
|
|
|
@ -22,7 +22,7 @@ export default class RelatedContent extends React.PureComponent {
|
|||
}
|
||||
|
||||
render() {
|
||||
const { isSearching, recommendedContent, navigation, urlOpenHandler, uri, fullUri } = this.props;
|
||||
const { isSearching, recommendedContent, navigation, uri, fullUri } = this.props;
|
||||
|
||||
return (
|
||||
<View style={relatedContentStyle.container}>
|
||||
|
@ -33,7 +33,6 @@ export default class RelatedContent extends React.PureComponent {
|
|||
<ClaimResultItem
|
||||
style={fileListStyle.item}
|
||||
uri={result ? normalizeURI(`${result.name}#${result.claimId}`) : null}
|
||||
urlOpenHandler={urlOpenHandler}
|
||||
key={result.claimId}
|
||||
result={result}
|
||||
navigation={navigation}
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
// @flow
|
||||
import React from 'react';
|
||||
import { ActivityIndicator, Text, TouchableOpacity, View } from 'react-native';
|
||||
import { formatUsd } from 'utils/helper';
|
||||
import Colors from 'styles/colors';
|
||||
import Colors from '../../styles/colors';
|
||||
import Icon from 'react-native-vector-icons/FontAwesome5';
|
||||
import Link from 'component/link';
|
||||
import rewardStyle from 'styles/reward';
|
||||
import Link from '../link';
|
||||
import rewardStyle from '../../styles/reward';
|
||||
|
||||
type Props = {
|
||||
canClaim: boolean,
|
||||
|
@ -62,7 +61,7 @@ class RewardCard extends React.PureComponent<Props> {
|
|||
if (reward) {
|
||||
const claimed = !!reward.transaction_id;
|
||||
if (!claimed && reward.reward_range && reward.reward_range.includes('-')) {
|
||||
return reward.reward_range.split('-')[1];
|
||||
return reward.reward_range.split('-')[0] + '+'; // ex: 5+
|
||||
} else if (reward.reward_amount > 0) {
|
||||
return reward.reward_amount;
|
||||
}
|
||||
|
@ -73,7 +72,7 @@ class RewardCard extends React.PureComponent<Props> {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { canClaim, isPending, onClaimPress, reward, usdExchangeRate } = this.props;
|
||||
const { canClaim, isPending, onClaimPress, reward } = this.props;
|
||||
const claimed = !!reward.transaction_id;
|
||||
|
||||
return (
|
||||
|
@ -118,16 +117,8 @@ class RewardCard extends React.PureComponent<Props> {
|
|||
)}
|
||||
</View>
|
||||
<View style={rewardStyle.rightCol}>
|
||||
{reward.reward_range && reward.reward_range.indexOf('-') > -1 && (
|
||||
<Text style={rewardStyle.rightColHeader}>{__('up to')}</Text>
|
||||
)}
|
||||
<Text style={rewardStyle.rewardAmount}>{this.getDisplayAmount()}</Text>
|
||||
<Text style={rewardStyle.rewardCurrency}>LBC</Text>
|
||||
{usdExchangeRate > 0 && (
|
||||
<Text style={rewardStyle.rewardUsd}>
|
||||
≈{formatUsd(parseFloat(this.getDisplayAmount()) * parseFloat(usdExchangeRate))}
|
||||
</Text>
|
||||
)}
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
);
|
||||
|
|
|
@ -7,7 +7,6 @@ import Link from 'component/link';
|
|||
import Colors from 'styles/colors';
|
||||
import Icon from 'react-native-vector-icons/FontAwesome5';
|
||||
import rewardStyle from 'styles/reward';
|
||||
import { formatUsd } from '../../utils/helper';
|
||||
|
||||
class RewardEnrolment extends React.Component {
|
||||
componentDidMount() {
|
||||
|
@ -30,7 +29,7 @@ class RewardEnrolment extends React.Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { unclaimedRewardAmount, usdExchangeRate } = this.props;
|
||||
const { fetching, navigation, unclaimedRewardAmount, user } = this.props;
|
||||
|
||||
return (
|
||||
<View style={rewardStyle.enrollContainer}>
|
||||
|
@ -44,11 +43,9 @@ class RewardEnrolment extends React.Component {
|
|||
|
||||
<View style={rewardStyle.onboarding}>
|
||||
<Text style={rewardStyle.enrollDescText}>
|
||||
{__('LBRY credits allow you to publish or purchase content.')}
|
||||
{__('LBRY credits allow you to purchase content, publish content, and influence the network.')}
|
||||
{'\n\n'}
|
||||
{__('You can obtain free credits worth %amount% after you provide an email address.', {
|
||||
amount: formatUsd(parseFloat(unclaimedRewardAmount) * parseFloat(usdExchangeRate)),
|
||||
})}
|
||||
{__('You get credits for free for providing an email address and taking other basic actions.')}
|
||||
{'\n\n'}
|
||||
<Link style={rewardStyle.learnMoreLink} text={__('Learn more')} onPress={this.onLearnMorePressed} />.
|
||||
</Text>
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
import { connect } from 'react-redux';
|
||||
import SdkLoadingStatus from './view';
|
||||
|
||||
export default connect()(SdkLoadingStatus);
|
|
@ -1,15 +0,0 @@
|
|||
import { ActivityIndicator, Text, View } from 'react-native';
|
||||
import React from 'react';
|
||||
import discoverStyle from 'styles/discover';
|
||||
import Colors from 'styles/colors';
|
||||
|
||||
export default class SdkLoadingStatus extends React.PureComponent {
|
||||
render() {
|
||||
return (
|
||||
<View style={discoverStyle.sdkLoading}>
|
||||
<ActivityIndicator color={Colors.White} size={'small'} />
|
||||
<Text style={discoverStyle.sdkLoadingText}>{__('The LBRY background service is initializing...')}</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
|
@ -23,4 +23,7 @@ const perform = dispatch => ({
|
|||
unsubscribe: subscription => doChannelUnsubscribe(subscription),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(SuggestedSubscriptionItem);
|
||||
export default connect(
|
||||
select,
|
||||
perform,
|
||||
)(SuggestedSubscriptionItem);
|
||||
|
|
|
@ -16,4 +16,7 @@ const perform = dispatch => ({
|
|||
claimSearch: options => dispatch(doClaimSearch(options)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(SuggestedSubscriptions);
|
||||
export default connect(
|
||||
select,
|
||||
perform
|
||||
)(SuggestedSubscriptions);
|
||||
|
|
|
@ -24,4 +24,7 @@ const perform = dispatch => ({
|
|||
claimSearch: options => dispatch(doClaimSearch(options)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(SuggestedSubscriptionsGrid);
|
||||
export default connect(
|
||||
select,
|
||||
perform,
|
||||
)(SuggestedSubscriptionsGrid);
|
||||
|
|
|
@ -58,7 +58,7 @@ class SuggestedSubscriptionsGrid extends React.PureComponent {
|
|||
const uris = claimSearchByQuery[claimSearchKey];
|
||||
if (
|
||||
lastPageReached[claimSearchKey] ||
|
||||
(uris.length > 0 && uris.length < suggestedPageSize) || uris.length >= softLimit
|
||||
((uris.length > 0 && uris.length < suggestedPageSize) || uris.length >= softLimit)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ class SuggestedSubscriptionsGrid extends React.PureComponent {
|
|||
}
|
||||
|
||||
render() {
|
||||
const { claimSearchByQuery, inModal, navigation } = this.props;
|
||||
const { claimSearchByQuery, suggested, inModal, navigation } = this.props;
|
||||
const options = this.buildClaimSearchOptions();
|
||||
const claimSearchKey = createNormalizedClaimSearchKey(options);
|
||||
const claimSearchUris = claimSearchByQuery[claimSearchKey];
|
||||
|
@ -92,7 +92,7 @@ class SuggestedSubscriptionsGrid extends React.PureComponent {
|
|||
maxToRenderPerBatch={48}
|
||||
removeClippedSubviews
|
||||
itemDimension={120}
|
||||
spacing={1}
|
||||
spacing={2}
|
||||
items={claimSearchUris}
|
||||
style={inModal ? subscriptionsStyle.modalScrollContainer : subscriptionsStyle.scrollContainer}
|
||||
contentContainerStyle={
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
// @flow
|
||||
import React from 'react';
|
||||
import { SEARCH_TYPES, isNameValid, isURIValid, normalizeURI } from 'lbry-redux';
|
||||
import { Alert, Dimensions, FlatList, Keyboard, Text, TextInput, TouchableOpacity, View } from 'react-native';
|
||||
import { Dimensions, FlatList, Keyboard, Text, TextInput, TouchableOpacity, View } from 'react-native';
|
||||
import { navigateToUri, transformUrl } from 'utils/helper';
|
||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||
import UriBarItem from './internal/uri-bar-item';
|
||||
import Icon from 'react-native-vector-icons/FontAwesome5';
|
||||
import NavigationButton from 'component/navigationButton';
|
||||
import uriBarStyle from 'styles/uriBar';
|
||||
import { NavigationActions, StackActions } from 'react-navigation';
|
||||
|
||||
class UriBar extends React.PureComponent {
|
||||
static INPUT_TIMEOUT = 2500; // 2.5 seconds
|
||||
|
@ -184,33 +183,6 @@ class UriBar extends React.PureComponent {
|
|||
});
|
||||
};
|
||||
|
||||
handleNavigationButtonPress = () => {
|
||||
const { navigation } = this.props;
|
||||
if (!navigation.openDrawer) {
|
||||
Alert.alert(
|
||||
__('Stop watching?'),
|
||||
'The LBRY service is still loading stuff in the background. Would you like to continue?',
|
||||
[
|
||||
{ text: __('No') },
|
||||
{
|
||||
text: __('Yes'),
|
||||
onPress: () => {
|
||||
const resetAction = StackActions.reset({
|
||||
index: 0,
|
||||
actions: [
|
||||
NavigationActions.navigate({ routeName: 'Splash', params: { resetUrl: 'lbry://?subscriptions' } }),
|
||||
],
|
||||
});
|
||||
navigation.dispatch(resetAction);
|
||||
},
|
||||
},
|
||||
],
|
||||
);
|
||||
} else {
|
||||
navigation.openDrawer();
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const {
|
||||
allowEdit,
|
||||
|
@ -290,7 +262,7 @@ class UriBar extends React.PureComponent {
|
|||
size={24}
|
||||
style={uriBarStyle.drawerMenuButton}
|
||||
iconStyle={uriBarStyle.drawerHamburger}
|
||||
onPress={this.handleNavigationButtonPress}
|
||||
onPress={() => navigation.openDrawer()}
|
||||
/>
|
||||
)}
|
||||
{!selectionMode && (
|
||||
|
|
|
@ -6,4 +6,7 @@ const select = state => ({
|
|||
balance: selectBalance(state),
|
||||
});
|
||||
|
||||
export default connect(select, null)(WalletBalance);
|
||||
export default connect(
|
||||
select,
|
||||
null
|
||||
)(WalletBalance);
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
// @flow
|
||||
import React from 'react';
|
||||
import { Image, Text, View } from 'react-native';
|
||||
import { formatCredits } from 'lbry-redux';
|
||||
import { Lbryio } from 'lbryinc';
|
||||
import { formatUsd } from 'utils/helper';
|
||||
import { Lbry, formatCredits } from 'lbry-redux';
|
||||
import Address from 'component/address';
|
||||
import Button from 'component/button';
|
||||
import walletStyle from 'styles/wallet';
|
||||
|
||||
type Props = {
|
||||
|
@ -11,18 +11,6 @@ type Props = {
|
|||
};
|
||||
|
||||
class WalletBalance extends React.PureComponent<Props> {
|
||||
state = {
|
||||
usdExchangeRate: 0,
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
Lbryio.getExchangeRates().then(rates => {
|
||||
if (!isNaN(rates.LBC_USD)) {
|
||||
this.setState({ usdExchangeRate: rates.LBC_USD });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
const { balance } = this.props;
|
||||
return (
|
||||
|
@ -33,13 +21,6 @@ class WalletBalance extends React.PureComponent<Props> {
|
|||
<Text style={walletStyle.balance}>
|
||||
{(balance || balance === 0) && formatCredits(parseFloat(balance), 2) + ' LBC'}
|
||||
</Text>
|
||||
<Text style={walletStyle.usdBalance}>
|
||||
{this.state.usdExchangeRate > 0 && (
|
||||
<Text>
|
||||
≈{formatUsd(isNaN(balance) ? 0 : parseFloat(balance) * parseFloat(this.state.usdExchangeRate))}
|
||||
</Text>
|
||||
)}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
import { connect } from 'react-redux';
|
||||
import { selectClaimsBalance, selectSupportsBalance, selectTipsBalance } from 'lbry-redux';
|
||||
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
||||
import WalletBalanceExtra from './view';
|
||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||
|
||||
const select = state => ({
|
||||
claimsBalance: selectClaimsBalance(state) || 0,
|
||||
deviceWalletSynced: makeSelectClientSetting(Constants.SETTING_DEVICE_WALLET_SYNCED)(state),
|
||||
supportsBalance: selectSupportsBalance(state) || 0,
|
||||
tipsBalance: selectTipsBalance(state) || 0,
|
||||
});
|
||||
|
||||
export default connect(select, null)(WalletBalanceExtra);
|
||||
export default connect(
|
||||
select,
|
||||
null,
|
||||
)(WalletBalanceExtra);
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
// @flow
|
||||
import React from 'react';
|
||||
import { Text, View } from 'react-native';
|
||||
import { formatCredits } from 'lbry-redux';
|
||||
import { Lbryio } from 'lbryinc';
|
||||
import { formatUsd } from 'utils/helper';
|
||||
import { Image, Text, View } from 'react-native';
|
||||
import { Lbry, formatCredits } from 'lbry-redux';
|
||||
import Address from 'component/address';
|
||||
import Button from 'component/button';
|
||||
import Colors from 'styles/colors';
|
||||
import Icon from 'react-native-vector-icons/FontAwesome5';
|
||||
import Link from 'component/link';
|
||||
import walletStyle from 'styles/wallet';
|
||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||
|
||||
type Props = {
|
||||
claimsBalance: number,
|
||||
|
@ -17,95 +15,36 @@ type Props = {
|
|||
};
|
||||
|
||||
class WalletBalanceExtra extends React.PureComponent<Props> {
|
||||
state = {
|
||||
usdExchangeRate: 0,
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
Lbryio.getExchangeRates().then(rates => {
|
||||
if (!isNaN(rates.LBC_USD)) {
|
||||
this.setState({ usdExchangeRate: rates.LBC_USD });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
const { claimsBalance, deviceWalletSynced, navigation, supportsBalance, tipsBalance } = this.props;
|
||||
const { claimsBalance, supportsBalance, tipsBalance } = this.props;
|
||||
|
||||
return (
|
||||
<View style={walletStyle.balanceExtra}>
|
||||
<View style={walletStyle.usdInfoCard}>
|
||||
<Text style={walletStyle.usdInfoText}>
|
||||
You can convert your credits to USD and withdraw the converted amount using an exchange.{' '}
|
||||
<Link
|
||||
style={walletStyle.usdConvertFaqLink}
|
||||
href={'https://lbry.com/faq/exchanges'}
|
||||
text={__('Learn more')}
|
||||
/>
|
||||
.
|
||||
</Text>
|
||||
<Link
|
||||
style={walletStyle.usdConvertLink}
|
||||
href={'https://bittrex.com/Account/Register?referralCode=4M1-P30-BON'}
|
||||
text={__('Convert credits to USD on Bittrex')}
|
||||
/>
|
||||
</View>
|
||||
|
||||
<View style={walletStyle.balanceExtraCard}>
|
||||
<View style={walletStyle.walletExtraRow}>
|
||||
<View style={walletStyle.walletExtraCol}>
|
||||
<Icon style={walletStyle.walletExtraIcon} color={Colors.LbryGreen} name={'gift'} size={16} />
|
||||
<Text style={walletStyle.walletExtraCaption}>{__('You also have')}</Text>
|
||||
<View style={walletStyle.balanceRow}>
|
||||
<Text style={walletStyle.walletExtraBalance}>{formatCredits(parseFloat(tipsBalance), 2)}</Text>
|
||||
<Text style={walletStyle.walletExtraCurrency}>LBC</Text>
|
||||
</View>
|
||||
<Text style={walletStyle.usdWalletExtraBalance}>
|
||||
≈{formatUsd(parseFloat(tipsBalance) * parseFloat(this.state.usdExchangeRate))}
|
||||
</Text>
|
||||
<Text style={walletStyle.text}>{__('in tips')}</Text>
|
||||
|
||||
<Link
|
||||
style={walletStyle.earnTipsLink}
|
||||
onPress={() => {
|
||||
navigation.navigate({ routeName: Constants.DRAWER_ROUTE_PUBLISH });
|
||||
}}
|
||||
text={__('Earn more tips by uploading cool videos')}
|
||||
/>
|
||||
</View>
|
||||
|
||||
<View style={walletStyle.walletExtraCol}>
|
||||
<Icon style={walletStyle.walletExtraIcon} color={Colors.LbryGreen} name={'lock'} size={16} />
|
||||
<Text style={walletStyle.walletExtraCaption}>{__('You staked')}</Text>
|
||||
<View style={walletStyle.balanceRow}>
|
||||
<Text style={walletStyle.walletExtraBalance}>{formatCredits(parseFloat(claimsBalance), 2)}</Text>
|
||||
<Text style={walletStyle.walletExtraCurrency}>LBC</Text>
|
||||
</View>
|
||||
<Text style={walletStyle.text}>{__('in your publishes')}</Text>
|
||||
<View style={[walletStyle.balanceRow, walletStyle.walletExtraTopMargin]}>
|
||||
<Text style={walletStyle.walletExtraBalance}>{formatCredits(parseFloat(supportsBalance), 2)}</Text>
|
||||
<Text style={walletStyle.walletExtraCurrency}>LBC</Text>
|
||||
</View>
|
||||
<Text style={walletStyle.text}>{__('in your supports')}</Text>
|
||||
<View style={walletStyle.balanceExtraCard}>
|
||||
<View style={walletStyle.walletExtraRow}>
|
||||
<View style={walletStyle.walletExtraCol}>
|
||||
<Icon style={walletStyle.walletExtraIcon} color={Colors.LbryGreen} name={'gift'} size={16} />
|
||||
<Text style={walletStyle.walletExtraCaption}>{__('You also have')}</Text>
|
||||
<View style={walletStyle.balanceRow}>
|
||||
<Text style={walletStyle.walletExtraBalance}>{formatCredits(parseFloat(tipsBalance), 2)}</Text>
|
||||
<Text style={walletStyle.walletExtraCurrency}>LBC</Text>
|
||||
</View>
|
||||
<Text style={walletStyle.text}>{__('in tips')}</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<View style={walletStyle.syncDriverCustody}>
|
||||
<Text style={walletStyle.syncInfoText}>
|
||||
{deviceWalletSynced
|
||||
? __('A backup of your wallet is synced with lbry.tv')
|
||||
: __('Your wallet is not currently synced with lbry.tv. You are responsible for backing up your wallet.')}
|
||||
</Text>
|
||||
<Link
|
||||
text={__('What does this mean?')}
|
||||
href={
|
||||
deviceWalletSynced
|
||||
? 'https://lbry.com/faq/account-sync'
|
||||
: 'https://lbry.com/faq/how-to-backup-wallet#android'
|
||||
}
|
||||
style={walletStyle.syncInfoLink}
|
||||
/>
|
||||
<View style={walletStyle.walletExtraCol}>
|
||||
<Icon style={walletStyle.walletExtraIcon} color={Colors.LbryGreen} name={'lock'} size={16} />
|
||||
<Text style={walletStyle.walletExtraCaption}>{__('You staked')}</Text>
|
||||
<View style={walletStyle.balanceRow}>
|
||||
<Text style={walletStyle.walletExtraBalance}>{formatCredits(parseFloat(claimsBalance), 2)}</Text>
|
||||
<Text style={walletStyle.walletExtraCurrency}>LBC</Text>
|
||||
</View>
|
||||
<Text style={walletStyle.text}>{__('in your publishes')}</Text>
|
||||
<View style={[walletStyle.balanceRow, walletStyle.walletExtraTopMargin]}>
|
||||
<Text style={walletStyle.walletExtraBalance}>{formatCredits(parseFloat(supportsBalance), 2)}</Text>
|
||||
<Text style={walletStyle.walletExtraCurrency}>LBC</Text>
|
||||
</View>
|
||||
<Text style={walletStyle.text}>{__('in your supports')}</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
|
|
|
@ -27,7 +27,7 @@ class WalletSyncDriver extends React.PureComponent<Props> {
|
|||
},
|
||||
},
|
||||
],
|
||||
{ cancelable: true },
|
||||
{ cancelable: true }
|
||||
);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -44,10 +44,6 @@ const Constants = {
|
|||
SETTING_BACKUP_DISMISSED: 'backupDismissed',
|
||||
SETTING_REWARDS_NOT_INTERESTED: 'rewardsNotInterested',
|
||||
SETTING_DEVICE_WALLET_SYNCED: 'deviceWalletSynced',
|
||||
SETTING_DHT_ENABLED: 'dhtEnabled',
|
||||
SETTING_NEW_ANDROID_REWARD_CLAIMED: 'newAndroidRewardClaimed',
|
||||
|
||||
ACTION_SDK_READY: 'SDK_READY',
|
||||
|
||||
ACTION_DELETE_COMPLETED_BLOBS: 'DELETE_COMPLETED_BLOBS',
|
||||
ACTION_FIRST_RUN_PAGE_CHANGED: 'FIRST_RUN_PAGE_CHANGED',
|
||||
|
@ -97,7 +93,6 @@ const Constants = {
|
|||
DRAWER_ROUTE_CHANNEL_CREATOR: 'ChannelCreator',
|
||||
DRAWER_ROUTE_CHANNEL_CREATOR_FORM: 'ChannnelCreatorForm',
|
||||
DRAWER_ROUTE_INVITES: 'Invites',
|
||||
DRAWER_ROUTE_LITE_FILE: 'LiteFile',
|
||||
|
||||
FULL_ROUTE_NAME_DISCOVER: 'DiscoverStack',
|
||||
FULL_ROUTE_NAME_WALLET: 'WalletStack',
|
||||
|
@ -150,7 +145,7 @@ const Constants = {
|
|||
|
||||
TRUE_STRING: 'true',
|
||||
|
||||
MINIMUM_TRANSACTION_BALANCE: 0.01,
|
||||
MINIMUM_TRANSACTION_BALANCE: 0.1,
|
||||
|
||||
SHARE_BASE_URL: 'https://open.lbry.com',
|
||||
};
|
||||
|
|
|
@ -55,10 +55,6 @@ import settingsReducer from 'redux/reducers/settings';
|
|||
import thunk from 'redux-thunk';
|
||||
|
||||
window.__ = __;
|
||||
if (!NativeModules.UtilityModule.dhtEnabled) {
|
||||
Lbry.alternateConnectionString = 'https://api.lbry.tv/api/v1/proxy';
|
||||
Lbry.methodsUsingAlternateConnectionString = ['claim_search', 'resolve'];
|
||||
}
|
||||
|
||||
const globalExceptionHandler = (error, isFatal) => {
|
||||
if (error && NativeModules.Firebase) {
|
||||
|
|
|
@ -10,7 +10,6 @@ import aboutStyle from 'styles/about';
|
|||
class AboutPage extends React.PureComponent {
|
||||
state = {
|
||||
appVersion: null,
|
||||
firebaseToken: null,
|
||||
lbryId: null,
|
||||
versionInfo: null,
|
||||
};
|
||||
|
@ -46,12 +45,11 @@ class AboutPage extends React.PureComponent {
|
|||
setPlayerVisible();
|
||||
|
||||
NativeModules.Firebase.setCurrentScreen('About').then(result => {
|
||||
NativeModules.VersionInfo.getAppVersion().then(version => {
|
||||
this.setState({ appVersion: version });
|
||||
});
|
||||
NativeModules.Firebase.getMessagingToken().then(firebaseToken => {
|
||||
this.setState({ firebaseToken });
|
||||
});
|
||||
if (NativeModules.VersionInfo) {
|
||||
NativeModules.VersionInfo.getAppVersion().then(version => {
|
||||
this.setState({ appVersion: version });
|
||||
});
|
||||
}
|
||||
Lbry.version().then(info => {
|
||||
this.setState({
|
||||
versionInfo: info,
|
||||
|
@ -79,7 +77,7 @@ class AboutPage extends React.PureComponent {
|
|||
<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.',
|
||||
'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.'
|
||||
)}
|
||||
</Text>
|
||||
<View style={aboutStyle.links}>
|
||||
|
@ -90,7 +88,7 @@ class AboutPage extends React.PureComponent {
|
|||
<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.',
|
||||
'You can interact with the LBRY team and members of the community on Discord, Facebook, Instagram, Twitter or Reddit.'
|
||||
)}
|
||||
</Text>
|
||||
<View style={aboutStyle.links}>
|
||||
|
@ -166,15 +164,6 @@ class AboutPage extends React.PureComponent {
|
|||
</View>
|
||||
</View>
|
||||
|
||||
<View style={aboutStyle.row}>
|
||||
<View style={aboutStyle.col}>
|
||||
<Text style={aboutStyle.text}>{__('Firebase Token')}</Text>
|
||||
<Text selectable style={aboutStyle.lineValueText}>
|
||||
{this.state.firebaseToken ? this.state.firebaseToken : loading}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<View style={aboutStyle.row}>
|
||||
<View style={aboutStyle.col}>
|
||||
<Text style={aboutStyle.text}>{__('Logs')}</Text>
|
||||
|
|
|
@ -22,7 +22,6 @@ import {
|
|||
import { doUpdateChannelFormState, doClearChannelFormState } from 'redux/actions/form';
|
||||
import { selectDrawerStack } from 'redux/selectors/drawer';
|
||||
import { selectChannelFormState, selectHasChannelFormState } from 'redux/selectors/form';
|
||||
import { selectSdkReady } from 'redux/selectors/settings';
|
||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||
import ChannelCreator from './view';
|
||||
|
||||
|
@ -34,7 +33,6 @@ const select = state => ({
|
|||
fetchingChannels: selectFetchingMyChannels(state),
|
||||
balance: selectBalance(state),
|
||||
hasFormState: selectHasChannelFormState(state),
|
||||
sdkReady: selectSdkReady(state),
|
||||
updatingChannel: selectUpdatingChannel(state),
|
||||
updateChannelError: selectUpdateChannelError(state),
|
||||
});
|
||||
|
@ -54,4 +52,7 @@ const perform = dispatch => ({
|
|||
setExplicitNavigateBack: flag => dispatch(doSetExplicitNavigateBack(flag)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(ChannelCreator);
|
||||
export default connect(
|
||||
select,
|
||||
perform,
|
||||
)(ChannelCreator);
|
||||
|
|
|
@ -47,7 +47,7 @@ export default class ChannelCreator extends React.PureComponent {
|
|||
channelNameUserEdited: false,
|
||||
newChannelTitle: '',
|
||||
newChannelName: '',
|
||||
newChannelBid: 0.01,
|
||||
newChannelBid: 0.1,
|
||||
addingChannel: false,
|
||||
creatingChannel: false,
|
||||
editChannelUrl: null,
|
||||
|
@ -176,7 +176,9 @@ export default class ChannelCreator extends React.PureComponent {
|
|||
NativeModules.Firebase.setCurrentScreen('Channels').then(result => {
|
||||
pushDrawerStack(Constants.DRAWER_ROUTE_CHANNEL_CREATOR, navigation.state.params ? navigation.state.params : null);
|
||||
setPlayerVisible();
|
||||
fetchChannelListMine();
|
||||
if (!fetchingChannels) {
|
||||
fetchChannelListMine();
|
||||
}
|
||||
|
||||
DeviceEventEmitter.addListener('onDocumentPickerFilePicked', this.onFilePicked);
|
||||
DeviceEventEmitter.addListener('onDocumentPickerCanceled', this.onPickerCanceled);
|
||||
|
@ -280,7 +282,7 @@ export default class ChannelCreator extends React.PureComponent {
|
|||
handleCreateCancel = () => {
|
||||
const { clearChannelFormState } = this.props;
|
||||
clearChannelFormState(); // explicitly clear state on cancel?
|
||||
this.setState({ showCreateChannel: false, newChannelName: '', newChannelBid: 0.01 });
|
||||
this.setState({ showCreateChannel: false, newChannelName: '', newChannelBid: 0.1 });
|
||||
};
|
||||
|
||||
handlePickerValueChange = (itemValue, itemIndex) => {
|
||||
|
@ -589,7 +591,7 @@ export default class ChannelCreator extends React.PureComponent {
|
|||
channelNameUserEdited: false,
|
||||
newChannelTitle: '',
|
||||
newChannelName: '',
|
||||
newChannelBid: 0.01,
|
||||
newChannelBid: 0.1,
|
||||
addingChannel: false,
|
||||
creatingChannel: false,
|
||||
newChannelNameError: '',
|
||||
|
@ -800,15 +802,7 @@ export default class ChannelCreator extends React.PureComponent {
|
|||
};
|
||||
|
||||
render() {
|
||||
const {
|
||||
abandoningClaimIds,
|
||||
balance,
|
||||
fetchingChannels,
|
||||
sdkReady,
|
||||
updatingChannel,
|
||||
channels = [],
|
||||
navigation,
|
||||
} = this.props;
|
||||
const { abandoningClaimIds, balance, fetchingChannels, updatingChannel, channels = [], navigation } = this.props;
|
||||
const {
|
||||
autoStyle,
|
||||
autoStyles,
|
||||
|
@ -832,19 +826,6 @@ export default class ChannelCreator extends React.PureComponent {
|
|||
|
||||
const hasChannels = channels && channels.length > 0;
|
||||
|
||||
if (!sdkReady) {
|
||||
return (
|
||||
<View style={channelCreatorStyle.container}>
|
||||
<UriBar navigation={navigation} />
|
||||
<EmptyStateView
|
||||
message={__(
|
||||
'The background service is still initializing. You can still explore and watch content during the initialization process.',
|
||||
)}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<View style={channelCreatorStyle.container}>
|
||||
<UriBar
|
||||
|
|
|
@ -13,7 +13,7 @@ import {
|
|||
} from 'lbryinc';
|
||||
import { doPushDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
|
||||
import { doSetClientSetting, doSetSortByItem, doSetTimeItem } from 'redux/actions/settings';
|
||||
import { makeSelectClientSetting, selectSdkReady, selectSortByItem, selectTimeItem } from 'redux/selectors/settings';
|
||||
import { makeSelectClientSetting, selectSortByItem, selectTimeItem } from 'redux/selectors/settings';
|
||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||
import DiscoverPage from './view';
|
||||
|
||||
|
@ -27,7 +27,6 @@ const select = state => ({
|
|||
followedTags: selectFollowedTags(state),
|
||||
ratingReminderDisabled: makeSelectClientSetting(Constants.SETTING_RATING_REMINDER_DISABLED)(state),
|
||||
ratingReminderLastShown: makeSelectClientSetting(Constants.SETTING_RATING_REMINDER_LAST_SHOWN)(state),
|
||||
sdkReady: selectSdkReady(state),
|
||||
sortByItem: selectSortByItem(state),
|
||||
timeItem: selectTimeItem(state),
|
||||
unreadSubscriptions: selectUnreadSubscriptions(state),
|
||||
|
@ -47,4 +46,7 @@ const perform = dispatch => ({
|
|||
setTimeItem: item => dispatch(doSetTimeItem(item)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(DiscoverPage);
|
||||
export default connect(
|
||||
select,
|
||||
perform,
|
||||
)(DiscoverPage);
|
||||
|
|
|
@ -23,7 +23,6 @@ import Icon from 'react-native-vector-icons/FontAwesome5';
|
|||
import Link from 'component/link';
|
||||
import ModalTagSelector from 'component/modalTagSelector';
|
||||
import ModalPicker from 'component/modalPicker';
|
||||
import SdkLoadingStatus from 'component/sdkLoadingStatus';
|
||||
import UriBar from 'component/uriBar';
|
||||
import _ from 'lodash';
|
||||
|
||||
|
@ -269,8 +268,8 @@ class DiscoverPage extends React.PureComponent {
|
|||
);
|
||||
|
||||
render() {
|
||||
const { currentRoute, navigation, sdkReady, sortByItem, timeItem } = this.props;
|
||||
const { showModalTagSelector, showSortPicker, showTimePicker } = this.state;
|
||||
const { currentRoute, navigation, sortByItem, timeItem } = this.props;
|
||||
const { orderBy, showModalTagSelector, showSortPicker, showTimePicker } = this.state;
|
||||
|
||||
return (
|
||||
<View style={discoverStyle.container}>
|
||||
|
@ -290,7 +289,7 @@ class DiscoverPage extends React.PureComponent {
|
|||
keyExtractor={(item, index) => item}
|
||||
/>
|
||||
)}
|
||||
{sdkReady && !showModalTagSelector && !showSortPicker && !showTimePicker && (
|
||||
{!showModalTagSelector && !showSortPicker && !showTimePicker && (
|
||||
<FloatingWalletBalance navigation={navigation} />
|
||||
)}
|
||||
{showModalTagSelector && (
|
||||
|
@ -317,8 +316,6 @@ class DiscoverPage extends React.PureComponent {
|
|||
items={Constants.CLAIM_SEARCH_TIME_ITEMS}
|
||||
/>
|
||||
)}
|
||||
|
||||
{!sdkReady && <SdkLoadingStatus />}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -11,17 +11,15 @@ import {
|
|||
import { doPushDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
|
||||
import { doDeleteFile } from 'redux/actions/file';
|
||||
import { selectCurrentRoute } from 'redux/selectors/drawer';
|
||||
import { selectSdkReady } from 'redux/selectors/settings';
|
||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||
import DownloadsPage from './view';
|
||||
|
||||
const select = state => ({
|
||||
claims: selectMyClaimsWithoutChannels(state),
|
||||
currentRoute: selectCurrentRoute(state),
|
||||
downloadedUris: selectDownloadedUris(state),
|
||||
fileInfos: selectFileInfosDownloaded(state),
|
||||
downloadedUris: selectDownloadedUris(state),
|
||||
fetching: selectIsFetchingFileList(state) || selectIsFetchingClaimListMine(state),
|
||||
sdkReady: selectSdkReady(state),
|
||||
});
|
||||
|
||||
const perform = dispatch => ({
|
||||
|
@ -34,4 +32,7 @@ const perform = dispatch => ({
|
|||
setPlayerVisible: () => dispatch(doSetPlayerVisible(false)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(DownloadsPage);
|
||||
export default connect(
|
||||
select,
|
||||
perform
|
||||
)(DownloadsPage);
|
||||
|
|
|
@ -144,24 +144,11 @@ class DownloadsPage extends React.PureComponent {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { downloadedUris, fetching, navigation, sdkReady } = this.props;
|
||||
const { fetching, claims, downloadedUris, fileInfos, navigation } = this.props;
|
||||
const { selectionMode, selectedUris } = this.state;
|
||||
const filteredUris = this.getFilteredUris();
|
||||
const hasDownloads = filteredUris && filteredUris.length > 0;
|
||||
|
||||
if (!sdkReady) {
|
||||
return (
|
||||
<View style={downloadsStyle.container}>
|
||||
<UriBar navigation={navigation} />
|
||||
<EmptyStateView
|
||||
message={__(
|
||||
'The background service is still initializing. You can still explore and watch content during the initialization process.',
|
||||
)}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<View style={downloadsStyle.container}>
|
||||
<UriBar
|
||||
|
|
|
@ -41,7 +41,6 @@ import { doDeleteFile, doStopDownloadingFile } from 'redux/actions/file';
|
|||
import { doPushDrawerStack, doPopDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
|
||||
import { doToggleFullscreenMode } from 'redux/actions/settings';
|
||||
import { selectDrawerStack, makeSelectPlayerVisible } from 'redux/selectors/drawer';
|
||||
import { selectSdkReady } from 'redux/selectors/settings';
|
||||
import FilePage from './view';
|
||||
|
||||
const select = (state, props) => {
|
||||
|
@ -67,7 +66,6 @@ const select = (state, props) => {
|
|||
failedPurchaseUris: selectFailedPurchaseUris(state),
|
||||
myClaimUris: selectMyClaimUrisWithoutChannels(state),
|
||||
purchaseUriErrorMessage: selectPurchaseUriErrorMessage(state),
|
||||
sdkReady: selectSdkReady(state),
|
||||
streamingUrl: makeSelectStreamingUrlForUri(contentUri)(state),
|
||||
thumbnail: makeSelectThumbnailForUri(contentUri)(state),
|
||||
title: makeSelectTitleForUri(contentUri)(state),
|
||||
|
@ -101,4 +99,7 @@ const perform = dispatch => ({
|
|||
toggleFullscreenMode: mode => dispatch(doToggleFullscreenMode(mode)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(FilePage);
|
||||
export default connect(
|
||||
select,
|
||||
perform,
|
||||
)(FilePage);
|
||||
|
|
|
@ -37,13 +37,13 @@ import FilePrice from 'component/filePrice';
|
|||
import FloatingWalletBalance from 'component/floatingWalletBalance';
|
||||
import Link from 'component/link';
|
||||
import MediaPlayer from 'component/mediaPlayer';
|
||||
import ModalRepostView from 'component/modalRepostView';
|
||||
import ModalTipView from 'component/modalTipView';
|
||||
import ProgressCircle from 'react-native-progress-circle';
|
||||
import RelatedContent from 'component/relatedContent';
|
||||
import SubscribeButton from 'component/subscribeButton';
|
||||
import SubscribeNotificationButton from 'component/subscribeNotificationButton';
|
||||
import UriBar from 'component/uriBar';
|
||||
import Video from 'react-native-video';
|
||||
import FileRewardsDriver from 'component/fileRewardsDriver';
|
||||
import filePageStyle from 'styles/filePage';
|
||||
import uriBarStyle from 'styles/uriBar';
|
||||
|
@ -73,7 +73,7 @@ class FilePage extends React.PureComponent {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
autoGetAttempted: false,
|
||||
attemptAutoGet: false,
|
||||
autoOpened: false,
|
||||
autoDownloadStarted: false,
|
||||
autoPlayMedia: false,
|
||||
|
@ -95,7 +95,6 @@ class FilePage extends React.PureComponent {
|
|||
showImageViewer: false,
|
||||
showWebView: false,
|
||||
showTipView: false,
|
||||
showRepostView: false,
|
||||
playbackStarted: false,
|
||||
playerBgHeight: 0,
|
||||
playerHeight: 0,
|
||||
|
@ -267,7 +266,6 @@ class FilePage extends React.PureComponent {
|
|||
'playerBgHeighht',
|
||||
'playerHeight',
|
||||
'relatedY',
|
||||
'showRepostView',
|
||||
'showTipView',
|
||||
'showImageViewer',
|
||||
'showWebView',
|
||||
|
@ -299,17 +297,7 @@ class FilePage extends React.PureComponent {
|
|||
}
|
||||
|
||||
componentDidUpdate(prevProps, prevState) {
|
||||
const {
|
||||
claim,
|
||||
contentType,
|
||||
costInfo,
|
||||
fileInfo,
|
||||
isResolvingUri,
|
||||
resolveUri,
|
||||
sdkReady,
|
||||
navigation,
|
||||
title,
|
||||
} = this.props;
|
||||
const { claim, contentType, costInfo, fileInfo, isResolvingUri, resolveUri, navigation, title } = this.props;
|
||||
const { uri } = this.state;
|
||||
if (!isResolvingUri && claim === undefined && uri) {
|
||||
resolveUri(uri);
|
||||
|
@ -335,12 +323,10 @@ class FilePage extends React.PureComponent {
|
|||
const isPlayable = mediaType === 'video' || mediaType === 'audio';
|
||||
const isViewable = mediaType === 'image' || mediaType === 'text';
|
||||
if (claim && costInfo && costInfo.cost === 0 && !this.state.autoGetAttempted && isViewable) {
|
||||
this.setState({ autoGetAttempted: true }, () => {
|
||||
this.checkStoragePermissionForDownload();
|
||||
});
|
||||
this.setState({ autoGetAttempted: true }, () => this.checkStoragePermissionForDownload());
|
||||
}
|
||||
|
||||
if (((costInfo && costInfo.cost > 0) || !isPlayable) && !fileInfo && !isViewable && !this.state.showRecommended) {
|
||||
if (((costInfo && costInfo.cost > 0) || !isPlayable) && (!fileInfo && !isViewable) && !this.state.showRecommended) {
|
||||
this.setState({ showRecommended: true });
|
||||
}
|
||||
|
||||
|
@ -720,7 +706,7 @@ class FilePage extends React.PureComponent {
|
|||
};
|
||||
|
||||
confirmPurchaseUri = (uri, costInfo, download) => {
|
||||
const { notify, purchaseUri, sdkReady, title } = this.props;
|
||||
const { notify, purchaseUri, title } = this.props;
|
||||
if (!costInfo) {
|
||||
notify({ message: __('This content cannot be viewed at this time. Please try again in a bit.'), isError: true });
|
||||
this.setState({ downloadPressed: false });
|
||||
|
@ -729,11 +715,6 @@ class FilePage extends React.PureComponent {
|
|||
}
|
||||
|
||||
const { cost } = costInfo;
|
||||
if (!NativeModules.UtilityModule.dhtEnabled && !sdkReady && parseFloat(cost) === 0) {
|
||||
this.attemptLbryTvPlayback();
|
||||
return;
|
||||
}
|
||||
|
||||
if (costInfo.cost > 0) {
|
||||
Alert.alert(
|
||||
__('Confirm Purchase'),
|
||||
|
@ -761,40 +742,22 @@ class FilePage extends React.PureComponent {
|
|||
}
|
||||
};
|
||||
|
||||
getStreamUrlForClaim = claim => {
|
||||
const { name, claim_id: claimId } = claim;
|
||||
return `https://player.lbry.tv/content/claims/${name}/${claimId}/stream`;
|
||||
};
|
||||
|
||||
attemptLbryTvPlayback = () => {
|
||||
const { claim } = this.props;
|
||||
if (claim) {
|
||||
this.setState({ streamingMode: true, currentStreamUrl: this.getStreamUrlForClaim(claim) });
|
||||
}
|
||||
};
|
||||
|
||||
onFileDownloadButtonPressed = () => {
|
||||
this.startTime = Date.now();
|
||||
const { claim, costInfo, contentType, notify, sdkReady, setPlayerVisible } = this.props;
|
||||
const { claim, costInfo, contentType, setPlayerVisible } = this.props;
|
||||
const mediaType = Lbry.getMediaType(contentType);
|
||||
const isPlayable = mediaType === 'video' || mediaType === 'audio';
|
||||
const isViewable = mediaType === 'image' || mediaType === 'text';
|
||||
|
||||
const purchaseUrl = this.getPurchaseUrl();
|
||||
NativeModules.Firebase.track('purchase_uri', { uri: purchaseUrl });
|
||||
|
||||
if (!isPlayable) {
|
||||
if (!sdkReady) {
|
||||
notify({
|
||||
message: __('The LBRY background service is still initializing. Please wait a few moments and try again.'),
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.onDownloadPressed();
|
||||
} else {
|
||||
this.confirmPurchaseUri(purchaseUrl, costInfo, !isPlayable);
|
||||
}
|
||||
|
||||
NativeModules.Firebase.track('purchase_uri', { uri: purchaseUrl });
|
||||
|
||||
if (isPlayable) {
|
||||
this.setState({ downloadPressed: true, autoPlayMedia: true, stopDownloadConfirmed: false });
|
||||
}
|
||||
|
@ -820,16 +783,7 @@ class FilePage extends React.PureComponent {
|
|||
};
|
||||
|
||||
onDownloadPressed = () => {
|
||||
const { claim, notify, sdkReady, title } = this.props;
|
||||
if (!sdkReady) {
|
||||
notify({
|
||||
message: __(
|
||||
'The background service is still initializing. You can still explore and watch content during the initialization process.',
|
||||
),
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const { claim, title } = this.props;
|
||||
const fileSize = claim && claim.value && claim.value.source ? claim.value.source.size : 0;
|
||||
Alert.alert(
|
||||
__('Download file'),
|
||||
|
@ -1029,6 +983,7 @@ class FilePage extends React.PureComponent {
|
|||
myClaimUris,
|
||||
navigation,
|
||||
position,
|
||||
purchaseUri,
|
||||
pushDrawerStack,
|
||||
setPlayerVisible,
|
||||
thumbnail,
|
||||
|
@ -1138,8 +1093,7 @@ class FilePage extends React.PureComponent {
|
|||
const channelName = signingChannel && signingChannel.name;
|
||||
const channelClaimId = claim && claim.signing_channel && claim.signing_channel.claim_id;
|
||||
const fullUri = `${claim.name}#${claim.claim_id}`;
|
||||
const canEdit =
|
||||
myClaimUris.includes(normalizeURI(fullUri)) || myClaimUris.includes(normalizeURI(claim.canonical_url));
|
||||
const canEdit = myClaimUris.includes(normalizeURI(fullUri));
|
||||
const showActions =
|
||||
(canEdit || (fileInfo && fileInfo.download_path)) &&
|
||||
!this.state.fullscreenMode &&
|
||||
|
@ -1223,7 +1177,7 @@ class FilePage extends React.PureComponent {
|
|||
style={filePageStyle.mediaContainer}
|
||||
onPress={this.onFileDownloadButtonPressed}
|
||||
>
|
||||
{(canOpen || !fileInfo || (isPlayable && !canLoadMedia) || (!canOpen && fileInfo)) && (
|
||||
{(canOpen || (!fileInfo || (isPlayable && !canLoadMedia)) || (!canOpen && fileInfo)) && (
|
||||
<FileItemMedia
|
||||
duration={duration}
|
||||
style={filePageStyle.thumbnail}
|
||||
|
@ -1360,14 +1314,6 @@ class FilePage extends React.PureComponent {
|
|||
<Text style={filePageStyle.largeButtonText}>{__('Share')}</Text>
|
||||
</TouchableOpacity>
|
||||
|
||||
<TouchableOpacity
|
||||
style={filePageStyle.largeButton}
|
||||
onPress={() => this.setState({ showRepostView: true })}
|
||||
>
|
||||
<Icon name={'retweet'} size={16} style={filePageStyle.largeButtonIcon} />
|
||||
<Text style={filePageStyle.largeButtonText}>{__('Repost')}</Text>
|
||||
</TouchableOpacity>
|
||||
|
||||
<TouchableOpacity
|
||||
style={filePageStyle.largeButton}
|
||||
onPress={() => this.setState({ showTipView: true })}
|
||||
|
@ -1542,17 +1488,7 @@ class FilePage extends React.PureComponent {
|
|||
onSendTipSuccessful={() => this.setState({ showTipView: false })}
|
||||
/>
|
||||
)}
|
||||
{this.state.showRepostView && (
|
||||
<ModalRepostView
|
||||
claim={claim}
|
||||
title={title}
|
||||
onCancelPress={() => this.setState({ showRepostView: false })}
|
||||
onOverlayPress={() => this.setState({ showRepostView: false })}
|
||||
onRepostSuccessful={() => this.setState({ showRepostView: false })}
|
||||
/>
|
||||
)}
|
||||
{!this.state.fullscreenMode &&
|
||||
!this.state.showRepostView &&
|
||||
!this.state.showTipView &&
|
||||
!this.state.showImageViewer &&
|
||||
!this.state.showWebView && <FloatingWalletBalance navigation={navigation} />}
|
||||
|
|
|
@ -12,22 +12,23 @@ import {
|
|||
doFetchInviteStatus,
|
||||
doUserInviteNew,
|
||||
} from 'lbryinc';
|
||||
import { doPushDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
|
||||
import { selectSdkReady } from 'redux/selectors/settings';
|
||||
import { doPushDrawerStack, doPopDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
|
||||
import { doUpdateChannelFormState, doClearChannelFormState } from 'redux/actions/form';
|
||||
import { selectDrawerStack } from 'redux/selectors/drawer';
|
||||
import { selectChannelFormState, selectHasChannelFormState } from 'redux/selectors/form';
|
||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||
import InvitesPage from './view';
|
||||
|
||||
const select = state => ({
|
||||
channels: selectMyChannelClaims(state),
|
||||
errorMessage: selectUserInviteNewErrorMessage(state),
|
||||
fetchingChannels: selectFetchingMyChannels(state),
|
||||
fetchingInvitees: selectUserInviteStatusIsPending(state),
|
||||
invitees: selectUserInvitees(state),
|
||||
errorMessage: selectUserInviteNewErrorMessage(state),
|
||||
invitesRemaining: selectUserInvitesRemaining(state),
|
||||
isPending: selectUserInviteNewIsPending(state),
|
||||
referralCode: selectUserInviteReferralCode(state),
|
||||
isPending: selectUserInviteNewIsPending(state),
|
||||
invitees: selectUserInvitees(state),
|
||||
referralReward: selectReferralReward(state),
|
||||
sdkReady: selectSdkReady(state),
|
||||
});
|
||||
|
||||
const perform = dispatch => ({
|
||||
|
@ -39,4 +40,7 @@ const perform = dispatch => ({
|
|||
notify: data => dispatch(doToast(data)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(InvitesPage);
|
||||
export default connect(
|
||||
select,
|
||||
perform,
|
||||
)(InvitesPage);
|
||||
|
|
|
@ -11,10 +11,14 @@ import {
|
|||
View,
|
||||
} from 'react-native';
|
||||
import Colors from 'styles/colors';
|
||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||
import Icon from 'react-native-vector-icons/FontAwesome5';
|
||||
import Link from 'component/link';
|
||||
import Button from 'component/button';
|
||||
import ChannelSelector from 'component/channelSelector';
|
||||
import EmptyStateView from 'component/emptyStateView';
|
||||
import PageHeader from 'component/pageHeader';
|
||||
import RewardCard from 'component/rewardCard';
|
||||
import RewardEnrolment from 'component/rewardEnrolment';
|
||||
import UriBar from 'component/uriBar';
|
||||
import invitesStyle from 'styles/invites';
|
||||
import { fetchReferralCode, logPublish } from 'utils/helper';
|
||||
|
@ -130,23 +134,10 @@ class InvitesPage extends React.PureComponent {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { fetchingInvitees, invitees, isPending, navigation, sdkReady } = this.props;
|
||||
const { email } = this.state;
|
||||
const { fetchingInvitees, user, navigation, notify, isPending, invitees } = this.props;
|
||||
const { email, inviteLink } = this.state;
|
||||
const hasInvitees = invitees && invitees.length > 0;
|
||||
|
||||
if (!sdkReady) {
|
||||
return (
|
||||
<View style={invitesStyle.container}>
|
||||
<UriBar navigation={navigation} />
|
||||
<EmptyStateView
|
||||
message={__(
|
||||
'The background service is still initializing. You can still explore and watch content during the initialization process.',
|
||||
)}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<View style={invitesStyle.container}>
|
||||
<UriBar navigation={navigation} />
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
import { connect } from 'react-redux';
|
||||
import { makeSelectContentPositionForUri, selectBalance } from 'lbry-redux';
|
||||
import { doClaimEligiblePurchaseRewards, makeSelectViewCountForUri, selectRewardContentClaimIds } from 'lbryinc';
|
||||
import { doSetPlayerVisible } from 'redux/actions/drawer';
|
||||
import { makeSelectPlayerVisible } from 'redux/selectors/drawer';
|
||||
import { doToggleFullscreenMode } from 'redux/actions/settings';
|
||||
import LiteFilePage from './view';
|
||||
|
||||
const select = (state, props) => {
|
||||
const { uri, fullUri } = props.navigation.state.params;
|
||||
const contentUri = fullUri || uri;
|
||||
const selectProps = { uri: contentUri };
|
||||
return {
|
||||
balance: selectBalance(state),
|
||||
isPlayerVisible: makeSelectPlayerVisible(uri)(state), // use navigation uri for this selector
|
||||
position: makeSelectContentPositionForUri(contentUri)(state),
|
||||
viewCount: makeSelectViewCountForUri(contentUri)(state),
|
||||
rewardedContentClaimIds: selectRewardContentClaimIds(state),
|
||||
};
|
||||
};
|
||||
|
||||
const perform = dispatch => ({
|
||||
claimEligibleRewards: () => dispatch(doClaimEligiblePurchaseRewards()),
|
||||
setPlayerVisible: (visible, uri) => dispatch(doSetPlayerVisible(visible, uri)),
|
||||
toggleFullscreenMode: mode => dispatch(doToggleFullscreenMode(mode)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(LiteFilePage);
|
|
@ -1,297 +0,0 @@
|
|||
import React from 'react';
|
||||
import { Lbry, formatCredits, normalizeURI, parseURI, parseQueryParams } from 'lbry-redux';
|
||||
import { Lbryio } from 'lbryinc';
|
||||
import {
|
||||
ActivityIndicator,
|
||||
Alert,
|
||||
DeviceEventEmitter,
|
||||
Dimensions,
|
||||
Image,
|
||||
Linking,
|
||||
NativeModules,
|
||||
Platform,
|
||||
ScrollView,
|
||||
StatusBar,
|
||||
StyleSheet,
|
||||
Text,
|
||||
TextInput,
|
||||
TouchableOpacity,
|
||||
TouchableWithoutFeedback,
|
||||
View,
|
||||
} from 'react-native';
|
||||
import UriBar from 'component/uriBar';
|
||||
import Link from 'component/link';
|
||||
import MediaPlayer from 'component/mediaPlayer';
|
||||
import RelatedContent from 'component/relatedContent';
|
||||
import filePageStyle from 'styles/filePage';
|
||||
import { decode, formatLbryUrlForWeb, navigateToUri } from 'utils/helper';
|
||||
import Icon from 'react-native-vector-icons/FontAwesome5';
|
||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||
import uriBarStyle from 'styles/uriBar';
|
||||
import { NavigationActions, StackActions } from 'react-navigation';
|
||||
|
||||
// This page will only be used for playing audio / video content from a remote stream URL
|
||||
class LiteFilePage extends React.PureComponent {
|
||||
playerBackground = null;
|
||||
|
||||
scrollView = null;
|
||||
|
||||
player = null;
|
||||
|
||||
startTime = null;
|
||||
|
||||
state = {
|
||||
channelName: null,
|
||||
channelUrl: null,
|
||||
fileViewLogged: false,
|
||||
fullscreenMode: false,
|
||||
playbackStarted: false,
|
||||
playerHeight: null,
|
||||
isLandscape: false,
|
||||
sdkReady: false, // TODO: progressively enable features (e.g. tip) when sdk is ready
|
||||
showRecommended: false,
|
||||
title: null,
|
||||
viewCount: 0,
|
||||
};
|
||||
|
||||
checkOrientation = () => {
|
||||
if (this.state.fullscreenMode) {
|
||||
return;
|
||||
}
|
||||
|
||||
const screenDimension = Dimensions.get('window');
|
||||
const screenWidth = screenDimension.width;
|
||||
const screenHeight = screenDimension.height;
|
||||
const isLandscape = screenWidth > screenHeight;
|
||||
this.setState({ isLandscape });
|
||||
|
||||
if (!this.playerBackground) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isLandscape) {
|
||||
this.playerBackground.setNativeProps({
|
||||
height: screenHeight - StyleSheet.flatten(uriBarStyle.uriContainer).height,
|
||||
});
|
||||
} else if (this.state.playerBgHeight > 0) {
|
||||
this.playerBackground.setNativeProps({ height: this.state.playerBgHeight });
|
||||
}
|
||||
};
|
||||
|
||||
handleFullscreenToggle = isFullscreen => {
|
||||
const { toggleFullscreenMode } = this.props;
|
||||
toggleFullscreenMode(isFullscreen);
|
||||
|
||||
if (isFullscreen) {
|
||||
// fullscreen, so change orientation to landscape mode
|
||||
NativeModules.ScreenOrientation.lockOrientationLandscape();
|
||||
|
||||
// hide the navigation bar (on devices that have the soft navigation bar)
|
||||
NativeModules.UtilityModule.hideNavigationBar();
|
||||
} else {
|
||||
// Switch back to portrait mode when the media is not fullscreen
|
||||
NativeModules.ScreenOrientation.lockOrientationPortrait();
|
||||
|
||||
// show the navigation bar (on devices that have the soft navigation bar)
|
||||
NativeModules.UtilityModule.showNavigationBar();
|
||||
}
|
||||
|
||||
this.setState({ fullscreenMode: isFullscreen });
|
||||
StatusBar.setHidden(isFullscreen);
|
||||
};
|
||||
|
||||
getStreamUrl = url => {
|
||||
const { claimName, claimId } = parseURI(url);
|
||||
return `https://player.lbry.tv/content/claims/${claimName}/${claimId}/stream`;
|
||||
};
|
||||
|
||||
handleSharePress = url => {
|
||||
const shareUrl = Constants.SHARE_BASE_URL + formatLbryUrlForWeb(url);
|
||||
NativeModules.UtilityModule.shareUrl(shareUrl);
|
||||
};
|
||||
|
||||
handleOpenUrl = url => {
|
||||
const { navigation } = this.props;
|
||||
Alert.alert(
|
||||
__('Stop watching?'),
|
||||
'The LBRY service is still loading stuff in the background. Would you like to continue?',
|
||||
[
|
||||
{ text: __('No') },
|
||||
{
|
||||
text: __('Yes'),
|
||||
onPress: () => {
|
||||
const resetAction = StackActions.reset({
|
||||
index: 0,
|
||||
actions: [NavigationActions.navigate({ routeName: 'Splash', params: { resetUrl: url } })],
|
||||
});
|
||||
navigation.dispatch(resetAction);
|
||||
},
|
||||
},
|
||||
],
|
||||
);
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
this.startTime = Date.now();
|
||||
}
|
||||
|
||||
componentDidUpdate() {
|
||||
const { navigation } = this.props;
|
||||
const { uri } = navigation.state.params;
|
||||
|
||||
if (!this.state.title) {
|
||||
const params = parseQueryParams(uri);
|
||||
const { channelUrl, contentTitle } = params;
|
||||
const channelName = channelUrl ? parseURI(decode(channelUrl)).claimName : null;
|
||||
|
||||
this.setState({
|
||||
title: decode(contentTitle),
|
||||
channelUrl,
|
||||
channelName,
|
||||
showRecommended: true,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const { navigation, rewardedContentClaimIds } = this.props;
|
||||
const { channelName, channelUrl, title, sdkReady, viewCount } = this.state;
|
||||
const { uri } = navigation.state.params;
|
||||
const { claimName, claimId } = parseURI(uri);
|
||||
const isRewardContent = rewardedContentClaimIds.includes(claimId);
|
||||
|
||||
const playerBgStyle = [filePageStyle.playerBackground, filePageStyle.containedPlayerBackground];
|
||||
const fsPlayerBgStyle = [filePageStyle.playerBackground, filePageStyle.fullscreenPlayerBackground];
|
||||
|
||||
const playerStyle = [
|
||||
filePageStyle.player,
|
||||
this.state.isLandscape
|
||||
? filePageStyle.containedPlayerLandscape
|
||||
: this.state.fullscreenMode
|
||||
? filePageStyle.fullscreenPlayer
|
||||
: filePageStyle.containedPlayer,
|
||||
];
|
||||
|
||||
return (
|
||||
<View style={filePageStyle.pageContainer}>
|
||||
{!this.state.fullscreenMode && <UriBar value={uri.split('?')[0]} navigation={navigation} />}
|
||||
|
||||
<View
|
||||
style={this.state.fullscreenMode ? filePageStyle.innerPageContainerFsMode : filePageStyle.innerPageContainer}
|
||||
onLayout={this.checkOrientation}
|
||||
>
|
||||
<TouchableOpacity activeOpacity={0.5} style={filePageStyle.mediaContainer} />
|
||||
|
||||
<View
|
||||
style={playerBgStyle}
|
||||
ref={ref => {
|
||||
this.playerBackground = ref;
|
||||
}}
|
||||
onLayout={evt => {
|
||||
if (!this.state.playerBgHeight) {
|
||||
this.setState({ playerBgHeight: evt.nativeEvent.layout.height });
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
{this.state.fullscreenMode && <View style={fsPlayerBgStyle} />}
|
||||
<MediaPlayer
|
||||
assignPlayer={ref => {
|
||||
this.player = ref;
|
||||
}}
|
||||
uri={uri}
|
||||
source={this.getStreamUrl(uri)}
|
||||
style={playerStyle}
|
||||
autoPlay
|
||||
onFullscreenToggled={this.handleFullscreenToggle}
|
||||
onLayout={evt => {
|
||||
if (!this.state.playerHeight) {
|
||||
this.setState({ playerHeight: evt.nativeEvent.layout.height });
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
<ScrollView
|
||||
style={filePageStyle.scrollContainer}
|
||||
contentContainerStyle={filePageStyle.scrollContent}
|
||||
keyboardShouldPersistTaps={'handled'}
|
||||
ref={ref => {
|
||||
this.scrollView = ref;
|
||||
}}
|
||||
>
|
||||
<TouchableWithoutFeedback
|
||||
style={filePageStyle.titleTouch}
|
||||
onPress={() => this.setState({ showDescription: !this.state.showDescription })}
|
||||
>
|
||||
<View style={filePageStyle.titleArea}>
|
||||
<View style={filePageStyle.titleRow}>
|
||||
<Text style={filePageStyle.title} selectable>
|
||||
{title}
|
||||
</Text>
|
||||
{isRewardContent && <Icon name="award" style={filePageStyle.rewardIcon} size={16} />}
|
||||
</View>
|
||||
<Text style={filePageStyle.viewCount}>
|
||||
{viewCount === 1 && __('%view% view', { view: viewCount })}
|
||||
{viewCount > 1 && __('%view% views', { view: viewCount })}
|
||||
</Text>
|
||||
</View>
|
||||
</TouchableWithoutFeedback>
|
||||
|
||||
<View style={filePageStyle.largeButtonsRow}>
|
||||
<TouchableOpacity style={filePageStyle.largeButton} onPress={() => this.handleSharePress(uri)}>
|
||||
<Icon name={'share-alt'} size={16} style={filePageStyle.largeButtonIcon} />
|
||||
<Text style={filePageStyle.largeButtonText}>{__('Share')}</Text>
|
||||
</TouchableOpacity>
|
||||
|
||||
{sdkReady && (
|
||||
<TouchableOpacity
|
||||
style={filePageStyle.largeButton}
|
||||
onPress={() => this.setState({ showTipView: true })}
|
||||
>
|
||||
<Icon name={'gift'} size={16} style={filePageStyle.largeButtonIcon} />
|
||||
<Text style={filePageStyle.largeButtonText}>{__('Tip')}</Text>
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
</View>
|
||||
|
||||
<View style={filePageStyle.channelRow}>
|
||||
<View style={filePageStyle.publishInfo}>
|
||||
{channelName && (
|
||||
<Link
|
||||
style={filePageStyle.channelName}
|
||||
selectable
|
||||
text={channelName}
|
||||
numberOfLines={1}
|
||||
ellipsizeMode={'tail'}
|
||||
onPress={() => this.handleOpenUrl(channelUrl)}
|
||||
/>
|
||||
)}
|
||||
{!channelName && (
|
||||
<Text style={filePageStyle.anonChannelName} selectable ellipsizeMode={'tail'}>
|
||||
{__('Anonymous')}
|
||||
</Text>
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<View onLayout={this.setRelatedContentPosition} />
|
||||
|
||||
{this.state.showRecommended && (
|
||||
<RelatedContent
|
||||
navigation={navigation}
|
||||
claimId={claimId}
|
||||
claimName={claimName}
|
||||
title={title}
|
||||
urlOpenHandler={this.handleOpenUrl}
|
||||
uri={uri}
|
||||
fullUri={uri}
|
||||
/>
|
||||
)}
|
||||
</ScrollView>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default LiteFilePage;
|
|
@ -13,7 +13,6 @@ import { selectDrawerStack } from 'redux/selectors/drawer';
|
|||
import { doUpdatePublishFormState, doClearPublishFormState, doPendingPublishSuccess } from 'redux/actions/form';
|
||||
import { doPushDrawerStack, doPopDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
|
||||
import { selectPublishFormState, selectHasPublishFormState } from 'redux/selectors/form';
|
||||
import { selectSdkReady } from 'redux/selectors/settings';
|
||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||
import PublishPage from './view';
|
||||
|
||||
|
@ -24,7 +23,6 @@ const select = state => ({
|
|||
myClaims: selectMyClaims(state),
|
||||
publishFormState: selectPublishFormState(state),
|
||||
publishFormValues: selectPublishFormValues(state),
|
||||
sdkReady: selectSdkReady(state),
|
||||
});
|
||||
|
||||
const perform = dispatch => ({
|
||||
|
@ -41,4 +39,7 @@ const perform = dispatch => ({
|
|||
setPlayerVisible: () => dispatch(doSetPlayerVisible(false)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(PublishPage);
|
||||
export default connect(
|
||||
select,
|
||||
perform,
|
||||
)(PublishPage);
|
||||
|
|
|
@ -37,7 +37,6 @@ import Button from 'component/button';
|
|||
import ChannelSelector from 'component/channelSelector';
|
||||
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';
|
||||
|
@ -121,7 +120,7 @@ class PublishPage extends React.PureComponent {
|
|||
|
||||
// input data
|
||||
hasEditedContentAddress: false,
|
||||
bid: 0.01,
|
||||
bid: 0.1,
|
||||
description: null,
|
||||
title: null,
|
||||
language: 'en',
|
||||
|
@ -975,7 +974,7 @@ class PublishPage extends React.PureComponent {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { balance, navigation, notify, sdkReady } = this.props;
|
||||
const { balance, navigation, notify, publishFormValues } = this.props;
|
||||
const {
|
||||
allThumbnailsChecked,
|
||||
canUseCamera,
|
||||
|
@ -988,19 +987,6 @@ class PublishPage extends React.PureComponent {
|
|||
videos,
|
||||
} = this.state;
|
||||
|
||||
if (!sdkReady) {
|
||||
return (
|
||||
<View style={publishStyle.container}>
|
||||
<UriBar navigation={navigation} />
|
||||
<EmptyStateView
|
||||
message={__(
|
||||
'The background service is still initializing. You can still explore and watch content during the initialization process.',
|
||||
)}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
let content;
|
||||
if (Constants.PHASE_SELECTOR === currentPhase) {
|
||||
content = (
|
||||
|
|
|
@ -9,7 +9,6 @@ import {
|
|||
selectIsFetchingClaimListMine,
|
||||
} from 'lbry-redux';
|
||||
import { doPushDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
|
||||
import { selectSdkReady } from 'redux/selectors/settings';
|
||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||
import PublishesPage from './view';
|
||||
|
||||
|
@ -17,7 +16,6 @@ const select = state => ({
|
|||
uris: selectMyClaimUrisWithoutChannels(state),
|
||||
fetching: selectIsFetchingClaimListMine(state),
|
||||
pendingClaims: selectPendingClaims(state),
|
||||
sdkReady: selectSdkReady(state),
|
||||
});
|
||||
|
||||
const perform = dispatch => ({
|
||||
|
@ -29,4 +27,7 @@ const perform = dispatch => ({
|
|||
setPlayerVisible: () => dispatch(doSetPlayerVisible(false)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(PublishesPage);
|
||||
export default connect(
|
||||
select,
|
||||
perform
|
||||
)(PublishesPage);
|
||||
|
|
|
@ -114,27 +114,14 @@ class PublishesPage extends React.PureComponent {
|
|||
},
|
||||
},
|
||||
],
|
||||
{ cancelable: true },
|
||||
{ cancelable: true }
|
||||
);
|
||||
};
|
||||
|
||||
render() {
|
||||
const { fetching, navigation, sdkReady, uris } = this.props;
|
||||
const { fetching, navigation, uris } = this.props;
|
||||
const { selectionMode, selectedUris } = this.state;
|
||||
|
||||
if (!sdkReady) {
|
||||
return (
|
||||
<View style={publishStyle.container}>
|
||||
<UriBar navigation={navigation} />
|
||||
<EmptyStateView
|
||||
message={__(
|
||||
'The background service is still initializing. You can still explore and watch content during the initialization process.',
|
||||
)}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<View style={publishStyle.container}>
|
||||
<UriBar
|
||||
|
@ -194,7 +181,7 @@ class PublishesPage extends React.PureComponent {
|
|||
});
|
||||
} else {
|
||||
// TODO: when shortUrl is available for my claims, navigate to that URL instead
|
||||
navigateToUri(navigation, claim.permanent_url);
|
||||
navigateToUri(navigation, item);
|
||||
}
|
||||
}
|
||||
}}
|
||||
|
|
|
@ -12,8 +12,7 @@ import {
|
|||
import { doToast } from 'lbry-redux';
|
||||
import { doPushDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
|
||||
import { selectCurrentRoute } from 'redux/selectors/drawer';
|
||||
import { selectSdkReady } from 'redux/selectors/settings';
|
||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||
import Constants from 'constants';
|
||||
import RewardsPage from './view';
|
||||
|
||||
const select = state => ({
|
||||
|
@ -23,7 +22,6 @@ const select = state => ({
|
|||
emailVerifyPending: selectEmailVerifyIsPending(state),
|
||||
fetching: selectFetchingRewards(state),
|
||||
rewards: selectUnclaimedRewards(state),
|
||||
sdkReady: selectSdkReady(state),
|
||||
user: selectUser(state),
|
||||
});
|
||||
|
||||
|
@ -35,4 +33,7 @@ const perform = dispatch => ({
|
|||
setPlayerVisible: () => dispatch(doSetPlayerVisible(false)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(RewardsPage);
|
||||
export default connect(
|
||||
select,
|
||||
perform
|
||||
)(RewardsPage);
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import React from 'react';
|
||||
import { Lbryio } from 'lbryinc';
|
||||
import { Lbry } from 'lbry-redux';
|
||||
import { ActivityIndicator, NativeModules, ScrollView, Text, View } from 'react-native';
|
||||
import Colors from 'styles/colors';
|
||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||
import Link from 'component/link';
|
||||
import CustomRewardCard from 'component/customRewardCard';
|
||||
import EmptyStateView from 'component/emptyStateView';
|
||||
import PageHeader from 'component/pageHeader';
|
||||
import RewardCard from 'component/rewardCard';
|
||||
import RewardEnrolment from 'component/rewardEnrolment';
|
||||
import UriBar from 'component/uriBar';
|
||||
|
@ -17,14 +17,13 @@ const FILTER_CLAIMED = 'claimed';
|
|||
|
||||
class RewardsPage extends React.PureComponent {
|
||||
state = {
|
||||
currentFilter: FILTER_AVAILABLE,
|
||||
firstRewardClaimed: false,
|
||||
isEmailVerified: false,
|
||||
isIdentityVerified: false,
|
||||
isRewardApproved: false,
|
||||
revealVerification: true,
|
||||
usdExchangeRate: 0,
|
||||
verifyRequestStarted: false,
|
||||
revealVerification: true,
|
||||
firstRewardClaimed: false,
|
||||
currentFilter: FILTER_AVAILABLE,
|
||||
};
|
||||
|
||||
scrollView = null;
|
||||
|
@ -49,12 +48,6 @@ class RewardsPage extends React.PureComponent {
|
|||
setPlayerVisible();
|
||||
NativeModules.Firebase.setCurrentScreen('Rewards');
|
||||
|
||||
Lbryio.getExchangeRates().then(rates => {
|
||||
if (!isNaN(rates.LBC_USD)) {
|
||||
this.setState({ usdExchangeRate: rates.LBC_USD });
|
||||
}
|
||||
});
|
||||
|
||||
fetchRewards();
|
||||
|
||||
this.setState({
|
||||
|
@ -165,7 +158,6 @@ class RewardsPage extends React.PureComponent {
|
|||
canClaim={!isNotEligible}
|
||||
reward={reward}
|
||||
reward_type={reward.reward_type}
|
||||
usdExchangeRate={this.state.usdExchangeRate}
|
||||
/>
|
||||
))}
|
||||
<CustomRewardCard canClaim={!isNotEligible} showVerification={this.showVerification} />
|
||||
|
@ -200,28 +192,13 @@ class RewardsPage extends React.PureComponent {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { navigation, sdkReady } = this.props;
|
||||
const { user, navigation } = this.props;
|
||||
const { currentFilter } = this.state;
|
||||
|
||||
if (!sdkReady) {
|
||||
return (
|
||||
<View style={rewardStyle.container}>
|
||||
<UriBar navigation={navigation} />
|
||||
<EmptyStateView
|
||||
message={__(
|
||||
'The background service is still initializing. You can still explore and watch content during the initialization process.',
|
||||
)}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<View style={rewardStyle.container}>
|
||||
<UriBar navigation={navigation} />
|
||||
{(!this.state.isEmailVerified || !this.state.isRewardApproved) && (
|
||||
<RewardEnrolment usdExchangeRate={this.state.usdExchangeRate} navigation={navigation} />
|
||||
)}
|
||||
{(!this.state.isEmailVerified || !this.state.isRewardApproved) && <RewardEnrolment navigation={navigation} />}
|
||||
|
||||
{this.state.isEmailVerified && this.state.isRewardApproved && (
|
||||
<ScrollView
|
||||
|
|
|
@ -11,7 +11,6 @@ const select = state => ({
|
|||
backgroundPlayEnabled: makeSelectClientSetting(SETTINGS.BACKGROUND_PLAY_ENABLED)(state),
|
||||
currentRoute: selectCurrentRoute(state),
|
||||
drawerStack: selectDrawerStack(state),
|
||||
enableDht: makeSelectClientSetting(Constants.SETTING_DHT_ENABLED)(state),
|
||||
keepDaemonRunning: makeSelectClientSetting(SETTINGS.KEEP_DAEMON_RUNNING)(state),
|
||||
language: makeSelectClientSetting(SETTINGS.LANGUAGE)(state),
|
||||
showNsfw: makeSelectClientSetting(SETTINGS.SHOW_NSFW)(state),
|
||||
|
@ -30,4 +29,7 @@ const perform = dispatch => ({
|
|||
setPlayerVisible: () => dispatch(doSetPlayerVisible(false)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(SettingsPage);
|
||||
export default connect(
|
||||
select,
|
||||
perform
|
||||
)(SettingsPage);
|
||||
|
|
|
@ -1,16 +1,6 @@
|
|||
import React from 'react';
|
||||
import { SETTINGS } from 'lbry-redux';
|
||||
import {
|
||||
ActivityIndicator,
|
||||
Picker,
|
||||
Platform,
|
||||
Text,
|
||||
TextInput,
|
||||
View,
|
||||
ScrollView,
|
||||
Switch,
|
||||
NativeModules,
|
||||
} from 'react-native';
|
||||
import { ActivityIndicator, Picker, Platform, Text, View, ScrollView, Switch, NativeModules } from 'react-native';
|
||||
import { navigateBack } from 'utils/helper';
|
||||
import AsyncStorage from '@react-native-community/async-storage';
|
||||
import Colors from 'styles/colors';
|
||||
|
@ -21,27 +11,16 @@ import settingsStyle from 'styles/settings';
|
|||
|
||||
const languageOptions = [
|
||||
{ code: 'default', name: 'Use device language' },
|
||||
{ code: 'jv', name: 'Basa Jawa' },
|
||||
{ code: 'da', name: 'Danish' },
|
||||
{ code: 'nl', name: 'Dutch' },
|
||||
{ code: 'en', name: 'English' },
|
||||
{ code: 'et', name: 'Estonian' },
|
||||
{ code: 'fr', name: 'French' },
|
||||
{ code: 'gu', name: 'Gujarati' },
|
||||
{ code: 'hi', name: 'Hindi' },
|
||||
{ code: 'id', name: 'Indonesian' },
|
||||
{ code: 'it', name: 'Italian' },
|
||||
{ code: 'kn', name: 'Kannada' },
|
||||
{ code: 'ms', name: 'Malay' },
|
||||
{ code: 'mr', name: 'Marathi' },
|
||||
{ code: 'tr', name: 'Turkish' },
|
||||
{ code: 'pl', name: 'Polish' },
|
||||
{ code: 'pt', name: 'Portuguese' },
|
||||
{ code: 'ro', name: 'Romanian' },
|
||||
{ code: 'ru', name: 'Russian' },
|
||||
{ code: 'sk', name: 'Slovak' },
|
||||
{ code: 'es', name: 'Spanish' },
|
||||
{ code: 'tr', name: 'Turkish' },
|
||||
{ code: 'uk', name: 'Ukrainian' },
|
||||
];
|
||||
|
||||
class SettingsPage extends React.PureComponent {
|
||||
|
@ -161,7 +140,6 @@ class SettingsPage extends React.PureComponent {
|
|||
render() {
|
||||
const {
|
||||
backgroundPlayEnabled,
|
||||
enableDht,
|
||||
keepDaemonRunning,
|
||||
receiveSubscriptionNotifications,
|
||||
receiveRewardNotifications,
|
||||
|
@ -179,7 +157,6 @@ class SettingsPage extends React.PureComponent {
|
|||
const actualReceiveRewardNotifications = this.getBooleanSetting(receiveRewardNotifications, true);
|
||||
const actualReceiveInterestsNotifications = this.getBooleanSetting(receiveInterestsNotifications, true);
|
||||
const actualReceiveCreatorNotifications = this.getBooleanSetting(receiveCreatorNotifications, true);
|
||||
const actualEnableDht = this.getBooleanSetting(enableDht, false);
|
||||
|
||||
return (
|
||||
<View style={settingsStyle.container}>
|
||||
|
@ -317,7 +294,7 @@ class SettingsPage extends React.PureComponent {
|
|||
</Text>
|
||||
<Text style={settingsStyle.description}>
|
||||
{__(
|
||||
'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.'
|
||||
)}
|
||||
</Text>
|
||||
</View>
|
||||
|
@ -333,25 +310,6 @@ class SettingsPage extends React.PureComponent {
|
|||
/>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<View style={settingsStyle.row}>
|
||||
<View style={settingsStyle.switchText}>
|
||||
<Text style={settingsStyle.label}>{__('Participate in the data network')}</Text>
|
||||
<Text style={settingsStyle.description}>
|
||||
{__(
|
||||
'Enable peer-to-peer functionality (this will take effect upon app and background service restart)',
|
||||
)}
|
||||
</Text>
|
||||
</View>
|
||||
<View style={settingsStyle.switchContainer}>
|
||||
<Switch
|
||||
value={actualEnableDht}
|
||||
onValueChange={value => {
|
||||
this.setNativeBooleanSetting(Constants.SETTING_DHT_ENABLED, value);
|
||||
}}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</ScrollView>
|
||||
</View>
|
||||
);
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { connect } from 'react-redux';
|
||||
import { SETTINGS, doUpdateBlockHeight, doPopulateSharedUserState, doToast } from 'lbry-redux';
|
||||
import { SETTINGS, doBalanceSubscribe, doUpdateBlockHeight, doPopulateSharedUserState, doToast } from 'lbry-redux';
|
||||
import {
|
||||
doAuthenticate,
|
||||
doClaimRewardType,
|
||||
doInstallNewWithParams,
|
||||
doBlackListedOutpointsSubscribe,
|
||||
doFilteredOutpointsSubscribe,
|
||||
doFetchMySubscriptions,
|
||||
doFetchRewardedContent,
|
||||
doGetSync,
|
||||
|
@ -26,10 +26,10 @@ const select = state => ({
|
|||
});
|
||||
|
||||
const perform = dispatch => ({
|
||||
authenticate: (appVersion, os, firebaseToken, callInstall) =>
|
||||
dispatch(doAuthenticate(appVersion, os, firebaseToken, true, null, callInstall)),
|
||||
installNewWithParams: (appVersion, installationId, nodeId, lbrynetVersion, os, platform, firebaseToken) =>
|
||||
dispatch(doInstallNewWithParams(appVersion, installationId, nodeId, lbrynetVersion, os, platform, firebaseToken)),
|
||||
authenticate: (appVersion, os, firebaseToken) => dispatch(doAuthenticate(appVersion, os, firebaseToken)),
|
||||
balanceSubscribe: () => dispatch(doBalanceSubscribe()),
|
||||
blacklistedOutpointsSubscribe: () => dispatch(doBlackListedOutpointsSubscribe()),
|
||||
filteredOutpointsSubscribe: () => dispatch(doFilteredOutpointsSubscribe()),
|
||||
fetchRewardedContent: () => dispatch(doFetchRewardedContent()),
|
||||
fetchSubscriptions: callback => dispatch(doFetchMySubscriptions(callback)),
|
||||
getSync: (password, callback) => dispatch(doGetSync(password, callback)),
|
||||
|
@ -42,4 +42,7 @@ const perform = dispatch => ({
|
|||
verifyUserEmailFailure: error => dispatch(doUserEmailVerifyFailure(error)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(SplashScreen);
|
||||
export default connect(
|
||||
select,
|
||||
perform,
|
||||
)(SplashScreen);
|
||||
|
|
|
@ -23,12 +23,9 @@ class SplashScreen extends React.PureComponent {
|
|||
};
|
||||
|
||||
state = {
|
||||
authWithoutSdk: false,
|
||||
accountUnlockFailed: false,
|
||||
appVersion: null,
|
||||
daemonReady: false,
|
||||
details: __('Starting up'),
|
||||
firebaseToken: null,
|
||||
message: __('Connecting'),
|
||||
isRunning: false,
|
||||
isLagging: false,
|
||||
|
@ -37,57 +34,12 @@ class SplashScreen extends React.PureComponent {
|
|||
headersDownloadProgress: 0,
|
||||
shouldAuthenticate: false,
|
||||
subscriptionsFetched: false,
|
||||
liteMode: false,
|
||||
liteModeParams: {},
|
||||
};
|
||||
|
||||
initLiteMode = () => {
|
||||
NativeModules.UtilityModule.getLbrynetDirectory().then(path => {
|
||||
NativeModules.UtilityModule.getPlatform().then(platform => {
|
||||
RNFS.readFile(`${path}/install_id`, 'utf8')
|
||||
.then(installIdContent => {
|
||||
// node_id is actually optional (won't be present if dht is disabled)
|
||||
// RNFS.readFile(`${path}/node_id`, 'utf8').then(nodeIdContent => {
|
||||
// TODO: Load proper lbrynetVersion value
|
||||
this.setState(
|
||||
{
|
||||
liteModeParams: {
|
||||
installationId: installIdContent,
|
||||
nodeId: null,
|
||||
lbrynetVersion: '0.64.0',
|
||||
platform,
|
||||
},
|
||||
},
|
||||
() => this.updateStatus(),
|
||||
);
|
||||
// }).catch((err) => { console.log(err); console.log('node_id not found.'); this.lbryConnect() });
|
||||
})
|
||||
.catch(() => this.lbryConnect());
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
authenticateWithoutSdk() {
|
||||
const { authenticate } = this.props;
|
||||
NativeModules.VersionInfo.getAppVersion().then(appVersion => {
|
||||
this.setState({ appVersion, shouldAuthenticate: true, authWithoutSdk: true });
|
||||
NativeModules.Firebase.getMessagingToken()
|
||||
.then(firebaseToken => {
|
||||
this.setState({ firebaseToken }, () => authenticate(appVersion, Platform.OS, firebaseToken, false));
|
||||
})
|
||||
.catch(() => {
|
||||
authenticate(appVersion, Platform.OS, null, false);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
updateStatus() {
|
||||
const { liteMode } = this.state;
|
||||
|
||||
// authenticate immediately
|
||||
if (!NativeModules.UtilityModule.dhtEnabled) {
|
||||
this.authenticateWithoutSdk();
|
||||
}
|
||||
Lbry.status().then(status => {
|
||||
this._updateStatusCallback(status);
|
||||
});
|
||||
}
|
||||
|
||||
navigateToMain = () => {
|
||||
|
@ -121,70 +73,28 @@ class SplashScreen extends React.PureComponent {
|
|||
};
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
const { getSync, installNewWithParams } = this.props;
|
||||
const {
|
||||
daemonReady,
|
||||
authWithoutSdk,
|
||||
shouldAuthenticate,
|
||||
liteMode,
|
||||
liteModeParams,
|
||||
appVersion,
|
||||
firebaseToken,
|
||||
} = this.state;
|
||||
const { emailToVerify, getSync, setEmailToVerify, verifyUserEmail, verifyUserEmailFailure } = this.props;
|
||||
const { daemonReady, shouldAuthenticate } = this.state;
|
||||
const { user } = nextProps;
|
||||
|
||||
if (liteMode && user && user.id) {
|
||||
this.navigateToLiteMode();
|
||||
} else if (shouldAuthenticate && user && user.id) {
|
||||
if (daemonReady || authWithoutSdk) {
|
||||
this.setState({ shouldAuthenticate: false }, () => {
|
||||
// call install new after successful authentication
|
||||
if (authWithoutSdk) {
|
||||
const { installationId, nodeId, lbrynetVersion, platform } = liteModeParams;
|
||||
installNewWithParams(
|
||||
appVersion,
|
||||
installationId,
|
||||
nodeId,
|
||||
lbrynetVersion,
|
||||
Platform.OS,
|
||||
platform,
|
||||
firebaseToken,
|
||||
);
|
||||
}
|
||||
|
||||
// user is authenticated, navigate to the main view
|
||||
if (user.has_verified_email) {
|
||||
NativeModules.UtilityModule.getSecureValue(Constants.KEY_WALLET_PASSWORD).then(walletPassword => {
|
||||
getSync(walletPassword, () => {
|
||||
this.getUserSettings();
|
||||
});
|
||||
if (daemonReady && shouldAuthenticate && user && user.id) {
|
||||
this.setState({ shouldAuthenticate: false }, () => {
|
||||
// user is authenticated, navigate to the main view
|
||||
if (user.has_verified_email) {
|
||||
NativeModules.UtilityModule.getSecureValue(Constants.KEY_WALLET_PASSWORD).then(walletPassword => {
|
||||
getSync(walletPassword, () => {
|
||||
this.getUserSettings();
|
||||
});
|
||||
|
||||
this.navigateToMain();
|
||||
return;
|
||||
}
|
||||
|
||||
});
|
||||
this.navigateToMain();
|
||||
});
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
this.navigateToMain();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
navigateToLiteMode = () => {
|
||||
const { navigation } = this.props;
|
||||
const { launchUrl } = this.state;
|
||||
const resetAction = StackActions.reset({
|
||||
index: 0,
|
||||
actions: [
|
||||
NavigationActions.navigate({
|
||||
routeName: Constants.DRAWER_ROUTE_LITE_FILE,
|
||||
params: { uri: launchUrl },
|
||||
}),
|
||||
],
|
||||
});
|
||||
navigation.dispatch(resetAction);
|
||||
};
|
||||
|
||||
getUserSettings = () => {
|
||||
const { populateSharedUserState } = this.props;
|
||||
|
||||
|
@ -206,9 +116,22 @@ class SplashScreen extends React.PureComponent {
|
|||
};
|
||||
|
||||
finishSplashScreen = () => {
|
||||
const { authenticate, getSync, user } = this.props;
|
||||
const {
|
||||
authenticate,
|
||||
balanceSubscribe,
|
||||
blacklistedOutpointsSubscribe,
|
||||
filteredOutpointsSubscribe,
|
||||
getSync,
|
||||
updateBlockHeight,
|
||||
user,
|
||||
} = this.props;
|
||||
|
||||
// Lbry.resolve({ urls: 'lbry://one' }).then(() => {
|
||||
// Leave the splash screen
|
||||
balanceSubscribe();
|
||||
blacklistedOutpointsSubscribe();
|
||||
filteredOutpointsSubscribe();
|
||||
|
||||
if (user && user.id && user.has_verified_email) {
|
||||
// user already authenticated
|
||||
NativeModules.UtilityModule.getSecureValue(Constants.KEY_WALLET_PASSWORD).then(walletPassword => {
|
||||
|
@ -222,20 +145,37 @@ class SplashScreen extends React.PureComponent {
|
|||
this.setState({ shouldAuthenticate: true }, () => {
|
||||
NativeModules.Firebase.getMessagingToken()
|
||||
.then(firebaseToken => {
|
||||
authenticate(appVersion, Platform.OS, firebaseToken, true);
|
||||
authenticate(appVersion, Platform.OS, firebaseToken);
|
||||
})
|
||||
.catch(() => authenticate(appVersion, Platform.OS, null, true));
|
||||
.catch(() => authenticate(appVersion, Platform.OS));
|
||||
});
|
||||
});
|
||||
}
|
||||
// });
|
||||
};
|
||||
|
||||
handleAccountUnlockFailed() {
|
||||
this.setState({ accountUnlockFailed: true });
|
||||
}
|
||||
|
||||
handleSdkReady = () => {
|
||||
this.setState({ daemonReady: true }, () => {
|
||||
_updateStatusCallback(status) {
|
||||
const { fetchSubscriptions, getSync, setClientSetting } = this.props;
|
||||
const startupStatus = status.startup_status;
|
||||
const walletStatus = status.wallet;
|
||||
|
||||
// At the minimum, wallet should be started and blocks_behind equal to 0 before calling resolve
|
||||
const hasStarted = startupStatus.stream_manager && startupStatus.wallet && status.wallet.blocks_behind <= 0;
|
||||
if (hasStarted) {
|
||||
// Wait until we are able to resolve a name before declaring
|
||||
// that we are done.
|
||||
// TODO: This is a hack, and the logic should live in the daemon
|
||||
// to give us a better sense of when we are actually started
|
||||
this.setState({
|
||||
daemonReady: true,
|
||||
isLagging: false,
|
||||
isRunning: true,
|
||||
});
|
||||
|
||||
Lbry.wallet_status().then(secureWalletStatus => {
|
||||
// For now, automatically unlock the wallet if a password is set so that downloads work
|
||||
NativeModules.UtilityModule.getSecureValue(Constants.KEY_WALLET_PASSWORD).then(password => {
|
||||
|
@ -266,12 +206,9 @@ class SplashScreen extends React.PureComponent {
|
|||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
handleSdkStatusResponse = evt => {
|
||||
const { status } = evt;
|
||||
const walletStatus = status.wallet;
|
||||
return;
|
||||
}
|
||||
|
||||
const headerSyncProgress = walletStatus ? walletStatus.headers_synchronization_progress : null;
|
||||
if (headerSyncProgress && headerSyncProgress < 100) {
|
||||
|
@ -306,45 +243,49 @@ class SplashScreen extends React.PureComponent {
|
|||
details: __('Initializing LBRY service'),
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
setTimeout(() => {
|
||||
this.updateStatus();
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
DeviceEventEmitter.addListener('onNotificationTargetLaunch', this.onNotificationTargetLaunch);
|
||||
DeviceEventEmitter.addListener('onSdkReady', this.handleSdkReady);
|
||||
DeviceEventEmitter.addListener('onSdkStatusResponse', this.handleSdkStatusResponse);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
DeviceEventEmitter.removeListener('onNotificationTargetLaunch', this.onNotificationTargetLaunch);
|
||||
DeviceEventEmitter.removeListener('onSdkReady', this.handleSdkReady);
|
||||
DeviceEventEmitter.removeListener('onSdkStatusResponse', this.handleSdkStatusResponse);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
NativeModules.Firebase.track('app_launch', null);
|
||||
NativeModules.Firebase.setCurrentScreen('Splash');
|
||||
NativeModules.UtilityModule.checkSdkReady();
|
||||
|
||||
const { navigation } = this.props;
|
||||
const { resetUrl } = navigation.state.params;
|
||||
const isResetUrlSet = !!resetUrl;
|
||||
|
||||
this.props.fetchRewardedContent();
|
||||
Linking.getInitialURL().then(url => {
|
||||
let liteMode;
|
||||
if (url) {
|
||||
liteMode = !isResetUrlSet && url.indexOf('liteMode=1') > -1;
|
||||
this.setState({ launchUrl: resetUrl || url, liteMode });
|
||||
this.setState({ launchUrl: url });
|
||||
}
|
||||
|
||||
NativeModules.UtilityModule.getNotificationLaunchTarget().then(target => {
|
||||
if (target) {
|
||||
liteMode = !isResetUrlSet && target.indexOf('liteMode=1') > -1;
|
||||
this.setState({ launchUrl: resetUrl || target, liteMode });
|
||||
this.setState({ launchUrl: target });
|
||||
}
|
||||
|
||||
// Only connect after checking initial launch url / notification launch target
|
||||
this.initLiteMode();
|
||||
Lbry.connect()
|
||||
.then(() => {
|
||||
this.updateStatus();
|
||||
})
|
||||
.catch(e => {
|
||||
this.setState({
|
||||
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.',
|
||||
),
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -359,26 +300,6 @@ class SplashScreen extends React.PureComponent {
|
|||
});
|
||||
}
|
||||
|
||||
lbryConnect = () => {
|
||||
if (NativeModules.UtilityModule.dhtEnabled) {
|
||||
Lbry.connect()
|
||||
.then(() => {
|
||||
this.updateStatus();
|
||||
})
|
||||
.catch(e => {
|
||||
this.setState({
|
||||
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.',
|
||||
),
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.updateStatus(); // skip lbry.connect for now (unless dht flag is enabled)
|
||||
}
|
||||
};
|
||||
|
||||
handleContinueAnywayPressed = () => {
|
||||
this.setState(
|
||||
{
|
||||
|
|
|
@ -12,13 +12,11 @@ import {
|
|||
selectViewMode,
|
||||
selectFirstRunCompleted,
|
||||
selectShowSuggestedSubs,
|
||||
selectUnclaimedRewardValue,
|
||||
selectUser,
|
||||
} from 'lbryinc';
|
||||
import { doToast, selectFetchingClaimSearch } from 'lbry-redux';
|
||||
import { doPushDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
|
||||
import { doSetClientSetting, doSetTimeItem } from 'redux/actions/settings';
|
||||
import { makeSelectClientSetting, selectSdkReady, selectTimeItem } from 'redux/selectors/settings';
|
||||
import { makeSelectClientSetting, selectTimeItem } from 'redux/selectors/settings';
|
||||
import { selectCurrentRoute } from 'redux/selectors/drawer';
|
||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||
import SubscriptionsPage from './view';
|
||||
|
@ -34,12 +32,8 @@ const select = state => ({
|
|||
unreadSubscriptions: selectUnreadSubscriptions(state),
|
||||
viewMode: selectViewMode(state),
|
||||
firstRunCompleted: selectFirstRunCompleted(state),
|
||||
rewardsNotInterested: makeSelectClientSetting(Constants.SETTING_REWARDS_NOT_INTERESTED)(state),
|
||||
showSuggestedSubs: selectShowSuggestedSubs(state),
|
||||
timeItem: selectTimeItem(state),
|
||||
sdkReady: selectSdkReady(state),
|
||||
unclaimedRewardAmount: selectUnclaimedRewardValue(state),
|
||||
user: selectUser(state),
|
||||
});
|
||||
|
||||
const perform = dispatch => ({
|
||||
|
@ -54,4 +48,7 @@ const perform = dispatch => ({
|
|||
setTimeItem: item => dispatch(doSetTimeItem(item)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(SubscriptionsPage);
|
||||
export default connect(
|
||||
select,
|
||||
perform,
|
||||
)(SubscriptionsPage);
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
View,
|
||||
} from 'react-native';
|
||||
import { buildURI, parseURI } from 'lbry-redux';
|
||||
import { formatUsd, getOrderBy } from 'utils/helper';
|
||||
import { getOrderBy } from 'utils/helper';
|
||||
import AsyncStorage from '@react-native-community/async-storage';
|
||||
import moment from 'moment';
|
||||
import Button from 'component/button';
|
||||
|
@ -30,22 +30,16 @@ import SubscribedChannelList from 'component/subscribedChannelList';
|
|||
import SuggestedSubscriptions from 'component/suggestedSubscriptions';
|
||||
import SuggestedSubscriptionsGrid from 'component/suggestedSubscriptionsGrid';
|
||||
import UriBar from 'component/uriBar';
|
||||
import SdkLoadingStatus from 'component/sdkLoadingStatus';
|
||||
import Snackbar from 'react-native-snackbar';
|
||||
import { Lbryio } from 'lbryinc';
|
||||
|
||||
class SubscriptionsPage extends React.PureComponent {
|
||||
state = {
|
||||
currentSortByItem: Constants.CLAIM_SEARCH_SORT_BY_ITEMS[1], // should always default to sorting subscriptions by new
|
||||
filteredChannels: [],
|
||||
orderBy: ['release_time'],
|
||||
showRewardsNag: true,
|
||||
showingSuggestedSubs: false,
|
||||
showSortPicker: false,
|
||||
showTimePicker: false,
|
||||
showModalSuggestedSubs: false,
|
||||
usdExchangeRate: 0,
|
||||
userEmailVerified: false,
|
||||
orderBy: ['release_time'],
|
||||
filteredChannels: [],
|
||||
currentSortByItem: Constants.CLAIM_SEARCH_SORT_BY_ITEMS[1], // should always default to sorting subscriptions by new
|
||||
};
|
||||
|
||||
didFocusListener;
|
||||
|
@ -62,7 +56,15 @@ class SubscriptionsPage extends React.PureComponent {
|
|||
}
|
||||
|
||||
onComponentFocused = () => {
|
||||
const { currentRoute, doFetchMySubscriptions, pushDrawerStack, sdkReady, setPlayerVisible, user } = this.props;
|
||||
const {
|
||||
currentRoute,
|
||||
doFetchMySubscriptions,
|
||||
doFetchRecommendedSubscriptions,
|
||||
doSetViewMode,
|
||||
pushDrawerStack,
|
||||
setPlayerVisible,
|
||||
subscriptionsViewMode,
|
||||
} = this.props;
|
||||
|
||||
if (currentRoute === Constants.DRAWER_ROUTE_SUBSCRIPTIONS) {
|
||||
pushDrawerStack();
|
||||
|
@ -70,17 +72,6 @@ class SubscriptionsPage extends React.PureComponent {
|
|||
setPlayerVisible();
|
||||
NativeModules.Firebase.setCurrentScreen('Subscriptions');
|
||||
|
||||
Lbryio.getExchangeRates().then(rates => {
|
||||
if (!isNaN(rates.LBC_USD)) {
|
||||
this.setState({ usdExchangeRate: rates.LBC_USD }, () => {
|
||||
if (sdkReady && parseFloat(this.state.usdExchangeRate) > 0 && user && !user.is_reward_approved) {
|
||||
this.showRewardsAvailable();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
this.setState({ userEmailVerified: user && user.has_verified_email });
|
||||
doFetchMySubscriptions();
|
||||
};
|
||||
|
||||
|
@ -89,56 +80,15 @@ class SubscriptionsPage extends React.PureComponent {
|
|||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
const { currentRoute, user, sdkReady } = nextProps;
|
||||
const { currentRoute: prevRoute, doFetchMySubscriptions } = this.props;
|
||||
const { currentRoute } = nextProps;
|
||||
const { currentRoute: prevRoute } = this.props;
|
||||
if (Constants.DRAWER_ROUTE_SUBSCRIPTIONS === currentRoute && currentRoute !== prevRoute) {
|
||||
this.onComponentFocused();
|
||||
}
|
||||
|
||||
if (user && user.has_verified_email && !this.state.userEmailVerified) {
|
||||
// user just signed in
|
||||
this.setState({ showingSuggestedSubs: false, userEmailVerified: true }, () => {
|
||||
doFetchMySubscriptions();
|
||||
});
|
||||
}
|
||||
|
||||
if (
|
||||
sdkReady &&
|
||||
parseFloat(this.state.usdExchangeRate) > 0 &&
|
||||
this.state.showRewardsNag &&
|
||||
user &&
|
||||
!user.is_reward_approved
|
||||
) {
|
||||
this.showRewardsAvailable();
|
||||
}
|
||||
|
||||
this.unsubscribeShortChannelUrls();
|
||||
}
|
||||
|
||||
showRewardsAvailable = () => {
|
||||
const { navigation, unclaimedRewardAmount, rewardsNotInterested } = this.props;
|
||||
if (rewardsNotInterested) {
|
||||
this.setState({ showRewardsNag: false });
|
||||
return;
|
||||
}
|
||||
|
||||
this.setState({ showRewardsNag: false }, () => {
|
||||
Snackbar.show({
|
||||
title: __('Did you know that you can earn free credits worth up to %amount%?', {
|
||||
amount: formatUsd(parseFloat(this.state.usdExchangeRate) * parseFloat(unclaimedRewardAmount)),
|
||||
}),
|
||||
duration: Snackbar.LENGTH_LONG,
|
||||
action: {
|
||||
title: __('SHOW ME'),
|
||||
color: Colors.LbryGreen,
|
||||
onPress: () => {
|
||||
navigation.navigate({ routeName: Constants.DRAWER_ROUTE_REWARDS });
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
handleSortByItemSelected = item => {
|
||||
this.setState({ currentSortByItem: item, orderBy: getOrderBy(item), showSortPicker: false });
|
||||
};
|
||||
|
@ -187,7 +137,21 @@ class SubscriptionsPage extends React.PureComponent {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { subscribedChannels, loading, loadingSuggested, sdkReady, timeItem, navigation, notify } = this.props;
|
||||
const {
|
||||
suggestedChannels,
|
||||
subscribedChannels,
|
||||
allSubscriptions,
|
||||
doCompleteFirstRun,
|
||||
doShowSuggestedSubs,
|
||||
loading,
|
||||
loadingSuggested,
|
||||
firstRunCompleted,
|
||||
showSuggestedSubs,
|
||||
timeItem,
|
||||
unreadSubscriptions,
|
||||
navigation,
|
||||
notify,
|
||||
} = this.props;
|
||||
const { currentSortByItem, filteredChannels, showModalSuggestedSubs, showSortPicker, showTimePicker } = this.state;
|
||||
|
||||
const numberOfSubscriptions = subscribedChannels ? subscribedChannels.length : 0;
|
||||
|
@ -332,8 +296,6 @@ class SubscriptionsPage extends React.PureComponent {
|
|||
onDonePress={() => this.setState({ showModalSuggestedSubs: false })}
|
||||
/>
|
||||
)}
|
||||
|
||||
{!sdkReady && <SdkLoadingStatus />}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -3,12 +3,11 @@ import { selectFollowedTags, doToggleTagFollow } from 'lbry-redux';
|
|||
import { doPushDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
|
||||
import { doSetSortByItem, doSetTimeItem } from 'redux/actions/settings';
|
||||
import { selectCurrentRoute } from 'redux/selectors/drawer';
|
||||
import { selectSdkReady, selectSortByItem, selectTimeItem } from 'redux/selectors/settings';
|
||||
import { selectSortByItem, selectTimeItem } from 'redux/selectors/settings';
|
||||
import TagPage from './view';
|
||||
|
||||
const select = state => ({
|
||||
currentRoute: selectCurrentRoute(state),
|
||||
sdkReady: selectSdkReady(state),
|
||||
sortByItem: selectSortByItem(state),
|
||||
timeItem: selectTimeItem(state),
|
||||
followedTags: selectFollowedTags(state),
|
||||
|
@ -22,4 +21,7 @@ const perform = dispatch => ({
|
|||
toggleTagFollow: tag => dispatch(doToggleTagFollow(tag)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(TagPage);
|
||||
export default connect(
|
||||
select,
|
||||
perform
|
||||
)(TagPage);
|
||||
|
|
|
@ -14,7 +14,6 @@ import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
|||
import FloatingWalletBalance from 'component/floatingWalletBalance';
|
||||
import Link from 'component/link';
|
||||
import ModalPicker from 'component/modalPicker';
|
||||
import SdkLoadingStatus from 'component/sdkLoadingStatus';
|
||||
import UriBar from 'component/uriBar';
|
||||
|
||||
class TagPage extends React.PureComponent {
|
||||
|
@ -128,7 +127,7 @@ class TagPage extends React.PureComponent {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { navigation, sdkReady, sortByItem, timeItem } = this.props;
|
||||
const { navigation, sortByItem, timeItem } = this.props;
|
||||
const { tag, showSortPicker, showTimePicker } = this.state;
|
||||
|
||||
return (
|
||||
|
@ -145,7 +144,7 @@ class TagPage extends React.PureComponent {
|
|||
orientation={Constants.ORIENTATION_VERTICAL}
|
||||
/>
|
||||
)}
|
||||
{sdkReady && !showSortPicker && !showTimePicker && <FloatingWalletBalance navigation={navigation} />}
|
||||
{!showSortPicker && !showTimePicker && <FloatingWalletBalance navigation={navigation} />}
|
||||
{showSortPicker && (
|
||||
<ModalPicker
|
||||
title={__('Sort content by')}
|
||||
|
@ -164,7 +163,6 @@ class TagPage extends React.PureComponent {
|
|||
items={Constants.CLAIM_SEARCH_TIME_ITEMS}
|
||||
/>
|
||||
)}
|
||||
{!sdkReady && <SdkLoadingStatus />}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { connect } from 'react-redux';
|
||||
import { doSetClientSetting } from 'redux/actions/settings';
|
||||
import { makeSelectClientSetting, selectSdkReady } from 'redux/selectors/settings';
|
||||
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
||||
import { doPushDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
|
||||
import { selectCurrentRoute } from 'redux/selectors/drawer';
|
||||
import { selectBalance } from 'lbry-redux';
|
||||
|
@ -15,7 +15,6 @@ const select = state => ({
|
|||
deviceWalletSynced: makeSelectClientSetting(Constants.SETTING_DEVICE_WALLET_SYNCED)(state),
|
||||
hasSyncedWallet: selectHasSyncedWallet(state),
|
||||
rewardsNotInterested: makeSelectClientSetting(Constants.SETTING_REWARDS_NOT_INTERESTED)(state),
|
||||
sdkReady: selectSdkReady(state),
|
||||
understandsRisks: makeSelectClientSetting(Constants.SETTING_ALPHA_UNDERSTANDS_RISKS)(state),
|
||||
user: selectUser(state),
|
||||
});
|
||||
|
@ -28,4 +27,7 @@ const perform = dispatch => ({
|
|||
setPlayerVisible: () => dispatch(doSetPlayerVisible(false)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(WalletPage);
|
||||
export default connect(
|
||||
select,
|
||||
perform
|
||||
)(WalletPage);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import React from 'react';
|
||||
import { NativeModules, ScrollView, Text, View } from 'react-native';
|
||||
import EmptyStateView from 'component/emptyStateView';
|
||||
import TransactionListRecent from 'component/transactionListRecent';
|
||||
import WalletAddress from 'component/walletAddress';
|
||||
import WalletBalance from 'component/walletBalance';
|
||||
|
@ -9,6 +8,8 @@ import WalletSend from 'component/walletSend';
|
|||
import WalletRewardsDriver from 'component/walletRewardsDriver';
|
||||
import WalletSignIn from 'component/walletSignIn';
|
||||
import WalletSyncDriver from 'component/walletSyncDriver';
|
||||
import Button from 'component/button';
|
||||
import Link from 'component/link';
|
||||
import UriBar from 'component/uriBar';
|
||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||
import walletStyle from 'styles/wallet';
|
||||
|
@ -59,20 +60,16 @@ class WalletPage extends React.PureComponent {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { balance, rewardsNotInterested, understandsRisks, navigation, sdkReady, user } = this.props;
|
||||
|
||||
if (!sdkReady) {
|
||||
return (
|
||||
<View style={walletStyle.container}>
|
||||
<UriBar navigation={navigation} />
|
||||
<EmptyStateView
|
||||
message={__(
|
||||
'The background service is still initializing. You can still explore and watch content during the initialization process.',
|
||||
)}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
const {
|
||||
balance,
|
||||
backupDismissed,
|
||||
hasSyncedWallet,
|
||||
rewardsNotInterested,
|
||||
understandsRisks,
|
||||
setClientSetting,
|
||||
navigation,
|
||||
user,
|
||||
} = this.props;
|
||||
|
||||
const signedIn = user && user.has_verified_email;
|
||||
if (!signedIn && !understandsRisks) {
|
||||
|
@ -94,7 +91,7 @@ class WalletPage extends React.PureComponent {
|
|||
>
|
||||
{!rewardsNotInterested && (!balance || balance === 0) && <WalletRewardsDriver navigation={navigation} />}
|
||||
<WalletBalance />
|
||||
<WalletBalanceExtra navigation={navigation} />
|
||||
<WalletBalanceExtra />
|
||||
<WalletAddress />
|
||||
<WalletSend />
|
||||
<TransactionListRecent navigation={navigation} />
|
||||
|
|
|
@ -17,14 +17,6 @@ export function doSetClientSetting(key, value) {
|
|||
};
|
||||
}
|
||||
|
||||
export function doSetSdkReady() {
|
||||
return dispatch => {
|
||||
dispatch({
|
||||
type: Constants.ACTION_SDK_READY,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
export function doSetSortByItem(item) {
|
||||
return dispatch => {
|
||||
dispatch({
|
||||
|
|
|
@ -45,13 +45,12 @@ reducers[Constants.ACTION_PUSH_DRAWER_STACK] = (state, action) => {
|
|||
if (routeName === Constants.DRAWER_ROUTE_SUBSCRIPTIONS && newStack.length === 1) {
|
||||
canPushStack = false;
|
||||
}
|
||||
if (routeName === Constants.DRAWER_ROUTE_LITE_FILE) {
|
||||
canPushStack = false;
|
||||
}
|
||||
|
||||
let lastRouteInStack;
|
||||
if (canPushStack) {
|
||||
newStack.push({ route: routeName, params });
|
||||
|
||||
// save the route
|
||||
lastRouteInStack = { route: routeName, params };
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
|||
const reducers = {};
|
||||
const defaultState = {
|
||||
clientSettings: {},
|
||||
sdkReady: false,
|
||||
sortByItemName: Constants.SORT_BY_HOT,
|
||||
timeItemName: Constants.TIME_WEEK,
|
||||
fullscreenMode: false,
|
||||
|
@ -21,11 +20,6 @@ reducers[ACTIONS.CLIENT_SETTING_CHANGED] = (state, action) => {
|
|||
});
|
||||
};
|
||||
|
||||
reducers[Constants.ACTION_SDK_READY] = (state, action) =>
|
||||
Object.assign({}, state, {
|
||||
sdkReady: true,
|
||||
});
|
||||
|
||||
reducers[Constants.ACTION_SORT_BY_ITEM_CHANGED] = (state, action) =>
|
||||
Object.assign({}, state, {
|
||||
sortByItemName: action.data.name,
|
||||
|
|
|
@ -4,22 +4,38 @@ import { getSortByItemForName, getTimeItemForName } from 'utils/helper';
|
|||
|
||||
const selectState = state => state.settings || {};
|
||||
|
||||
export const selectDaemonSettings = createSelector(selectState, state => state.daemonSettings);
|
||||
export const selectDaemonSettings = createSelector(
|
||||
selectState,
|
||||
state => state.daemonSettings
|
||||
);
|
||||
|
||||
export const selectClientSettings = createSelector(selectState, state => state.clientSettings || {});
|
||||
export const selectClientSettings = createSelector(
|
||||
selectState,
|
||||
state => state.clientSettings || {}
|
||||
);
|
||||
|
||||
export const selectSortByItem = createSelector(selectState, state => getSortByItemForName(state.sortByItemName));
|
||||
export const selectSortByItem = createSelector(
|
||||
selectState,
|
||||
state => getSortByItemForName(state.sortByItemName)
|
||||
);
|
||||
|
||||
export const selectTimeItem = createSelector(selectState, state => getTimeItemForName(state.timeItemName));
|
||||
export const selectTimeItem = createSelector(
|
||||
selectState,
|
||||
state => getTimeItemForName(state.timeItemName)
|
||||
);
|
||||
|
||||
export const makeSelectClientSetting = setting =>
|
||||
createSelector(selectClientSettings, settings => (settings ? settings[setting] : undefined));
|
||||
createSelector(
|
||||
selectClientSettings,
|
||||
settings => (settings ? settings[setting] : undefined)
|
||||
);
|
||||
|
||||
// refactor me
|
||||
export const selectShowNsfw = makeSelectClientSetting(SETTINGS.SHOW_NSFW);
|
||||
|
||||
export const selectKeepDaemonRunning = makeSelectClientSetting(SETTINGS.KEEP_DAEMON_RUNNING);
|
||||
|
||||
export const selectFullscreenMode = createSelector(selectState, state => state.fullscreenMode);
|
||||
|
||||
export const selectSdkReady = createSelector(selectState, state => state.sdkReady);
|
||||
export const selectFullscreenMode = createSelector(
|
||||
selectState,
|
||||
state => state.fullscreenMode
|
||||
);
|
||||
|
|
|
@ -398,23 +398,6 @@ const discoverStyle = StyleSheet.create({
|
|||
fontSize: 14,
|
||||
textAlign: 'center',
|
||||
},
|
||||
sdkLoading: {
|
||||
position: 'absolute',
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
padding: 8,
|
||||
backgroundColor: Colors.LbryGreen,
|
||||
},
|
||||
sdkLoadingText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: 14,
|
||||
color: Colors.White,
|
||||
marginLeft: 8,
|
||||
},
|
||||
});
|
||||
|
||||
export default discoverStyle;
|
||||
|
|
|
@ -1,93 +0,0 @@
|
|||
import { StyleSheet } from 'react-native';
|
||||
import Colors from './colors';
|
||||
|
||||
const modalRepostStyle = StyleSheet.create({
|
||||
container: {
|
||||
padding: 16,
|
||||
},
|
||||
title: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: 24,
|
||||
marginBottom: 8,
|
||||
},
|
||||
row: {
|
||||
flexDirection: 'row',
|
||||
flex: 1,
|
||||
},
|
||||
amountRow: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
marginRight: 24,
|
||||
},
|
||||
depositAmountInput: {
|
||||
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,
|
||||
},
|
||||
cancelLink: {
|
||||
color: Colors.Grey,
|
||||
},
|
||||
advancedLink: {
|
||||
color: Colors.Grey,
|
||||
marginRight: 16,
|
||||
},
|
||||
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,
|
||||
},
|
||||
label: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: 14,
|
||||
marginTop: 8,
|
||||
},
|
||||
nameRow: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
},
|
||||
rightButtonRow: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
},
|
||||
input: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: 14,
|
||||
},
|
||||
});
|
||||
|
||||
export default modalRepostStyle;
|
|
@ -411,7 +411,6 @@ const publishStyle = StyleSheet.create({
|
|||
marginTop: 60,
|
||||
},
|
||||
publishesScrollPadding: {
|
||||
paddingTop: 16,
|
||||
paddingBottom: 16,
|
||||
},
|
||||
listItem: {
|
||||
|
@ -419,9 +418,8 @@ const publishStyle = StyleSheet.create({
|
|||
flexDirection: 'row',
|
||||
justifyContent: 'space-between',
|
||||
marginTop: 8,
|
||||
marginLeft: 16,
|
||||
marginRight: 16,
|
||||
marginBottom: 12,
|
||||
marginLeft: 8,
|
||||
marginRight: 8,
|
||||
},
|
||||
noVideos: {
|
||||
color: Colors.White,
|
||||
|
@ -451,7 +449,7 @@ const publishStyle = StyleSheet.create({
|
|||
publishesFooterButton: {
|
||||
alignSelf: 'flex-start',
|
||||
backgroundColor: Colors.LbryGreen,
|
||||
marginTop: 8,
|
||||
marginTop: 16,
|
||||
},
|
||||
thumbnailEditOverlay: {
|
||||
alignItems: 'center',
|
||||
|
|
|
@ -147,10 +147,6 @@ const rewardStyle = StyleSheet.create({
|
|||
width: '18%',
|
||||
alignItems: 'center',
|
||||
},
|
||||
rightColHeader: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: 12,
|
||||
},
|
||||
rewardAmount: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: 26,
|
||||
|
@ -158,7 +154,6 @@ const rewardStyle = StyleSheet.create({
|
|||
},
|
||||
rewardCurrency: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: 12,
|
||||
},
|
||||
rewardTitle: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
|
@ -327,12 +322,6 @@ const rewardStyle = StyleSheet.create({
|
|||
activeFilterLink: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
},
|
||||
rewardUsd: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: 12,
|
||||
color: Colors.DescriptionGrey,
|
||||
marginTop: 6,
|
||||
},
|
||||
});
|
||||
|
||||
export default rewardStyle;
|
||||
|
|
|
@ -192,6 +192,8 @@ const subscriptionsStyle = StyleSheet.create({
|
|||
suggestedItem: {
|
||||
alignItems: 'center',
|
||||
marginBottom: 16,
|
||||
marginLeft: 16,
|
||||
marginRight: 16,
|
||||
height: 140,
|
||||
},
|
||||
suggestedItemThumbnailContainer: {
|
||||
|
@ -207,8 +209,8 @@ const subscriptionsStyle = StyleSheet.create({
|
|||
height: '100%',
|
||||
},
|
||||
suggestedItemDetails: {
|
||||
marginLeft: 8,
|
||||
marginRight: 8,
|
||||
marginLeft: 16,
|
||||
marginRight: 16,
|
||||
alignItems: 'center',
|
||||
},
|
||||
suggestedItemSubscribe: {
|
||||
|
@ -227,7 +229,7 @@ const subscriptionsStyle = StyleSheet.create({
|
|||
suggestedItemTitle: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
textAlign: 'center',
|
||||
fontSize: 13,
|
||||
fontSize: 14,
|
||||
marginTop: 4,
|
||||
marginBottom: 2,
|
||||
},
|
||||
|
|
|
@ -23,7 +23,7 @@ const tagStyle = StyleSheet.create({
|
|||
},
|
||||
text: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: 12,
|
||||
fontSize: 14,
|
||||
marginRight: 8,
|
||||
},
|
||||
tagResultsList: {
|
||||
|
|
|
@ -103,12 +103,10 @@ const walletStyle = StyleSheet.create({
|
|||
marginLeft: 16,
|
||||
marginRight: 16,
|
||||
},
|
||||
balanceExtra: {
|
||||
marginLeft: 16,
|
||||
marginRight: 16,
|
||||
},
|
||||
balanceExtraCard: {
|
||||
backgroundColor: Colors.White,
|
||||
marginLeft: 16,
|
||||
marginRight: 16,
|
||||
padding: 16,
|
||||
},
|
||||
balanceBackground: {
|
||||
|
@ -137,13 +135,6 @@ const walletStyle = StyleSheet.create({
|
|||
fontFamily: 'Inter-Bold',
|
||||
fontSize: 36,
|
||||
marginLeft: 16,
|
||||
},
|
||||
usdBalance: {
|
||||
color: Colors.White,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: 20,
|
||||
marginLeft: 16,
|
||||
marginTop: 2,
|
||||
marginBottom: 16,
|
||||
},
|
||||
balanceFocus: {
|
||||
|
@ -261,22 +252,6 @@ const walletStyle = StyleSheet.create({
|
|||
borderBottomWidth: 1,
|
||||
borderBottomColor: Colors.PageBackground,
|
||||
},
|
||||
syncDriverCustody: {
|
||||
backgroundColor: Colors.LbryGreen,
|
||||
padding: 16,
|
||||
},
|
||||
syncInfoText: {
|
||||
color: Colors.White,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: 16,
|
||||
marginBottom: 8,
|
||||
},
|
||||
syncInfoLink: {
|
||||
color: Colors.White,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: 14,
|
||||
textDecorationLine: 'underline',
|
||||
},
|
||||
syncDriverLink: {
|
||||
color: Colors.LbryGreen,
|
||||
fontFamily: 'Inter-Regular',
|
||||
|
@ -409,11 +384,6 @@ const walletStyle = StyleSheet.create({
|
|||
fontFamily: 'Inter-SemiBold',
|
||||
fontSize: 28,
|
||||
},
|
||||
usdWalletExtraBalance: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: 16,
|
||||
color: Colors.DescriptionGrey,
|
||||
},
|
||||
balanceRow: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
|
@ -436,34 +406,6 @@ const walletStyle = StyleSheet.create({
|
|||
left: 0,
|
||||
top: 0,
|
||||
},
|
||||
usdInfoCard: {
|
||||
backgroundColor: Colors.White,
|
||||
padding: 16,
|
||||
borderBottomColor: Colors.VeryLightGrey,
|
||||
borderBottomWidth: 1,
|
||||
},
|
||||
usdInfoText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: 14,
|
||||
marginBottom: 8,
|
||||
},
|
||||
usdConvertLink: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: 16,
|
||||
color: Colors.LbryGreen,
|
||||
},
|
||||
usdConvertFaqLink: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: 14,
|
||||
color: Colors.LbryGreen,
|
||||
},
|
||||
earnTipsLink: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: 14,
|
||||
color: Colors.LbryGreen,
|
||||
marginTop: 12,
|
||||
marginRight: 16,
|
||||
},
|
||||
});
|
||||
|
||||
export default walletStyle;
|
||||
|
|
|
@ -432,14 +432,3 @@ export function fetchReferralCode(successCallback, errorCallback) {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function decode(value) {
|
||||
return decodeURIComponent(value).replace(/\+/g, ' ');
|
||||
}
|
||||
|
||||
export function formatUsd(value) {
|
||||
if (isNaN(parseFloat(value))) {
|
||||
value = 0;
|
||||
}
|
||||
return '$' + parseFloat(value).toFixed(2);
|
||||
}
|
||||
|
|
405
yarn.lock
405
yarn.lock
|
@ -10,17 +10,17 @@
|
|||
"@babel/highlight" "^7.8.3"
|
||||
|
||||
"@babel/core@^7.0.0", "@babel/core@^7.6.2":
|
||||
version "7.8.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.7.tgz#b69017d221ccdeb203145ae9da269d72cf102f3b"
|
||||
integrity sha512-rBlqF3Yko9cynC5CCFy6+K/w2N+Sq/ff2BPy+Krp7rHlABIr5epbA7OxVeKoMHB39LZOp1UY5SuLjy6uWi35yA==
|
||||
version "7.8.4"
|
||||
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.4.tgz#d496799e5c12195b3602d0fddd77294e3e38e80e"
|
||||
integrity sha512-0LiLrB2PwrVI+a2/IEskBopDYSd8BCb3rOvH7D5tzoWd696TBEduBvuLVm4Nx6rltrLZqvI3MCalB2K2aVzQjA==
|
||||
dependencies:
|
||||
"@babel/code-frame" "^7.8.3"
|
||||
"@babel/generator" "^7.8.7"
|
||||
"@babel/generator" "^7.8.4"
|
||||
"@babel/helpers" "^7.8.4"
|
||||
"@babel/parser" "^7.8.7"
|
||||
"@babel/template" "^7.8.6"
|
||||
"@babel/traverse" "^7.8.6"
|
||||
"@babel/types" "^7.8.7"
|
||||
"@babel/parser" "^7.8.4"
|
||||
"@babel/template" "^7.8.3"
|
||||
"@babel/traverse" "^7.8.4"
|
||||
"@babel/types" "^7.8.3"
|
||||
convert-source-map "^1.7.0"
|
||||
debug "^4.1.0"
|
||||
gensync "^1.0.0-beta.1"
|
||||
|
@ -30,12 +30,12 @@
|
|||
semver "^5.4.1"
|
||||
source-map "^0.5.0"
|
||||
|
||||
"@babel/generator@^7.0.0", "@babel/generator@^7.8.6", "@babel/generator@^7.8.7":
|
||||
version "7.8.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.7.tgz#870b3cf7984f5297998152af625c4f3e341400f7"
|
||||
integrity sha512-DQwjiKJqH4C3qGiyQCAExJHoZssn49JTMJgZ8SANGgVFdkupcUhLOdkAeoC6kmHZCPfoDG5M0b6cFlSN5wW7Ew==
|
||||
"@babel/generator@^7.0.0", "@babel/generator@^7.8.4":
|
||||
version "7.8.4"
|
||||
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.4.tgz#35bbc74486956fe4251829f9f6c48330e8d0985e"
|
||||
integrity sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA==
|
||||
dependencies:
|
||||
"@babel/types" "^7.8.7"
|
||||
"@babel/types" "^7.8.3"
|
||||
jsesc "^2.5.1"
|
||||
lodash "^4.17.13"
|
||||
source-map "^0.5.0"
|
||||
|
@ -63,33 +63,32 @@
|
|||
"@babel/types" "^7.8.3"
|
||||
esutils "^2.0.0"
|
||||
|
||||
"@babel/helper-call-delegate@^7.8.7":
|
||||
version "7.8.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.8.7.tgz#28a279c2e6c622a6233da548127f980751324cab"
|
||||
integrity sha512-doAA5LAKhsFCR0LAFIf+r2RSMmC+m8f/oQ+URnUET/rWeEzC0yTRmAGyWkD4sSu3xwbS7MYQ2u+xlt1V5R56KQ==
|
||||
"@babel/helper-call-delegate@^7.8.3":
|
||||
version "7.8.3"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.8.3.tgz#de82619898aa605d409c42be6ffb8d7204579692"
|
||||
integrity sha512-6Q05px0Eb+N4/GTyKPPvnkig7Lylw+QzihMpws9iiZQv7ZImf84ZsZpQH7QoWN4n4tm81SnSzPgHw2qtO0Zf3A==
|
||||
dependencies:
|
||||
"@babel/helper-hoist-variables" "^7.8.3"
|
||||
"@babel/traverse" "^7.8.3"
|
||||
"@babel/types" "^7.8.7"
|
||||
"@babel/types" "^7.8.3"
|
||||
|
||||
"@babel/helper-create-class-features-plugin@^7.8.3":
|
||||
version "7.8.6"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.8.6.tgz#243a5b46e2f8f0f674dc1387631eb6b28b851de0"
|
||||
integrity sha512-klTBDdsr+VFFqaDHm5rR69OpEQtO2Qv8ECxHS1mNhJJvaHArR6a1xTf5K/eZW7eZpJbhCx3NW1Yt/sKsLXLblg==
|
||||
version "7.8.3"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.8.3.tgz#5b94be88c255f140fd2c10dd151e7f98f4bff397"
|
||||
integrity sha512-qmp4pD7zeTxsv0JNecSBsEmG1ei2MqwJq4YQcK3ZWm/0t07QstWfvuV/vm3Qt5xNMFETn2SZqpMx2MQzbtq+KA==
|
||||
dependencies:
|
||||
"@babel/helper-function-name" "^7.8.3"
|
||||
"@babel/helper-member-expression-to-functions" "^7.8.3"
|
||||
"@babel/helper-optimise-call-expression" "^7.8.3"
|
||||
"@babel/helper-plugin-utils" "^7.8.3"
|
||||
"@babel/helper-replace-supers" "^7.8.6"
|
||||
"@babel/helper-replace-supers" "^7.8.3"
|
||||
"@babel/helper-split-export-declaration" "^7.8.3"
|
||||
|
||||
"@babel/helper-create-regexp-features-plugin@^7.8.3":
|
||||
version "7.8.6"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.6.tgz#7fa040c97fb8aebe1247a5c645330c32d083066b"
|
||||
integrity sha512-bPyujWfsHhV/ztUkwGHz/RPV1T1TDEsSZDsN42JPehndA+p1KKTh3npvTadux0ZhCrytx9tvjpWNowKby3tM6A==
|
||||
version "7.8.3"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.3.tgz#c774268c95ec07ee92476a3862b75cc2839beb79"
|
||||
integrity sha512-Gcsm1OHCUr9o9TcJln57xhWHtdXbA2pgQ58S0Lxlks0WMGNXuki4+GLfX0p+L2ZkINUGZvfkz8rzoqJQSthI+Q==
|
||||
dependencies:
|
||||
"@babel/helper-annotate-as-pure" "^7.8.3"
|
||||
"@babel/helper-regex" "^7.8.3"
|
||||
regexpu-core "^4.6.0"
|
||||
|
||||
|
@ -148,16 +147,15 @@
|
|||
"@babel/types" "^7.8.3"
|
||||
|
||||
"@babel/helper-module-transforms@^7.8.3":
|
||||
version "7.8.6"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.8.6.tgz#6a13b5eecadc35692047073a64e42977b97654a4"
|
||||
integrity sha512-RDnGJSR5EFBJjG3deY0NiL0K9TO8SXxS9n/MPsbPK/s9LbQymuLNtlzvDiNS7IpecuL45cMeLVkA+HfmlrnkRg==
|
||||
version "7.8.3"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.8.3.tgz#d305e35d02bee720fbc2c3c3623aa0c316c01590"
|
||||
integrity sha512-C7NG6B7vfBa/pwCOshpMbOYUmrYQDfCpVL/JCRu0ek8B5p8kue1+BCXpg2vOYs7w5ACB9GTOBYQ5U6NwrMg+3Q==
|
||||
dependencies:
|
||||
"@babel/helper-module-imports" "^7.8.3"
|
||||
"@babel/helper-replace-supers" "^7.8.6"
|
||||
"@babel/helper-simple-access" "^7.8.3"
|
||||
"@babel/helper-split-export-declaration" "^7.8.3"
|
||||
"@babel/template" "^7.8.6"
|
||||
"@babel/types" "^7.8.6"
|
||||
"@babel/template" "^7.8.3"
|
||||
"@babel/types" "^7.8.3"
|
||||
lodash "^4.17.13"
|
||||
|
||||
"@babel/helper-optimise-call-expression@^7.8.3":
|
||||
|
@ -190,15 +188,15 @@
|
|||
"@babel/traverse" "^7.8.3"
|
||||
"@babel/types" "^7.8.3"
|
||||
|
||||
"@babel/helper-replace-supers@^7.8.3", "@babel/helper-replace-supers@^7.8.6":
|
||||
version "7.8.6"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz#5ada744fd5ad73203bf1d67459a27dcba67effc8"
|
||||
integrity sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA==
|
||||
"@babel/helper-replace-supers@^7.8.3":
|
||||
version "7.8.3"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.8.3.tgz#91192d25f6abbcd41da8a989d4492574fb1530bc"
|
||||
integrity sha512-xOUssL6ho41U81etpLoT2RTdvdus4VfHamCuAm4AHxGr+0it5fnwoVdwUJ7GFEqCsQYzJUhcbsN9wB9apcYKFA==
|
||||
dependencies:
|
||||
"@babel/helper-member-expression-to-functions" "^7.8.3"
|
||||
"@babel/helper-optimise-call-expression" "^7.8.3"
|
||||
"@babel/traverse" "^7.8.6"
|
||||
"@babel/types" "^7.8.6"
|
||||
"@babel/traverse" "^7.8.3"
|
||||
"@babel/types" "^7.8.3"
|
||||
|
||||
"@babel/helper-simple-access@^7.8.3":
|
||||
version "7.8.3"
|
||||
|
@ -243,10 +241,10 @@
|
|||
esutils "^2.0.2"
|
||||
js-tokens "^4.0.0"
|
||||
|
||||
"@babel/parser@^7.0.0", "@babel/parser@^7.8.6", "@babel/parser@^7.8.7":
|
||||
version "7.8.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.7.tgz#7b8facf95d25fef9534aad51c4ffecde1a61e26a"
|
||||
integrity sha512-9JWls8WilDXFGxs0phaXAZgpxTZhSk/yOYH2hTHC0X1yC7Z78IJfvR1vJ+rmJKq3I35td2XzXzN6ZLYlna+r/A==
|
||||
"@babel/parser@^7.0.0", "@babel/parser@^7.8.3", "@babel/parser@^7.8.4":
|
||||
version "7.8.4"
|
||||
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.4.tgz#d1dbe64691d60358a974295fa53da074dd2ce8e8"
|
||||
integrity sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==
|
||||
|
||||
"@babel/plugin-external-helpers@^7.0.0":
|
||||
version "7.8.3"
|
||||
|
@ -405,16 +403,16 @@
|
|||
lodash "^4.17.13"
|
||||
|
||||
"@babel/plugin-transform-classes@^7.0.0":
|
||||
version "7.8.6"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.8.6.tgz#77534447a477cbe5995ae4aee3e39fbc8090c46d"
|
||||
integrity sha512-k9r8qRay/R6v5aWZkrEclEhKO6mc1CCQr2dLsVHBmOQiMpN6I2bpjX3vgnldUWeEI1GHVNByULVxZ4BdP4Hmdg==
|
||||
version "7.8.3"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.8.3.tgz#46fd7a9d2bb9ea89ce88720477979fe0d71b21b8"
|
||||
integrity sha512-SjT0cwFJ+7Rbr1vQsvphAHwUHvSUPmMjMU/0P59G8U2HLFqSa082JO7zkbDNWs9kH/IUqpHI6xWNesGf8haF1w==
|
||||
dependencies:
|
||||
"@babel/helper-annotate-as-pure" "^7.8.3"
|
||||
"@babel/helper-define-map" "^7.8.3"
|
||||
"@babel/helper-function-name" "^7.8.3"
|
||||
"@babel/helper-optimise-call-expression" "^7.8.3"
|
||||
"@babel/helper-plugin-utils" "^7.8.3"
|
||||
"@babel/helper-replace-supers" "^7.8.6"
|
||||
"@babel/helper-replace-supers" "^7.8.3"
|
||||
"@babel/helper-split-export-declaration" "^7.8.3"
|
||||
globals "^11.1.0"
|
||||
|
||||
|
@ -449,9 +447,9 @@
|
|||
"@babel/plugin-syntax-flow" "^7.8.3"
|
||||
|
||||
"@babel/plugin-transform-for-of@^7.0.0":
|
||||
version "7.8.6"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.8.6.tgz#a051bd1b402c61af97a27ff51b468321c7c2a085"
|
||||
integrity sha512-M0pw4/1/KI5WAxPsdcUL/w2LJ7o89YHN3yLkzNjg7Yl15GlVGgzHyCU+FMeAxevHGsLVmUqbirlUIKTafPmzdw==
|
||||
version "7.8.4"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.8.4.tgz#6fe8eae5d6875086ee185dd0b098a8513783b47d"
|
||||
integrity sha512-iAXNlOWvcYUYoV8YIxwS7TxGRJcxyl8eQCfT+A5j8sKUzRFvJdcyjp97jL2IghWSRDaL2PU2O2tX8Cu9dTBq5A==
|
||||
dependencies:
|
||||
"@babel/helper-plugin-utils" "^7.8.3"
|
||||
|
||||
|
@ -503,11 +501,11 @@
|
|||
"@babel/helper-replace-supers" "^7.8.3"
|
||||
|
||||
"@babel/plugin-transform-parameters@^7.0.0":
|
||||
version "7.8.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.8.7.tgz#66fa2f1de4129b4e0447509223ac71bda4955395"
|
||||
integrity sha512-brYWaEPTRimOctz2NDA3jnBbDi7SVN2T4wYuu0aqSzxC3nozFZngGaw29CJ9ZPweB7k+iFmZuoG3IVPIcXmD2g==
|
||||
version "7.8.4"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.8.4.tgz#1d5155de0b65db0ccf9971165745d3bb990d77d3"
|
||||
integrity sha512-IsS3oTxeTsZlE5KqzTbcC2sV0P9pXdec53SU+Yxv7o/6dvGM5AkTotQKhoSffhNgZ/dftsSiOoxy7evCYJXzVA==
|
||||
dependencies:
|
||||
"@babel/helper-call-delegate" "^7.8.7"
|
||||
"@babel/helper-call-delegate" "^7.8.3"
|
||||
"@babel/helper-get-function-arity" "^7.8.3"
|
||||
"@babel/helper-plugin-utils" "^7.8.3"
|
||||
|
||||
|
@ -543,11 +541,11 @@
|
|||
"@babel/plugin-syntax-jsx" "^7.8.3"
|
||||
|
||||
"@babel/plugin-transform-regenerator@^7.0.0":
|
||||
version "7.8.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.7.tgz#5e46a0dca2bee1ad8285eb0527e6abc9c37672f8"
|
||||
integrity sha512-TIg+gAl4Z0a3WmD3mbYSk+J9ZUH6n/Yc57rtKRnlA/7rcCvpekHXe0CMZHP1gYp7/KLe9GHTuIba0vXmls6drA==
|
||||
version "7.8.3"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.3.tgz#b31031e8059c07495bf23614c97f3d9698bc6ec8"
|
||||
integrity sha512-qt/kcur/FxrQrzFR432FGZznkVAjiyFtCOANjkAKwCbt465L6ZCiUQh2oMYGU3Wo8LRFJxNDFwWn106S5wVUNA==
|
||||
dependencies:
|
||||
regenerator-transform "^0.14.2"
|
||||
regenerator-transform "^0.14.0"
|
||||
|
||||
"@babel/plugin-transform-runtime@^7.0.0":
|
||||
version "7.8.3"
|
||||
|
@ -589,10 +587,10 @@
|
|||
"@babel/helper-annotate-as-pure" "^7.8.3"
|
||||
"@babel/helper-plugin-utils" "^7.8.3"
|
||||
|
||||
"@babel/plugin-transform-typescript@^7.0.0":
|
||||
version "7.8.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.8.7.tgz#48bccff331108a7b3a28c3a4adc89e036dc3efda"
|
||||
integrity sha512-7O0UsPQVNKqpHeHLpfvOG4uXmlw+MOxYvUv6Otc9uH5SYMIxvF6eBdjkWvC3f9G+VXe0RsNExyAQBeTRug/wqQ==
|
||||
"@babel/plugin-transform-typescript@^7.0.0", "@babel/plugin-transform-typescript@^7.5.0":
|
||||
version "7.8.3"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.8.3.tgz#be6f01a7ef423be68e65ace1f04fc407e6d88917"
|
||||
integrity sha512-Ebj230AxcrKGZPKIp4g4TdQLrqX95TobLUWKd/CwG7X1XHUH1ZpkpFvXuXqWbtGRWb7uuEWNlrl681wsOArAdQ==
|
||||
dependencies:
|
||||
"@babel/helper-create-class-features-plugin" "^7.8.3"
|
||||
"@babel/helper-plugin-utils" "^7.8.3"
|
||||
|
@ -607,9 +605,9 @@
|
|||
"@babel/helper-plugin-utils" "^7.8.3"
|
||||
|
||||
"@babel/register@^7.0.0":
|
||||
version "7.8.6"
|
||||
resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.8.6.tgz#a1066aa6168a73a70c35ef28cc5865ccc087ea69"
|
||||
integrity sha512-7IDO93fuRsbyml7bAafBQb3RcBGlCpU4hh5wADA2LJEEcYk92WkwFZ0pHyIi2fb5Auoz1714abETdZKCOxN0CQ==
|
||||
version "7.8.3"
|
||||
resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.8.3.tgz#5d5d30cfcc918437535d724b8ac1e4a60c5db1f8"
|
||||
integrity sha512-t7UqebaWwo9nXWClIPLPloa5pN33A2leVs8Hf0e9g9YwUP8/H9NeR7DJU+4CXo23QtjChQv5a3DjEtT83ih1rg==
|
||||
dependencies:
|
||||
find-cache-dir "^2.0.0"
|
||||
lodash "^4.17.13"
|
||||
|
@ -617,41 +615,41 @@
|
|||
pirates "^4.0.0"
|
||||
source-map-support "^0.5.16"
|
||||
|
||||
"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.8.4":
|
||||
version "7.8.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.8.7.tgz#8fefce9802db54881ba59f90bb28719b4996324d"
|
||||
integrity sha512-+AATMUFppJDw6aiR5NVPHqIQBlV/Pj8wY/EZH+lmvRdUo9xBaz/rF3alAwFJQavvKfeOlPE7oaaDHVbcySbCsg==
|
||||
"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2":
|
||||
version "7.8.4"
|
||||
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.8.4.tgz#d79f5a2040f7caa24d53e563aad49cbc05581308"
|
||||
integrity sha512-neAp3zt80trRVBI1x0azq6c57aNBqYZH8KhMm3TaB7wEI5Q4A2SHfBHE8w9gOhI/lrqxtEbXZgQIrHP+wvSGwQ==
|
||||
dependencies:
|
||||
regenerator-runtime "^0.13.4"
|
||||
regenerator-runtime "^0.13.2"
|
||||
|
||||
"@babel/template@^7.0.0", "@babel/template@^7.8.3", "@babel/template@^7.8.6":
|
||||
version "7.8.6"
|
||||
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.6.tgz#86b22af15f828dfb086474f964dcc3e39c43ce2b"
|
||||
integrity sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg==
|
||||
"@babel/template@^7.0.0", "@babel/template@^7.8.3":
|
||||
version "7.8.3"
|
||||
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.3.tgz#e02ad04fe262a657809327f578056ca15fd4d1b8"
|
||||
integrity sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==
|
||||
dependencies:
|
||||
"@babel/code-frame" "^7.8.3"
|
||||
"@babel/parser" "^7.8.6"
|
||||
"@babel/types" "^7.8.6"
|
||||
"@babel/parser" "^7.8.3"
|
||||
"@babel/types" "^7.8.3"
|
||||
|
||||
"@babel/traverse@^7.0.0", "@babel/traverse@^7.8.3", "@babel/traverse@^7.8.4", "@babel/traverse@^7.8.6":
|
||||
version "7.8.6"
|
||||
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.6.tgz#acfe0c64e1cd991b3e32eae813a6eb564954b5ff"
|
||||
integrity sha512-2B8l0db/DPi8iinITKuo7cbPznLCEk0kCxDoB9/N6gGNg/gxOXiR/IcymAFPiBwk5w6TtQ27w4wpElgp9btR9A==
|
||||
"@babel/traverse@^7.0.0", "@babel/traverse@^7.8.3", "@babel/traverse@^7.8.4":
|
||||
version "7.8.4"
|
||||
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.4.tgz#f0845822365f9d5b0e312ed3959d3f827f869e3c"
|
||||
integrity sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg==
|
||||
dependencies:
|
||||
"@babel/code-frame" "^7.8.3"
|
||||
"@babel/generator" "^7.8.6"
|
||||
"@babel/generator" "^7.8.4"
|
||||
"@babel/helper-function-name" "^7.8.3"
|
||||
"@babel/helper-split-export-declaration" "^7.8.3"
|
||||
"@babel/parser" "^7.8.6"
|
||||
"@babel/types" "^7.8.6"
|
||||
"@babel/parser" "^7.8.4"
|
||||
"@babel/types" "^7.8.3"
|
||||
debug "^4.1.0"
|
||||
globals "^11.1.0"
|
||||
lodash "^4.17.13"
|
||||
|
||||
"@babel/types@^7.0.0", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.8.7":
|
||||
version "7.8.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.7.tgz#1fc9729e1acbb2337d5b6977a63979b4819f5d1d"
|
||||
integrity sha512-k2TreEHxFA4CjGkL+GYjRyx35W0Mr7DP5+9q6WMkyKXB+904bYmG40syjMFV0oLlhhFCwWl0vA0DyzTDkwAiJw==
|
||||
"@babel/types@^7.0.0", "@babel/types@^7.8.3":
|
||||
version "7.8.3"
|
||||
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.3.tgz#5a383dffa5416db1b73dedffd311ffd0788fb31c"
|
||||
integrity sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==
|
||||
dependencies:
|
||||
esutils "^2.0.2"
|
||||
lodash "^4.17.13"
|
||||
|
@ -770,9 +768,9 @@
|
|||
chalk "^3.0.0"
|
||||
|
||||
"@react-native-community/async-storage@^1.5.1":
|
||||
version "1.8.1"
|
||||
resolved "https://registry.yarnpkg.com/@react-native-community/async-storage/-/async-storage-1.8.1.tgz#c93e69dcf948667b207e409b8039b7edf199159b"
|
||||
integrity sha512-MA1fTp4SB7OOtDmNAwds6jIpiwwty1NIoFboWjEWkoyWW35zIuxlhHxD4joSy21aWEzUVwvv6JJ2hSsP/HTb7A==
|
||||
version "1.8.0"
|
||||
resolved "https://registry.yarnpkg.com/@react-native-community/async-storage/-/async-storage-1.8.0.tgz#5f23ad486daa284398c71f2cc94d15fb7be40bb8"
|
||||
integrity sha512-R8hYm9h7MqoTa/opzBID6hhL5rseNoMJK1wG/B/Diob+JzEv7b1GMpHjsAZX2pU2o82LU73XbPJOPzfvkGFaUA==
|
||||
|
||||
"@react-native-community/cli-debugger-ui@^3.0.0":
|
||||
version "3.0.0"
|
||||
|
@ -820,9 +818,9 @@
|
|||
integrity sha512-ng6Tm537E/M42GjE4TRUxQyL8sRfClcL7bQWblOCoxPZzJ2J3bdALsjeG3vDnVCIfI/R0AeFalN9KjMt0+Z/Zg==
|
||||
|
||||
"@react-native-community/cli@^3.0.0":
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-3.2.1.tgz#2a466801eb6080a1f73358c5d740c53c24ed8c6f"
|
||||
integrity sha512-bZ/bfZ+9r1gQSxp6t7+00DcpC6vmbVYSvzUCFM/yo5k8bhsDdcy8aocscIaXXVGG+v9Edri/Q7hH9ks7L18/Rg==
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-3.2.0.tgz#f4b04b94bf96810c4a7f57379a69ebd11fd9c933"
|
||||
integrity sha512-k8GmNQH/EbIIVd4VlVbFP99IRNhovWV6hhnJ3y2+FfZq18H/U6yV/t1bpI3A3QqPuAyWxk/1jBdXvP6BY/7kbw==
|
||||
dependencies:
|
||||
"@hapi/joi" "^15.0.3"
|
||||
"@react-native-community/cli-debugger-ui" "^3.0.0"
|
||||
|
@ -883,9 +881,9 @@
|
|||
prettier "1.16.4"
|
||||
|
||||
"@react-native-community/masked-view@^0.1.5":
|
||||
version "0.1.7"
|
||||
resolved "https://registry.yarnpkg.com/@react-native-community/masked-view/-/masked-view-0.1.7.tgz#a65ce0702f55cb67fd777995de6fc7b3e5781903"
|
||||
integrity sha512-9KbP7LTLFz9dx1heURJbO6nuVMdSjDez8znlrUzaB1nUwKVsTTwlKRuHxGUYIIkReLWrJQeCv9tidy+84z2eCw==
|
||||
version "0.1.6"
|
||||
resolved "https://registry.yarnpkg.com/@react-native-community/masked-view/-/masked-view-0.1.6.tgz#c7f2ac187c1f25aa8c30d11baa8f4398eca3bb84"
|
||||
integrity sha512-PpMoeXwPUoldCRKDuSi+zK5rT+sJTW6ri6RdGPkSKRzU77Q1d9IaR0O5IKvBj0XSdL3p+dcOa05gk35aGDffBQ==
|
||||
|
||||
"@react-navigation/core@^3.6.1":
|
||||
version "3.6.1"
|
||||
|
@ -1055,15 +1053,15 @@ accepts@~1.3.5, accepts@~1.3.7:
|
|||
mime-types "~2.1.24"
|
||||
negotiator "0.6.2"
|
||||
|
||||
acorn-jsx@^5.2.0:
|
||||
acorn-jsx@^5.1.0:
|
||||
version "5.2.0"
|
||||
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.2.0.tgz#4c66069173d6fdd68ed85239fc256226182b2ebe"
|
||||
integrity sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==
|
||||
|
||||
acorn@^7.1.0:
|
||||
version "7.1.1"
|
||||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf"
|
||||
integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==
|
||||
version "7.1.0"
|
||||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.0.tgz#949d36f2c292535da602283586c2477c57eb2d6c"
|
||||
integrity sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==
|
||||
|
||||
ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5:
|
||||
version "6.12.0"
|
||||
|
@ -1102,11 +1100,11 @@ ansi-escapes@^3.0.0:
|
|||
integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==
|
||||
|
||||
ansi-escapes@^4.2.1:
|
||||
version "4.3.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61"
|
||||
integrity sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.0.tgz#a4ce2b33d6b214b7950d8595c212f12ac9cc569d"
|
||||
integrity sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg==
|
||||
dependencies:
|
||||
type-fest "^0.11.0"
|
||||
type-fest "^0.8.1"
|
||||
|
||||
ansi-fragments@^0.2.1:
|
||||
version "0.2.1"
|
||||
|
@ -2180,9 +2178,9 @@ camelcase@^5.0.0, camelcase@^5.3.1:
|
|||
integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
|
||||
|
||||
caniuse-lite@^1.0.30000844:
|
||||
version "1.0.30001032"
|
||||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001032.tgz#b8d224914e2cd7f507085583d4e38144c652bce4"
|
||||
integrity sha512-8joOm7BwcpEN4BfVHtfh0hBXSAPVYk+eUIcNntGtMkUWy/6AKRCDZINCLe3kB1vHhT2vBxBF85Hh9VlPXi/qjA==
|
||||
version "1.0.30001030"
|
||||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001030.tgz#78076c4c6d67d3e41d6eb9399853fb27fe6e44ee"
|
||||
integrity sha512-QGK0W4Ft/Ac+zTjEiRJfwDNATvS3fodDczBXrH42784kcfqcDKpEPfN08N0HQjrAp8He/Jw8QiSS9QRn7XAbUw==
|
||||
|
||||
capture-exit@^2.0.0:
|
||||
version "2.0.0"
|
||||
|
@ -2756,9 +2754,9 @@ electron-download@^3.0.1:
|
|||
sumchecker "^1.2.0"
|
||||
|
||||
electron-to-chromium@^1.3.47:
|
||||
version "1.3.370"
|
||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.370.tgz#420fba483d30ba3f7965b30ecf850fdb5f08a0bc"
|
||||
integrity sha512-399cXDE9C7qoVF2CUgCA/MLflfvxbo1F0kB/pkB94426freL/JgZ0HNaloomsOfnE+VC/qgTFZqzmivSdaNfPQ==
|
||||
version "1.3.361"
|
||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.361.tgz#a820bf52da171c0024314745462cfe0dc944373e"
|
||||
integrity sha512-OzSVjWpsRhJyr9PSAXkeloSe6e9viU2ToGt1wXlXFsGcxuI9vlsnalL+V/AM59Z2pEo3wRxIddtOGsT7Y6x/sQ==
|
||||
|
||||
electron@^1.8.7:
|
||||
version "1.8.8"
|
||||
|
@ -3102,12 +3100,12 @@ eslint@^6.5.1:
|
|||
v8-compile-cache "^2.0.3"
|
||||
|
||||
espree@^6.1.2:
|
||||
version "6.2.0"
|
||||
resolved "https://registry.yarnpkg.com/espree/-/espree-6.2.0.tgz#349fef01a202bbab047748300deb37fa44da79d7"
|
||||
integrity sha512-Xs8airJ7RQolnDIbLtRutmfvSsAe0xqMMAantCN/GMoqf81TFbeI1T7Jpd56qYu1uuh32dOG5W/X9uO+ghPXzA==
|
||||
version "6.1.2"
|
||||
resolved "https://registry.yarnpkg.com/espree/-/espree-6.1.2.tgz#6c272650932b4f91c3714e5e7b5f5e2ecf47262d"
|
||||
integrity sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA==
|
||||
dependencies:
|
||||
acorn "^7.1.0"
|
||||
acorn-jsx "^5.2.0"
|
||||
acorn-jsx "^5.1.0"
|
||||
eslint-visitor-keys "^1.1.0"
|
||||
|
||||
esprima@^4.0.0:
|
||||
|
@ -3515,9 +3513,9 @@ flow-babel-webpack-plugin@^1.1.1:
|
|||
lodash.merge "^4.6.0"
|
||||
|
||||
"flow-bin@>=0.44.2 <1":
|
||||
version "0.120.1"
|
||||
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.120.1.tgz#ab051d6df71829b70a26a2c90bb81f9d43797cae"
|
||||
integrity sha512-KgE+d+rKzdXzhweYVJty1QIOOZTTbtnXZf+4SLnmArLvmdfeLreQOZpeLbtq5h79m7HhDzX/HkUkoyu/fmSC2A==
|
||||
version "0.119.1"
|
||||
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.119.1.tgz#b6d763b386ec9f1085848ca7df98909d80a16bd0"
|
||||
integrity sha512-mX6qjJVi7aLqR9sDf8QIHt8yYEWQbkMLw7qFoC7sM/AbJwvqFm3pATPN96thsaL9o1rrshvxJpSgoj1PJSC3KA==
|
||||
|
||||
for-in@^1.0.2:
|
||||
version "1.0.2"
|
||||
|
@ -3849,9 +3847,9 @@ home-path@^1.0.1:
|
|||
integrity sha512-tM1pVa+u3ZqQwIkXcWfhUlY3HWS3TsnKsfi2OHHvnhkX52s9etyktPyy1rQotkr0euWimChDq+QkQuDe8ngUlQ==
|
||||
|
||||
hosted-git-info@^2.1.4:
|
||||
version "2.8.8"
|
||||
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488"
|
||||
integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==
|
||||
version "2.8.6"
|
||||
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.6.tgz#3a6e6d0324c5371fc8c7ba7175e1e5d14578724d"
|
||||
integrity sha512-Kp6rShEsCHhF5dD3EWKdkgVA8ix90oSUJ0VY4g9goxxa0+f4lx63muTftn0mlJ/+8IESGWyKnP//V2D7S4ZbIQ==
|
||||
|
||||
http-errors@~1.7.2:
|
||||
version "1.7.3"
|
||||
|
@ -3981,22 +3979,22 @@ inquirer@^3.0.6:
|
|||
through "^2.3.6"
|
||||
|
||||
inquirer@^7.0.0:
|
||||
version "7.0.6"
|
||||
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.0.6.tgz#ee4ff0ea7ecda5324656fe665878790f66df7d0c"
|
||||
integrity sha512-7SVO4h+QIdMq6XcqIqrNte3gS5MzCCKZdsq9DO4PJziBFNYzP3PGFbDjgadDb//MCahzgjCxvQ/O2wa7kx9o4w==
|
||||
version "7.0.4"
|
||||
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.0.4.tgz#99af5bde47153abca23f5c7fc30db247f39da703"
|
||||
integrity sha512-Bu5Td5+j11sCkqfqmUTiwv+tWisMtP0L7Q8WrqA2C/BbBhy1YTdFrvjjlrKq8oagA/tLQBski2Gcx/Sqyi2qSQ==
|
||||
dependencies:
|
||||
ansi-escapes "^4.2.1"
|
||||
chalk "^3.0.0"
|
||||
chalk "^2.4.2"
|
||||
cli-cursor "^3.1.0"
|
||||
cli-width "^2.0.0"
|
||||
external-editor "^3.0.3"
|
||||
figures "^3.0.0"
|
||||
lodash "^4.17.15"
|
||||
mute-stream "0.0.8"
|
||||
run-async "^2.4.0"
|
||||
run-async "^2.2.0"
|
||||
rxjs "^6.5.3"
|
||||
string-width "^4.1.0"
|
||||
strip-ansi "^6.0.0"
|
||||
strip-ansi "^5.1.0"
|
||||
through "^2.3.6"
|
||||
|
||||
internal-slot@^1.0.2:
|
||||
|
@ -4591,17 +4589,17 @@ latest-version@^3.0.0:
|
|||
dependencies:
|
||||
package-json "^4.0.0"
|
||||
|
||||
lbry-redux@lbryio/lbry-redux#69ffd110dbf3633e5847f61f008751edec033017:
|
||||
lbry-redux@lbryio/lbry-redux#9c48cce570ee8e057068c86cb6507e1b441841ee:
|
||||
version "0.0.1"
|
||||
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/69ffd110dbf3633e5847f61f008751edec033017"
|
||||
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/9c48cce570ee8e057068c86cb6507e1b441841ee"
|
||||
dependencies:
|
||||
proxy-polyfill "0.1.6"
|
||||
reselect "^3.0.0"
|
||||
uuid "^3.3.2"
|
||||
|
||||
lbryinc@lbryio/lbryinc#667024ebb7cb207609273174ca422cee47469270:
|
||||
lbryinc@lbryio/lbryinc#0dc8829a319a708f45a855765f70a193ccb72676:
|
||||
version "0.0.1"
|
||||
resolved "https://codeload.github.com/lbryio/lbryinc/tar.gz/667024ebb7cb207609273174ca422cee47469270"
|
||||
resolved "https://codeload.github.com/lbryio/lbryinc/tar.gz/0dc8829a319a708f45a855765f70a193ccb72676"
|
||||
dependencies:
|
||||
reselect "^3.0.0"
|
||||
|
||||
|
@ -5049,47 +5047,6 @@ metro-minify-uglify@^0.56.4:
|
|||
dependencies:
|
||||
uglify-es "^3.1.9"
|
||||
|
||||
metro-react-native-babel-preset@0.56.3:
|
||||
version "0.56.3"
|
||||
resolved "https://registry.yarnpkg.com/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.56.3.tgz#5a1097c2f94e8ee0797a8ba2ab8f86d096f4c093"
|
||||
integrity sha512-tGPzX2ZwI8vQ8SiNVBPUIgKqmaRNVB6rtJtHCBQZAYRiMbxh0NHCUoFfKBej6U5qVgxiYYHyN8oB23evG4/Oow==
|
||||
dependencies:
|
||||
"@babel/plugin-proposal-class-properties" "^7.0.0"
|
||||
"@babel/plugin-proposal-export-default-from" "^7.0.0"
|
||||
"@babel/plugin-proposal-nullish-coalescing-operator" "^7.0.0"
|
||||
"@babel/plugin-proposal-object-rest-spread" "^7.0.0"
|
||||
"@babel/plugin-proposal-optional-catch-binding" "^7.0.0"
|
||||
"@babel/plugin-proposal-optional-chaining" "^7.0.0"
|
||||
"@babel/plugin-syntax-dynamic-import" "^7.0.0"
|
||||
"@babel/plugin-syntax-export-default-from" "^7.0.0"
|
||||
"@babel/plugin-syntax-flow" "^7.2.0"
|
||||
"@babel/plugin-transform-arrow-functions" "^7.0.0"
|
||||
"@babel/plugin-transform-block-scoping" "^7.0.0"
|
||||
"@babel/plugin-transform-classes" "^7.0.0"
|
||||
"@babel/plugin-transform-computed-properties" "^7.0.0"
|
||||
"@babel/plugin-transform-destructuring" "^7.0.0"
|
||||
"@babel/plugin-transform-exponentiation-operator" "^7.0.0"
|
||||
"@babel/plugin-transform-flow-strip-types" "^7.0.0"
|
||||
"@babel/plugin-transform-for-of" "^7.0.0"
|
||||
"@babel/plugin-transform-function-name" "^7.0.0"
|
||||
"@babel/plugin-transform-literals" "^7.0.0"
|
||||
"@babel/plugin-transform-modules-commonjs" "^7.0.0"
|
||||
"@babel/plugin-transform-object-assign" "^7.0.0"
|
||||
"@babel/plugin-transform-parameters" "^7.0.0"
|
||||
"@babel/plugin-transform-react-display-name" "^7.0.0"
|
||||
"@babel/plugin-transform-react-jsx" "^7.0.0"
|
||||
"@babel/plugin-transform-react-jsx-source" "^7.0.0"
|
||||
"@babel/plugin-transform-regenerator" "^7.0.0"
|
||||
"@babel/plugin-transform-runtime" "^7.0.0"
|
||||
"@babel/plugin-transform-shorthand-properties" "^7.0.0"
|
||||
"@babel/plugin-transform-spread" "^7.0.0"
|
||||
"@babel/plugin-transform-sticky-regex" "^7.0.0"
|
||||
"@babel/plugin-transform-template-literals" "^7.0.0"
|
||||
"@babel/plugin-transform-typescript" "^7.0.0"
|
||||
"@babel/plugin-transform-unicode-regex" "^7.0.0"
|
||||
"@babel/template" "^7.0.0"
|
||||
react-refresh "^0.4.0"
|
||||
|
||||
metro-react-native-babel-preset@^0.56.4:
|
||||
version "0.56.4"
|
||||
resolved "https://registry.yarnpkg.com/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.56.4.tgz#dcedc64b7ff5c0734839458e70eb0ebef6d063a8"
|
||||
|
@ -5131,6 +5088,47 @@ metro-react-native-babel-preset@^0.56.4:
|
|||
"@babel/template" "^7.0.0"
|
||||
react-refresh "^0.4.0"
|
||||
|
||||
metro-react-native-babel-preset@^0.58.0:
|
||||
version "0.58.0"
|
||||
resolved "https://registry.yarnpkg.com/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.58.0.tgz#18f48d33fe124280ffabc000ab8b42c488d762a2"
|
||||
integrity sha512-MRriNW+fF6jxABsgPphocUY6mIhmCm8idcrQZ58fT3Iti2vCdtkaK32TyCGUNUptzhUe2/cbE57j4aC+eaodAA==
|
||||
dependencies:
|
||||
"@babel/plugin-proposal-class-properties" "^7.0.0"
|
||||
"@babel/plugin-proposal-export-default-from" "^7.0.0"
|
||||
"@babel/plugin-proposal-nullish-coalescing-operator" "^7.0.0"
|
||||
"@babel/plugin-proposal-object-rest-spread" "^7.0.0"
|
||||
"@babel/plugin-proposal-optional-catch-binding" "^7.0.0"
|
||||
"@babel/plugin-proposal-optional-chaining" "^7.0.0"
|
||||
"@babel/plugin-syntax-dynamic-import" "^7.0.0"
|
||||
"@babel/plugin-syntax-export-default-from" "^7.0.0"
|
||||
"@babel/plugin-syntax-flow" "^7.2.0"
|
||||
"@babel/plugin-transform-arrow-functions" "^7.0.0"
|
||||
"@babel/plugin-transform-block-scoping" "^7.0.0"
|
||||
"@babel/plugin-transform-classes" "^7.0.0"
|
||||
"@babel/plugin-transform-computed-properties" "^7.0.0"
|
||||
"@babel/plugin-transform-destructuring" "^7.0.0"
|
||||
"@babel/plugin-transform-exponentiation-operator" "^7.0.0"
|
||||
"@babel/plugin-transform-flow-strip-types" "^7.0.0"
|
||||
"@babel/plugin-transform-for-of" "^7.0.0"
|
||||
"@babel/plugin-transform-function-name" "^7.0.0"
|
||||
"@babel/plugin-transform-literals" "^7.0.0"
|
||||
"@babel/plugin-transform-modules-commonjs" "^7.0.0"
|
||||
"@babel/plugin-transform-object-assign" "^7.0.0"
|
||||
"@babel/plugin-transform-parameters" "^7.0.0"
|
||||
"@babel/plugin-transform-react-display-name" "^7.0.0"
|
||||
"@babel/plugin-transform-react-jsx" "^7.0.0"
|
||||
"@babel/plugin-transform-react-jsx-source" "^7.0.0"
|
||||
"@babel/plugin-transform-regenerator" "^7.0.0"
|
||||
"@babel/plugin-transform-runtime" "^7.0.0"
|
||||
"@babel/plugin-transform-shorthand-properties" "^7.0.0"
|
||||
"@babel/plugin-transform-spread" "^7.0.0"
|
||||
"@babel/plugin-transform-sticky-regex" "^7.0.0"
|
||||
"@babel/plugin-transform-template-literals" "^7.0.0"
|
||||
"@babel/plugin-transform-typescript" "^7.5.0"
|
||||
"@babel/plugin-transform-unicode-regex" "^7.0.0"
|
||||
"@babel/template" "^7.0.0"
|
||||
react-refresh "^0.4.0"
|
||||
|
||||
metro-react-native-babel-transformer@^0.56.0:
|
||||
version "0.56.4"
|
||||
resolved "https://registry.yarnpkg.com/metro-react-native-babel-transformer/-/metro-react-native-babel-transformer-0.56.4.tgz#3c6e48b605c305362ee624e45ff338656e35fc1d"
|
||||
|
@ -6041,7 +6039,7 @@ pretty-format@^25.1.0:
|
|||
ansi-styles "^4.0.0"
|
||||
react-is "^16.12.0"
|
||||
|
||||
private@^0.1.6, private@^0.1.8:
|
||||
private@^0.1.6:
|
||||
version "0.1.8"
|
||||
resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
|
||||
integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==
|
||||
|
@ -6123,9 +6121,9 @@ query-string@6.8.1:
|
|||
strict-uri-encode "^2.0.0"
|
||||
|
||||
query-string@^6.11.0:
|
||||
version "6.11.1"
|
||||
resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.11.1.tgz#ab021f275d463ce1b61e88f0ce6988b3e8fe7c2c"
|
||||
integrity sha512-1ZvJOUl8ifkkBxu2ByVM/8GijMIPx+cef7u3yroO3Ogm4DOdZcF5dcrWTIlSHe3Pg/mtlt6/eFjObDfJureZZA==
|
||||
version "6.11.0"
|
||||
resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.11.0.tgz#dc27a05733d1be66f16d0f83dfa957270f45f66d"
|
||||
integrity sha512-jS+me8X3OEGFTsF6kF+vUUMFG/d3WUCvD7bHhfZP5784nOq1pjj8yau/u86nfOncmcN6ZkSWKWkKAvv/MGxzLA==
|
||||
dependencies:
|
||||
decode-uri-component "^0.2.0"
|
||||
split-on-first "^1.0.0"
|
||||
|
@ -6172,9 +6170,9 @@ react-devtools@^3.6.3:
|
|||
update-notifier "^2.1.0"
|
||||
|
||||
react-is@^16.12.0, react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.4, react-is@^16.8.6:
|
||||
version "16.13.0"
|
||||
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.0.tgz#0f37c3613c34fe6b37cd7f763a0d6293ab15c527"
|
||||
integrity sha512-GFMtL0vHkiBv9HluwNZTggSn/sCyEt9n02aM0dSAjGGyqyNlAyftYm4phPxdvCigG15JreC5biwxCgTAJZ7yAA==
|
||||
version "16.12.0"
|
||||
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.12.0.tgz#2cc0fe0fba742d97fd527c42a13bec4eeb06241c"
|
||||
integrity sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q==
|
||||
|
||||
react-lifecycles-compat@^3.0.0, react-lifecycles-compat@^3.0.4:
|
||||
version "3.0.4"
|
||||
|
@ -6182,9 +6180,9 @@ react-lifecycles-compat@^3.0.0, react-lifecycles-compat@^3.0.4:
|
|||
integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==
|
||||
|
||||
react-native-camera@^3.15.0:
|
||||
version "3.19.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-camera/-/react-native-camera-3.19.0.tgz#32c43908d3ba398c89d21437a9dba2ebb17f3896"
|
||||
integrity sha512-ef3ccKUu5nYRvc2fXlnRDsrBPBygkXoMvk0c/mrgfLYgr4X0G/8Qg7t+MOAisQ0V6RastHVygpjgAW+dxcZnyA==
|
||||
version "3.18.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-camera/-/react-native-camera-3.18.0.tgz#aa046a86ea8a691f25fd579b8abcbda1503e13fa"
|
||||
integrity sha512-rLjLKJDEnI0E0nN7ZfK3GKEP37cYURh6QV2DCI1BRs9FWcETwDcgVYtQSfFEibWcGazPtsAqVDTg5LUYMFPjCA==
|
||||
dependencies:
|
||||
prop-types "^15.6.2"
|
||||
|
||||
|
@ -6279,9 +6277,9 @@ react-native-safe-area-view@^0.14.6, react-native-safe-area-view@^0.14.8:
|
|||
hoist-non-react-statics "^2.3.1"
|
||||
|
||||
react-native-screens@^2.0.0:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-2.2.0.tgz#cc4cdf17426fdda97ad93a5e812a1899390f1978"
|
||||
integrity sha512-a0VzxOWot7F9B/GQyDSssBRd3jUJazFnTQS61IiyReWB6aHlFhf3Xz10jBRoURXy1EMCDCHgenmTVTkKHpKyqQ==
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-2.0.0.tgz#ac9db593351474790f8daa5d85b5ea337b20cfb1"
|
||||
integrity sha512-T1xxYajGuiaOXjqKWKfjw9LKwoGTn69WrYZcg0jB2ZlPE6o6QqlJWtR1ytqu/4fg8pHdsk5S1iPY06mqTylrYA==
|
||||
dependencies:
|
||||
debounce "^1.2.0"
|
||||
|
||||
|
@ -6398,9 +6396,9 @@ react-navigation-stack@^1.10.3:
|
|||
prop-types "^15.7.2"
|
||||
|
||||
react-navigation-tabs@^2.7.0:
|
||||
version "2.8.2"
|
||||
resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-2.8.2.tgz#b49534a77a6b15fd7f681a33007e3fff7faf3f84"
|
||||
integrity sha512-eLoLh2DetaXdrKkb4wR8e6+npi0E7UGn6iHmDKHdV5M6SFdsgz5CaEXW/tg+pgvGDb/8iG6syTUV1KrUtFCZ4Q==
|
||||
version "2.8.1"
|
||||
resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-2.8.1.tgz#1c8202945e7f7e3fe9e6cbfcd9e203027658703d"
|
||||
integrity sha512-hF9rotTe/wjJRj0HCIltYm38renbp18kUBi9VG3wF6/RR9pI8dcXNPdkpL7J3wQXyq+Zri3ltHbmEKtexnWWug==
|
||||
dependencies:
|
||||
hoist-non-react-statics "^3.3.2"
|
||||
react-lifecycles-compat "^3.0.4"
|
||||
|
@ -6408,9 +6406,9 @@ react-navigation-tabs@^2.7.0:
|
|||
react-native-tab-view "^2.11.0"
|
||||
|
||||
react-navigation@^4.0.10:
|
||||
version "4.2.2"
|
||||
resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-4.2.2.tgz#8183f47c1b0c7c2350e970aa652c0fee4160ef9e"
|
||||
integrity sha512-/CdQsDkUEJWyKKK68txvFUJDO79+MYFX6DYTVbQ23YtSw/GD5J5pQ/E08IJy8PJNYgnWP/OhiOYg2UpNoh96RQ==
|
||||
version "4.2.1"
|
||||
resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-4.2.1.tgz#45565e0c9e3e9266b13df27762b59281f3b0135d"
|
||||
integrity sha512-/SMeEyBkgIA+cNQ/oZJdK5UvboR1c9W/8J1E3ZNh9VWCRFHGImlURphcxvCzRWI7sClTuC5/xnHeT+UU6K7wrg==
|
||||
dependencies:
|
||||
"@react-navigation/core" "^3.6.1"
|
||||
"@react-navigation/native" "^3.7.3"
|
||||
|
@ -6595,11 +6593,6 @@ regenerator-runtime@^0.13.2:
|
|||
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz#7cf6a77d8f5c6f60eb73c5fc1955b2ceb01e6bf5"
|
||||
integrity sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==
|
||||
|
||||
regenerator-runtime@^0.13.4:
|
||||
version "0.13.4"
|
||||
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.4.tgz#e96bf612a3362d12bb69f7e8f74ffeab25c7ac91"
|
||||
integrity sha512-plpwicqEzfEyTQohIKktWigcLzmNStMGwbOUbykx51/29Z3JOGYldaaNGK7ngNXV+UcoqvIMmloZ48Sr74sd+g==
|
||||
|
||||
regenerator-transform@^0.10.0:
|
||||
version "0.10.1"
|
||||
resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd"
|
||||
|
@ -6609,13 +6602,12 @@ regenerator-transform@^0.10.0:
|
|||
babel-types "^6.19.0"
|
||||
private "^0.1.6"
|
||||
|
||||
regenerator-transform@^0.14.2:
|
||||
version "0.14.2"
|
||||
resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.2.tgz#949d9d87468ff88d5a7e4734ebb994a892de1ff2"
|
||||
integrity sha512-V4+lGplCM/ikqi5/mkkpJ06e9Bujq1NFmNLvsCs56zg3ZbzrnUzAtizZ24TXxtRX/W2jcdScwQCnbL0CICTFkQ==
|
||||
regenerator-transform@^0.14.0:
|
||||
version "0.14.1"
|
||||
resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.1.tgz#3b2fce4e1ab7732c08f665dfdb314749c7ddd2fb"
|
||||
integrity sha512-flVuee02C3FKRISbxhXl9mGzdbWUVHubl1SMaknjxkFB1/iqpJhArQUvRxOOPEc/9tAiX0BaQ28FJH10E4isSQ==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.8.4"
|
||||
private "^0.1.8"
|
||||
private "^0.1.6"
|
||||
|
||||
regex-not@^1.0.0, regex-not@^1.0.2:
|
||||
version "1.0.2"
|
||||
|
@ -6854,7 +6846,7 @@ rsvp@^4.8.4:
|
|||
resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734"
|
||||
integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA==
|
||||
|
||||
run-async@^2.2.0, run-async@^2.4.0:
|
||||
run-async@^2.2.0:
|
||||
version "2.4.0"
|
||||
resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.0.tgz#e59054a5b86876cfae07f431d18cbaddc594f1e8"
|
||||
integrity sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg==
|
||||
|
@ -7641,9 +7633,9 @@ trim-newlines@^1.0.0:
|
|||
integrity sha1-WIeWa7WCpFA6QetST301ARgVphM=
|
||||
|
||||
tslib@^1.8.1, tslib@^1.9.0:
|
||||
version "1.11.1"
|
||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35"
|
||||
integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==
|
||||
version "1.11.0"
|
||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.0.tgz#f1f3528301621a53220d58373ae510ff747a66bc"
|
||||
integrity sha512-BmndXUtiTn/VDDrJzQE7Mm22Ix3PxgLltW9bSNLoeCY31gnG2OPx0QqJnuc9oMIKioYrz487i6K9o4Pdn0j+Kg==
|
||||
|
||||
tsutils@^3.7.0:
|
||||
version "3.17.1"
|
||||
|
@ -7671,11 +7663,6 @@ type-check@~0.3.2:
|
|||
dependencies:
|
||||
prelude-ls "~1.1.2"
|
||||
|
||||
type-fest@^0.11.0:
|
||||
version "0.11.0"
|
||||
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1"
|
||||
integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==
|
||||
|
||||
type-fest@^0.7.1:
|
||||
version "0.7.1"
|
||||
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.7.1.tgz#8dda65feaf03ed78f0a3f9678f1869147f7c5c48"
|
||||
|
|
Loading…
Add table
Reference in a new issue