Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f065ed0bc | ||
|
|
fa122ce5ea | ||
|
|
4e88d75639 | ||
|
|
d87c2a2218 | ||
|
|
c88d9f71f8 |
No files matched your search
@@ -10,7 +10,6 @@
|
||||
"__": true
|
||||
},
|
||||
"rules": {
|
||||
"no-console": 2,
|
||||
"no-multi-spaces": 0,
|
||||
"new-cap": 0,
|
||||
"prefer-promise-reject-errors": 0,
|
||||
|
||||
+1
-57
@@ -248,61 +248,5 @@
|
||||
"Authenticating": "Authenticating",
|
||||
"Waiting for authentication": "Waiting for authentication",
|
||||
"Delete file": "Delete file",
|
||||
"Are you sure you want to remove this file from your device?": "Are you sure you want to remove this file from your device?",
|
||||
"Following": "Following",
|
||||
"Update mailing preferences": "Update mailing preferences",
|
||||
"Please confirm you want to tip %amount% credits": "Please confirm you want to tip %amount% credits",
|
||||
"Send Tip": "Send Tip",
|
||||
"You do not have any\ndownloaded content on this device.": "You do not have any\ndownloaded content on this device.",
|
||||
"%view% view": "%view% view",
|
||||
"No channel name after @.": "No channel name after @.",
|
||||
"Loading transactions...": "Loading transactions...",
|
||||
"Pending": "Pending",
|
||||
"Phone Number": "Phone Number",
|
||||
"Please provide a phone number to prevent fraud.": "Please provide a phone number to prevent fraud.",
|
||||
"Send verification text": "Send verification text",
|
||||
"Open": "Open",
|
||||
"for": "for",
|
||||
"Everyone": "Everyone",
|
||||
"Suggested channels": "Suggested channels",
|
||||
"You might also like": "You might also like",
|
||||
"Publish something new": "Publish something new",
|
||||
"Filter for": "Filter for",
|
||||
"Tags you follow": "Tags you follow",
|
||||
"Sort content by": "Sort content by",
|
||||
"Trending content": "Trending content",
|
||||
"New content": "New content",
|
||||
"Top content": "Top content",
|
||||
"Top": "Top",
|
||||
"Past week": "Past week",
|
||||
"It looks like you have not\npublished any content to LBRY yet.": "It looks like you have not\npublished any content to LBRY yet.",
|
||||
"Stop": "Stop",
|
||||
"Unsupported Content": "Unsupported Content",
|
||||
"all tags you follow": "all tags you follow",
|
||||
"Send LBC": "Send LBC",
|
||||
"from": "from",
|
||||
"This file cannot be displayed in the LBRY app.": "This file cannot be displayed in the LBRY app.",
|
||||
"Please press the Play button.": "Please press the Play button.",
|
||||
"Stop download": "Stop download",
|
||||
"Are you sure you want to stop downloading this file?": "Are you sure you want to stop downloading this file?",
|
||||
"The download will stop momentarily. You do not need to wait to discover something else.": "The download will stop momentarily. You do not need to wait to discover something else.",
|
||||
"Connection Failure": "Connection Failure",
|
||||
"We could not establish a connection to the SDK. Your data connection may be preventing LBRY from connecting. Contact hello@lbry.com if you think this is a software bug.": "We could not establish a connection to the SDK. Your data connection may be preventing LBRY from connecting. Contact hello@lbry.com if you think this is a software bug.",
|
||||
"%num% block behind": "%num% block behind",
|
||||
"Delete files": "Delete files",
|
||||
"Are you sure you want to delete the selected content?": "Are you sure you want to delete the selected content?",
|
||||
"We could not find any videos on your device. Take a photo or record a video to get started.": "We could not find any videos on your device. Take a photo or record a video to get started.",
|
||||
"You have already published to the specified content address. Please enter a new address.": "You have already published to the specified content address. Please enter a new address.",
|
||||
"Camera": "Camera",
|
||||
"Please grant access to make use of your camera": "Please grant access to make use of your camera",
|
||||
"OK": "OK",
|
||||
"Audio": "Audio",
|
||||
"Please grant access to record audio": "Please grant access to record audio",
|
||||
"Camera not authorized": "Camera not authorized",
|
||||
"There's nothing at this location.": "There's nothing at this location.",
|
||||
"Publish something here": "Publish something here",
|
||||
"This content cannot be viewed at this time. Please try again in a bit.": "This content cannot be viewed at this time. Please try again in a bit.",
|
||||
"Download file": "Download file",
|
||||
"Save %title% (%size%) to your device": "Save %title% (%size%) to your device",
|
||||
"Save \"%title%\" (%size%) to your device": "Save \"%title%\" (%size%) to your device"
|
||||
"Are you sure you want to remove this file from your device?": "Are you sure you want to remove this file from your device?"
|
||||
}
|
||||
Generated
+20
-12
@@ -7067,8 +7067,8 @@
|
||||
}
|
||||
},
|
||||
"lbry-redux": {
|
||||
"version": "github:lbryio/lbry-redux#c910cd2b80b165843a81fdf6ce96094429b94ec8",
|
||||
"from": "github:lbryio/lbry-redux#c910cd2b80b165843a81fdf6ce96094429b94ec8",
|
||||
"version": "github:lbryio/lbry-redux#e8f29f1c47b136669df265babb109d2488a37db0",
|
||||
"from": "github:lbryio/lbry-redux#e8f29f1c47b136669df265babb109d2488a37db0",
|
||||
"requires": {
|
||||
"proxy-polyfill": "0.1.6",
|
||||
"reselect": "^3.0.0",
|
||||
@@ -7076,8 +7076,8 @@
|
||||
}
|
||||
},
|
||||
"lbryinc": {
|
||||
"version": "github:lbryio/lbryinc#138a053754ec8e3da8e9bf153d32f527c962f25c",
|
||||
"from": "github:lbryio/lbryinc#138a053754ec8e3da8e9bf153d32f527c962f25c",
|
||||
"version": "github:lbryio/lbryinc#053ca52f4f7f9bf8eb62a3581b183671a475ad1c",
|
||||
"from": "github:lbryio/lbryinc#053ca52f4f7f9bf8eb62a3581b183671a475ad1c",
|
||||
"requires": {
|
||||
"reselect": "^3.0.0"
|
||||
}
|
||||
@@ -9905,11 +9905,6 @@
|
||||
"prop-types": "^15.5.10"
|
||||
}
|
||||
},
|
||||
"react-native-progress-circle": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/react-native-progress-circle/-/react-native-progress-circle-2.1.0.tgz",
|
||||
"integrity": "sha512-VP0s92bgbTMQy4hQzPU4LlGyFj3z5u7i1HYFG8/yzXXfGkX1cxKS4xOlE+OTaObWC99w7Bodi3h8R7En2nQPYw=="
|
||||
},
|
||||
"react-native-reanimated": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/react-native-reanimated/-/react-native-reanimated-1.4.0.tgz",
|
||||
@@ -10141,9 +10136,22 @@
|
||||
}
|
||||
},
|
||||
"react-navigation-drawer": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/react-navigation-drawer/-/react-navigation-drawer-2.3.3.tgz",
|
||||
"integrity": "sha512-d/rA8Slqv7HoMfONKVDBQUrRF7YQH796Gzal/KOhaY4VOwUUqIwfxMRJ3WrsdL2OkDPixtkXJE2Fz6KAj658uA=="
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/react-navigation-drawer/-/react-navigation-drawer-1.4.0.tgz",
|
||||
"integrity": "sha512-ZyWBozcjB2aZ7vwCALv90cYA2NpDjM+WALaiYRshvPvue8l7cqynePbHK8GhlMGyJDwZqp4MxQmu8u1XAKp3Bw==",
|
||||
"requires": {
|
||||
"react-native-tab-view": "^1.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"react-native-tab-view": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/react-native-tab-view/-/react-native-tab-view-1.4.1.tgz",
|
||||
"integrity": "sha512-Bke8KkDcDhvB/z0AS7MnQKMD2p6Kwfc1rSKlMOvg9CC5CnClQ2QEnhPSbwegKDYhUkBI92iH/BYy7hNSm5kbUQ==",
|
||||
"requires": {
|
||||
"prop-types": "^15.6.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"react-navigation-redux-helpers": {
|
||||
"version": "3.0.2",
|
||||
|
||||
+3
-4
@@ -12,8 +12,8 @@
|
||||
"base-64": "^0.1.0",
|
||||
"@expo/vector-icons": "^8.1.0",
|
||||
"gfycat-style-urls": "^1.0.3",
|
||||
"lbry-redux": "lbryio/lbry-redux#c910cd2b80b165843a81fdf6ce96094429b94ec8",
|
||||
"lbryinc": "lbryio/lbryinc#138a053754ec8e3da8e9bf153d32f527c962f25c",
|
||||
"lbry-redux": "lbryio/lbry-redux#e8f29f1c47b136669df265babb109d2488a37db0",
|
||||
"lbryinc": "lbryio/lbryinc#053ca52f4f7f9bf8eb62a3581b183671a475ad1c",
|
||||
"lodash": ">=4.17.11",
|
||||
"merge": ">=1.2.1",
|
||||
"moment": "^2.22.1",
|
||||
@@ -30,7 +30,6 @@
|
||||
"react-native-image-zoom-viewer": "^2.2.5",
|
||||
"react-native-password-strength-meter": "^0.0.2",
|
||||
"react-native-phone-input": "lbryio/react-native-phone-input",
|
||||
"react-native-progress-circle": "2.1.0",
|
||||
"react-native-reanimated": "1.4.0",
|
||||
"react-native-safe-area-context": "^0.6.2",
|
||||
"react-native-snackbar": "2.0.4",
|
||||
@@ -39,7 +38,7 @@
|
||||
"react-native-video": "lbryio/react-native-video#7992ff945872f9bd00a3736d9ff1318f343abf47",
|
||||
"react-native-webview": "^8.0.2",
|
||||
"react-navigation": "^4.0.10",
|
||||
"react-navigation-drawer": "^2.3.3",
|
||||
"react-navigation-drawer": "^1.4.0",
|
||||
"react-navigation-redux-helpers": "^3.0.2",
|
||||
"react-navigation-tabs": "^2.7.0",
|
||||
"react-navigation-stack": "^1.10.3",
|
||||
|
||||
@@ -6,7 +6,6 @@ import DownloadsPage from 'page/downloads';
|
||||
import DrawerContent from 'component/drawerContent';
|
||||
import FilePage from 'page/file';
|
||||
import FirstRunScreen from 'page/firstRun';
|
||||
import InvitesPage from 'page/invites';
|
||||
import PublishPage from 'page/publish';
|
||||
import PublishesPage from 'page/publishes';
|
||||
import RewardsPage from 'page/rewards';
|
||||
@@ -39,15 +38,7 @@ import {
|
||||
ToastAndroid,
|
||||
} from 'react-native';
|
||||
import { selectDrawerStack } from 'redux/selectors/drawer';
|
||||
import {
|
||||
ACTIONS,
|
||||
SETTINGS,
|
||||
doDismissToast,
|
||||
doPopulateSharedUserState,
|
||||
doPreferenceGet,
|
||||
doToast,
|
||||
selectToast,
|
||||
} from 'lbry-redux';
|
||||
import { SETTINGS, doDismissToast, doPopulateSharedUserState, doPreferenceGet, doToast, selectToast } from 'lbry-redux';
|
||||
import {
|
||||
Lbryio,
|
||||
doGetSync,
|
||||
@@ -211,12 +202,6 @@ const drawer = createDrawerNavigator(
|
||||
drawerIcon: ({ tintColor }) => <Icon name="award" size={drawerIconSize} style={{ color: tintColor }} />,
|
||||
},
|
||||
},
|
||||
Invites: {
|
||||
screen: InvitesPage,
|
||||
navigationOptions: {
|
||||
drawerIcon: ({ tintColor }) => <Icon name="user-friends" size={drawerIconSize} style={{ color: tintColor }} />,
|
||||
},
|
||||
},
|
||||
Downloads: {
|
||||
screen: DownloadsPage,
|
||||
navigationOptions: {
|
||||
@@ -240,7 +225,7 @@ const drawer = createDrawerNavigator(
|
||||
},
|
||||
},
|
||||
{
|
||||
drawerWidth: 299,
|
||||
drawerWidth: 300,
|
||||
drawerBackgroundColor: 'transparent',
|
||||
headerMode: 'none',
|
||||
backBehavior: 'none',
|
||||
@@ -328,7 +313,6 @@ class AppWithNavigationState extends React.Component {
|
||||
this.emailVerifyCheckInterval = setInterval(() => this.checkEmailVerification(), 5000);
|
||||
Linking.addEventListener('url', this._handleUrl);
|
||||
|
||||
DeviceEventEmitter.addListener('onDownloadAborted', this.handleDownloadAborted);
|
||||
DeviceEventEmitter.addListener('onDownloadStarted', this.handleDownloadStarted);
|
||||
DeviceEventEmitter.addListener('onDownloadUpdated', this.handleDownloadUpdated);
|
||||
DeviceEventEmitter.addListener('onDownloadCompleted', this.handleDownloadCompleted);
|
||||
@@ -385,24 +369,7 @@ class AppWithNavigationState extends React.Component {
|
||||
dispatch(doCompleteDownload(uri, outpoint, fileInfo));
|
||||
};
|
||||
|
||||
handleDownloadAborted = evt => {
|
||||
const { dispatch } = this.props;
|
||||
const { uri, outpoint } = evt;
|
||||
dispatch({
|
||||
type: ACTIONS.DOWNLOADING_CANCELED,
|
||||
data: { uri, outpoint },
|
||||
});
|
||||
|
||||
dispatch({
|
||||
type: ACTIONS.FILE_DELETE,
|
||||
data: {
|
||||
outpoint,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
componentWillUnmount() {
|
||||
DeviceEventEmitter.removeListener('onDownloadAborted', this.handleDownloadAborted);
|
||||
DeviceEventEmitter.removeListener('onDownloadStarted', this.handleDownloadStarted);
|
||||
DeviceEventEmitter.removeListener('onDownloadUpdated', this.handleDownloadUpdated);
|
||||
DeviceEventEmitter.removeListener('onDownloadCompleted', this.handleDownloadCompleted);
|
||||
@@ -537,7 +504,7 @@ class AppWithNavigationState extends React.Component {
|
||||
try {
|
||||
verification = JSON.parse(atob(evt.url.substring(15)));
|
||||
} catch (error) {
|
||||
// console.log(error);
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
if (verification.token && verification.recaptcha) {
|
||||
|
||||
@@ -51,7 +51,7 @@ export default class ChannelIconItem extends React.PureComponent {
|
||||
<TouchableOpacity style={channelIconStyle.container} onPress={onPress}>
|
||||
{isResolvingUri && (
|
||||
<View style={channelIconStyle.centered}>
|
||||
<ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />
|
||||
<ActivityIndicator size={'small'} color={Colors.LbryGreen} />
|
||||
</View>
|
||||
)}
|
||||
<View
|
||||
|
||||
@@ -36,14 +36,10 @@ export default class ChannelSelector extends React.PureComponent {
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
const { channels: prevChannels = [], channelName: prevChannelName } = this.props;
|
||||
const { channels = [], channelName } = nextProps;
|
||||
const { channels: prevChannels = [], channelName } = this.props;
|
||||
const { channels = [] } = nextProps;
|
||||
|
||||
if (channels && channels.length !== prevChannels.length && channelName !== this.state.currentSelectedValue) {
|
||||
this.setState({ currentSelectedValue: prevChannelName });
|
||||
}
|
||||
|
||||
if (channelName !== prevChannelName) {
|
||||
this.setState({ currentSelectedValue: channelName });
|
||||
}
|
||||
}
|
||||
@@ -193,11 +189,10 @@ export default class ChannelSelector extends React.PureComponent {
|
||||
|
||||
render() {
|
||||
const channel = this.state.addingChannel ? 'new' : this.props.channel;
|
||||
const { balance, enabled, fetchingChannels, channels = [], showAnonymous } = this.props;
|
||||
const pickerItems = (showAnonymous
|
||||
? [Constants.ITEM_ANONYMOUS, Constants.ITEM_CREATE_A_CHANNEL]
|
||||
: [Constants.ITEM_CREATE_A_CHANNEL]
|
||||
).concat(channels ? channels.map(ch => ch.name) : []);
|
||||
const { balance, enabled, fetchingChannels, channels = [] } = this.props;
|
||||
const pickerItems = [Constants.ITEM_ANONYMOUS, Constants.ITEM_CREATE_A_CHANNEL].concat(
|
||||
channels ? channels.map(ch => ch.name) : []
|
||||
);
|
||||
|
||||
const {
|
||||
newChannelName,
|
||||
@@ -269,7 +264,7 @@ export default class ChannelSelector extends React.PureComponent {
|
||||
</Text>
|
||||
|
||||
<View style={channelSelectorStyle.buttonContainer}>
|
||||
{creatingChannel && <ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />}
|
||||
{creatingChannel && <ActivityIndicator size={'small'} color={Colors.LbryGreen} />}
|
||||
{!creatingChannel && (
|
||||
<View style={channelSelectorStyle.buttons}>
|
||||
<Link style={channelSelectorStyle.cancelLink} text={__('Cancel')} onPress={this.handleCreateCancel} />
|
||||
|
||||
@@ -10,7 +10,6 @@ import {
|
||||
makeSelectTitleForUri,
|
||||
makeSelectThumbnailForUri,
|
||||
} from 'lbry-redux';
|
||||
import { doSetPlayerVisible } from 'redux/actions/drawer';
|
||||
import { selectBlackListedOutpoints, selectFilteredOutpoints, selectRewardContentClaimIds } from 'lbryinc';
|
||||
import { selectShowNsfw } from 'redux/selectors/settings';
|
||||
import ClaimResultItem from './view';
|
||||
@@ -33,7 +32,6 @@ const select = (state, props) => ({
|
||||
|
||||
const perform = dispatch => ({
|
||||
resolveUri: uri => dispatch(doResolveUri(uri)),
|
||||
setPlayerVisible: (visible, uri) => dispatch(doSetPlayerVisible(visible, uri)),
|
||||
});
|
||||
|
||||
export default connect(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { normalizeURI, parseURI } from 'lbry-redux';
|
||||
import { ActivityIndicator, Platform, Text, TouchableOpacity, View } from 'react-native';
|
||||
import { navigateToUri, getDownloadProgress, getStorageForFileInfo } from 'utils/helper';
|
||||
import { navigateToUri, formatTitle, getDownloadProgress, getStorageForFileInfo } from 'utils/helper';
|
||||
import Colors from 'styles/colors';
|
||||
import ChannelIconItem from 'component/channelIconItem';
|
||||
import channelIconStyle from 'styles/channelIcon';
|
||||
@@ -39,14 +39,14 @@ class ClaimResultItem extends React.PureComponent {
|
||||
}
|
||||
|
||||
onPressHandler = () => {
|
||||
const { autoplay, navigation, result, setPlayerVisible } = this.props;
|
||||
const { autoplay, navigation, result } = this.props;
|
||||
const { claimId, name } = result;
|
||||
const url = normalizeURI(`${name}#${claimId}`);
|
||||
navigateToUri(navigation, url, { autoplay }, false, url, setPlayerVisible);
|
||||
navigateToUri(navigation, url, { autoplay }, false, url);
|
||||
};
|
||||
|
||||
render() {
|
||||
const { fileInfo, navigation, obscureNsfw, result, rewardedContentClaimIds, setPlayerVisible, style } = this.props;
|
||||
const { featuredResult, fileInfo, navigation, obscureNsfw, result, rewardedContentClaimIds, style } = this.props;
|
||||
const {
|
||||
channel,
|
||||
channel_claim_id: channelClaimId,
|
||||
@@ -65,7 +65,7 @@ class ClaimResultItem extends React.PureComponent {
|
||||
const obscure = obscureNsfw && nsfw;
|
||||
const url = normalizeURI(`${name}#${claimId}`);
|
||||
const hasChannel = !!channel;
|
||||
const channelUrl = hasChannel ? normalizeURI(`${channel}#${channelClaimId}`) : null;
|
||||
const channelUrl = channel ? normalizeURI(`${channel}#${channelClaimId}`) : null;
|
||||
const isRewardContent = rewardedContentClaimIds.includes(claimId);
|
||||
|
||||
return (
|
||||
@@ -85,7 +85,7 @@ class ClaimResultItem extends React.PureComponent {
|
||||
)}
|
||||
|
||||
{isChannel && (
|
||||
<View style={fileListStyle.channelThumbnailView}>
|
||||
<View style={fileListStyle.thumbnail}>
|
||||
<View style={[fileListStyle.channelThumbnailContainer, this.state.autoStyle]}>
|
||||
{hasThumbnail && (
|
||||
<FastImage
|
||||
@@ -104,7 +104,13 @@ class ClaimResultItem extends React.PureComponent {
|
||||
)}
|
||||
|
||||
{fileInfo && fileInfo.completed && fileInfo.download_path && (
|
||||
<Icon style={fileListStyle.downloadedIcon} solid color={Colors.NextLbryGreen} name={'folder'} size={16} />
|
||||
<Icon
|
||||
style={featuredResult ? fileListStyle.featuredDownloadedIcon : fileListStyle.downloadedIcon}
|
||||
solid
|
||||
color={Colors.NextLbryGreen}
|
||||
name={'folder'}
|
||||
size={16}
|
||||
/>
|
||||
)}
|
||||
<FilePrice
|
||||
cost={fee ? parseFloat(fee) / 100000000 : 0}
|
||||
@@ -116,33 +122,33 @@ class ClaimResultItem extends React.PureComponent {
|
||||
<View style={fileListStyle.detailsContainer}>
|
||||
{(title || name) && (
|
||||
<View style={fileListStyle.titleContainer}>
|
||||
<Text style={fileListStyle.title} numberOfLines={3}>
|
||||
{title || name}
|
||||
<Text style={featuredResult ? fileListStyle.featuredTitle : fileListStyle.title}>
|
||||
{formatTitle(title) || formatTitle(name)}
|
||||
</Text>
|
||||
{isRewardContent && <Icon style={fileListStyle.rewardIcon} name="award" size={12} />}
|
||||
</View>
|
||||
)}
|
||||
|
||||
{(hasChannel || isChannel) && (
|
||||
<Link
|
||||
style={fileListStyle.publisher}
|
||||
text={isChannel ? name : channel}
|
||||
onPress={() => {
|
||||
navigateToUri(
|
||||
navigation,
|
||||
normalizeURI(isChannel ? url : channelUrl),
|
||||
null,
|
||||
false,
|
||||
isChannel ? url : channelUrl,
|
||||
setPlayerVisible,
|
||||
);
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
{hasChannel ||
|
||||
(isChannel && (
|
||||
<Link
|
||||
style={fileListStyle.publisher}
|
||||
text={isChannel ? name : channel}
|
||||
onPress={() => {
|
||||
navigateToUri(
|
||||
navigation,
|
||||
normalizeURI(isChannel ? url : channelUrl),
|
||||
null,
|
||||
false,
|
||||
isChannel ? url : channelUrl,
|
||||
);
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
|
||||
<View style={fileListStyle.info}>
|
||||
{fileInfo && !isNaN(fileInfo.written_bytes) && fileInfo.written_bytes > 0 && (
|
||||
<Text style={fileListStyle.infoText}>{getStorageForFileInfo(fileInfo)}</Text>
|
||||
<Text>{getStorageForFileInfo(fileInfo)}</Text>
|
||||
)}
|
||||
<DateTime
|
||||
style={fileListStyle.publishInfo}
|
||||
|
||||
@@ -22,7 +22,6 @@ const groupedMenuItems = {
|
||||
Wallet: [
|
||||
{ icon: 'wallet', label: 'Wallet', route: Constants.DRAWER_ROUTE_WALLET },
|
||||
{ icon: 'award', label: 'Rewards', route: Constants.DRAWER_ROUTE_REWARDS },
|
||||
{ icon: 'user-friends', label: 'Invites', route: Constants.DRAWER_ROUTE_INVITES },
|
||||
],
|
||||
Settings: [
|
||||
{ icon: 'cog', label: 'Settings', route: Constants.DRAWER_ROUTE_SETTINGS },
|
||||
|
||||
@@ -10,7 +10,6 @@ import {
|
||||
makeSelectClaimIsNsfw,
|
||||
makeSelectShortUrlForUri,
|
||||
} from 'lbry-redux';
|
||||
import { doSetPlayerVisible } from 'redux/actions/drawer';
|
||||
import { selectBlackListedOutpoints, selectFilteredOutpoints, selectRewardContentClaimIds } from 'lbryinc';
|
||||
import { selectShowNsfw } from 'redux/selectors/settings';
|
||||
import FileItem from './view';
|
||||
@@ -32,10 +31,9 @@ const select = (state, props) => ({
|
||||
|
||||
const perform = dispatch => ({
|
||||
resolveUri: uri => dispatch(doResolveUri(uri)),
|
||||
setPlayerVisible: (visible, uri) => dispatch(doSetPlayerVisible(visible, uri)),
|
||||
});
|
||||
|
||||
export default connect(
|
||||
select,
|
||||
perform,
|
||||
perform
|
||||
)(FileItem);
|
||||
@@ -56,7 +56,6 @@ class FileItem extends React.PureComponent {
|
||||
obscureNsfw,
|
||||
showDetails,
|
||||
compactView,
|
||||
setPlayerVisible,
|
||||
titleBeforeThumbnail,
|
||||
} = this.props;
|
||||
|
||||
@@ -136,7 +135,6 @@ class FileItem extends React.PureComponent {
|
||||
null,
|
||||
false,
|
||||
fullChannelUri,
|
||||
setPlayerVisible,
|
||||
);
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -10,7 +10,6 @@ import {
|
||||
makeSelectTitleForUri,
|
||||
makeSelectThumbnailForUri,
|
||||
} from 'lbry-redux';
|
||||
import { doSetPlayerVisible } from 'redux/actions/drawer';
|
||||
import { selectBlackListedOutpoints, selectFilteredOutpoints, selectRewardContentClaimIds } from 'lbryinc';
|
||||
import { selectShowNsfw } from 'redux/selectors/settings';
|
||||
import FileListItem from './view';
|
||||
@@ -33,7 +32,6 @@ const select = (state, props) => ({
|
||||
|
||||
const perform = dispatch => ({
|
||||
resolveUri: uri => dispatch(doResolveUri(uri)),
|
||||
setPlayerVisible: (visible, uri) => dispatch(doSetPlayerVisible(visible, uri)),
|
||||
});
|
||||
|
||||
export default connect(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { normalizeURI, parseURI } from 'lbry-redux';
|
||||
import { ActivityIndicator, Platform, Text, TouchableOpacity, View } from 'react-native';
|
||||
import { navigateToUri, getDownloadProgress, getStorageForFileInfo } from 'utils/helper';
|
||||
import { navigateToUri, formatTitle, getDownloadProgress, getStorageForFileInfo } from 'utils/helper';
|
||||
import Colors from 'styles/colors';
|
||||
import ChannelIconItem from 'component/channelIconItem';
|
||||
import channelIconStyle from 'styles/channelIcon';
|
||||
@@ -80,7 +80,6 @@ class FileListItem extends React.PureComponent {
|
||||
onPress,
|
||||
navigation,
|
||||
rewardedContentClaimIds,
|
||||
setPlayerVisible,
|
||||
thumbnail,
|
||||
hideChannel,
|
||||
onLongPress,
|
||||
@@ -152,7 +151,7 @@ class FileListItem extends React.PureComponent {
|
||||
)}
|
||||
|
||||
{isChannel && (
|
||||
<View style={fileListStyle.channelThumbnailView}>
|
||||
<View style={fileListStyle.thumbnail}>
|
||||
<View style={[fileListStyle.channelThumbnailContainer, this.state.autoStyle]}>
|
||||
{hasThumbnail && (
|
||||
<FastImage
|
||||
@@ -210,11 +209,8 @@ class FileListItem extends React.PureComponent {
|
||||
|
||||
{(title || name) && (
|
||||
<View style={fileListStyle.titleContainer}>
|
||||
<Text
|
||||
style={featuredResult ? fileListStyle.featuredTitle : fileListStyle.title}
|
||||
numberOfLines={hideChannel ? 4 : 3}
|
||||
>
|
||||
{title || name}
|
||||
<Text style={featuredResult ? fileListStyle.featuredTitle : fileListStyle.title}>
|
||||
{formatTitle(title) || formatTitle(name)}
|
||||
</Text>
|
||||
{isRewardContent && <Icon style={fileListStyle.rewardIcon} name="award" size={12} />}
|
||||
</View>
|
||||
@@ -237,7 +233,6 @@ class FileListItem extends React.PureComponent {
|
||||
null,
|
||||
false,
|
||||
isChannel ? claim && claim.permanent_url : fullChannelUri,
|
||||
setPlayerVisible,
|
||||
);
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -341,12 +341,6 @@ class MediaPlayer extends React.PureComponent {
|
||||
this.setState({ paused: true }, this.updateBackgroundMediaNotification);
|
||||
};
|
||||
|
||||
handleSeek = time => {
|
||||
const { currentTime } = this.state;
|
||||
const newTime = currentTime + time;
|
||||
this.seekTo(newTime);
|
||||
};
|
||||
|
||||
updateBackgroundMediaNotification = () => {
|
||||
this.handlePausedState();
|
||||
const { backgroundPlayEnabled } = this.props;
|
||||
@@ -368,26 +362,14 @@ class MediaPlayer extends React.PureComponent {
|
||||
<Icon name={'arrow-left'} size={18} style={mediaPlayerStyle.backButtonIcon} />
|
||||
</TouchableOpacity>
|
||||
|
||||
<View style={mediaPlayerStyle.midControls}>
|
||||
<TouchableOpacity style={mediaPlayerStyle.rewind10} onPress={() => this.handleSeek(-10)}>
|
||||
<Icon name="undo" size={24} color={Colors.White} />
|
||||
<Text style={[mediaPlayerStyle.midControlText, mediaPlayerStyle.leftMidControlText]}>10</Text>
|
||||
</TouchableOpacity>
|
||||
|
||||
<TouchableOpacity style={mediaPlayerStyle.playPauseButton} onPress={this.togglePlay}>
|
||||
{this.state.paused && <Icon name="play" size={40} color={Colors.White} />}
|
||||
{!this.state.paused && <Icon name="pause" size={40} color={Colors.White} />}
|
||||
</TouchableOpacity>
|
||||
|
||||
<TouchableOpacity style={mediaPlayerStyle.forward10} onPress={() => this.handleSeek(10)}>
|
||||
<Icon name="redo" size={24} color={Colors.White} />
|
||||
<Text style={[mediaPlayerStyle.midControlText, mediaPlayerStyle.rightMidControlText]}>10</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
<TouchableOpacity style={mediaPlayerStyle.playPauseButton} onPress={this.togglePlay}>
|
||||
{this.state.paused && <Icon name="play" size={40} color="#ffffff" />}
|
||||
{!this.state.paused && <Icon name="pause" size={40} color="#ffffff" />}
|
||||
</TouchableOpacity>
|
||||
|
||||
<TouchableOpacity style={mediaPlayerStyle.toggleFullscreenButton} onPress={this.toggleFullscreenMode}>
|
||||
{this.state.fullscreenMode && <Icon name="compress" size={16} color={Colors.White} />}
|
||||
{!this.state.fullscreenMode && <Icon name="expand" size={16} color={Colors.White} />}
|
||||
{this.state.fullscreenMode && <Icon name="compress" size={16} color="#ffffff" />}
|
||||
{!this.state.fullscreenMode && <Icon name="expand" size={16} color="#ffffff" />}
|
||||
</TouchableOpacity>
|
||||
|
||||
<Text style={mediaPlayerStyle.elapsedDuration}>{this.formatTime(this.state.currentTime)}</Text>
|
||||
@@ -439,7 +421,7 @@ class MediaPlayer extends React.PureComponent {
|
||||
const seekerCircleStyle = [this.state.seeking ? mediaPlayerStyle.bigSeekerCircle : mediaPlayerStyle.seekerCircle];
|
||||
if (!this.state.seeking) {
|
||||
seekerCircleStyle.push(
|
||||
this.state.fullscreenMode ? mediaPlayerStyle.seekerCircleTopFs : mediaPlayerStyle.seekerCircleTop,
|
||||
this.state.fullscreenMode ? mediaPlayerStyle.seekerCircleTopFs : mediaPlayerStyle.seekerCircleTop
|
||||
);
|
||||
}
|
||||
|
||||
@@ -458,7 +440,6 @@ class MediaPlayer extends React.PureComponent {
|
||||
}}
|
||||
resizeMode={this.state.resizeMode}
|
||||
playInBackground={this.state.backgroundPlayEnabled}
|
||||
playWhenInactive={this.state.backgroundPlayEnabled}
|
||||
style={mediaPlayerStyle.player}
|
||||
rate={this.state.rate}
|
||||
volume={this.state.volume}
|
||||
|
||||
@@ -32,7 +32,6 @@ export default class RelatedContent extends React.PureComponent {
|
||||
recommendedContent.map(result => (
|
||||
<ClaimResultItem
|
||||
style={fileListStyle.item}
|
||||
uri={result ? normalizeURI(`${result.name}#${result.claimId}`) : null}
|
||||
key={result.claimId}
|
||||
result={result}
|
||||
navigation={navigation}
|
||||
|
||||
@@ -43,7 +43,7 @@ class SuggestedSubscriptionItem extends React.PureComponent {
|
||||
if (isResolvingUri) {
|
||||
return (
|
||||
<View style={subscriptionsStyle.itemLoadingContainer}>
|
||||
<ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />
|
||||
<ActivityIndicator size={'small'} color={Colors.LbryGreen} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ import {
|
||||
selectSearchSuggestions,
|
||||
SETTINGS,
|
||||
} from 'lbry-redux';
|
||||
import { doSetPlayerVisible } from 'redux/actions/drawer';
|
||||
import { selectCurrentRoute } from 'redux/selectors/drawer';
|
||||
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
||||
import UriBar from './view';
|
||||
@@ -25,10 +24,9 @@ const select = state => {
|
||||
|
||||
const perform = dispatch => ({
|
||||
updateSearchQuery: query => dispatch(doUpdateSearchQuery(query)),
|
||||
setPlayerVisible: (visible, uri) => dispatch(doSetPlayerVisible(visible, uri)),
|
||||
});
|
||||
|
||||
export default connect(
|
||||
select,
|
||||
perform,
|
||||
perform
|
||||
)(UriBar);
|
||||
@@ -83,7 +83,7 @@ class UriBar extends React.PureComponent {
|
||||
};
|
||||
|
||||
handleItemPress = item => {
|
||||
const { navigation, onSearchSubmitted, setPlayerVisible, updateSearchQuery } = this.props;
|
||||
const { navigation, onSearchSubmitted, updateSearchQuery } = this.props;
|
||||
const { type, value } = item;
|
||||
|
||||
Keyboard.dismiss();
|
||||
@@ -112,7 +112,7 @@ class UriBar extends React.PureComponent {
|
||||
});
|
||||
} else {
|
||||
const uri = normalizeURI(value);
|
||||
navigateToUri(navigation, uri, null, false, null, setPlayerVisible);
|
||||
navigateToUri(navigation, uri);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -128,7 +128,7 @@ class UriBar extends React.PureComponent {
|
||||
};
|
||||
|
||||
handleSubmitEditing = () => {
|
||||
const { navigation, onSearchSubmitted, setPlayerVisible, updateSearchQuery } = this.props;
|
||||
const { navigation, onSearchSubmitted, updateSearchQuery } = this.props;
|
||||
if (this.state.inputText) {
|
||||
let inputText = this.state.inputText,
|
||||
inputTextIsUrl = false;
|
||||
@@ -137,7 +137,7 @@ class UriBar extends React.PureComponent {
|
||||
// if it's a URI (lbry://...), open the file page
|
||||
if (transformedUrl && isURIValid(transformedUrl)) {
|
||||
inputTextIsUrl = true;
|
||||
navigateToUri(navigation, transformedUrl, null, false, null, setPlayerVisible);
|
||||
navigateToUri(navigation, transformedUrl);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,12 +170,6 @@ class UriBar extends React.PureComponent {
|
||||
);
|
||||
};
|
||||
|
||||
handleTouchStart = () => {
|
||||
if (this.state.focused) {
|
||||
this.setState({ selection: null });
|
||||
}
|
||||
};
|
||||
|
||||
handleBlur = () => {
|
||||
this.setState({
|
||||
focused: false,
|
||||
@@ -183,6 +177,10 @@ class UriBar extends React.PureComponent {
|
||||
});
|
||||
};
|
||||
|
||||
onSearchPageBlurred() {
|
||||
this.setState({ currenValueSet: false });
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
allowEdit,
|
||||
@@ -270,7 +268,6 @@ class UriBar extends React.PureComponent {
|
||||
ref={ref => {
|
||||
this.textInput = ref;
|
||||
}}
|
||||
onTouchStart={this.handleTouchStart}
|
||||
autoCorrect={false}
|
||||
style={uriBarStyle.uriText}
|
||||
selection={this.state.selection}
|
||||
|
||||
+1
-3
@@ -90,7 +90,6 @@ const Constants = {
|
||||
DRAWER_ROUTE_TAG: 'Tag',
|
||||
DRAWER_ROUTE_CHANNEL_CREATOR: 'ChannelCreator',
|
||||
DRAWER_ROUTE_CHANNEL_CREATOR_FORM: 'ChannnelCreatorForm',
|
||||
DRAWER_ROUTE_INVITES: 'Invites',
|
||||
|
||||
FULL_ROUTE_NAME_DISCOVER: 'DiscoverStack',
|
||||
FULL_ROUTE_NAME_WALLET: 'WalletStack',
|
||||
@@ -135,7 +134,7 @@ const Constants = {
|
||||
|
||||
ORDER_BY_EFFECTIVE_AMOUNT: 'effective_amount',
|
||||
|
||||
DEFAULT_PAGE_SIZE: 20,
|
||||
DEFAULT_PAGE_SIZE: 10,
|
||||
|
||||
ALL_PLACEHOLDER: '_all',
|
||||
|
||||
@@ -166,7 +165,6 @@ export const DrawerRoutes = [
|
||||
Constants.DRAWER_ROUTE_SEARCH,
|
||||
Constants.DRAWER_ROUTE_TRANSACTION_HISTORY,
|
||||
Constants.DRAWER_ROUTE_CHANNEL_CREATOR,
|
||||
Constants.DRAWER_ROUTE_INVITES,
|
||||
];
|
||||
|
||||
// sub-pages for main routes
|
||||
|
||||
+2
-4
@@ -95,7 +95,6 @@ const compressor = createCompressor();
|
||||
const authFilter = createFilter('auth', ['authToken']);
|
||||
const blockedFilter = createFilter('blocked', ['blockedChannels']);
|
||||
const contentFilter = createFilter('content', ['positions']);
|
||||
const drawerFilter = createFilter('drawer', ['lastRouteInStack']);
|
||||
const saveClaimsFilter = createFilter('claims', ['claimsByUri']);
|
||||
const subscriptionsFilter = createFilter('subscriptions', ['enabledChannelNotifications', 'subscriptions', 'latest']);
|
||||
const settingsFilter = createFilter('settings', ['clientSettings']);
|
||||
@@ -103,13 +102,12 @@ const tagsFilter = createFilter('tags', ['followedTags']);
|
||||
const walletFilter = createFilter('wallet', ['receiveAddress']);
|
||||
|
||||
const v4PersistOptions = {
|
||||
whitelist: ['auth', 'blocked', 'claims', 'drawer', 'content', 'subscriptions', 'settings', 'tags', 'wallet'],
|
||||
whitelist: ['auth', 'blocked', 'claims', 'content', 'subscriptions', 'settings', 'tags', 'wallet'],
|
||||
// Order is important. Needs to be compressed last or other transforms can't
|
||||
// read the data
|
||||
transforms: [
|
||||
authFilter,
|
||||
blockedFilter,
|
||||
drawerFilter,
|
||||
saveClaimsFilter,
|
||||
subscriptionsFilter,
|
||||
settingsFilter,
|
||||
@@ -204,7 +202,7 @@ window.store = store;
|
||||
|
||||
const persistor = persistStore(store, null, err => {
|
||||
if (err) {
|
||||
// console.log('Unable to load saved SETTINGS');
|
||||
console.log('Unable to load saved SETTINGS');
|
||||
}
|
||||
});
|
||||
window.persistor = persistor;
|
||||
|
||||
@@ -905,7 +905,7 @@ export default class ChannelCreator extends React.PureComponent {
|
||||
style={channelCreatorStyle.coverImage}
|
||||
resizeMode={'cover'}
|
||||
source={
|
||||
!!coverImageUrl && coverImageUrl.trim().length > 0
|
||||
coverImageUrl !== null && coverImageUrl.trim().length > 0
|
||||
? { uri: coverImageUrl }
|
||||
: require('../../assets/default_channel_cover.png')
|
||||
}
|
||||
@@ -924,15 +924,14 @@ export default class ChannelCreator extends React.PureComponent {
|
||||
|
||||
<View style={[channelCreatorStyle.avatarImageContainer, autoStyle]}>
|
||||
<TouchableOpacity style={channelCreatorStyle.avatarTouchArea} onPress={this.onAvatarImagePress}>
|
||||
{!!thumbnailUrl && thumbnailUrl.trim().length > 0 && (
|
||||
{thumbnailUrl !== null && thumbnailUrl.trim().length > 0 && (
|
||||
<Image
|
||||
style={channelCreatorStyle.avatarImage}
|
||||
resizeMode={'cover'}
|
||||
source={{ uri: thumbnailUrl }}
|
||||
/>
|
||||
)}
|
||||
{(!!thumbnailUrl || (!!thumbnailUrl && thumbnailUrl.trim().length === 0)) &&
|
||||
newChannelName.length > 0 && (
|
||||
{(thumbnailUrl === null || thumbnailUrl.trim().length === 0) && newChannelName.length > 0 && (
|
||||
<Text style={channelIconStyle.autothumbCharacter}>
|
||||
{newChannelName.substring(0, 1).toUpperCase()}
|
||||
</Text>
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
selectSubscriptionClaims,
|
||||
selectUnreadSubscriptions,
|
||||
} from 'lbryinc';
|
||||
import { doPushDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
|
||||
import { doPushDrawerStack } from 'redux/actions/drawer';
|
||||
import { doSetClientSetting, doSetSortByItem, doSetTimeItem } from 'redux/actions/settings';
|
||||
import { makeSelectClientSetting, selectSortByItem, selectTimeItem } from 'redux/selectors/settings';
|
||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||
@@ -41,12 +41,11 @@ const perform = dispatch => ({
|
||||
pushDrawerStack: () => dispatch(doPushDrawerStack(Constants.DRAWER_ROUTE_DISCOVER)),
|
||||
removeUnreadSubscriptions: () => dispatch(doRemoveUnreadSubscriptions()),
|
||||
setClientSetting: (key, value) => dispatch(doSetClientSetting(key, value)),
|
||||
setPlayerVisible: () => dispatch(doSetPlayerVisible(false)),
|
||||
setSortByItem: item => dispatch(doSetSortByItem(item)),
|
||||
setTimeItem: item => dispatch(doSetTimeItem(item)),
|
||||
});
|
||||
|
||||
export default connect(
|
||||
select,
|
||||
perform,
|
||||
perform
|
||||
)(DiscoverPage);
|
||||
+17
-21
@@ -86,11 +86,9 @@ class DiscoverPage extends React.PureComponent {
|
||||
}
|
||||
|
||||
onComponentFocused = () => {
|
||||
const { pushDrawerStack, setPlayerVisible } = this.props;
|
||||
const { pushDrawerStack } = this.props;
|
||||
// pushDrawerStack();
|
||||
|
||||
NativeModules.Firebase.setCurrentScreen('Your tags');
|
||||
setPlayerVisible();
|
||||
};
|
||||
|
||||
handleSortByItemSelected = item => {
|
||||
@@ -137,7 +135,7 @@ class DiscoverPage extends React.PureComponent {
|
||||
Alert.alert(
|
||||
__('Enjoying LBRY?'),
|
||||
__(
|
||||
'Are you enjoying your experience with the LBRY app? You can leave a review for us on the Play Store.',
|
||||
'Are you enjoying your experience with the LBRY app? You can leave a review for us on the Play Store.'
|
||||
),
|
||||
[
|
||||
{
|
||||
@@ -153,7 +151,7 @@ class DiscoverPage extends React.PureComponent {
|
||||
},
|
||||
},
|
||||
],
|
||||
{ cancelable: false },
|
||||
{ cancelable: false }
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -291,27 +289,25 @@ class DiscoverPage extends React.PureComponent {
|
||||
);
|
||||
|
||||
render() {
|
||||
const { currentRoute, navigation, sortByItem, timeItem } = this.props;
|
||||
const { navigation, sortByItem, timeItem } = this.props;
|
||||
const { orderBy, showModalTagSelector, showSortPicker, showTimePicker } = this.state;
|
||||
|
||||
return (
|
||||
<View style={discoverStyle.container}>
|
||||
<UriBar navigation={navigation} belowOverlay={showModalTagSelector} />
|
||||
{currentRoute !== Constants.ROUTE_FILE && currentRoute !== Constants.DRAWER_ROUTE_FILE_VIEW && (
|
||||
<SectionList
|
||||
ListHeaderComponent={this.sectionListHeader}
|
||||
ListFooterComponent={this.sectionListFooter}
|
||||
style={discoverStyle.scrollContainer}
|
||||
contentContainerStyle={discoverStyle.scrollPadding}
|
||||
initialNumToRender={4}
|
||||
maxToRenderPerBatch={4}
|
||||
removeClippedSubviews
|
||||
renderItem={this.renderSectionListItem}
|
||||
renderSectionHeader={this.renderSectionHeader}
|
||||
sections={this.buildSections()}
|
||||
keyExtractor={(item, index) => item}
|
||||
/>
|
||||
)}
|
||||
<SectionList
|
||||
ListHeaderComponent={this.sectionListHeader}
|
||||
ListFooterComponent={this.sectionListFooter}
|
||||
style={discoverStyle.scrollContainer}
|
||||
contentContainerStyle={discoverStyle.scrollPadding}
|
||||
initialNumToRender={4}
|
||||
maxToRenderPerBatch={4}
|
||||
removeClippedSubviews
|
||||
renderItem={this.renderSectionListItem}
|
||||
renderSectionHeader={this.renderSectionHeader}
|
||||
sections={this.buildSections()}
|
||||
keyExtractor={(item, index) => item}
|
||||
/>
|
||||
{!showModalTagSelector && !showSortPicker && !showTimePicker && (
|
||||
<FloatingWalletBalance navigation={navigation} />
|
||||
)}
|
||||
|
||||
@@ -79,7 +79,7 @@ class DownloadsPage extends React.PureComponent {
|
||||
const { claims, fileInfos } = this.props;
|
||||
const claimUris = claims.map(claim => normalizeURI(`${claim.name}#${claim.claim_id}`));
|
||||
return fileInfos.filter(
|
||||
fileInfo => !claimUris.includes(normalizeURI(`${fileInfo.claim_name}#${fileInfo.claim_id}`)),
|
||||
fileInfo => !claimUris.includes(normalizeURI(`${fileInfo.claim_name}#${fileInfo.claim_id}`))
|
||||
);
|
||||
};
|
||||
|
||||
@@ -125,11 +125,7 @@ class DownloadsPage extends React.PureComponent {
|
||||
onPress: () => {
|
||||
const uris = Object.keys(selectedClaimsMap);
|
||||
uris.forEach(uri => {
|
||||
const { txid, nout, name, claim_id: claimId } = selectedClaimsMap[uri];
|
||||
if (name && claimId) {
|
||||
NativeModules.UtilityModule.deleteDownload(normalizeURI(`${name}#${claimId}`));
|
||||
}
|
||||
|
||||
const { txid, nout } = selectedClaimsMap[uri];
|
||||
deleteFile(`${txid}:${nout}`, true);
|
||||
});
|
||||
this.onExitSelectionMode();
|
||||
@@ -139,7 +135,7 @@ class DownloadsPage extends React.PureComponent {
|
||||
],
|
||||
{
|
||||
cancelable: true,
|
||||
},
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
@@ -188,7 +184,7 @@ class DownloadsPage extends React.PureComponent {
|
||||
this.handleSelectItem(item, claim);
|
||||
} else {
|
||||
// TODO: when shortUrl is available for my claims, navigate to that URL instead
|
||||
navigateToUri(navigation, item, { autoplay: true }, false, null);
|
||||
navigateToUri(navigation, item, { autoplay: true });
|
||||
}
|
||||
}}
|
||||
onLongPress={claim => this.handleItemLongPress(item, claim)}
|
||||
|
||||
@@ -27,6 +27,7 @@ import {
|
||||
selectPurchasedUris,
|
||||
selectFailedPurchaseUris,
|
||||
selectPurchaseUriErrorMessage,
|
||||
selectIsSearching,
|
||||
} from 'lbry-redux';
|
||||
import {
|
||||
doClaimEligiblePurchaseRewards,
|
||||
@@ -40,7 +41,7 @@ import {
|
||||
import { doDeleteFile, doStopDownloadingFile } from 'redux/actions/file';
|
||||
import { doPushDrawerStack, doPopDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
|
||||
import { doToggleFullscreenMode } from 'redux/actions/settings';
|
||||
import { selectDrawerStack, makeSelectPlayerVisible } from 'redux/selectors/drawer';
|
||||
import { selectDrawerStack } from 'redux/selectors/drawer';
|
||||
import FilePage from './view';
|
||||
|
||||
const select = (state, props) => {
|
||||
@@ -60,7 +61,6 @@ const select = (state, props) => {
|
||||
fileInfo: makeSelectFileInfoForUri(contentUri)(state),
|
||||
rewardedContentClaimIds: selectRewardContentClaimIds(state, selectProps),
|
||||
channelUri: makeSelectChannelForClaimUri(contentUri, true)(state),
|
||||
isPlayerVisible: makeSelectPlayerVisible(uri)(state), // use navigation uri for this selector
|
||||
position: makeSelectContentPositionForUri(contentUri)(state),
|
||||
purchasedUris: selectPurchasedUris(state),
|
||||
failedPurchaseUris: selectFailedPurchaseUris(state),
|
||||
@@ -69,6 +69,7 @@ const select = (state, props) => {
|
||||
streamingUrl: makeSelectStreamingUrlForUri(contentUri)(state),
|
||||
thumbnail: makeSelectThumbnailForUri(contentUri)(state),
|
||||
title: makeSelectTitleForUri(contentUri)(state),
|
||||
isSearchingRecommendContent: selectIsSearching(state),
|
||||
viewCount: makeSelectViewCountForUri(contentUri)(state),
|
||||
};
|
||||
};
|
||||
@@ -94,7 +95,7 @@ const perform = dispatch => ({
|
||||
resolveUris: uris => dispatch(doResolveUris(uris)),
|
||||
sendTip: (amount, claimId, isSupport, successCallback, errorCallback) =>
|
||||
dispatch(doSendTip(amount, claimId, isSupport, successCallback, errorCallback)),
|
||||
setPlayerVisible: (visible, uri) => dispatch(doSetPlayerVisible(visible, uri)),
|
||||
setPlayerVisible: () => dispatch(doSetPlayerVisible(true)),
|
||||
stopDownload: (uri, fileInfo) => dispatch(doStopDownloadingFile(uri, fileInfo)),
|
||||
toggleFullscreenMode: mode => dispatch(doToggleFullscreenMode(mode)),
|
||||
});
|
||||
|
||||
+85
-221
@@ -9,7 +9,6 @@ import {
|
||||
Image,
|
||||
Linking,
|
||||
NativeModules,
|
||||
Platform,
|
||||
ScrollView,
|
||||
StatusBar,
|
||||
StyleSheet,
|
||||
@@ -21,7 +20,7 @@ import {
|
||||
} from 'react-native';
|
||||
import { WebView } from 'react-native-webview';
|
||||
import { NavigationEvents } from 'react-navigation';
|
||||
import { navigateBack, navigateToUri, formatBytes, formatLbryUrlForWeb } from 'utils/helper';
|
||||
import { navigateBack, navigateToUri, formatLbryUrlForWeb } from 'utils/helper';
|
||||
import Icon from 'react-native-vector-icons/FontAwesome5';
|
||||
import ImageViewer from 'react-native-image-zoom-viewer';
|
||||
import Button from 'component/button';
|
||||
@@ -38,7 +37,6 @@ import FloatingWalletBalance from 'component/floatingWalletBalance';
|
||||
import Link from 'component/link';
|
||||
import MediaPlayer from 'component/mediaPlayer';
|
||||
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';
|
||||
@@ -66,10 +64,6 @@ class FilePage extends React.PureComponent {
|
||||
|
||||
converter = null;
|
||||
|
||||
linkHandlerScript = `(function () {
|
||||
window.onclick = function(evt) { evt.preventDefault(); window.ReactNativeWebView.postMessage(evt.target.href); evt.stopPropagation(); }
|
||||
}());`;
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
@@ -95,7 +89,6 @@ class FilePage extends React.PureComponent {
|
||||
showImageViewer: false,
|
||||
showWebView: false,
|
||||
showTipView: false,
|
||||
playbackStarted: false,
|
||||
playerBgHeight: 0,
|
||||
playerHeight: 0,
|
||||
uri: null,
|
||||
@@ -117,9 +110,6 @@ class FilePage extends React.PureComponent {
|
||||
onComponentFocused = () => {
|
||||
StatusBar.setHidden(false);
|
||||
NativeModules.Firebase.setCurrentScreen('File').then(result => {
|
||||
const { setPlayerVisible } = this.props;
|
||||
|
||||
DeviceEventEmitter.addListener('onDownloadAborted', this.handleDownloadAborted);
|
||||
DeviceEventEmitter.addListener('onStoragePermissionGranted', this.handleStoragePermissionGranted);
|
||||
DeviceEventEmitter.addListener('onStoragePermissionRefused', this.handleStoragePermissionRefused);
|
||||
|
||||
@@ -127,7 +117,6 @@ class FilePage extends React.PureComponent {
|
||||
const { uri, uriVars } = navigation.state.params;
|
||||
this.setState({ uri, uriVars });
|
||||
|
||||
setPlayerVisible(true, uri);
|
||||
if (!isResolvingUri && !claim) resolveUri(uri);
|
||||
|
||||
this.fetchFileInfo(uri, this.props);
|
||||
@@ -168,6 +157,7 @@ class FilePage extends React.PureComponent {
|
||||
notify,
|
||||
drawerStack: prevDrawerStack,
|
||||
} = this.props;
|
||||
const { uri } = navigation.state.params;
|
||||
const {
|
||||
currentRoute: prevRoute,
|
||||
failedPurchaseUris,
|
||||
@@ -178,39 +168,40 @@ class FilePage extends React.PureComponent {
|
||||
drawerStack,
|
||||
resolveUris,
|
||||
} = nextProps;
|
||||
const uri = this.getPurchaseUrl();
|
||||
|
||||
if (Constants.ROUTE_FILE === currentRoute && currentRoute !== prevRoute) {
|
||||
this.onComponentFocused();
|
||||
}
|
||||
|
||||
if (failedPurchaseUris.includes(uri) && prevPurchaseUriErrorMessage !== purchaseUriErrorMessage) {
|
||||
if (
|
||||
failedPurchaseUris.includes(uri) &&
|
||||
!purchasedUris.includes(uri) &&
|
||||
prevPurchaseUriErrorMessage !== purchaseUriErrorMessage
|
||||
) {
|
||||
if (purchaseUriErrorMessage && purchaseUriErrorMessage.trim().length > 0) {
|
||||
notify({ message: purchaseUriErrorMessage, isError: true });
|
||||
}
|
||||
this.setState({ downloadPressed: false, fileViewLogged: false, mediaLoaded: false, showRecommended: true });
|
||||
this.setState({ downloadPressed: false, fileViewLogged: false, mediaLoaded: false });
|
||||
}
|
||||
|
||||
const mediaType = Lbry.getMediaType(contentType);
|
||||
const isPlayable = mediaType === 'video' || mediaType === 'audio';
|
||||
if (this.state.fileGetStarted || prevPurchasedUris.length !== purchasedUris.length) {
|
||||
const { permanent_url: permanentUrl, nout, txid } = claim;
|
||||
const outpoint = `${txid}:${nout}`;
|
||||
if (this.state.fileGetStarted) {
|
||||
NativeModules.UtilityModule.queueDownload(outpoint);
|
||||
this.setState({ fileGetStarted: false });
|
||||
}
|
||||
|
||||
const { permanent_url: permanentUrl } = claim;
|
||||
if (purchasedUris.includes(uri) || purchasedUris.includes(permanentUrl)) {
|
||||
const { nout, txid } = claim;
|
||||
const outpoint = `${txid}:${nout}`;
|
||||
NativeModules.UtilityModule.queueDownload(outpoint);
|
||||
// If the media is playable, file/view will be done in onPlaybackStarted
|
||||
if (!isPlayable && !this.state.fileViewLogged) {
|
||||
this.logFileView(uri, claim);
|
||||
}
|
||||
this.setState({ fileGetStarted: false });
|
||||
}
|
||||
NativeModules.UtilityModule.checkDownloads();
|
||||
}
|
||||
|
||||
if ((!fileInfo || (fileInfo && !fileInfo.completed)) && !this.state.streamingMode && isPlayable) {
|
||||
if (!this.state.streamingMode && isPlayable) {
|
||||
if (streamingUrl) {
|
||||
this.setState({ streamingMode: true, currentStreamUrl: streamingUrl });
|
||||
} else if (fileInfo && fileInfo.streaming_url) {
|
||||
@@ -235,45 +226,10 @@ class FilePage extends React.PureComponent {
|
||||
}
|
||||
|
||||
shouldComponentUpdate(nextProps, nextState) {
|
||||
const { fileInfo: prevFileInfo } = this.props;
|
||||
const { fileInfo } = nextProps;
|
||||
|
||||
const propKeyTriggers = ['balance', 'viewCount', 'isResolvingUri'];
|
||||
const stateKeyTriggers = [
|
||||
'downloadPressed',
|
||||
'fullscreenMode',
|
||||
'mediaLoaded',
|
||||
'playerBgHeighht',
|
||||
'playerHeight',
|
||||
'relatedY',
|
||||
'showTipView',
|
||||
'showImageViewer',
|
||||
'showWebView',
|
||||
'showDescription',
|
||||
'showRecommended',
|
||||
'uri',
|
||||
];
|
||||
for (let i = 0; i < propKeyTriggers.length; i++) {
|
||||
const key = propKeyTriggers[i];
|
||||
if (this.props[key] !== nextProps[key]) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < stateKeyTriggers.length; i++) {
|
||||
const key = stateKeyTriggers[i];
|
||||
if (this.state[key] !== nextState[key]) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!prevFileInfo && fileInfo) {
|
||||
return true;
|
||||
}
|
||||
if (prevFileInfo && fileInfo && Object.keys(this.difference(fileInfo, prevFileInfo)).length > 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return (
|
||||
Object.keys(this.difference(nextProps, this.props)).length > 0 ||
|
||||
Object.keys(this.difference(nextState, this.state)).length > 0
|
||||
);
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps, prevState) {
|
||||
@@ -301,7 +257,7 @@ class FilePage extends React.PureComponent {
|
||||
this.setState({ autoGetAttempted: true }, () => this.checkStoragePermissionForDownload());
|
||||
}
|
||||
|
||||
if (((costInfo && costInfo.cost > 0) || !isPlayable) && (!fileInfo && !isViewable) && !this.state.showRecommended) {
|
||||
if (((costInfo && costInfo.cost > 0) || !isPlayable) && !this.state.showRecommended) {
|
||||
this.setState({ showRecommended: true });
|
||||
}
|
||||
|
||||
@@ -338,6 +294,8 @@ class FilePage extends React.PureComponent {
|
||||
|
||||
handleFullscreenToggle = isFullscreen => {
|
||||
const { toggleFullscreenMode } = this.props;
|
||||
this.setState({ fullscreenMode: isFullscreen });
|
||||
|
||||
toggleFullscreenMode(isFullscreen);
|
||||
|
||||
if (isFullscreen) {
|
||||
@@ -354,7 +312,6 @@ class FilePage extends React.PureComponent {
|
||||
NativeModules.UtilityModule.showNavigationBar();
|
||||
}
|
||||
|
||||
this.setState({ fullscreenMode: isFullscreen });
|
||||
StatusBar.setHidden(isFullscreen);
|
||||
};
|
||||
|
||||
@@ -375,12 +332,11 @@ class FilePage extends React.PureComponent {
|
||||
text: __('Yes'),
|
||||
onPress: () => {
|
||||
const { uri } = navigation.state.params;
|
||||
const purchaseUrl = this.getPurchaseUrl();
|
||||
|
||||
deleteFile(`${claim.txid}:${claim.nout}`, true);
|
||||
deletePurchasedUri(uri);
|
||||
|
||||
NativeModules.UtilityModule.deleteDownload(normalizeURI(purchaseUrl));
|
||||
NativeModules.UtilityModule.deleteDownload(uri);
|
||||
this.setState({
|
||||
downloadPressed: false,
|
||||
fileViewLogged: false,
|
||||
@@ -408,18 +364,19 @@ class FilePage extends React.PureComponent {
|
||||
const { deletePurchasedUri, fileInfo, navigation, notify, stopDownload } = this.props;
|
||||
|
||||
Alert.alert(
|
||||
__('Stop download'),
|
||||
__('Are you sure you want to stop downloading this file?'),
|
||||
'Stop download',
|
||||
'Are you sure you want to stop downloading this file?',
|
||||
[
|
||||
{ text: __('No') },
|
||||
{ text: 'No' },
|
||||
{
|
||||
text: __('Yes'),
|
||||
text: 'Yes',
|
||||
onPress: () => {
|
||||
const uri = this.getPurchaseUrl();
|
||||
const { uri } = navigation.state.params;
|
||||
stopDownload(uri, fileInfo);
|
||||
deletePurchasedUri(uri);
|
||||
NativeModules.UtilityModule.deleteDownload(normalizeURI(uri));
|
||||
|
||||
if (NativeModules.UtilityModule) {
|
||||
NativeModules.UtilityModule.deleteDownload(uri);
|
||||
}
|
||||
this.setState({
|
||||
downloadPressed: false,
|
||||
fileViewLogged: false,
|
||||
@@ -430,7 +387,7 @@ class FilePage extends React.PureComponent {
|
||||
// there can be a bit of lag between the user pressing Yes and the UI being updated
|
||||
// after the file_set_status and file_delete operations, so let the user know
|
||||
notify({
|
||||
message: __('The download will stop momentarily. You do not need to wait to discover something else.'),
|
||||
message: 'The download will stop momentarily. You do not need to wait to discover something else.',
|
||||
});
|
||||
},
|
||||
},
|
||||
@@ -455,29 +412,12 @@ class FilePage extends React.PureComponent {
|
||||
if (window.currentMediaInfo) {
|
||||
window.currentMediaInfo = null;
|
||||
}
|
||||
DeviceEventEmitter.removeListener('onDownloadAborted', this.handleDownloadAborted);
|
||||
window.player = null;
|
||||
|
||||
DeviceEventEmitter.removeListener('onStoragePermissionGranted', this.handleStoragePermissionGranted);
|
||||
DeviceEventEmitter.removeListener('onStoragePermissionRefused', this.handleStoragePermissionRefused);
|
||||
}
|
||||
|
||||
handleDownloadAborted = evt => {
|
||||
const { deletePurchasedUri, fileInfo, stopDownload } = this.props;
|
||||
const { uri, outpoint } = evt;
|
||||
const purchaseUrl = normalizeURI(this.getPurchaseUrl());
|
||||
if (purchaseUrl === uri) {
|
||||
stopDownload(uri, fileInfo);
|
||||
deletePurchasedUri(uri);
|
||||
NativeModules.UtilityModule.deleteDownload(normalizeURI(uri));
|
||||
|
||||
this.setState({
|
||||
downloadPressed: false,
|
||||
fileViewLogged: false,
|
||||
mediaLoaded: false,
|
||||
stopDownloadConfirmed: true,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
handleStoragePermissionGranted = () => {
|
||||
// permission was allowed. proceed to download
|
||||
const { notify } = this.props;
|
||||
@@ -490,7 +430,7 @@ class FilePage extends React.PureComponent {
|
||||
})
|
||||
.then(() => this.performDownload())
|
||||
.catch(() => {
|
||||
notify({ message: __('The file could not be downloaded to the default download directory.'), isError: true });
|
||||
notify({ message: 'The file could not be downloaded to the default download directory.', isError: true });
|
||||
});
|
||||
});
|
||||
};
|
||||
@@ -508,14 +448,12 @@ class FilePage extends React.PureComponent {
|
||||
if (!fileInfo) {
|
||||
return null;
|
||||
}
|
||||
return 'file://' + fileInfo.download_path;
|
||||
return 'file:///' + fileInfo.download_path;
|
||||
};
|
||||
|
||||
playerUriForFileInfo = fileInfo => {
|
||||
const { streamingUrl } = this.props;
|
||||
if (!this.state.streamingMode && fileInfo && fileInfo.download_path && fileInfo.completed) {
|
||||
// take streamingMode in the state into account because if the download completes while
|
||||
// the media is already streaming, it will restart from the beginning
|
||||
if (fileInfo && fileInfo.download_path) {
|
||||
return this.getEncodedDownloadPath(fileInfo);
|
||||
}
|
||||
if (streamingUrl) {
|
||||
@@ -622,7 +560,7 @@ class FilePage extends React.PureComponent {
|
||||
NativeModules.Firebase.track('play', payload);
|
||||
|
||||
// only fetch recommended content after playback has started
|
||||
this.setState({ playbackStarted: true, showRecommended: true });
|
||||
this.setState({ showRecommended: true });
|
||||
};
|
||||
|
||||
onPlaybackFinished = () => {
|
||||
@@ -678,14 +616,13 @@ class FilePage extends React.PureComponent {
|
||||
|
||||
confirmPurchaseUri = (uri, costInfo, download) => {
|
||||
const { notify, purchaseUri, title } = this.props;
|
||||
const { cost } = costInfo;
|
||||
|
||||
if (!costInfo) {
|
||||
notify({ message: __('This content cannot be viewed at this time. Please try again in a bit.'), isError: true });
|
||||
this.setState({ downloadPressed: false });
|
||||
this.fetchCostInfo(uri, this.props);
|
||||
return;
|
||||
}
|
||||
|
||||
const { cost } = costInfo;
|
||||
if (costInfo.cost > 0) {
|
||||
Alert.alert(
|
||||
__('Confirm Purchase'),
|
||||
@@ -715,59 +652,27 @@ class FilePage extends React.PureComponent {
|
||||
const isPlayable = mediaType === 'video' || mediaType === 'audio';
|
||||
const isViewable = mediaType === 'image' || mediaType === 'text';
|
||||
|
||||
const purchaseUrl = this.getPurchaseUrl();
|
||||
NativeModules.Firebase.track('purchase_uri', { uri: purchaseUrl });
|
||||
const { permanent_url: uri } = claim;
|
||||
NativeModules.Firebase.track('purchase_uri', { uri: uri });
|
||||
|
||||
if (!isPlayable) {
|
||||
this.onDownloadPressed();
|
||||
this.checkStoragePermissionForDownload();
|
||||
} else {
|
||||
this.confirmPurchaseUri(purchaseUrl, costInfo, !isPlayable);
|
||||
this.confirmPurchaseUri(uri, costInfo, !isPlayable);
|
||||
}
|
||||
|
||||
if (isPlayable) {
|
||||
this.startTime = Date.now();
|
||||
this.setState({ downloadPressed: true, autoPlayMedia: true, stopDownloadConfirmed: false });
|
||||
setPlayerVisible();
|
||||
}
|
||||
if (isViewable) {
|
||||
this.setState({ downloadPressed: true });
|
||||
}
|
||||
};
|
||||
|
||||
getPurchaseUrl = () => {
|
||||
const { claim, navigation } = this.props;
|
||||
const permanentUrl = claim ? claim.permanent_url : null;
|
||||
|
||||
let purchaseUrl;
|
||||
if (navigation.state.params) {
|
||||
const { uri, fullUri } = navigation.state.params;
|
||||
purchaseUrl = fullUri || permanentUrl || uri;
|
||||
}
|
||||
if (!purchaseUrl && permanentUrl) {
|
||||
purchaseUrl = permanentUrl;
|
||||
}
|
||||
|
||||
return purchaseUrl;
|
||||
};
|
||||
|
||||
onDownloadPressed = () => {
|
||||
const { claim, title } = this.props;
|
||||
const fileSize = claim && claim.value && claim.value.source ? claim.value.source.size : 0;
|
||||
Alert.alert(
|
||||
__('Download file'),
|
||||
fileSize > 0
|
||||
? __('Save "%title%" (%size%) to your device', { title, size: formatBytes(fileSize, 0) })
|
||||
: __('Save "%title%" to your device', { title }),
|
||||
[
|
||||
{ text: __('No') },
|
||||
{
|
||||
text: __('Yes'),
|
||||
onPress: () => {
|
||||
this.checkStoragePermissionForDownload();
|
||||
},
|
||||
},
|
||||
],
|
||||
{ cancelable: true },
|
||||
);
|
||||
this.checkStoragePermissionForDownload();
|
||||
};
|
||||
|
||||
checkStoragePermissionForDownload = () => {
|
||||
@@ -783,7 +688,7 @@ class FilePage extends React.PureComponent {
|
||||
};
|
||||
|
||||
performDownload = () => {
|
||||
const { claim, costInfo, fileGet, fileInfo, purchasedUris } = this.props;
|
||||
const { claim, costInfo, purchaseUri } = this.props;
|
||||
this.setState(
|
||||
{
|
||||
downloadPressed: true,
|
||||
@@ -791,21 +696,15 @@ class FilePage extends React.PureComponent {
|
||||
stopDownloadConfirmed: false,
|
||||
},
|
||||
() => {
|
||||
const url = this.getPurchaseUrl();
|
||||
if (fileInfo || purchasedUris.includes(url)) {
|
||||
// file already in library or URI already purchased, use fileGet directly
|
||||
this.setState({ fileGetStarted: true }, () => fileGet(url, true));
|
||||
} else {
|
||||
this.confirmPurchaseUri(url, costInfo, true);
|
||||
}
|
||||
this.confirmPurchaseUri(claim.permanent_url, costInfo, true);
|
||||
NativeModules.UtilityModule.checkDownloads();
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
onBackButtonPressed = () => {
|
||||
const { navigation, drawerStack, popDrawerStack, setPlayerVisible } = this.props;
|
||||
navigateBack(navigation, drawerStack, popDrawerStack, setPlayerVisible);
|
||||
const { navigation, drawerStack, popDrawerStack } = this.props;
|
||||
navigateBack(navigation, drawerStack, popDrawerStack);
|
||||
};
|
||||
|
||||
onOpenFilePressed = () => {
|
||||
@@ -813,16 +712,25 @@ class FilePage extends React.PureComponent {
|
||||
const localFileUri = this.localUriForFileInfo(fileInfo);
|
||||
const mediaType = Lbry.getMediaType(contentType);
|
||||
const isViewable = mediaType === 'image' || mediaType === 'text';
|
||||
const isPlayable = mediaType === 'video' || mediaType === 'audio';
|
||||
if (isViewable) {
|
||||
this.openFile(localFileUri, mediaType, contentType);
|
||||
} else if (isPlayable) {
|
||||
notify({ message: __('Please press the Play button.') });
|
||||
} else {
|
||||
notify({ message: __('This file cannot be displayed in the LBRY app.') });
|
||||
}
|
||||
};
|
||||
|
||||
onSaveFilePressed = () => {
|
||||
const { costInfo, fileGet, fileInfo, navigation, purchasedUris, purchaseUri } = this.props;
|
||||
const { uri } = navigation.state.params;
|
||||
|
||||
if (fileInfo || purchasedUris.includes(uri)) {
|
||||
// file already in library or URI already purchased, use fileGet directly
|
||||
this.setState({ fileGetStarted: true }, () => fileGet(uri, true));
|
||||
} else {
|
||||
this.checkStoragePermissionForDownload();
|
||||
}
|
||||
};
|
||||
|
||||
openFile = (localFileUri, mediaType, contentType) => {
|
||||
const { pushDrawerStack } = this.props;
|
||||
const isWebViewable = mediaType === 'text';
|
||||
@@ -838,7 +746,6 @@ class FilePage extends React.PureComponent {
|
||||
},
|
||||
],
|
||||
showImageViewer: true,
|
||||
showRecommended: true,
|
||||
},
|
||||
() => pushDrawerStack(Constants.DRAWER_ROUTE_FILE_VIEW),
|
||||
);
|
||||
@@ -850,7 +757,6 @@ class FilePage extends React.PureComponent {
|
||||
this.setState(
|
||||
{
|
||||
showWebView: true,
|
||||
showRecommended: true,
|
||||
},
|
||||
() => {
|
||||
pushDrawerStack(Constants.DRAWER_ROUTE_FILE_VIEW);
|
||||
@@ -880,52 +786,21 @@ class FilePage extends React.PureComponent {
|
||||
}
|
||||
};
|
||||
|
||||
handleWebViewMessage = evt => {
|
||||
const href = evt.nativeEvent.data;
|
||||
if (href && href.startsWith('http')) {
|
||||
Linking.openURL(href);
|
||||
}
|
||||
};
|
||||
|
||||
buildWebViewSource = () => {
|
||||
const { contentType, fileInfo } = this.props;
|
||||
const localFileUri = this.localUriForFileInfo(fileInfo);
|
||||
|
||||
if (['text/markdown', 'text/md'].includes(contentType)) {
|
||||
let fontdecl = '';
|
||||
if (Platform.OS === 'android') {
|
||||
fontdecl = `
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
src: url('file:///android_asset/fonts/Inter-Regular.otf');
|
||||
font-weight: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Inter;
|
||||
src: url('file:///android_asset/fonts/Inter-Bold.otf');
|
||||
font-weight: bold;
|
||||
}
|
||||
`;
|
||||
}
|
||||
|
||||
const html = `
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no"/>
|
||||
<style type="text/css">
|
||||
${fontdecl}
|
||||
body { font-family: 'Inter', sans-serif; margin: 16px }
|
||||
img { width: 100%; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="content"></div>
|
||||
</body>
|
||||
</html>
|
||||
`;
|
||||
|
||||
const html =
|
||||
'<!doctype html>' +
|
||||
'<html>' +
|
||||
' <head>' +
|
||||
' <meta charset="utf-8"/>' +
|
||||
' </head>' +
|
||||
' <body>' +
|
||||
' <div id="content"></div>' +
|
||||
' </body>' +
|
||||
'</html>';
|
||||
return { html };
|
||||
}
|
||||
|
||||
@@ -944,7 +819,6 @@ class FilePage extends React.PureComponent {
|
||||
contentType,
|
||||
tab,
|
||||
rewardedContentClaimIds,
|
||||
isPlayerVisible,
|
||||
isResolvingUri,
|
||||
blackListedOutpoints,
|
||||
myClaimUris,
|
||||
@@ -952,7 +826,6 @@ class FilePage extends React.PureComponent {
|
||||
position,
|
||||
purchaseUri,
|
||||
pushDrawerStack,
|
||||
setPlayerVisible,
|
||||
thumbnail,
|
||||
title,
|
||||
viewCount,
|
||||
@@ -969,7 +842,7 @@ class FilePage extends React.PureComponent {
|
||||
<View style={filePageStyle.pageContainer}>
|
||||
<UriBar value={uri} navigation={navigation} />
|
||||
{isResolvingUri && (
|
||||
<View style={filePageStyle.busyContainer}>
|
||||
<View stylebuildWeb={filePageStyle.busyContainer}>
|
||||
<ActivityIndicator size="large" color={Colors.NextLbryGreen} />
|
||||
<Text style={filePageStyle.infoText}>{__('Loading decentralized data...')}</Text>
|
||||
</View>
|
||||
@@ -1104,8 +977,6 @@ class FilePage extends React.PureComponent {
|
||||
source={this.buildWebViewSource()}
|
||||
style={filePageStyle.viewer}
|
||||
onLoad={this.handleWebViewLoad}
|
||||
injectedJavaScript={this.linkHandlerScript}
|
||||
onMessage={this.handleWebViewMessage}
|
||||
/>
|
||||
)}
|
||||
{this.state.showImageViewer && (
|
||||
@@ -1201,9 +1072,7 @@ class FilePage extends React.PureComponent {
|
||||
{!innerContent &&
|
||||
(this.state.streamingMode || (canLoadMedia && fileInfo && isPlayable)) &&
|
||||
this.state.fullscreenMode && <View style={fsPlayerBgStyle} />}
|
||||
{isPlayerVisible &&
|
||||
!innerContent &&
|
||||
(this.state.streamingMode || (canLoadMedia && fileInfo && isPlayable)) && (
|
||||
{!innerContent && (this.state.streamingMode || (canLoadMedia && fileInfo && isPlayable)) && (
|
||||
<MediaPlayer
|
||||
claim={claim}
|
||||
assignPlayer={ref => {
|
||||
@@ -1272,35 +1141,23 @@ class FilePage extends React.PureComponent {
|
||||
<Text style={filePageStyle.largeButtonText}>{__('Tip')}</Text>
|
||||
</TouchableOpacity>
|
||||
|
||||
{!canEdit && (
|
||||
{!canEdit && !isPlayable && (
|
||||
<View style={filePageStyle.sharedLargeButton}>
|
||||
{!this.state.downloadPressed &&
|
||||
(!fileInfo || !fileInfo.download_path || (fileInfo.written_bytes <= 0 && !completed)) && (
|
||||
{(!fileInfo || (fileInfo.written_bytes <= 0 && !completed)) && (
|
||||
<TouchableOpacity style={filePageStyle.innerLargeButton} onPress={this.onDownloadPressed}>
|
||||
<Icon name={'download'} size={16} style={filePageStyle.largeButtonIcon} />
|
||||
<Text style={filePageStyle.largeButtonText}>{__('Download')}</Text>
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
|
||||
{this.state.downloadPressed && (!fileInfo || fileInfo.written_bytes === 0) && (
|
||||
<ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />
|
||||
)}
|
||||
|
||||
{!completed &&
|
||||
fileInfo &&
|
||||
!fileInfo.stopped &&
|
||||
fileInfo.written_bytes > 0 &&
|
||||
fileInfo.written_bytes < fileInfo.total_bytes &&
|
||||
!this.state.stopDownloadConfirmed && (
|
||||
<TouchableOpacity style={filePageStyle.innerLargeButton} onPress={this.onStopDownloadPressed}>
|
||||
<ProgressCircle
|
||||
percent={(fileInfo.written_bytes / fileInfo.total_bytes) * 100}
|
||||
radius={9}
|
||||
borderWidth={2}
|
||||
shadowColor={Colors.ActionGrey}
|
||||
color={Colors.NextLbryGreen}
|
||||
>
|
||||
<Icon name={'stop'} size={6} style={filePageStyle.largeButtonIcon} />
|
||||
</ProgressCircle>
|
||||
<Icon name={'stop'} size={16} style={filePageStyle.largeButtonIcon} />
|
||||
<Text style={filePageStyle.largeButtonText}>{__('Stop')}</Text>
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
@@ -1355,7 +1212,6 @@ class FilePage extends React.PureComponent {
|
||||
null,
|
||||
false,
|
||||
fullChannelUri,
|
||||
setPlayerVisible,
|
||||
);
|
||||
}}
|
||||
/>
|
||||
@@ -1374,6 +1230,14 @@ class FilePage extends React.PureComponent {
|
||||
/>
|
||||
</View>
|
||||
<View style={filePageStyle.subscriptionRow}>
|
||||
{false && ((isPlayable && !fileInfo) || (isPlayable && fileInfo && !fileInfo.download_path)) && (
|
||||
<Button
|
||||
style={[filePageStyle.actionButton, filePageStyle.saveFileButton]}
|
||||
theme={'light'}
|
||||
icon={'download'}
|
||||
onPress={this.onSaveFilePressed}
|
||||
/>
|
||||
)}
|
||||
{channelName && (
|
||||
<SubscribeButton
|
||||
style={filePageStyle.actionButton}
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
import { connect } from 'react-redux';
|
||||
import { selectMyChannelClaims, selectFetchingMyChannels, doFetchChannelListMine, doToast } from 'lbry-redux';
|
||||
import {
|
||||
selectReferralReward,
|
||||
selectUserInvitesRemaining,
|
||||
selectUserInviteNewIsPending,
|
||||
selectUserInviteNewErrorMessage,
|
||||
selectUserInviteReferralLink,
|
||||
selectUserInviteReferralCode,
|
||||
selectUserInvitees,
|
||||
selectUserInviteStatusIsPending,
|
||||
doFetchInviteStatus,
|
||||
doUserInviteNew,
|
||||
} from 'lbryinc';
|
||||
import { doPushDrawerStack, doPopDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
|
||||
import { doUpdateChannelFormState, doClearChannelFormState } from 'redux/actions/form';
|
||||
import { selectDrawerStack } from 'redux/selectors/drawer';
|
||||
import { selectChannelFormState, selectHasChannelFormState } from 'redux/selectors/form';
|
||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||
import InvitesPage from './view';
|
||||
|
||||
const select = state => ({
|
||||
channels: selectMyChannelClaims(state),
|
||||
fetchingChannels: selectFetchingMyChannels(state),
|
||||
fetchingInvitees: selectUserInviteStatusIsPending(state),
|
||||
errorMessage: selectUserInviteNewErrorMessage(state),
|
||||
invitesRemaining: selectUserInvitesRemaining(state),
|
||||
referralCode: selectUserInviteReferralCode(state),
|
||||
isPending: selectUserInviteNewIsPending(state),
|
||||
invitees: selectUserInvitees(state),
|
||||
referralReward: selectReferralReward(state),
|
||||
});
|
||||
|
||||
const perform = dispatch => ({
|
||||
fetchChannelListMine: () => dispatch(doFetchChannelListMine()),
|
||||
fetchInviteStatus: () => dispatch(doFetchInviteStatus()),
|
||||
inviteNew: email => dispatch(doUserInviteNew(email)),
|
||||
pushDrawerStack: () => dispatch(doPushDrawerStack(Constants.DRAWER_ROUTE_INVITES)),
|
||||
setPlayerVisible: () => dispatch(doSetPlayerVisible(false)),
|
||||
notify: data => dispatch(doToast(data)),
|
||||
});
|
||||
|
||||
export default connect(
|
||||
select,
|
||||
perform,
|
||||
)(InvitesPage);
|
||||
@@ -1,228 +0,0 @@
|
||||
import React from 'react';
|
||||
import { Lbry, parseURI } from 'lbry-redux';
|
||||
import {
|
||||
ActivityIndicator,
|
||||
Clipboard,
|
||||
NativeModules,
|
||||
ScrollView,
|
||||
Text,
|
||||
TextInput,
|
||||
TouchableOpacity,
|
||||
View,
|
||||
} from 'react-native';
|
||||
import Colors from 'styles/colors';
|
||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||
import Icon from 'react-native-vector-icons/FontAwesome5';
|
||||
import Link from 'component/link';
|
||||
import Button from 'component/button';
|
||||
import ChannelSelector from 'component/channelSelector';
|
||||
import PageHeader from 'component/pageHeader';
|
||||
import RewardCard from 'component/rewardCard';
|
||||
import RewardEnrolment from 'component/rewardEnrolment';
|
||||
import UriBar from 'component/uriBar';
|
||||
import invitesStyle from 'styles/invites';
|
||||
|
||||
class InvitesPage extends React.PureComponent {
|
||||
state = {
|
||||
channelName: null,
|
||||
email: null,
|
||||
inviteLink: null,
|
||||
selectedChannel: null,
|
||||
};
|
||||
|
||||
componentWillMount() {
|
||||
const { navigation } = this.props;
|
||||
// this.didFocusListener = navigation.addListener('didFocus', this.onComponentFocused);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
if (this.didFocusListener) {
|
||||
this.didFocusListener.remove();
|
||||
}
|
||||
}
|
||||
|
||||
onComponentFocused = () => {
|
||||
const { fetchChannelListMine, fetchInviteStatus, pushDrawerStack, navigation, setPlayerVisible, user } = this.props;
|
||||
|
||||
pushDrawerStack();
|
||||
setPlayerVisible();
|
||||
NativeModules.Firebase.setCurrentScreen('Invites').then(result => {
|
||||
fetchChannelListMine();
|
||||
fetchInviteStatus();
|
||||
});
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
this.onComponentFocused();
|
||||
}
|
||||
|
||||
handleChannelChange = channelName => {
|
||||
const { channels = [] } = this.props;
|
||||
if (channels && channels.length > 0) {
|
||||
const filtered = channels.filter(c => c.name === channelName);
|
||||
if (filtered.length > 0) {
|
||||
const channel = filtered[0];
|
||||
this.setState({ channelName, inviteLink: this.getLinkForChannel(channel) });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
getLinkForChannel = channel => {
|
||||
const { claimId, claimName } = parseURI(channel.permanent_url);
|
||||
return `https://lbry.tv/$/invite/${claimName}:${claimId}`;
|
||||
};
|
||||
|
||||
handleInviteEmailChange = text => {
|
||||
this.setState({ email: text });
|
||||
};
|
||||
|
||||
handleInvitePress = () => {
|
||||
const { inviteNew, notify } = this.props;
|
||||
const { email } = this.state;
|
||||
if (!email || email.indexOf('@') === -1) {
|
||||
return notify({
|
||||
message: __('Please enter a valid email address to send an invite to.'),
|
||||
isError: true,
|
||||
});
|
||||
}
|
||||
|
||||
inviteNew(email);
|
||||
};
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
const { isPending: prevPending, notify } = this.props;
|
||||
const { channels = [], isPending, errorMessage } = nextProps;
|
||||
const { email } = this.state;
|
||||
|
||||
if (!this.state.channelName && channels && channels.length > 0) {
|
||||
const firstChannel = channels[0];
|
||||
this.setState({ channelName: firstChannel.name, inviteLink: this.getLinkForChannel(firstChannel) });
|
||||
}
|
||||
|
||||
if (prevPending && !isPending) {
|
||||
if (errorMessage && errorMessage.trim().length > 0) {
|
||||
notify({ message: errorMessage, isError: true });
|
||||
} else {
|
||||
notify({ message: __(`${email} was invited to the LBRY party!`) });
|
||||
this.setState({ email: null });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
handleInviteLinkPress = () => {
|
||||
const { notify } = this.props;
|
||||
Clipboard.setString(this.state.inviteLink);
|
||||
notify({
|
||||
message: __('Invite link copied'),
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { fetchingInvitees, user, navigation, notify, isPending, invitees } = this.props;
|
||||
const { email, inviteLink } = this.state;
|
||||
const hasInvitees = invitees && invitees.length > 0;
|
||||
|
||||
return (
|
||||
<View style={invitesStyle.container}>
|
||||
<UriBar navigation={navigation} />
|
||||
|
||||
<ScrollView style={invitesStyle.scrollContainer}>
|
||||
<TouchableOpacity style={invitesStyle.rewardDriverCard} onPress={() => navigation.navigate('Rewards')}>
|
||||
<Icon name="award" size={16} style={invitesStyle.rewardDriverIcon} />
|
||||
<Text style={invitesStyle.rewardDriverText}>{__('Earn rewards for inviting your friends.')}</Text>
|
||||
</TouchableOpacity>
|
||||
|
||||
<View style={invitesStyle.card}>
|
||||
<Text style={invitesStyle.title}>{__('Invite Link')}</Text>
|
||||
<Text style={invitesStyle.text}>
|
||||
{__('Share this link with friends (or enemies) and get 20 LBC when they join lbry.tv')}
|
||||
</Text>
|
||||
|
||||
<Text style={invitesStyle.subTitle}>{__('Your invite link')}</Text>
|
||||
<View style={invitesStyle.row}>
|
||||
<Text selectable numberOfLines={1} style={invitesStyle.inviteLink} onPress={this.handleInviteLinkPress}>
|
||||
{this.state.inviteLink}
|
||||
</Text>
|
||||
<Button icon={'clipboard'} style={invitesStyle.button} onPress={this.handleInviteLinkPress} />
|
||||
</View>
|
||||
|
||||
<Text style={invitesStyle.customizeTitle}>{__('Customize invite link')}</Text>
|
||||
<ChannelSelector
|
||||
showAnonymous={false}
|
||||
channelName={this.state.channelName}
|
||||
onChannelChange={this.handleChannelChange}
|
||||
/>
|
||||
</View>
|
||||
|
||||
<View style={invitesStyle.card}>
|
||||
<Text style={invitesStyle.title}>{__('Invite by Email')}</Text>
|
||||
<Text style={invitesStyle.text}>
|
||||
{__('Invite someone you know by email and earn 20 LBC when they join lbry.tv.')}
|
||||
</Text>
|
||||
|
||||
<TextInput
|
||||
style={invitesStyle.emailInput}
|
||||
editable={!isPending}
|
||||
value={this.state.email}
|
||||
onChangeText={this.handleInviteEmailChange}
|
||||
placeholder={__('imaginary@friend.com')}
|
||||
underlineColorAndroid={Colors.NextLbryGreen}
|
||||
/>
|
||||
<View style={invitesStyle.rightRow}>
|
||||
{isPending && (
|
||||
<ActivityIndicator size={'small'} color={Colors.NextLbryGreen} style={invitesStyle.loading} />
|
||||
)}
|
||||
<Button
|
||||
disabled={!email || email.indexOf('@') === -1 || isPending}
|
||||
style={invitesStyle.button}
|
||||
text={__('Invite')}
|
||||
onPress={this.handleInvitePress}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<View style={[invitesStyle.card, invitesStyle.lastCard]}>
|
||||
<View style={invitesStyle.titleRow}>
|
||||
<Text style={invitesStyle.titleCol}>{__('Invite History')}</Text>
|
||||
{fetchingInvitees && <ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />}
|
||||
</View>
|
||||
|
||||
<Text style={invitesStyle.text}>
|
||||
{__(
|
||||
'Earn 20 LBC for inviting a friend, an enemy, a frenemy, or an enefriend. Everyone needs content freedom.',
|
||||
)}
|
||||
</Text>
|
||||
|
||||
<View style={invitesStyle.invitees}>
|
||||
{hasInvitees && (
|
||||
<View style={invitesStyle.inviteesHeader}>
|
||||
<Text style={invitesStyle.emailHeader} numberOfLines={1}>
|
||||
{__('Email')}
|
||||
</Text>
|
||||
<Text style={invitesStyle.rewardHeader} numberOfLines={1}>
|
||||
{__('Reward')}
|
||||
</Text>
|
||||
</View>
|
||||
)}
|
||||
{hasInvitees &&
|
||||
invitees.map(invitee => (
|
||||
<View key={invitee.email} style={invitesStyle.inviteeItem}>
|
||||
<Text style={invitesStyle.inviteeEmail} numberOfLines={1}>
|
||||
{invitee.email}
|
||||
</Text>
|
||||
<Text style={invitesStyle.rewardStatus} numberOfLines={1}>
|
||||
{invitee.invite_reward_claimed && __('Claimed')}
|
||||
{!invitee.invite_reward_claimed &&
|
||||
(invitee.invite_reward_claimable ? __('Claimable') : __('Unclaimable'))}
|
||||
</Text>
|
||||
</View>
|
||||
))}
|
||||
</View>
|
||||
</View>
|
||||
</ScrollView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default InvitesPage;
|
||||
@@ -1,7 +1,6 @@
|
||||
import { connect } from 'react-redux';
|
||||
import {
|
||||
doPublish,
|
||||
doFetchClaimListMine,
|
||||
doResolveUri,
|
||||
doToast,
|
||||
doUpdatePublishForm,
|
||||
@@ -28,7 +27,6 @@ const select = state => ({
|
||||
const perform = dispatch => ({
|
||||
notify: data => dispatch(doToast(data)),
|
||||
clearPublishFormState: () => dispatch(doClearPublishFormState()),
|
||||
fetchMyClaims: () => dispatch(doFetchClaimListMine()),
|
||||
pendingPublishSuccess: pendingClaim => dispatch(doPendingPublishSuccess(pendingClaim)),
|
||||
updatePublishForm: value => dispatch(doUpdatePublishForm(value)),
|
||||
updatePublishFormState: data => dispatch(doUpdatePublishFormState(data)),
|
||||
@@ -41,5 +39,5 @@ const perform = dispatch => ({
|
||||
|
||||
export default connect(
|
||||
select,
|
||||
perform,
|
||||
perform
|
||||
)(PublishPage);
|
||||
+15
-47
@@ -140,7 +140,6 @@ class PublishPage extends React.PureComponent {
|
||||
|
||||
// other
|
||||
publishStarted: false,
|
||||
storagePermissionRequired: false,
|
||||
};
|
||||
|
||||
didFocusListener;
|
||||
@@ -196,20 +195,8 @@ class PublishPage extends React.PureComponent {
|
||||
});
|
||||
};
|
||||
|
||||
loadVideos = () => {
|
||||
this.setState(
|
||||
{
|
||||
loadingVideos: true,
|
||||
storagePermissionRequired: false,
|
||||
},
|
||||
() => {
|
||||
NativeModules.Gallery.getVideos().then(videos => this.setState({ videos, loadingVideos: false }));
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
onComponentFocused = () => {
|
||||
const { balance, fetchMyClaims, hasFormState, pushDrawerStack, setPlayerVisible, navigation } = this.props;
|
||||
const { balance, hasFormState, pushDrawerStack, setPlayerVisible, navigation } = this.props;
|
||||
NativeModules.Firebase.setCurrentScreen('Publish').then(result => {
|
||||
pushDrawerStack(Constants.DRAWER_ROUTE_PUBLISH, navigation.state.params ? navigation.state.params : null);
|
||||
setPlayerVisible();
|
||||
@@ -217,20 +204,18 @@ class PublishPage extends React.PureComponent {
|
||||
DeviceEventEmitter.addListener('onStoragePermissionGranted', this.handleStoragePermissionGranted);
|
||||
DeviceEventEmitter.addListener('onStoragePermissionRefused', this.handleStoragePermissionRefused);
|
||||
|
||||
this.checkStoragePermission();
|
||||
|
||||
NativeModules.Gallery.canUseCamera().then(canUseCamera => this.setState({ canUseCamera }));
|
||||
NativeModules.Gallery.getThumbnailPath().then(thumbnailPath => this.setState({ thumbnailPath }));
|
||||
fetchMyClaims();
|
||||
|
||||
NativeModules.UtilityModule.canReadWriteStorage().then(canReadWrite => {
|
||||
if (!canReadWrite) {
|
||||
this.setState({ storagePermissionRequired: true }, () =>
|
||||
NativeModules.UtilityModule.requestStoragePermission(),
|
||||
);
|
||||
} else {
|
||||
// Can only load videos when the storage permission is granted
|
||||
this.loadVideos();
|
||||
}
|
||||
});
|
||||
this.setState(
|
||||
{
|
||||
loadingVideos: true,
|
||||
},
|
||||
() => {
|
||||
NativeModules.Gallery.getVideos().then(videos => this.setState({ videos, loadingVideos: false }));
|
||||
},
|
||||
);
|
||||
|
||||
// Check if this is an edit action
|
||||
let isEditMode = false,
|
||||
@@ -357,7 +342,7 @@ class PublishPage extends React.PureComponent {
|
||||
};
|
||||
|
||||
handlePublishPressed = () => {
|
||||
const { balance, myClaims, notify, publish, updatePublishForm } = this.props;
|
||||
const { balance, notify, publish, updatePublishForm } = this.props;
|
||||
const {
|
||||
editMode,
|
||||
bid,
|
||||
@@ -401,14 +386,6 @@ class PublishPage extends React.PureComponent {
|
||||
if (!isNameValid(name, false)) {
|
||||
notify({ message: __('Your content address contains invalid characters.'), isError: true });
|
||||
return;
|
||||
} else if (!editMode && myClaims && myClaims.length > 0) {
|
||||
if (myClaims.some(claim => claim.name.toLowerCase() === name.trim().toLowerCase())) {
|
||||
notify({
|
||||
message: __('You have already published to the specified content address. Please enter a new address.'),
|
||||
isError: true,
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!currentMedia && !editMode) {
|
||||
@@ -637,7 +614,7 @@ class PublishPage extends React.PureComponent {
|
||||
}
|
||||
} else {
|
||||
// could not determine the file path
|
||||
notify({ message: __('The path could not be determined. Please try a different file.'), isError: true });
|
||||
notify({ message: __('The path could not be determined. Please try a different file.') });
|
||||
}
|
||||
};
|
||||
|
||||
@@ -936,7 +913,6 @@ class PublishPage extends React.PureComponent {
|
||||
|
||||
handleStoragePermissionGranted = () => {
|
||||
// update the configured download folder
|
||||
this.loadVideos();
|
||||
NativeModules.UtilityModule.getDownloadDirectory().then(downloadDirectory => {
|
||||
Lbry.settings_set({
|
||||
key: 'download_dir',
|
||||
@@ -966,7 +942,6 @@ class PublishPage extends React.PureComponent {
|
||||
currentPhase,
|
||||
checkedThumbnails,
|
||||
loadingVideos,
|
||||
storagePermissionRequired,
|
||||
thumbnailPath,
|
||||
videos,
|
||||
} = this.state;
|
||||
@@ -1008,20 +983,13 @@ class PublishPage extends React.PureComponent {
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
{storagePermissionRequired && (
|
||||
<View style={publishStyle.relativeCentered}>
|
||||
<Text style={publishStyle.noVideos}>
|
||||
{__('The storage permission is required to be able to display and publish your videos.')}
|
||||
</Text>
|
||||
</View>
|
||||
)}
|
||||
{!storagePermissionRequired && (loadingVideos || !allThumbnailsChecked) && (
|
||||
{(loadingVideos || !allThumbnailsChecked) && (
|
||||
<View style={publishStyle.loadingView}>
|
||||
<ActivityIndicator size="small" color={Colors.NextLbryGreen} />
|
||||
<Text style={publishStyle.loadingText}>{__('Please wait while we load your videos...')}</Text>
|
||||
</View>
|
||||
)}
|
||||
{!storagePermissionRequired && !loadingVideos && (!videos || videos.length === 0) && (
|
||||
{!loadingVideos && (!videos || videos.length === 0) && (
|
||||
<View style={publishStyle.relativeCentered}>
|
||||
<Text style={publishStyle.noVideos}>
|
||||
{__('We could not find any videos on your device. Take a photo or record a video to get started.')}
|
||||
|
||||
@@ -11,10 +11,6 @@ import RewardEnrolment from 'component/rewardEnrolment';
|
||||
import UriBar from 'component/uriBar';
|
||||
import rewardStyle from 'styles/reward';
|
||||
|
||||
const FILTER_ALL = 'all';
|
||||
const FILTER_AVAILABLE = 'available';
|
||||
const FILTER_CLAIMED = 'claimed';
|
||||
|
||||
class RewardsPage extends React.PureComponent {
|
||||
state = {
|
||||
isEmailVerified: false,
|
||||
@@ -23,7 +19,6 @@ class RewardsPage extends React.PureComponent {
|
||||
verifyRequestStarted: false,
|
||||
revealVerification: true,
|
||||
firstRewardClaimed: false,
|
||||
currentFilter: FILTER_AVAILABLE,
|
||||
};
|
||||
|
||||
scrollView = null;
|
||||
@@ -187,13 +182,8 @@ class RewardsPage extends React.PureComponent {
|
||||
});
|
||||
};
|
||||
|
||||
setFilter = filter => {
|
||||
this.setState({ currentFilter: filter });
|
||||
};
|
||||
|
||||
render() {
|
||||
const { user, navigation } = this.props;
|
||||
const { currentFilter } = this.state;
|
||||
|
||||
return (
|
||||
<View style={rewardStyle.container}>
|
||||
@@ -207,29 +197,8 @@ class RewardsPage extends React.PureComponent {
|
||||
style={rewardStyle.scrollContainer}
|
||||
contentContainerStyle={rewardStyle.scrollContentContainer}
|
||||
>
|
||||
<View style={rewardStyle.filterHeader}>
|
||||
<Link
|
||||
style={[rewardStyle.filterLink, currentFilter === FILTER_ALL ? rewardStyle.activeFilterLink : null]}
|
||||
text={__('All')}
|
||||
onPress={() => this.setFilter(FILTER_ALL)}
|
||||
/>
|
||||
<Link
|
||||
style={[
|
||||
rewardStyle.filterLink,
|
||||
currentFilter === FILTER_AVAILABLE ? rewardStyle.activeFilterLink : null,
|
||||
]}
|
||||
text={__('Available')}
|
||||
onPress={() => this.setFilter(FILTER_AVAILABLE)}
|
||||
/>
|
||||
<Link
|
||||
style={[rewardStyle.filterLink, currentFilter === FILTER_CLAIMED ? rewardStyle.activeFilterLink : null]}
|
||||
text={__('Claimed')}
|
||||
onPress={() => this.setFilter(FILTER_CLAIMED)}
|
||||
/>
|
||||
</View>
|
||||
|
||||
{(currentFilter === FILTER_AVAILABLE || currentFilter === FILTER_ALL) && this.renderUnclaimedRewards()}
|
||||
{(currentFilter === FILTER_CLAIMED || currentFilter === FILTER_ALL) && this.renderClaimedRewards()}
|
||||
{this.renderUnclaimedRewards()}
|
||||
{this.renderClaimedRewards()}
|
||||
</ScrollView>
|
||||
)}
|
||||
</View>
|
||||
|
||||
@@ -5,7 +5,6 @@ import {
|
||||
doResolvedSearch,
|
||||
doUpdateSearchQuery,
|
||||
makeSelectResolvedSearchResults,
|
||||
makeSelectResolvedSearchResultsLastPageReached,
|
||||
makeSelectSearchUris,
|
||||
selectClaimSearchByQuery,
|
||||
selectIsSearching,
|
||||
@@ -18,21 +17,20 @@ import { selectCurrentRoute } from 'redux/selectors/drawer';
|
||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||
import SearchPage from './view';
|
||||
|
||||
const numSearchResults = 25;
|
||||
|
||||
const select = state => ({
|
||||
claimSearchByQuery: selectClaimSearchByQuery(state),
|
||||
currentRoute: selectCurrentRoute(state),
|
||||
isSearching: selectIsSearching(state),
|
||||
query: selectSearchValue(state),
|
||||
resolvingUris: selectResolvingUris(state),
|
||||
uris: makeSelectSearchUris(makeSelectQueryWithOptions(null, Constants.DEFAULT_PAGE_SIZE)(state))(state),
|
||||
results: makeSelectResolvedSearchResults(makeSelectQueryWithOptions(null, Constants.DEFAULT_PAGE_SIZE)(state))(state),
|
||||
lastPageReached: makeSelectResolvedSearchResultsLastPageReached(
|
||||
makeSelectQueryWithOptions(null, Constants.DEFAULT_PAGE_SIZE)(state),
|
||||
)(state),
|
||||
uris: makeSelectSearchUris(makeSelectQueryWithOptions(null, numSearchResults)(state))(state),
|
||||
results: makeSelectResolvedSearchResults(makeSelectQueryWithOptions(null, numSearchResults)(state))(state),
|
||||
});
|
||||
|
||||
const perform = dispatch => ({
|
||||
search: (query, from) => dispatch(doResolvedSearch(query, Constants.DEFAULT_PAGE_SIZE, from, false, {})),
|
||||
search: query => dispatch(doResolvedSearch(query, numSearchResults, null, false, {})),
|
||||
claimSearch: options => dispatch(doClaimSearch(options)),
|
||||
updateSearchQuery: query => dispatch(doUpdateSearchQuery(query)),
|
||||
pushDrawerStack: () => dispatch(doPushDrawerStack(Constants.DRAWER_ROUTE_SEARCH)),
|
||||
|
||||
+6
-36
@@ -20,12 +20,9 @@ import FloatingWalletBalance from 'component/floatingWalletBalance';
|
||||
import UriBar from 'component/uriBar';
|
||||
import searchStyle from 'styles/search';
|
||||
|
||||
const softLimit = 500;
|
||||
|
||||
class SearchPage extends React.PureComponent {
|
||||
state = {
|
||||
currentQuery: null,
|
||||
currentFrom: 0,
|
||||
currentUri: null,
|
||||
showTagResult: false,
|
||||
claimSearchRun: false,
|
||||
@@ -59,7 +56,6 @@ class SearchPage extends React.PureComponent {
|
||||
const searchQuery = query || this.getSearchQuery();
|
||||
if (searchQuery && searchQuery.trim().length > 0) {
|
||||
this.setState({
|
||||
currentFrom: 0,
|
||||
currentQuery: searchQuery,
|
||||
currentUri: isURIValid(searchQuery) ? normalizeURI(searchQuery) : null,
|
||||
claimSearchOptions: null,
|
||||
@@ -68,7 +64,7 @@ class SearchPage extends React.PureComponent {
|
||||
resultsResolved: false,
|
||||
tagResultDisplayed: false,
|
||||
});
|
||||
search(searchQuery, 0);
|
||||
search(searchQuery);
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -87,13 +83,12 @@ class SearchPage extends React.PureComponent {
|
||||
|
||||
if (query && query.trim().length > 0 && query !== this.state.currentQuery) {
|
||||
this.setState({
|
||||
currentFrom: 0,
|
||||
currentQuery: query,
|
||||
currentUri: isURIValid(query) ? normalizeURI(query) : null,
|
||||
resultsResolved: false,
|
||||
tagResultDisplayed: false,
|
||||
});
|
||||
search(query, 0);
|
||||
search(query);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,15 +134,13 @@ class SearchPage extends React.PureComponent {
|
||||
const { search } = this.props;
|
||||
this.setState({
|
||||
currentUri: isURIValid(keywords) ? normalizeURI(keywords) : null,
|
||||
currentFrom: 0,
|
||||
currentQuery: keywords,
|
||||
claimSearchOptions: null,
|
||||
claimSearchRun: false,
|
||||
showTagResult: false,
|
||||
resultsResolved: false,
|
||||
tagResultDisplayed: false,
|
||||
});
|
||||
search(keywords, 0);
|
||||
search(keywords);
|
||||
};
|
||||
|
||||
listEmptyComponent = () => {
|
||||
@@ -193,21 +186,6 @@ class SearchPage extends React.PureComponent {
|
||||
navigation.navigate({ routeName: Constants.DRAWER_ROUTE_TAG, key: `tagPage`, params: { tag: tag.toLowerCase() } });
|
||||
};
|
||||
|
||||
handleVerticalEndReached = () => {
|
||||
// fetch more results
|
||||
const { lastPageReached, results, search, isSearching } = this.props;
|
||||
if (lastPageReached || (results && results.length > softLimit)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isSearching) {
|
||||
const from = results ? results.length : 0;
|
||||
this.setState({ currentFrom: from }, () => {
|
||||
search(this.state.currentQuery, from);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { isSearching, navigation, query, results } = this.props;
|
||||
|
||||
@@ -215,13 +193,13 @@ class SearchPage extends React.PureComponent {
|
||||
<View style={searchStyle.container}>
|
||||
<UriBar value={query} navigation={navigation} onSearchSubmitted={this.handleSearchSubmitted} />
|
||||
|
||||
{isSearching && this.state.currentFrom === 0 && (
|
||||
{isSearching && (
|
||||
<View style={searchStyle.busyContainer}>
|
||||
<ActivityIndicator size="large" color={Colors.NextLbryGreen} style={searchStyle.loading} />
|
||||
</View>
|
||||
)}
|
||||
|
||||
{(!isSearching || this.state.currentFrom > 0) && (
|
||||
{!isSearching && (
|
||||
<FlatList
|
||||
extraData={this.state}
|
||||
style={searchStyle.scrollContainer}
|
||||
@@ -229,17 +207,14 @@ class SearchPage extends React.PureComponent {
|
||||
keyboardShouldPersistTaps={'handled'}
|
||||
data={results}
|
||||
keyExtractor={(item, index) => item.claimId}
|
||||
initialNumToRender={10}
|
||||
initialNumToRender={8}
|
||||
maxToRenderPerBatch={20}
|
||||
onEndReached={this.handleVerticalEndReached}
|
||||
onEndReachedThreshold={0.2}
|
||||
removeClippedSubviews
|
||||
ListEmptyComponent={!isSearching ? this.listEmptyComponent() : null}
|
||||
ListHeaderComponent={this.listHeaderComponent(this.state.showTagResult, this.state.currentQuery)}
|
||||
renderItem={({ item }) => (
|
||||
<ClaimResultItem
|
||||
key={item.claimId}
|
||||
uri={item ? normalizeURI(`${item.name}#${item.claimId}`) : null}
|
||||
result={item}
|
||||
style={searchStyle.resultItem}
|
||||
navigation={navigation}
|
||||
@@ -247,11 +222,6 @@ class SearchPage extends React.PureComponent {
|
||||
)}
|
||||
/>
|
||||
)}
|
||||
{this.state.currentFrom > 0 && isSearching && (
|
||||
<View style={searchStyle.moreLoading}>
|
||||
<ActivityIndicator size="small" color={Colors.NextLbryGreen} />
|
||||
</View>
|
||||
)}
|
||||
<FloatingWalletBalance navigation={navigation} />
|
||||
</View>
|
||||
);
|
||||
|
||||
@@ -4,6 +4,7 @@ import {
|
||||
doAuthenticate,
|
||||
doBlackListedOutpointsSubscribe,
|
||||
doFilteredOutpointsSubscribe,
|
||||
doCheckSubscriptionsInit,
|
||||
doFetchMySubscriptions,
|
||||
doFetchRewardedContent,
|
||||
doGetSync,
|
||||
@@ -14,13 +15,11 @@ import {
|
||||
selectEmailToVerify,
|
||||
} from 'lbryinc';
|
||||
import { doSetClientSetting } from 'redux/actions/settings';
|
||||
import { selectLastRouteInStack } from 'redux/selectors/drawer';
|
||||
import SplashScreen from './view';
|
||||
|
||||
const select = state => ({
|
||||
user: selectUser(state),
|
||||
emailToVerify: selectEmailToVerify(state),
|
||||
lastRouteInStack: selectLastRouteInStack(state),
|
||||
});
|
||||
|
||||
const perform = dispatch => ({
|
||||
@@ -28,6 +27,7 @@ const perform = dispatch => ({
|
||||
balanceSubscribe: () => dispatch(doBalanceSubscribe()),
|
||||
blacklistedOutpointsSubscribe: () => dispatch(doBlackListedOutpointsSubscribe()),
|
||||
filteredOutpointsSubscribe: () => dispatch(doFilteredOutpointsSubscribe()),
|
||||
checkSubscriptionsInit: () => dispatch(doCheckSubscriptionsInit()),
|
||||
fetchRewardedContent: () => dispatch(doFetchRewardedContent()),
|
||||
fetchSubscriptions: callback => dispatch(doFetchMySubscriptions(callback)),
|
||||
getSync: (password, callback) => dispatch(doGetSync(password, callback)),
|
||||
@@ -42,5 +42,5 @@ const perform = dispatch => ({
|
||||
|
||||
export default connect(
|
||||
select,
|
||||
perform,
|
||||
perform
|
||||
)(SplashScreen);
|
||||
+27
-12
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { Lbry, doPreferenceGet, isURIValid } from 'lbry-redux';
|
||||
import { Lbry, doPreferenceGet } from 'lbry-redux';
|
||||
import { Lbryio } from 'lbryinc';
|
||||
import { ActivityIndicator, DeviceEventEmitter, Linking, NativeModules, Platform, Text, View } from 'react-native';
|
||||
import { NavigationActions, StackActions } from 'react-navigation';
|
||||
@@ -11,7 +11,7 @@ import Button from 'component/button';
|
||||
import ProgressBar from 'component/progressBar';
|
||||
import PropTypes from 'prop-types';
|
||||
import Colors from 'styles/colors';
|
||||
import Constants, { DrawerRoutes, InnerDrawerRoutes } from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||
import splashStyle from 'styles/splash';
|
||||
import RNFS from 'react-native-fs';
|
||||
|
||||
@@ -43,7 +43,7 @@ class SplashScreen extends React.PureComponent {
|
||||
}
|
||||
|
||||
navigateToMain = () => {
|
||||
const { lastRouteInStack, navigation, notify, verifyUserEmail, verifyUserEmailFailure } = this.props;
|
||||
const { navigation, notify, verifyUserEmail, verifyUserEmailFailure } = this.props;
|
||||
const resetAction = StackActions.reset({
|
||||
index: 0,
|
||||
actions: [NavigationActions.navigate({ routeName: 'Main' })],
|
||||
@@ -55,16 +55,29 @@ class SplashScreen extends React.PureComponent {
|
||||
? navigation.state.params.launchUrl
|
||||
: this.state.launchUrl;
|
||||
if (launchUrl) {
|
||||
navigateToUri(navigation, transformUrl(launchUrl));
|
||||
} else if (lastRouteInStack) {
|
||||
// no launch url, check if there's a last route in stack to navigate to.
|
||||
const { route, params } = lastRouteInStack;
|
||||
if (route) {
|
||||
if (DrawerRoutes.includes(route)) {
|
||||
navigation.navigate({ routeName: route, params });
|
||||
} else if (!InnerDrawerRoutes.includes(route) && isURIValid(route)) {
|
||||
navigateToUri(navigation, route);
|
||||
if (launchUrl.startsWith('lbry://?verify=')) {
|
||||
let verification = {};
|
||||
try {
|
||||
verification = JSON.parse(atob(launchUrl.substring(15)));
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
if (verification.token && verification.recaptcha) {
|
||||
AsyncStorage.setItem(Constants.KEY_SHOULD_VERIFY_EMAIL, 'true');
|
||||
try {
|
||||
verifyUserEmail(verification.token, verification.recaptcha);
|
||||
} catch (error) {
|
||||
const message = __('Invalid Verification Token');
|
||||
verifyUserEmailFailure(message);
|
||||
notify({ message });
|
||||
}
|
||||
} else {
|
||||
notify({
|
||||
message: __('Invalid Verification URI'),
|
||||
});
|
||||
}
|
||||
} else {
|
||||
navigateToUri(navigation, transformUrl(launchUrl));
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -117,6 +130,7 @@ class SplashScreen extends React.PureComponent {
|
||||
authenticate,
|
||||
balanceSubscribe,
|
||||
blacklistedOutpointsSubscribe,
|
||||
checkSubscriptionsInit,
|
||||
filteredOutpointsSubscribe,
|
||||
getSync,
|
||||
updateBlockHeight,
|
||||
@@ -128,6 +142,7 @@ class SplashScreen extends React.PureComponent {
|
||||
balanceSubscribe();
|
||||
blacklistedOutpointsSubscribe();
|
||||
filteredOutpointsSubscribe();
|
||||
checkSubscriptionsInit();
|
||||
|
||||
if (user && user.id && user.has_verified_email) {
|
||||
// user already authenticated
|
||||
|
||||
@@ -1,28 +1,18 @@
|
||||
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||
|
||||
export const doPushDrawerStack = (routeName, params) => dispatch => {
|
||||
export const doPushDrawerStack = (routeName, params) => dispatch =>
|
||||
dispatch({
|
||||
type: Constants.ACTION_PUSH_DRAWER_STACK,
|
||||
data: { routeName, params },
|
||||
});
|
||||
|
||||
if (window.persistor) {
|
||||
window.persistor.flush();
|
||||
}
|
||||
};
|
||||
|
||||
export const doPopDrawerStack = () => dispatch => {
|
||||
export const doPopDrawerStack = () => dispatch =>
|
||||
dispatch({
|
||||
type: Constants.ACTION_POP_DRAWER_STACK,
|
||||
});
|
||||
|
||||
if (window.persistor) {
|
||||
window.persistor.flush();
|
||||
}
|
||||
};
|
||||
|
||||
export const doSetPlayerVisible = (visible, uri) => dispatch =>
|
||||
export const doSetPlayerVisible = visible => dispatch =>
|
||||
dispatch({
|
||||
type: Constants.ACTION_SET_PLAYER_VISIBLE,
|
||||
data: { visible, uri },
|
||||
data: { visible },
|
||||
});
|
||||
+17
-19
@@ -59,24 +59,22 @@ export function doCompleteDownload(uri, outpoint, fileInfo) {
|
||||
export function doStopDownloadingFile(uri, fileInfo) {
|
||||
return dispatch => {
|
||||
let params = { status: 'stop' };
|
||||
if (fileInfo) {
|
||||
if (fileInfo.sd_hash) {
|
||||
params.sd_hash = fileInfo.sd_hash;
|
||||
}
|
||||
if (fileInfo.stream_hash) {
|
||||
params.stream_hash = fileInfo.stream_hash;
|
||||
}
|
||||
|
||||
Lbry.file_set_status(params).then(() => {
|
||||
dispatch({
|
||||
type: ACTIONS.DOWNLOADING_CANCELED,
|
||||
data: { uri, outpoint: fileInfo.outpoint },
|
||||
});
|
||||
|
||||
// Should also delete the file after the user stops downloading
|
||||
dispatch(doDeleteFile(fileInfo.outpoint, uri));
|
||||
});
|
||||
if (fileInfo.sd_hash) {
|
||||
params.sd_hash = fileInfo.sd_hash;
|
||||
}
|
||||
if (fileInfo.stream_hash) {
|
||||
params.stream_hash = fileInfo.stream_hash;
|
||||
}
|
||||
|
||||
Lbry.file_set_status(params).then(() => {
|
||||
dispatch({
|
||||
type: ACTIONS.DOWNLOADING_CANCELED,
|
||||
data: { uri, outpoint: fileInfo.outpoint },
|
||||
});
|
||||
|
||||
// Should also delete the file after the user stops downloading
|
||||
dispatch(doDeleteFile(fileInfo.outpoint, uri));
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
@@ -97,7 +95,7 @@ export function doDeleteFile(outpoint, deleteFromComputer, abandonClaim) {
|
||||
});
|
||||
|
||||
// If the file is for a claim we published then also abandon the claim
|
||||
/* const myClaimsOutpoints = selectMyClaimsOutpoints(state);
|
||||
/*const myClaimsOutpoints = selectMyClaimsOutpoints(state);
|
||||
if (abandonClaim && myClaimsOutpoints.indexOf(outpoint) !== -1) {
|
||||
const byOutpoint = selectFileInfosByOutpoint(state);
|
||||
const fileInfo = byOutpoint[outpoint];
|
||||
@@ -108,7 +106,7 @@ export function doDeleteFile(outpoint, deleteFromComputer, abandonClaim) {
|
||||
|
||||
dispatch(doAbandonClaim(txid, nout));
|
||||
}
|
||||
} */
|
||||
}*/
|
||||
|
||||
dispatch({
|
||||
type: ACTIONS.FILE_DELETE,
|
||||
|
||||
@@ -3,29 +3,14 @@ import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
|
||||
const reducers = {};
|
||||
const defaultState = {
|
||||
stack: [{ route: Constants.DRAWER_ROUTE_DISCOVER, params: {} }], // Discover is always the first drawer route
|
||||
lastRouteInStack: {},
|
||||
playerVisible: false,
|
||||
playerVisibleByUri: {},
|
||||
currentRoute: null,
|
||||
};
|
||||
|
||||
reducers[Constants.ACTION_SET_PLAYER_VISIBLE] = (state, action) => {
|
||||
const { visible, uri } = action.data;
|
||||
const playerVisibleByUri = Object.assign({}, state.playerVisibleByUri);
|
||||
|
||||
if (!uri) {
|
||||
Object.keys(playerVisibleByUri).forEach(playerUri => {
|
||||
playerVisibleByUri[playerUri] = visible;
|
||||
});
|
||||
} else {
|
||||
playerVisibleByUri[uri] = visible;
|
||||
}
|
||||
|
||||
return Object.assign({}, state, {
|
||||
reducers[Constants.ACTION_SET_PLAYER_VISIBLE] = (state, action) =>
|
||||
Object.assign({}, state, {
|
||||
playerVisible: action.data.visible,
|
||||
playerVisibleByUri,
|
||||
});
|
||||
};
|
||||
|
||||
reducers[Constants.ACTION_PUSH_DRAWER_STACK] = (state, action) => {
|
||||
const { routeName, params } = action.data;
|
||||
@@ -43,30 +28,23 @@ reducers[Constants.ACTION_PUSH_DRAWER_STACK] = (state, action) => {
|
||||
canPushStack = false;
|
||||
}
|
||||
|
||||
let lastRouteInStack;
|
||||
if (canPushStack) {
|
||||
newStack.push({ route: routeName, params });
|
||||
|
||||
// save the route
|
||||
lastRouteInStack = { route: routeName, params };
|
||||
}
|
||||
|
||||
return {
|
||||
...state,
|
||||
stack: newStack,
|
||||
lastRouteInStack,
|
||||
};
|
||||
};
|
||||
|
||||
reducers[Constants.ACTION_POP_DRAWER_STACK] = (state, action) => {
|
||||
// We don't want to pop the Discover route, since it's always expected to be the first
|
||||
const newStack = state.stack.length === 1 ? state.stack.slice() : state.stack.slice(0, state.stack.length - 1);
|
||||
const lastRouteInStack = newStack && newStack.length > 0 ? newStack[newStack.length - 1] : null;
|
||||
|
||||
return {
|
||||
...state,
|
||||
stack: newStack,
|
||||
lastRouteInStack,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -4,25 +4,14 @@ export const selectState = state => state.drawer || {};
|
||||
|
||||
export const selectDrawerStack = createSelector(
|
||||
selectState,
|
||||
state => state.stack,
|
||||
state => state.stack
|
||||
);
|
||||
|
||||
export const selectIsPlayerVisible = createSelector(
|
||||
selectState,
|
||||
state => state.playerVisible,
|
||||
state => state.playerVisible
|
||||
);
|
||||
|
||||
export const selectPlayerVisibleByUri = createSelector(
|
||||
selectState,
|
||||
state => state.playerVisibleByUri,
|
||||
);
|
||||
|
||||
export const makeSelectPlayerVisible = uri =>
|
||||
createSelector(
|
||||
selectPlayerVisibleByUri,
|
||||
byUri => (byUri ? byUri[uri] : false),
|
||||
);
|
||||
|
||||
export const selectLastDrawerRoute = createSelector(
|
||||
selectState,
|
||||
state => {
|
||||
@@ -31,15 +20,10 @@ export const selectLastDrawerRoute = createSelector(
|
||||
}
|
||||
|
||||
return null;
|
||||
},
|
||||
);
|
||||
|
||||
export const selectLastRouteInStack = createSelector(
|
||||
selectState,
|
||||
state => state.lastRouteInStack,
|
||||
}
|
||||
);
|
||||
|
||||
export const selectCurrentRoute = createSelector(
|
||||
selectState,
|
||||
state => state.currentRoute,
|
||||
state => state.currentRoute
|
||||
);
|
||||
+9
-9
@@ -32,14 +32,14 @@ const aboutStyle = StyleSheet.create({
|
||||
title: {
|
||||
color: Colors.LbryGreen,
|
||||
fontSize: 24,
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
marginTop: 16,
|
||||
marginLeft: 12,
|
||||
marginRight: 12,
|
||||
marginBottom: 8,
|
||||
},
|
||||
paragraph: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
lineHeight: 24,
|
||||
marginLeft: 12,
|
||||
@@ -53,13 +53,13 @@ const aboutStyle = StyleSheet.create({
|
||||
},
|
||||
link: {
|
||||
color: Colors.LbryGreen,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
marginBottom: 24,
|
||||
},
|
||||
listLink: {
|
||||
color: Colors.LbryGreen,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 15,
|
||||
alignSelf: 'flex-end',
|
||||
},
|
||||
@@ -67,30 +67,30 @@ const aboutStyle = StyleSheet.create({
|
||||
alignSelf: 'stretch',
|
||||
},
|
||||
socialTitle: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
marginLeft: 12,
|
||||
marginRight: 12,
|
||||
marginBottom: 8,
|
||||
fontSize: 20,
|
||||
},
|
||||
releaseInfoTitle: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
marginLeft: 12,
|
||||
marginRight: 12,
|
||||
marginBottom: 12,
|
||||
fontSize: 20,
|
||||
},
|
||||
text: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 15,
|
||||
},
|
||||
valueText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
textAlign: 'right',
|
||||
fontSize: 15,
|
||||
},
|
||||
lineValueText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 15,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -29,7 +29,7 @@ const buttonStyle = StyleSheet.create({
|
||||
color: Colors.DarkGrey,
|
||||
},
|
||||
text: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
},
|
||||
textWithIcon: {
|
||||
|
||||
@@ -17,7 +17,7 @@ const channelCreatorStyle = StyleSheet.create({
|
||||
backgroundColor: Colors.PageBackground,
|
||||
},
|
||||
channelPicker: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
height: 52,
|
||||
width: '100%',
|
||||
@@ -27,7 +27,7 @@ const channelCreatorStyle = StyleSheet.create({
|
||||
alignItems: 'center',
|
||||
},
|
||||
label: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
},
|
||||
balance: {
|
||||
@@ -36,24 +36,24 @@ const channelCreatorStyle = StyleSheet.create({
|
||||
marginLeft: 24,
|
||||
},
|
||||
balanceText: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 14,
|
||||
marginLeft: 4,
|
||||
},
|
||||
channelNameInput: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
paddingLeft: 20,
|
||||
},
|
||||
bidAmountInput: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
marginLeft: 16,
|
||||
textAlign: 'right',
|
||||
width: 80,
|
||||
},
|
||||
helpText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 12,
|
||||
color: Colors.DescriptionGrey,
|
||||
},
|
||||
@@ -68,7 +68,7 @@ const channelCreatorStyle = StyleSheet.create({
|
||||
position: 'absolute',
|
||||
left: 4,
|
||||
top: 13,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
},
|
||||
buttonContainer: {
|
||||
@@ -90,7 +90,7 @@ const channelCreatorStyle = StyleSheet.create({
|
||||
alignSelf: 'flex-end',
|
||||
},
|
||||
inlineError: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 12,
|
||||
color: Colors.Red,
|
||||
marginTop: 2,
|
||||
@@ -151,12 +151,12 @@ const channelCreatorStyle = StyleSheet.create({
|
||||
alignItems: 'center',
|
||||
},
|
||||
channelListTitle: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 18,
|
||||
marginBottom: 4,
|
||||
},
|
||||
channelListName: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
},
|
||||
channelListAvatar: {
|
||||
@@ -189,13 +189,13 @@ const channelCreatorStyle = StyleSheet.create({
|
||||
marginBottom: 4,
|
||||
},
|
||||
textInputTitle: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 12,
|
||||
marginBottom: -10,
|
||||
marginLeft: 4,
|
||||
},
|
||||
inputText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
},
|
||||
toggleContainer: {
|
||||
@@ -209,7 +209,7 @@ const channelCreatorStyle = StyleSheet.create({
|
||||
marginRight: 16,
|
||||
},
|
||||
cardTitle: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 20,
|
||||
marginBottom: 8,
|
||||
},
|
||||
@@ -243,7 +243,7 @@ const channelCreatorStyle = StyleSheet.create({
|
||||
},
|
||||
editIcon: {
|
||||
color: Colors.White,
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 12,
|
||||
},
|
||||
uploadProgress: {
|
||||
@@ -262,7 +262,7 @@ const channelCreatorStyle = StyleSheet.create({
|
||||
},
|
||||
uploadText: {
|
||||
color: Colors.White,
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 12,
|
||||
marginLeft: 4,
|
||||
},
|
||||
|
||||
@@ -10,7 +10,7 @@ const channelIconStyle = StyleSheet.create({
|
||||
alignSelf: 'flex-start',
|
||||
},
|
||||
placeholderText: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 14,
|
||||
},
|
||||
thumbnailContainer: {
|
||||
@@ -39,14 +39,14 @@ const channelIconStyle = StyleSheet.create({
|
||||
justifyContent: 'center',
|
||||
},
|
||||
title: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 12,
|
||||
width: 80,
|
||||
marginTop: 4,
|
||||
textAlign: 'center',
|
||||
},
|
||||
autothumbCharacter: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 48,
|
||||
color: Colors.White,
|
||||
},
|
||||
|
||||
@@ -23,7 +23,7 @@ const channelPageStyle = StyleSheet.create({
|
||||
},
|
||||
title: {
|
||||
color: Colors.LbryGreen,
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 30,
|
||||
margin: 16,
|
||||
},
|
||||
@@ -34,7 +34,7 @@ const channelPageStyle = StyleSheet.create({
|
||||
padding: 24,
|
||||
},
|
||||
infoText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 20,
|
||||
textAlign: 'center',
|
||||
},
|
||||
@@ -62,7 +62,7 @@ const channelPageStyle = StyleSheet.create({
|
||||
},
|
||||
channelName: {
|
||||
color: Colors.White,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 18,
|
||||
padding: 2,
|
||||
backgroundColor: '#000000aa',
|
||||
@@ -98,7 +98,7 @@ const channelPageStyle = StyleSheet.create({
|
||||
justifyContent: 'flex-end',
|
||||
},
|
||||
tabTitle: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 14,
|
||||
color: Colors.White,
|
||||
},
|
||||
@@ -131,12 +131,12 @@ const channelPageStyle = StyleSheet.create({
|
||||
padding: 24,
|
||||
},
|
||||
aboutTitle: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 16,
|
||||
lineHeight: 24,
|
||||
},
|
||||
aboutText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
lineHeight: 24,
|
||||
},
|
||||
@@ -182,7 +182,7 @@ const channelPageStyle = StyleSheet.create({
|
||||
marginRight: 8,
|
||||
},
|
||||
followerCount: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 12,
|
||||
color: Colors.White,
|
||||
marginTop: 2,
|
||||
|
||||
@@ -6,13 +6,13 @@ const channelSelectorStyle = StyleSheet.create({
|
||||
flex: 1,
|
||||
},
|
||||
channelPicker: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
height: 52,
|
||||
width: '100%',
|
||||
},
|
||||
channelPickerItem: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
},
|
||||
bidRow: {
|
||||
@@ -21,7 +21,7 @@ const channelSelectorStyle = StyleSheet.create({
|
||||
alignItems: 'center',
|
||||
},
|
||||
label: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
},
|
||||
balance: {
|
||||
@@ -30,24 +30,24 @@ const channelSelectorStyle = StyleSheet.create({
|
||||
marginLeft: 24,
|
||||
},
|
||||
balanceText: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 14,
|
||||
marginLeft: 4,
|
||||
},
|
||||
channelNameInput: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
paddingLeft: 20,
|
||||
},
|
||||
bidAmountInput: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
marginLeft: 16,
|
||||
textAlign: 'right',
|
||||
width: 80,
|
||||
},
|
||||
helpText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 12,
|
||||
},
|
||||
createChannelContainer: {
|
||||
@@ -59,7 +59,7 @@ const channelSelectorStyle = StyleSheet.create({
|
||||
position: 'absolute',
|
||||
left: 4,
|
||||
top: 13,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
},
|
||||
buttonContainer: {
|
||||
@@ -80,7 +80,7 @@ const channelSelectorStyle = StyleSheet.create({
|
||||
backgroundColor: Colors.NextLbryGreen,
|
||||
},
|
||||
inlineError: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 12,
|
||||
color: Colors.Red,
|
||||
marginTop: 2,
|
||||
|
||||
@@ -13,7 +13,7 @@ const claimListStyle = StyleSheet.create({
|
||||
},
|
||||
noContentText: {
|
||||
color: Colors.DescriptionGrey,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
margin: 16,
|
||||
textAlign: 'center',
|
||||
|
||||
@@ -12,7 +12,6 @@ const Colors = {
|
||||
TagGreen: '#e3f6f1',
|
||||
TagGrape: '#da77f255',
|
||||
LightGrey: '#cccccc',
|
||||
ActionGrey: '#aaaaaa',
|
||||
LighterGrey: '#e5e5e5',
|
||||
Orange: '#ffbb00',
|
||||
Red: '#ff0000',
|
||||
@@ -25,8 +24,6 @@ const Colors = {
|
||||
StatsAudio: '#f6a637',
|
||||
StatsImage: '#ff4a7d',
|
||||
StatsOther: '#26bcf7',
|
||||
|
||||
ThumbnailPlaceholder: '#d5d5d5',
|
||||
};
|
||||
|
||||
export default Colors;
|
||||
+22
-22
@@ -55,11 +55,11 @@ const discoverStyle = StyleSheet.create({
|
||||
alignItems: 'center',
|
||||
},
|
||||
pageTitle: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 24,
|
||||
},
|
||||
customizeLink: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
},
|
||||
trendingContainer: {
|
||||
@@ -74,7 +74,7 @@ const discoverStyle = StyleSheet.create({
|
||||
flexDirection: 'row',
|
||||
},
|
||||
title: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 20,
|
||||
textAlign: 'center',
|
||||
marginLeft: 10,
|
||||
@@ -95,7 +95,7 @@ const discoverStyle = StyleSheet.create({
|
||||
marginBottom: 56,
|
||||
},
|
||||
footerTitle: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 20,
|
||||
marginBottom: 10,
|
||||
},
|
||||
@@ -108,7 +108,7 @@ const discoverStyle = StyleSheet.create({
|
||||
marginBottom: 12,
|
||||
},
|
||||
categoryName: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 18,
|
||||
color: Colors.Black,
|
||||
},
|
||||
@@ -127,7 +127,7 @@ const discoverStyle = StyleSheet.create({
|
||||
justifyContent: 'center',
|
||||
},
|
||||
moreText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
color: Colors.White,
|
||||
fontSize: 24,
|
||||
},
|
||||
@@ -142,18 +142,18 @@ const discoverStyle = StyleSheet.create({
|
||||
justifyContent: 'center',
|
||||
},
|
||||
fileItemName: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
marginTop: 8,
|
||||
fontSize: 14,
|
||||
},
|
||||
channelName: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 12,
|
||||
marginTop: 4,
|
||||
color: Colors.LbryGreen,
|
||||
},
|
||||
anonChannelName: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 12,
|
||||
marginTop: 4,
|
||||
color: Colors.DescriptionGrey,
|
||||
@@ -176,7 +176,7 @@ const discoverStyle = StyleSheet.create({
|
||||
borderRadius: 4,
|
||||
},
|
||||
filePriceText: {
|
||||
fontFamily: 'Inter-Bold',
|
||||
fontFamily: 'Inter-UI-Bold',
|
||||
fontSize: 12,
|
||||
textAlign: 'center',
|
||||
color: '#0c604b',
|
||||
@@ -205,7 +205,7 @@ const discoverStyle = StyleSheet.create({
|
||||
color: Colors.White,
|
||||
fontSize: 14,
|
||||
textAlign: 'center',
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
},
|
||||
rewardTitleContainer: {
|
||||
alignItems: 'center',
|
||||
@@ -222,11 +222,11 @@ const discoverStyle = StyleSheet.create({
|
||||
flex: 0.9,
|
||||
},
|
||||
menuText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
},
|
||||
titleText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
},
|
||||
detailsRow: {
|
||||
flexDirection: 'row',
|
||||
@@ -236,7 +236,7 @@ const discoverStyle = StyleSheet.create({
|
||||
marginTop: 2,
|
||||
},
|
||||
dateTimeText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 12,
|
||||
color: Colors.DescriptionGrey,
|
||||
},
|
||||
@@ -259,7 +259,7 @@ const discoverStyle = StyleSheet.create({
|
||||
flex: 1,
|
||||
},
|
||||
tagPageTitle: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 24,
|
||||
},
|
||||
tagPageClaimList: {
|
||||
@@ -288,7 +288,7 @@ const discoverStyle = StyleSheet.create({
|
||||
alignItems: 'center',
|
||||
},
|
||||
tagSortText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
marginRight: 4,
|
||||
},
|
||||
@@ -296,7 +296,7 @@ const discoverStyle = StyleSheet.create({
|
||||
marginTop: -6,
|
||||
},
|
||||
pickerLabel: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
color: Colors.DescriptionGrey,
|
||||
marginRight: 6,
|
||||
@@ -307,7 +307,7 @@ const discoverStyle = StyleSheet.create({
|
||||
marginBottom: 8,
|
||||
},
|
||||
menuGroupName: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 12,
|
||||
color: Colors.DescriptionGrey,
|
||||
textTransform: 'uppercase',
|
||||
@@ -337,7 +337,7 @@ const discoverStyle = StyleSheet.create({
|
||||
},
|
||||
menuItem: {
|
||||
marginLeft: 8,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
},
|
||||
signInContainer: {
|
||||
@@ -353,7 +353,7 @@ const discoverStyle = StyleSheet.create({
|
||||
left: 16,
|
||||
},
|
||||
signedInEmail: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 15,
|
||||
color: Colors.White,
|
||||
},
|
||||
@@ -388,13 +388,13 @@ const discoverStyle = StyleSheet.create({
|
||||
},
|
||||
signInMenuItemText: {
|
||||
color: Colors.DescriptionGrey,
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 14,
|
||||
textAlign: 'center',
|
||||
},
|
||||
signInMenuItemButtonText: {
|
||||
color: Colors.White,
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 14,
|
||||
textAlign: 'center',
|
||||
},
|
||||
|
||||
@@ -30,7 +30,7 @@ const downloadsStyle = StyleSheet.create({
|
||||
paddingBottom: 16,
|
||||
},
|
||||
noDownloadsText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
lineHeight: 24,
|
||||
marginLeft: 16,
|
||||
|
||||
@@ -30,7 +30,7 @@ const emptyStateStyle = StyleSheet.create({
|
||||
message: {
|
||||
marginTop: 24,
|
||||
textAlign: 'center',
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 18,
|
||||
lineHeight: 28,
|
||||
marginBottom: 24,
|
||||
|
||||
@@ -11,7 +11,7 @@ const fileDownloadButtonStyle = StyleSheet.create({
|
||||
backgroundColor: Colors.LbryGreen,
|
||||
},
|
||||
text: {
|
||||
fontFamily: 'Inter-Medium',
|
||||
fontFamily: 'Inter-UI-Medium',
|
||||
color: Colors.White,
|
||||
fontSize: 14,
|
||||
textAlign: 'center',
|
||||
|
||||
@@ -10,7 +10,7 @@ const fileItemMediaStyle = StyleSheet.create({
|
||||
alignItems: 'center',
|
||||
},
|
||||
autothumbText: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
textAlign: 'center',
|
||||
color: Colors.White,
|
||||
fontSize: 40,
|
||||
@@ -22,7 +22,7 @@ const fileItemMediaStyle = StyleSheet.create({
|
||||
},
|
||||
text: {
|
||||
color: '#ffffff',
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
marginTop: 8,
|
||||
},
|
||||
@@ -45,7 +45,7 @@ const fileItemMediaStyle = StyleSheet.create({
|
||||
paddingRight: 2,
|
||||
},
|
||||
durationText: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 12,
|
||||
color: Colors.White,
|
||||
},
|
||||
|
||||
+13
-21
@@ -22,24 +22,16 @@ const fileListStyle = StyleSheet.create({
|
||||
flex: 1,
|
||||
},
|
||||
featuredUri: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 24,
|
||||
color: Colors.White,
|
||||
},
|
||||
featuredTitle: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontSize: screenWidthPixels <= 720 ? 11 : 16,
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: screenWidthPixels <= 720 ? 12 : 16,
|
||||
color: Colors.White,
|
||||
},
|
||||
thumbnail: {
|
||||
backgroundColor: Colors.ThumbnailPlaceholder,
|
||||
width: thumbnailWidth,
|
||||
height: thumbnailHeight,
|
||||
marginRight: screenWidthPixels <= 720 ? 10 : 12,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
channelThumbnailView: {
|
||||
width: thumbnailWidth,
|
||||
height: thumbnailHeight,
|
||||
marginRight: screenWidthPixels <= 720 ? 10 : 12,
|
||||
@@ -69,17 +61,17 @@ const fileListStyle = StyleSheet.create({
|
||||
backgroundColor: '#000000aa',
|
||||
},
|
||||
title: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontSize: screenWidthPixels <= 720 ? 11 : 14,
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: screenWidthPixels <= 720 ? 12 : 14,
|
||||
},
|
||||
uri: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontSize: screenWidthPixels <= 720 ? 11 : 14,
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: screenWidthPixels <= 720 ? 12 : 14,
|
||||
marginBottom: 8,
|
||||
},
|
||||
publisher: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontSize: screenWidthPixels <= 720 ? 10 : 12,
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: screenWidthPixels <= 720 ? 11 : 12,
|
||||
marginTop: screenWidthPixels <= 720 ? 1 : 3,
|
||||
color: Colors.LbryGreen,
|
||||
},
|
||||
@@ -95,15 +87,15 @@ const fileListStyle = StyleSheet.create({
|
||||
justifyContent: 'space-between',
|
||||
},
|
||||
infoText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: screenWidthPixels <= 720 ? 10 : 12,
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: screenWidthPixels <= 720 ? 11 : 12,
|
||||
color: Colors.ChannelGrey,
|
||||
},
|
||||
downloadInfo: {
|
||||
marginTop: 2,
|
||||
},
|
||||
progress: {
|
||||
marginTop: screenWidthPixels <= 720 ? 1 : 4,
|
||||
marginTop: screenWidthPixels <= 720 ? 2 : 4,
|
||||
},
|
||||
progressCompleted: {
|
||||
backgroundColor: Colors.LbryGreen,
|
||||
@@ -156,7 +148,7 @@ const fileListStyle = StyleSheet.create({
|
||||
borderRadius: 4,
|
||||
},
|
||||
filePriceText: {
|
||||
fontFamily: 'Inter-Bold',
|
||||
fontFamily: 'Inter-UI-Bold',
|
||||
fontSize: 12,
|
||||
textAlign: 'center',
|
||||
color: '#0c604b',
|
||||
|
||||
+25
-25
@@ -38,7 +38,7 @@ const filePageStyle = StyleSheet.create({
|
||||
marginBottom: -17,
|
||||
},
|
||||
emptyClaimText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
textAlign: 'center',
|
||||
fontSize: 20,
|
||||
marginLeft: 24,
|
||||
@@ -54,7 +54,7 @@ const filePageStyle = StyleSheet.create({
|
||||
flex: 1,
|
||||
},
|
||||
title: {
|
||||
fontFamily: 'Inter-Bold',
|
||||
fontFamily: 'Inter-UI-Bold',
|
||||
fontSize: 16,
|
||||
flex: 18,
|
||||
alignSelf: 'flex-start',
|
||||
@@ -65,6 +65,7 @@ const filePageStyle = StyleSheet.create({
|
||||
titleRow: {
|
||||
flexDirection: 'row',
|
||||
marginTop: 12,
|
||||
marginBottom: 2,
|
||||
marginLeft: 12,
|
||||
marginRight: 12,
|
||||
alignItems: 'center',
|
||||
@@ -88,17 +89,17 @@ const filePageStyle = StyleSheet.create({
|
||||
marginTop: 6,
|
||||
},
|
||||
channelName: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 14,
|
||||
color: Colors.LbryGreen,
|
||||
},
|
||||
anonChannelName: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
color: Colors.DescriptionGrey,
|
||||
},
|
||||
publishDateText: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 12,
|
||||
color: Colors.DescriptionGrey,
|
||||
},
|
||||
@@ -107,13 +108,12 @@ const filePageStyle = StyleSheet.create({
|
||||
},
|
||||
description: {
|
||||
color: Colors.DescriptionGrey,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 13,
|
||||
lineHeight: 18,
|
||||
marginTop: -8,
|
||||
marginLeft: 12,
|
||||
marginRight: 12,
|
||||
marginBottom: 16,
|
||||
},
|
||||
thumbnail: {
|
||||
width: screenWidth,
|
||||
@@ -180,7 +180,7 @@ const filePageStyle = StyleSheet.create({
|
||||
borderRadius: 4,
|
||||
},
|
||||
filePriceText: {
|
||||
fontFamily: 'Inter-Bold',
|
||||
fontFamily: 'Inter-UI-Bold',
|
||||
fontSize: 12,
|
||||
textAlign: 'center',
|
||||
color: '#0c604b',
|
||||
@@ -235,19 +235,19 @@ const filePageStyle = StyleSheet.create({
|
||||
paddingRight: 24,
|
||||
},
|
||||
dmcaText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 18,
|
||||
lineHeight: 24,
|
||||
},
|
||||
dmcaLink: {
|
||||
color: Colors.LbryGreen,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 18,
|
||||
lineHeight: 24,
|
||||
marginTop: 24,
|
||||
},
|
||||
infoText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 20,
|
||||
textAlign: 'center',
|
||||
marginLeft: 10,
|
||||
@@ -294,7 +294,7 @@ const filePageStyle = StyleSheet.create({
|
||||
marginBottom: 14,
|
||||
},
|
||||
input: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
},
|
||||
tipAmountInput: {
|
||||
@@ -316,7 +316,7 @@ const filePageStyle = StyleSheet.create({
|
||||
marginTop: -8,
|
||||
},
|
||||
text: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
lineHeight: 24,
|
||||
},
|
||||
@@ -332,16 +332,17 @@ const filePageStyle = StyleSheet.create({
|
||||
tagContainer: {
|
||||
marginLeft: 12,
|
||||
marginRight: 12,
|
||||
marginTop: 16,
|
||||
marginBottom: 16,
|
||||
flexDirection: 'row',
|
||||
},
|
||||
tagTitle: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
flex: 0.2,
|
||||
marginTop: 4,
|
||||
},
|
||||
tagList: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
flex: 0.8,
|
||||
flexDirection: 'row',
|
||||
flexWrap: 'wrap',
|
||||
@@ -363,7 +364,7 @@ const filePageStyle = StyleSheet.create({
|
||||
marginRight: 8,
|
||||
},
|
||||
rewardDriverText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
color: Colors.White,
|
||||
fontSize: 14,
|
||||
},
|
||||
@@ -399,12 +400,11 @@ const filePageStyle = StyleSheet.create({
|
||||
flex: 0.2,
|
||||
},
|
||||
largeButtonIcon: {
|
||||
color: Colors.ActionGrey,
|
||||
color: Colors.DescriptionGrey,
|
||||
},
|
||||
largeButtonText: {
|
||||
color: Colors.ActionGrey,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: 12,
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
marginTop: 4,
|
||||
},
|
||||
largeButtonsRow: {
|
||||
@@ -431,7 +431,7 @@ const filePageStyle = StyleSheet.create({
|
||||
},
|
||||
unsupportedContentFilename: {
|
||||
color: Colors.LbryGreen,
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 16,
|
||||
},
|
||||
unsupportedContentImage: {
|
||||
@@ -440,11 +440,11 @@ const filePageStyle = StyleSheet.create({
|
||||
marginRight: 24,
|
||||
},
|
||||
unsupportedContentTitle: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 20,
|
||||
},
|
||||
unsupportedContentText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
marginTop: 4,
|
||||
},
|
||||
@@ -452,7 +452,7 @@ const filePageStyle = StyleSheet.create({
|
||||
marginTop: 16,
|
||||
},
|
||||
viewCount: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 12,
|
||||
color: Colors.DescriptionGrey,
|
||||
marginLeft: 12,
|
||||
@@ -464,7 +464,7 @@ const filePageStyle = StyleSheet.create({
|
||||
marginLeft: 24,
|
||||
},
|
||||
balanceText: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 14,
|
||||
marginLeft: 4,
|
||||
},
|
||||
|
||||
+12
-12
@@ -17,7 +17,7 @@ const firstRunStyle = StyleSheet.create({
|
||||
backgroundColor: Colors.LbryGreen,
|
||||
},
|
||||
title: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 40,
|
||||
marginLeft: 32,
|
||||
marginRight: 32,
|
||||
@@ -25,7 +25,7 @@ const firstRunStyle = StyleSheet.create({
|
||||
color: Colors.White,
|
||||
},
|
||||
paragraph: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 18,
|
||||
lineHeight: 24,
|
||||
marginLeft: 32,
|
||||
@@ -34,7 +34,7 @@ const firstRunStyle = StyleSheet.create({
|
||||
color: Colors.White,
|
||||
},
|
||||
spacedParagraph: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 18,
|
||||
lineHeight: 28,
|
||||
marginLeft: 32,
|
||||
@@ -43,7 +43,7 @@ const firstRunStyle = StyleSheet.create({
|
||||
color: Colors.White,
|
||||
},
|
||||
infoParagraph: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
lineHeight: 20,
|
||||
marginLeft: 32,
|
||||
@@ -55,7 +55,7 @@ const firstRunStyle = StyleSheet.create({
|
||||
marginTop: 36,
|
||||
},
|
||||
rowParagraph: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
lineHeight: 24,
|
||||
color: Colors.White,
|
||||
@@ -67,7 +67,7 @@ const firstRunStyle = StyleSheet.create({
|
||||
marginRight: 8,
|
||||
},
|
||||
emailInput: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 24,
|
||||
lineHeight: 24,
|
||||
marginLeft: 32,
|
||||
@@ -76,7 +76,7 @@ const firstRunStyle = StyleSheet.create({
|
||||
textAlign: 'center',
|
||||
},
|
||||
passwordInput: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 24,
|
||||
lineHeight: 24,
|
||||
marginLeft: 32,
|
||||
@@ -102,7 +102,7 @@ const firstRunStyle = StyleSheet.create({
|
||||
actionButton: {
|
||||
backgroundColor: Colors.White,
|
||||
alignSelf: 'center',
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 12,
|
||||
paddingLeft: 16,
|
||||
paddingRight: 16,
|
||||
@@ -114,18 +114,18 @@ const firstRunStyle = StyleSheet.create({
|
||||
paddingRight: 32,
|
||||
},
|
||||
buttonText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 18,
|
||||
color: Colors.White,
|
||||
},
|
||||
smallButtonText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
color: Colors.White,
|
||||
marginBottom: -2,
|
||||
},
|
||||
smallLeftButtonText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
color: Colors.White,
|
||||
marginBottom: 6,
|
||||
@@ -183,7 +183,7 @@ const firstRunStyle = StyleSheet.create({
|
||||
},
|
||||
passwordWarningText: {
|
||||
color: Colors.NextLbryGreen,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
},
|
||||
centered: {
|
||||
|
||||
@@ -42,12 +42,12 @@ const floatingButtonStyle = StyleSheet.create({
|
||||
},
|
||||
text: {
|
||||
color: Colors.White,
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 16,
|
||||
},
|
||||
bottomRight: {
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
right: 10,
|
||||
bottom: 10,
|
||||
},
|
||||
rewardIcon: {
|
||||
color: Colors.White,
|
||||
|
||||
@@ -1,150 +0,0 @@
|
||||
import { StyleSheet } from 'react-native';
|
||||
import Colors from './colors';
|
||||
|
||||
const walletStyle = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
backgroundColor: Colors.PageBackground,
|
||||
},
|
||||
scrollContainer: {
|
||||
marginTop: 60,
|
||||
},
|
||||
row: {
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'space-between',
|
||||
alignItems: 'center',
|
||||
},
|
||||
button: {
|
||||
backgroundColor: Colors.LbryGreen,
|
||||
alignSelf: 'flex-start',
|
||||
},
|
||||
card: {
|
||||
backgroundColor: Colors.White,
|
||||
marginTop: 16,
|
||||
marginLeft: 16,
|
||||
marginRight: 16,
|
||||
padding: 16,
|
||||
},
|
||||
title: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontSize: 20,
|
||||
marginBottom: 8,
|
||||
},
|
||||
titleRow: {
|
||||
alignItems: 'center',
|
||||
flexDirection: 'row',
|
||||
marginBottom: 8,
|
||||
justifyContent: 'space-between',
|
||||
},
|
||||
titleCol: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontSize: 20,
|
||||
},
|
||||
text: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: 14,
|
||||
},
|
||||
link: {
|
||||
color: Colors.LbryGreen,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: 14,
|
||||
},
|
||||
smallText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: 12,
|
||||
},
|
||||
rewardDriverCard: {
|
||||
alignItems: 'center',
|
||||
backgroundColor: Colors.RewardDriverBlue,
|
||||
flexDirection: 'row',
|
||||
padding: 16,
|
||||
marginLeft: 16,
|
||||
marginTop: 16,
|
||||
marginRight: 16,
|
||||
},
|
||||
rewardDriverIcon: {
|
||||
color: Colors.White,
|
||||
marginRight: 8,
|
||||
},
|
||||
rewardDriverText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
color: Colors.White,
|
||||
fontSize: 14,
|
||||
},
|
||||
subTitle: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: 14,
|
||||
marginTop: 12,
|
||||
marginBottom: 4,
|
||||
},
|
||||
customizeTitle: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: 14,
|
||||
marginTop: 12,
|
||||
},
|
||||
inviteLink: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
borderWidth: 1,
|
||||
borderRadius: 16,
|
||||
borderStyle: 'dashed',
|
||||
borderColor: '#e1e1e1',
|
||||
backgroundColor: '#f9f9f9',
|
||||
paddingTop: 8,
|
||||
paddingLeft: 8,
|
||||
paddingRight: 8,
|
||||
paddingBottom: 6,
|
||||
width: '88%',
|
||||
},
|
||||
emailInput: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: 14,
|
||||
},
|
||||
rightRow: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'flex-end',
|
||||
},
|
||||
loading: {
|
||||
marginRight: 8,
|
||||
},
|
||||
lastCard: {
|
||||
marginBottom: 16,
|
||||
},
|
||||
invitees: {
|
||||
marginTop: 8,
|
||||
},
|
||||
inviteesHeader: {
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
marginBottom: 8,
|
||||
},
|
||||
emailHeader: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontSize: 14,
|
||||
width: '65%',
|
||||
},
|
||||
rewardHeader: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontSize: 14,
|
||||
width: '35%',
|
||||
},
|
||||
inviteeItem: {
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
marginBottom: 8,
|
||||
},
|
||||
inviteeEmail: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: 12,
|
||||
width: '65%',
|
||||
},
|
||||
rewardStatus: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: 12,
|
||||
width: '35%',
|
||||
},
|
||||
});
|
||||
|
||||
export default walletStyle;
|
||||
@@ -56,41 +56,13 @@ const mediaPlayerStyle = StyleSheet.create({
|
||||
height: '100%',
|
||||
},
|
||||
playerControlsContainer: {
|
||||
backgroundColor: '#00000040',
|
||||
backgroundColor: '#00000020',
|
||||
flex: 1,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
midControls: {
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
height: 64,
|
||||
position: 'absolute',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
midControlText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: 10,
|
||||
position: 'absolute',
|
||||
top: 10,
|
||||
color: Colors.White,
|
||||
},
|
||||
leftMidControlText: {
|
||||
left: -6,
|
||||
},
|
||||
rightMidControlText: {
|
||||
right: -6,
|
||||
},
|
||||
rewind10: {
|
||||
marginRight: 48,
|
||||
alignItems: 'center',
|
||||
},
|
||||
forward10: {
|
||||
marginLeft: 48,
|
||||
alignItems: 'center',
|
||||
},
|
||||
playPauseButton: {
|
||||
position: 'absolute',
|
||||
width: 64,
|
||||
height: 64,
|
||||
alignItems: 'center',
|
||||
@@ -106,7 +78,7 @@ const mediaPlayerStyle = StyleSheet.create({
|
||||
bottom: 14,
|
||||
},
|
||||
elapsedDuration: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
position: 'absolute',
|
||||
left: 8,
|
||||
bottom: 24,
|
||||
@@ -114,7 +86,7 @@ const mediaPlayerStyle = StyleSheet.create({
|
||||
color: '#ffffff',
|
||||
},
|
||||
totalDuration: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
position: 'absolute',
|
||||
right: 48,
|
||||
bottom: 24,
|
||||
|
||||
@@ -29,7 +29,7 @@ const modalPickerStyle = StyleSheet.create({
|
||||
padding: 12,
|
||||
},
|
||||
title: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 12,
|
||||
marginTop: 4,
|
||||
textTransform: 'uppercase',
|
||||
@@ -54,7 +54,7 @@ const modalPickerStyle = StyleSheet.create({
|
||||
itemLabel: {
|
||||
marginLeft: 8,
|
||||
alignSelf: 'flex-start',
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
},
|
||||
itemSelected: {
|
||||
|
||||
@@ -42,7 +42,7 @@ const modalTagSelectorStyle = StyleSheet.create({
|
||||
marginBottom: 12,
|
||||
},
|
||||
title: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 24,
|
||||
},
|
||||
buttons: {
|
||||
|
||||
@@ -6,7 +6,7 @@ const modalTipStyle = StyleSheet.create({
|
||||
padding: 16,
|
||||
},
|
||||
title: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 24,
|
||||
},
|
||||
row: {
|
||||
@@ -19,7 +19,7 @@ const modalTipStyle = StyleSheet.create({
|
||||
marginRight: 24,
|
||||
},
|
||||
tipAmountInput: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
alignSelf: 'flex-start',
|
||||
textAlign: 'right',
|
||||
@@ -27,7 +27,7 @@ const modalTipStyle = StyleSheet.create({
|
||||
letterSpacing: 1,
|
||||
},
|
||||
currency: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 12,
|
||||
marginLeft: 4,
|
||||
},
|
||||
@@ -49,7 +49,7 @@ const modalTipStyle = StyleSheet.create({
|
||||
marginLeft: 24,
|
||||
},
|
||||
balanceText: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 14,
|
||||
marginLeft: 4,
|
||||
},
|
||||
@@ -57,12 +57,12 @@ const modalTipStyle = StyleSheet.create({
|
||||
marginTop: 4,
|
||||
},
|
||||
infoText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
color: Colors.DescriptionGrey,
|
||||
},
|
||||
learnMoreLink: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
color: Colors.LbryGreen,
|
||||
},
|
||||
|
||||
@@ -42,7 +42,7 @@ const pageHeaderStyle = StyleSheet.create({
|
||||
flexDirection: 'row',
|
||||
},
|
||||
titleText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: Platform.OS === 'ios' ? 17 : 20,
|
||||
fontWeight: Platform.OS === 'ios' ? '700' : '500',
|
||||
color: 'rgba(0, 0, 0, .9)',
|
||||
|
||||
+22
-22
@@ -23,7 +23,7 @@ const publishStyle = StyleSheet.create({
|
||||
height: 90,
|
||||
},
|
||||
inputText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
},
|
||||
card: {
|
||||
@@ -57,7 +57,7 @@ const publishStyle = StyleSheet.create({
|
||||
alignSelf: 'flex-end',
|
||||
},
|
||||
cardTitle: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 20,
|
||||
marginBottom: 8,
|
||||
},
|
||||
@@ -84,7 +84,7 @@ const publishStyle = StyleSheet.create({
|
||||
},
|
||||
actionText: {
|
||||
color: Colors.White,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
marginTop: 8,
|
||||
},
|
||||
@@ -119,12 +119,12 @@ const publishStyle = StyleSheet.create({
|
||||
},
|
||||
priceInput: {
|
||||
width: 80,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
textAlign: 'right',
|
||||
},
|
||||
currency: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
},
|
||||
cardRow: {
|
||||
flex: 1,
|
||||
@@ -155,12 +155,12 @@ const publishStyle = StyleSheet.create({
|
||||
},
|
||||
loadingText: {
|
||||
color: Colors.White,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
marginLeft: 8,
|
||||
},
|
||||
listEmptyText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
},
|
||||
titleRow: {
|
||||
@@ -168,7 +168,7 @@ const publishStyle = StyleSheet.create({
|
||||
justifyContent: 'space-between',
|
||||
},
|
||||
cardText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
},
|
||||
cameraPreview: {
|
||||
@@ -192,12 +192,12 @@ const publishStyle = StyleSheet.create({
|
||||
padding: 16,
|
||||
},
|
||||
successTitle: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 28,
|
||||
marginBottom: 16,
|
||||
},
|
||||
successText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
marginBottom: 16,
|
||||
lineHeight: 20,
|
||||
@@ -211,7 +211,7 @@ const publishStyle = StyleSheet.create({
|
||||
successUrl: {
|
||||
flex: 0.9,
|
||||
fontSize: 32,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
color: Colors.NextLbryGreen,
|
||||
marginRight: 16,
|
||||
},
|
||||
@@ -305,7 +305,7 @@ const publishStyle = StyleSheet.create({
|
||||
paddingBottom: 12,
|
||||
},
|
||||
rewardDriverText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
color: Colors.White,
|
||||
fontSize: 14,
|
||||
},
|
||||
@@ -325,7 +325,7 @@ const publishStyle = StyleSheet.create({
|
||||
marginBottom: 4,
|
||||
},
|
||||
textInputTitle: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 12,
|
||||
marginBottom: -10,
|
||||
marginLeft: 4,
|
||||
@@ -346,7 +346,7 @@ const publishStyle = StyleSheet.create({
|
||||
},
|
||||
thumbnailUploadText: {
|
||||
color: Colors.White,
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 12,
|
||||
marginLeft: 4,
|
||||
},
|
||||
@@ -357,7 +357,7 @@ const publishStyle = StyleSheet.create({
|
||||
marginBottom: 16,
|
||||
},
|
||||
toggleText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
marginLeft: 8,
|
||||
},
|
||||
@@ -398,7 +398,7 @@ const publishStyle = StyleSheet.create({
|
||||
padding: 16,
|
||||
},
|
||||
noPublishText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
},
|
||||
publishNowButton: {
|
||||
@@ -423,21 +423,21 @@ const publishStyle = StyleSheet.create({
|
||||
},
|
||||
noVideos: {
|
||||
color: Colors.White,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
},
|
||||
cameraInfo: {
|
||||
color: Colors.White,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
},
|
||||
warningText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
color: Colors.DescriptionGrey,
|
||||
},
|
||||
helpText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 12,
|
||||
color: Colors.DescriptionGrey,
|
||||
},
|
||||
@@ -463,7 +463,7 @@ const publishStyle = StyleSheet.create({
|
||||
},
|
||||
editIcon: {
|
||||
color: Colors.White,
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 12,
|
||||
},
|
||||
balance: {
|
||||
@@ -472,7 +472,7 @@ const publishStyle = StyleSheet.create({
|
||||
marginLeft: 24,
|
||||
},
|
||||
balanceText: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 14,
|
||||
marginLeft: 4,
|
||||
},
|
||||
|
||||
@@ -12,7 +12,7 @@ const relatedContentStyle = StyleSheet.create({
|
||||
borderTopWidth: 1,
|
||||
},
|
||||
title: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 18,
|
||||
},
|
||||
itemList: {
|
||||
|
||||
+21
-38
@@ -37,7 +37,7 @@ const rewardStyle = StyleSheet.create({
|
||||
marginTop: 36,
|
||||
},
|
||||
enrollDescText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 18,
|
||||
lineHeight: 28,
|
||||
color: Colors.White,
|
||||
@@ -67,36 +67,36 @@ const rewardStyle = StyleSheet.create({
|
||||
paddingBottom: 16,
|
||||
},
|
||||
text: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
lineHeight: 24,
|
||||
},
|
||||
infoText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 18,
|
||||
marginLeft: 12,
|
||||
},
|
||||
title: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 22,
|
||||
marginBottom: 6,
|
||||
color: Colors.LbryGreen,
|
||||
},
|
||||
subtitle: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 18,
|
||||
marginBottom: 6,
|
||||
color: Colors.LbryGreen,
|
||||
},
|
||||
subcardText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 15,
|
||||
lineHeight: 20,
|
||||
marginLeft: 2,
|
||||
marginRight: 2,
|
||||
},
|
||||
subcardTextInput: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
marginTop: 2,
|
||||
marginBottom: 2,
|
||||
@@ -122,7 +122,7 @@ const rewardStyle = StyleSheet.create({
|
||||
},
|
||||
link: {
|
||||
color: Colors.LbryGreen,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
},
|
||||
textLink: {
|
||||
@@ -148,21 +148,21 @@ const rewardStyle = StyleSheet.create({
|
||||
alignItems: 'center',
|
||||
},
|
||||
rewardAmount: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 26,
|
||||
textAlign: 'center',
|
||||
},
|
||||
rewardCurrency: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
},
|
||||
rewardTitle: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
color: Colors.LbryGreen,
|
||||
marginBottom: 4,
|
||||
},
|
||||
rewardDescription: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
lineHeight: 18,
|
||||
marginBottom: 4,
|
||||
@@ -195,7 +195,7 @@ const rewardStyle = StyleSheet.create({
|
||||
},
|
||||
summaryText: {
|
||||
color: Colors.White,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 28,
|
||||
marginLeft: 12,
|
||||
},
|
||||
@@ -208,19 +208,19 @@ const rewardStyle = StyleSheet.create({
|
||||
marginRight: 32,
|
||||
},
|
||||
phoneInputText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
letterSpacing: 1.3,
|
||||
color: Colors.White,
|
||||
},
|
||||
verifyingText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
marginLeft: 12,
|
||||
alignSelf: 'flex-start',
|
||||
},
|
||||
verificationCodeInput: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
color: Colors.White,
|
||||
fontSize: 24,
|
||||
letterSpacing: 12,
|
||||
@@ -244,11 +244,11 @@ const rewardStyle = StyleSheet.create({
|
||||
},
|
||||
notInterestedLink: {
|
||||
fontSize: 14,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
color: Colors.White,
|
||||
},
|
||||
learnMoreLink: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
color: Colors.White,
|
||||
textDecorationLine: 'underline',
|
||||
},
|
||||
@@ -258,7 +258,7 @@ const rewardStyle = StyleSheet.create({
|
||||
paddingRight: 16,
|
||||
},
|
||||
customCodeInput: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
letterSpacing: 1.3,
|
||||
marginTop: -8,
|
||||
@@ -285,7 +285,7 @@ const rewardStyle = StyleSheet.create({
|
||||
verificationTitle: {
|
||||
fontSize: 32,
|
||||
color: Colors.White,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
marginLeft: 32,
|
||||
marginRight: 32,
|
||||
marginBottom: 24,
|
||||
@@ -300,28 +300,11 @@ const rewardStyle = StyleSheet.create({
|
||||
fontSize: 14,
|
||||
},
|
||||
paragraphText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
color: Colors.White,
|
||||
fontSize: 12,
|
||||
lineHeight: 16,
|
||||
},
|
||||
filterHeader: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
marginTop: 16,
|
||||
marginLeft: 16,
|
||||
marginRight: 16,
|
||||
padding: 16,
|
||||
backgroundColor: Colors.White,
|
||||
},
|
||||
filterLink: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontSize: 14,
|
||||
marginRight: 24,
|
||||
},
|
||||
activeFilterLink: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
},
|
||||
});
|
||||
|
||||
export default rewardStyle;
|
||||
+5
-11
@@ -44,19 +44,19 @@ const searchStyle = StyleSheet.create({
|
||||
backgroundColor: Colors.DarkerGrey,
|
||||
},
|
||||
tagResultTitle: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 24,
|
||||
color: Colors.White,
|
||||
},
|
||||
tagResultDescription: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
color: Colors.VeryLightGrey,
|
||||
},
|
||||
searchInput: {
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
},
|
||||
noResults: {
|
||||
@@ -67,25 +67,19 @@ const searchStyle = StyleSheet.create({
|
||||
alignItems: 'center',
|
||||
},
|
||||
noResultsText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
marginTop: 16,
|
||||
marginLeft: 16,
|
||||
marginRight: 16,
|
||||
},
|
||||
boldText: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 16,
|
||||
},
|
||||
loading: {
|
||||
position: 'absolute',
|
||||
},
|
||||
moreLoading: {
|
||||
width: '100%',
|
||||
height: 48,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
});
|
||||
|
||||
export default searchStyle;
|
||||
@@ -38,23 +38,23 @@ const settingsStyle = StyleSheet.create({
|
||||
},
|
||||
label: {
|
||||
fontSize: 14,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
lineHeight: 18,
|
||||
},
|
||||
description: {
|
||||
color: '#aaaaaa',
|
||||
fontSize: 12,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
lineHeight: 18,
|
||||
},
|
||||
sectionTitle: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 20,
|
||||
marginBottom: 4,
|
||||
},
|
||||
sectionDescription: {
|
||||
color: '#aaaaaa',
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 12,
|
||||
lineHeight: 18,
|
||||
marginBottom: 8,
|
||||
@@ -66,7 +66,7 @@ const settingsStyle = StyleSheet.create({
|
||||
width: '85%',
|
||||
},
|
||||
languagePickerItem: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
},
|
||||
pickerRow: {
|
||||
|
||||
@@ -8,14 +8,14 @@ const splashStyle = StyleSheet.create({
|
||||
backgroundColor: Colors.LbryGreen,
|
||||
},
|
||||
title: {
|
||||
fontFamily: 'Inter-Bold',
|
||||
fontFamily: 'Inter-UI-Bold',
|
||||
fontSize: 64,
|
||||
textAlign: 'center',
|
||||
marginBottom: 48,
|
||||
color: Colors.White,
|
||||
},
|
||||
errorTitle: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 28,
|
||||
marginBottom: 24,
|
||||
marginLeft: 24,
|
||||
@@ -23,7 +23,7 @@ const splashStyle = StyleSheet.create({
|
||||
color: Colors.White,
|
||||
},
|
||||
paragraph: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
lineHeight: 24,
|
||||
marginBottom: 20,
|
||||
@@ -48,7 +48,7 @@ const splashStyle = StyleSheet.create({
|
||||
width: '50%',
|
||||
},
|
||||
details: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
marginLeft: 16,
|
||||
marginRight: 16,
|
||||
@@ -56,7 +56,7 @@ const splashStyle = StyleSheet.create({
|
||||
textAlign: 'center',
|
||||
},
|
||||
message: {
|
||||
fontFamily: 'Inter-Bold',
|
||||
fontFamily: 'Inter-UI-Bold',
|
||||
fontSize: 18,
|
||||
color: Colors.White,
|
||||
marginLeft: 16,
|
||||
|
||||
@@ -16,16 +16,16 @@ const storageStatsStyle = StyleSheet.create({
|
||||
padding: 16,
|
||||
},
|
||||
totalSize: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 36,
|
||||
},
|
||||
annotation: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
marginTop: -4,
|
||||
},
|
||||
statsText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
},
|
||||
distributionBar: {
|
||||
@@ -57,12 +57,12 @@ const storageStatsStyle = StyleSheet.create({
|
||||
height: 16,
|
||||
},
|
||||
legendText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
flex: 0.3,
|
||||
},
|
||||
legendSize: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
flex: 0.6,
|
||||
textAlign: 'right',
|
||||
|
||||
+12
-12
@@ -37,7 +37,7 @@ const subscriptionsStyle = StyleSheet.create({
|
||||
paddingTop: 24,
|
||||
},
|
||||
infoText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
marginTop: 8,
|
||||
marginBottom: 8,
|
||||
@@ -57,7 +57,7 @@ const subscriptionsStyle = StyleSheet.create({
|
||||
marginTop: 16,
|
||||
},
|
||||
contentText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
marginLeft: 24,
|
||||
marginRight: 24,
|
||||
@@ -96,7 +96,7 @@ const subscriptionsStyle = StyleSheet.create({
|
||||
justifyContent: 'center',
|
||||
},
|
||||
fileItemName: {
|
||||
fontFamily: 'Inter-Bold',
|
||||
fontFamily: 'Inter-UI-Bold',
|
||||
marginTop: 8,
|
||||
fontSize: 18,
|
||||
},
|
||||
@@ -109,7 +109,7 @@ const subscriptionsStyle = StyleSheet.create({
|
||||
borderBottomWidth: 1,
|
||||
},
|
||||
channelTitle: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 20,
|
||||
marginLeft: 24,
|
||||
marginTop: 16,
|
||||
@@ -136,16 +136,16 @@ const subscriptionsStyle = StyleSheet.create({
|
||||
color: Colors.LbryGreen,
|
||||
},
|
||||
inactiveMode: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
},
|
||||
activeMode: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
},
|
||||
claimList: {
|
||||
flex: 1,
|
||||
},
|
||||
pageTitle: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 24,
|
||||
},
|
||||
titleRow: {
|
||||
@@ -171,7 +171,7 @@ const subscriptionsStyle = StyleSheet.create({
|
||||
marginRight: 24,
|
||||
},
|
||||
tagSortText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
marginRight: 4,
|
||||
},
|
||||
@@ -218,13 +218,13 @@ const subscriptionsStyle = StyleSheet.create({
|
||||
top: 0,
|
||||
},
|
||||
suggestedItemTitle: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
marginBottom: 4,
|
||||
width: '85%',
|
||||
},
|
||||
suggestedItemName: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 14,
|
||||
marginBottom: 4,
|
||||
color: Colors.LbryGreen,
|
||||
@@ -235,7 +235,7 @@ const subscriptionsStyle = StyleSheet.create({
|
||||
flexWrap: 'wrap',
|
||||
},
|
||||
suggestedSubTitle: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 20,
|
||||
marginLeft: 16,
|
||||
marginRight: 16,
|
||||
@@ -253,7 +253,7 @@ const subscriptionsStyle = StyleSheet.create({
|
||||
alignItems: 'center',
|
||||
},
|
||||
suggestedLink: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
},
|
||||
modalContainer: {
|
||||
|
||||
+3
-3
@@ -7,7 +7,7 @@ const tagStyle = StyleSheet.create({
|
||||
marginBottom: 4,
|
||||
},
|
||||
tagSearchInput: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
},
|
||||
content: {
|
||||
@@ -22,7 +22,7 @@ const tagStyle = StyleSheet.create({
|
||||
marginRight: 8,
|
||||
},
|
||||
text: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
marginRight: 8,
|
||||
},
|
||||
@@ -34,7 +34,7 @@ const tagStyle = StyleSheet.create({
|
||||
marginTop: 8,
|
||||
},
|
||||
nsfwTagsTitle: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
marginBottom: 4,
|
||||
},
|
||||
|
||||
@@ -24,29 +24,29 @@ const transactionListStyle = StyleSheet.create({
|
||||
alignSelf: 'stretch',
|
||||
},
|
||||
text: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
},
|
||||
link: {
|
||||
color: Colors.LbryGreen,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
},
|
||||
amount: {
|
||||
textAlign: 'right',
|
||||
},
|
||||
smallText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 12,
|
||||
color: '#aaaaaa',
|
||||
},
|
||||
smallLink: {
|
||||
color: Colors.LbryGreen,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 12,
|
||||
},
|
||||
noTransactions: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
textAlign: 'center',
|
||||
padding: 16,
|
||||
color: '#aaaaaa',
|
||||
|
||||
@@ -29,8 +29,9 @@ const uriBarStyle = StyleSheet.create({
|
||||
borderRadius: 24,
|
||||
paddingLeft: 12,
|
||||
paddingRight: 12,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
height: 44,
|
||||
lineHeight: 18,
|
||||
flex: 17,
|
||||
},
|
||||
@@ -65,11 +66,11 @@ const uriBarStyle = StyleSheet.create({
|
||||
flex: 1,
|
||||
},
|
||||
itemText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
},
|
||||
itemDesc: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
color: Colors.UriDescBlue,
|
||||
},
|
||||
@@ -107,7 +108,7 @@ const uriBarStyle = StyleSheet.create({
|
||||
alignItems: 'center',
|
||||
},
|
||||
itemCount: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 20,
|
||||
marginLeft: 30,
|
||||
},
|
||||
|
||||
+24
-24
@@ -26,7 +26,7 @@ const walletStyle = StyleSheet.create({
|
||||
flexDirection: 'row',
|
||||
},
|
||||
address: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
letterSpacing: 0.8,
|
||||
borderWidth: 1,
|
||||
borderRadius: 16,
|
||||
@@ -69,12 +69,12 @@ const walletStyle = StyleSheet.create({
|
||||
margin: 16,
|
||||
},
|
||||
title: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 20,
|
||||
marginBottom: 24,
|
||||
},
|
||||
transactionsTitle: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 20,
|
||||
},
|
||||
transactionsHeader: {
|
||||
@@ -86,16 +86,16 @@ const walletStyle = StyleSheet.create({
|
||||
borderBottomColor: '#eeeeee',
|
||||
},
|
||||
text: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
},
|
||||
link: {
|
||||
color: Colors.LbryGreen,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
},
|
||||
smallText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 12,
|
||||
},
|
||||
balanceCard: {
|
||||
@@ -111,14 +111,14 @@ const walletStyle = StyleSheet.create({
|
||||
},
|
||||
balanceTitle: {
|
||||
color: Colors.White,
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 20,
|
||||
marginLeft: 16,
|
||||
marginTop: 16,
|
||||
},
|
||||
balanceCaption: {
|
||||
color: '#caedB9',
|
||||
fontFamily: 'Inter-Medium',
|
||||
fontFamily: 'Inter-UI-Medium',
|
||||
fontSize: 14,
|
||||
marginLeft: 16,
|
||||
marginTop: 8,
|
||||
@@ -126,7 +126,7 @@ const walletStyle = StyleSheet.create({
|
||||
},
|
||||
balance: {
|
||||
color: Colors.White,
|
||||
fontFamily: 'Inter-Bold',
|
||||
fontFamily: 'Inter-UI-Bold',
|
||||
fontSize: 36,
|
||||
marginLeft: 16,
|
||||
marginBottom: 16,
|
||||
@@ -137,19 +137,19 @@ const walletStyle = StyleSheet.create({
|
||||
marginLeft: 24,
|
||||
},
|
||||
balanceText: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 14,
|
||||
marginLeft: 4,
|
||||
},
|
||||
infoText: {
|
||||
color: '#aaaaaa',
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
padding: 16,
|
||||
textAlign: 'center',
|
||||
},
|
||||
input: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
},
|
||||
amountInput: {
|
||||
@@ -172,14 +172,14 @@ const walletStyle = StyleSheet.create({
|
||||
},
|
||||
warningParagraph: {
|
||||
color: Colors.White,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
lineHeight: 24,
|
||||
marginBottom: 16,
|
||||
},
|
||||
warningText: {
|
||||
color: Colors.White,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
lineHeight: 24,
|
||||
marginBottom: 8,
|
||||
@@ -222,7 +222,7 @@ const walletStyle = StyleSheet.create({
|
||||
},
|
||||
rewardDriverText: {
|
||||
color: Colors.White,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
lineHeight: 16,
|
||||
},
|
||||
@@ -237,7 +237,7 @@ const walletStyle = StyleSheet.create({
|
||||
marginRight: 16,
|
||||
},
|
||||
syncDriverTitle: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 20,
|
||||
paddingLeft: 16,
|
||||
marginTop: 16,
|
||||
@@ -247,7 +247,7 @@ const walletStyle = StyleSheet.create({
|
||||
},
|
||||
syncDriverLink: {
|
||||
color: Colors.LbryGreen,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 14,
|
||||
},
|
||||
actionRow: {
|
||||
@@ -291,11 +291,11 @@ const walletStyle = StyleSheet.create({
|
||||
justifyContent: 'flex-end',
|
||||
},
|
||||
labelText: {
|
||||
fontFamily: 'Inter-SemiBold',
|
||||
fontFamily: 'Inter-UI-SemiBold',
|
||||
fontSize: 16,
|
||||
},
|
||||
valueText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
},
|
||||
rightLink: {
|
||||
@@ -316,7 +316,7 @@ const walletStyle = StyleSheet.create({
|
||||
},
|
||||
loadingText: {
|
||||
color: '#aaaaaa',
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 16,
|
||||
marginLeft: 8,
|
||||
},
|
||||
@@ -331,11 +331,11 @@ const walletStyle = StyleSheet.create({
|
||||
},
|
||||
continueLink: {
|
||||
fontSize: 14,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
color: Colors.White,
|
||||
},
|
||||
learnMoreLink: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
color: Colors.NextLbryGreen,
|
||||
},
|
||||
signInButton: {
|
||||
@@ -353,7 +353,7 @@ const walletStyle = StyleSheet.create({
|
||||
marginTop: 36,
|
||||
},
|
||||
onboardingText: {
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 18,
|
||||
lineHeight: 28,
|
||||
color: Colors.White,
|
||||
@@ -363,7 +363,7 @@ const walletStyle = StyleSheet.create({
|
||||
},
|
||||
signInTitle: {
|
||||
color: Colors.White,
|
||||
fontFamily: 'Inter-Regular',
|
||||
fontFamily: 'Inter-UI-Regular',
|
||||
fontSize: 28,
|
||||
},
|
||||
});
|
||||
|
||||
+6
-14
@@ -10,7 +10,6 @@ const specialRouteMap = {
|
||||
about: Constants.DRAWER_ROUTE_ABOUT,
|
||||
allContent: Constants.DRAWER_ROUTE_TRENDING,
|
||||
channels: Constants.DRAWER_ROUTE_CHANNEL_CREATOR,
|
||||
invites: Constants.DRAWER_ROUTE_INVITES,
|
||||
library: Constants.DRAWER_ROUTE_MY_LBRY,
|
||||
publish: Constants.DRAWER_ROUTE_PUBLISH,
|
||||
publishes: Constants.DRAWER_ROUTE_PUBLISHES,
|
||||
@@ -55,10 +54,9 @@ export function dispatchNavigateToUri(dispatch, nav, uri, isNavigatingBack, full
|
||||
|
||||
if (!isNavigatingBack) {
|
||||
dispatch(doPushDrawerStack(uri));
|
||||
dispatch(doSetPlayerVisible(true));
|
||||
}
|
||||
|
||||
dispatch(doSetPlayerVisible(false));
|
||||
|
||||
if (nav && nav.routes && nav.routes.length > 0 && nav.routes[0].routeName === 'Main') {
|
||||
const mainRoute = nav.routes[0];
|
||||
const discoverRoute = mainRoute.routes[0];
|
||||
@@ -115,7 +113,7 @@ function parseUriVars(vars) {
|
||||
return uriVars;
|
||||
}
|
||||
|
||||
export function navigateToUri(navigation, uri, additionalParams, isNavigatingBack, fullUri, setPlayerVisible) {
|
||||
export function navigateToUri(navigation, uri, additionalParams, isNavigatingBack, fullUri) {
|
||||
if (!navigation) {
|
||||
return;
|
||||
}
|
||||
@@ -137,10 +135,6 @@ export function navigateToUri(navigation, uri, additionalParams, isNavigatingBac
|
||||
uriVars = parseUriVars(uriVarsStr);
|
||||
}
|
||||
|
||||
if (setPlayerVisible) {
|
||||
setPlayerVisible(false);
|
||||
}
|
||||
|
||||
const { store } = window;
|
||||
const params = Object.assign({ uri, uriVars, fullUri: fullUri }, additionalParams);
|
||||
if (navigation.state.routeName === 'File') {
|
||||
@@ -148,6 +142,7 @@ export function navigateToUri(navigation, uri, additionalParams, isNavigatingBac
|
||||
navigation.dispatch(stackAction);
|
||||
if (store && store.dispatch && !isNavigatingBack) {
|
||||
store.dispatch(doPushDrawerStack(uri));
|
||||
store.dispatch(doSetPlayerVisible(true));
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -155,10 +150,11 @@ export function navigateToUri(navigation, uri, additionalParams, isNavigatingBac
|
||||
navigation.navigate({ routeName: 'File', key: uri, params });
|
||||
if (store && store.dispatch && !isNavigatingBack) {
|
||||
store.dispatch(doPushDrawerStack(uri));
|
||||
store.dispatch(doSetPlayerVisible(true));
|
||||
}
|
||||
}
|
||||
|
||||
export function navigateBack(navigation, drawerStack, popDrawerStack, setPlayerVisible) {
|
||||
export function navigateBack(navigation, drawerStack, popDrawerStack) {
|
||||
if (drawerStack[drawerStack.length - 1].route === Constants.DRAWER_ROUTE_FILE_VIEW) {
|
||||
// inner file_view (web / image view) is handled differently
|
||||
if (popDrawerStack) {
|
||||
@@ -170,15 +166,12 @@ export function navigateBack(navigation, drawerStack, popDrawerStack, setPlayerV
|
||||
if (popDrawerStack) {
|
||||
popDrawerStack();
|
||||
}
|
||||
if (setPlayerVisible) {
|
||||
setPlayerVisible(false);
|
||||
}
|
||||
|
||||
const target = drawerStack[drawerStack.length > 1 ? drawerStack.length - 2 : 0];
|
||||
const { route, params } = target;
|
||||
navigation.goBack(navigation.state.key);
|
||||
if (!DrawerRoutes.includes(route) && !InnerDrawerRoutes.includes(route) && isURIValid(route)) {
|
||||
navigateToUri(navigation, route, null, true, null, setPlayerVisible);
|
||||
navigateToUri(navigation, route, null, true);
|
||||
} else {
|
||||
let targetRoute = route;
|
||||
let targetParams = params;
|
||||
@@ -208,7 +201,6 @@ export function dispatchNavigateBack(dispatch, nav, drawerStack) {
|
||||
}
|
||||
|
||||
dispatch(doPopDrawerStack());
|
||||
dispatch(doSetPlayerVisible(false));
|
||||
|
||||
const target = drawerStack[drawerStack.length > 1 ? drawerStack.length - 2 : 0];
|
||||
const { route } = target;
|
||||
|
||||
Reference in new issue
Block a user