Compare commits

...
Author SHA1 Message Date
Akinwale Ariwodola ddc9078294 update url for stop download 2020-01-15 06:50:06 +01:00
Akinwale Ariwodola fefc13bc7a fix double-playback when navigating to related content links 2020-01-15 06:44:31 +01:00
Akinwale Ariwodola 8f28aed662 fix ongoing playback when back button pressed 2020-01-14 08:49:34 +01:00
Akinwale Ariwodola f2b0d3417b show notifications for video downloads. fix double playback. 2020-01-14 03:28:53 +01:00
Akinwale Ariwodola 86b2f25b66 Merge remote-tracking branch 'origin/master' into playable-downloads 2020-01-14 02:31:15 +01:00
Akinwale Ariwodola 156e310368 fix error on opening related content or urls 2020-01-14 02:29:30 +01:00
Akinwale Ariwodola bea29e81e1 fix media player source and button display 2020-01-13 16:44:51 +01:00
Akinwale Ariwodola 683b1f4805 replace file page in navigation using the same key 2020-01-13 16:17:18 +01:00
Akinwale Ariwodola e263ad7569 react navigation drawer workaround 2020-01-13 12:24:03 +01:00
Akinwale Ariwodola 55f61a85f0 enable download button for video and audio content 2020-01-13 12:04:06 +01:00
Akinwale Ariwodola 24d580ea13 remove calls to doCheckSubscriptionsInit 2020-01-10 23:41:05 +01:00
Akinwale Ariwodola bfc3b11035 fix channel thumbnail container render. style tweaks for smaller screens. 2020-01-10 00:37:51 +01:00
Akinwale Ariwodola 6bf2f9460d fix claim result item channel render checks 2020-01-09 20:34:06 +01:00
Akinwale Ariwodola 504baeefaf fullscreen media player restore tweak 2020-01-09 18:56:36 +01:00
Akinwale Ariwodola 6c55633751 use Inter font for markdown display and some style tweaks 2020-01-09 18:11:23 +01:00
Akinwale Ariwodola 3395fa7aa2 fix storage permission request flow on new publish page 2020-01-09 17:45:02 +01:00
Akinwale Ariwodola 7a3def7ea1 fix claim result channel thumbnail view 2020-01-09 17:35:10 +01:00
Akinwale Ariwodola f1aafd6e34 unified display of channel results (#108)
* unified display of channel results
* add autoStyle to thumbnail container
* move common shared methods to helper
* change Image to FastImage in list views
2020-01-09 17:19:30 +01:00
Akinwale Ariwodola 1ce5fad8c0 allow scrolling for displaying more search results (#110)
* allow scrolling for displaying more search results
* add search page size constant
* use default page size. fix typo.
2020-01-09 16:49:14 +01:00
Akinwale Ariwodola 4690451bfe change default page size to 20 2020-01-09 16:46:08 +01:00
Akinwale Ariwodola b149c0039a update fontFamily definitions 2020-01-09 15:43:36 +01:00
Akinwale Ariwodola e97bf7ce79 cleanup: remove unused function 2020-01-09 04:43:09 +01:00
Akinwale Ariwodola 8c79115ce0 update input cursor position on press when the uri bar focused 2020-01-09 04:42:06 +01:00
Akinwale Ariwodola 24fa80d92a open links displayed in the embedded webview on the device browser 2020-01-09 04:29:48 +01:00
Akinwale Ariwodola 624d95ab42 Merge pull request #109 from lbryio/better-markdown-display
improve markdown display
2020-01-08 22:03:38 +01:00
67 changed files with 845 additions and 597 deletions

No files matched your search

+5 -18
View File
@@ -7067,8 +7067,8 @@
}
},
"lbry-redux": {
"version": "github:lbryio/lbry-redux#e8f29f1c47b136669df265babb109d2488a37db0",
"from": "github:lbryio/lbry-redux#e8f29f1c47b136669df265babb109d2488a37db0",
"version": "github:lbryio/lbry-redux#c910cd2b80b165843a81fdf6ce96094429b94ec8",
"from": "github:lbryio/lbry-redux#c910cd2b80b165843a81fdf6ce96094429b94ec8",
"requires": {
"proxy-polyfill": "0.1.6",
"reselect": "^3.0.0",
@@ -10136,22 +10136,9 @@
}
},
"react-navigation-drawer": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/react-navigation-drawer/-/react-navigation-drawer-1.4.0.tgz",
"integrity": "sha512-ZyWBozcjB2aZ7vwCALv90cYA2NpDjM+WALaiYRshvPvue8l7cqynePbHK8GhlMGyJDwZqp4MxQmu8u1XAKp3Bw==",
"requires": {
"react-native-tab-view": "^1.2.0"
},
"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"
}
}
}
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/react-navigation-drawer/-/react-navigation-drawer-2.3.3.tgz",
"integrity": "sha512-d/rA8Slqv7HoMfONKVDBQUrRF7YQH796Gzal/KOhaY4VOwUUqIwfxMRJ3WrsdL2OkDPixtkXJE2Fz6KAj658uA=="
},
"react-navigation-redux-helpers": {
"version": "3.0.2",
+2 -2
View File
@@ -12,7 +12,7 @@
"base-64": "^0.1.0",
"@expo/vector-icons": "^8.1.0",
"gfycat-style-urls": "^1.0.3",
"lbry-redux": "lbryio/lbry-redux#e8f29f1c47b136669df265babb109d2488a37db0",
"lbry-redux": "lbryio/lbry-redux#c910cd2b80b165843a81fdf6ce96094429b94ec8",
"lbryinc": "lbryio/lbryinc#053ca52f4f7f9bf8eb62a3581b183671a475ad1c",
"lodash": ">=4.17.11",
"merge": ">=1.2.1",
@@ -38,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": "^1.4.0",
"react-navigation-drawer": "^2.3.3",
"react-navigation-redux-helpers": "^3.0.2",
"react-navigation-tabs": "^2.7.0",
"react-navigation-stack": "^1.10.3",
+1 -1
View File
@@ -225,7 +225,7 @@ const drawer = createDrawerNavigator(
},
},
{
drawerWidth: 300,
drawerWidth: 299,
drawerBackgroundColor: 'transparent',
headerMode: 'none',
backBehavior: 'none',
+1 -1
View File
@@ -51,7 +51,7 @@ export default class ChannelIconItem extends React.PureComponent {
<TouchableOpacity style={channelIconStyle.container} onPress={onPress}>
{isResolvingUri && (
<View style={channelIconStyle.centered}>
<ActivityIndicator size={'small'} color={Colors.LbryGreen} />
<ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />
</View>
)}
<View
+2 -2
View File
@@ -191,7 +191,7 @@ export default class ChannelSelector extends React.PureComponent {
const channel = this.state.addingChannel ? 'new' : this.props.channel;
const { balance, enabled, fetchingChannels, channels = [] } = this.props;
const pickerItems = [Constants.ITEM_ANONYMOUS, Constants.ITEM_CREATE_A_CHANNEL].concat(
channels ? channels.map(ch => ch.name) : []
channels ? channels.map(ch => ch.name) : [],
);
const {
@@ -264,7 +264,7 @@ export default class ChannelSelector extends React.PureComponent {
</Text>
<View style={channelSelectorStyle.buttonContainer}>
{creatingChannel && <ActivityIndicator size={'small'} color={Colors.LbryGreen} />}
{creatingChannel && <ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />}
{!creatingChannel && (
<View style={channelSelectorStyle.buttons}>
<Link style={channelSelectorStyle.cancelLink} text={__('Cancel')} onPress={this.handleCreateCancel} />
@@ -10,9 +10,10 @@ 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 FileResultItem from './view';
import ClaimResultItem from './view';
const select = (state, props) => ({
blackListedOutpoints: selectBlackListedOutpoints(state),
@@ -32,9 +33,10 @@ const select = (state, props) => ({
const perform = dispatch => ({
resolveUri: uri => dispatch(doResolveUri(uri)),
setPlayerVisible: (visible, uri) => dispatch(doSetPlayerVisible(visible, uri)),
});
export default connect(
select,
perform,
)(FileResultItem);
)(ClaimResultItem);
+176
View File
@@ -0,0 +1,176 @@
import React from 'react';
import { normalizeURI, parseURI } from 'lbry-redux';
import { ActivityIndicator, Platform, Text, TouchableOpacity, View } from 'react-native';
import { navigateToUri, getDownloadProgress, getStorageForFileInfo } from 'utils/helper';
import Colors from 'styles/colors';
import ChannelIconItem from 'component/channelIconItem';
import channelIconStyle from 'styles/channelIcon';
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
import DateTime from 'component/dateTime';
import FastImage from 'react-native-fast-image';
import FileItemMedia from 'component/fileItemMedia';
import FilePrice from 'component/filePrice';
import Icon from 'react-native-vector-icons/FontAwesome5';
import Link from 'component/link';
import NsfwOverlay from 'component/nsfwOverlay';
import ProgressBar from 'component/progressBar';
import fileListStyle from 'styles/fileList';
import seedrandom from 'seedrandom';
class ClaimResultItem extends React.PureComponent {
state = {
autoStyle: null,
};
componentDidMount() {
const { result } = this.props;
if (!result || !result.name || !result.claimId) {
this.setState({
autoStyle:
ChannelIconItem.AUTO_THUMB_STYLES[Math.floor(Math.random() * ChannelIconItem.AUTO_THUMB_STYLES.length)],
});
} else {
// result property set, use deterministic random style
const rng = seedrandom(normalizeURI(`${result.name}#${result.claimId}`));
const index = Math.floor(rng.quick() * ChannelIconItem.AUTO_THUMB_STYLES.length);
this.setState({ autoStyle: ChannelIconItem.AUTO_THUMB_STYLES[index] });
}
}
onPressHandler = () => {
const { autoplay, navigation, result, setPlayerVisible } = this.props;
const { claimId, name } = result;
const url = normalizeURI(`${name}#${claimId}`);
navigateToUri(navigation, url, { autoplay }, false, url, setPlayerVisible);
};
render() {
const { fileInfo, navigation, obscureNsfw, result, rewardedContentClaimIds, setPlayerVisible, style } = this.props;
const {
channel,
channel_claim_id: channelClaimId,
claimId,
duration,
fee,
name,
nsfw,
release_time: releaseTime,
thumbnail_url: thumbnailUrl,
title,
} = result;
const isChannel = name && name.startsWith('@');
const hasThumbnail = !!thumbnailUrl;
const obscure = obscureNsfw && nsfw;
const url = normalizeURI(`${name}#${claimId}`);
const hasChannel = !!channel;
const channelUrl = hasChannel ? normalizeURI(`${channel}#${channelClaimId}`) : null;
const isRewardContent = rewardedContentClaimIds.includes(claimId);
return (
<View style={style}>
<TouchableOpacity
style={[style, isChannel ? fileListStyle.channelContainer : null]}
onPress={this.onPressHandler}
>
{!isChannel && (
<FileItemMedia
style={fileListStyle.thumbnail}
duration={duration}
resizeMode="cover"
title={title || name || normalizeURI(url).substring(7)}
thumbnail={thumbnailUrl}
/>
)}
{isChannel && (
<View style={fileListStyle.channelThumbnailView}>
<View style={[fileListStyle.channelThumbnailContainer, this.state.autoStyle]}>
{hasThumbnail && (
<FastImage
style={fileListStyle.channelThumbnail}
resizeMode={FastImage.resizeMode.cover}
source={{ uri: thumbnailUrl }}
/>
)}
{!hasThumbnail && (
<Text style={channelIconStyle.autothumbCharacter}>
{title ? title.substring(0, 1).toUpperCase() : name.substring(1, 2).toUpperCase()}
</Text>
)}
</View>
</View>
)}
{fileInfo && fileInfo.completed && fileInfo.download_path && (
<Icon style={fileListStyle.downloadedIcon} solid color={Colors.NextLbryGreen} name={'folder'} size={16} />
)}
<FilePrice
cost={fee ? parseFloat(fee) / 100000000 : 0}
uri={url}
style={fileListStyle.filePriceContainer}
iconStyle={fileListStyle.filePriceIcon}
textStyle={fileListStyle.filePriceText}
/>
<View style={fileListStyle.detailsContainer}>
{(title || name) && (
<View style={fileListStyle.titleContainer}>
<Text style={fileListStyle.title} numberOfLines={3}>
{title || name}
</Text>
{isRewardContent && <Icon style={fileListStyle.rewardIcon} name="award" size={12} />}
</View>
)}
{(hasChannel || isChannel) && (
<Link
style={fileListStyle.publisher}
text={isChannel ? name : channel}
onPress={() => {
navigateToUri(
navigation,
normalizeURI(isChannel ? url : channelUrl),
null,
false,
isChannel ? url : channelUrl,
setPlayerVisible,
);
}}
/>
)}
<View style={fileListStyle.info}>
{fileInfo && !isNaN(fileInfo.written_bytes) && fileInfo.written_bytes > 0 && (
<Text style={fileListStyle.infoText}>{getStorageForFileInfo(fileInfo)}</Text>
)}
<DateTime
style={fileListStyle.publishInfo}
textStyle={fileListStyle.infoText}
timeAgo
date={releaseTime}
/>
</View>
{fileInfo && fileInfo.download_path && (
<View style={fileListStyle.downloadInfo}>
{!fileInfo.completed && (
<ProgressBar
borderRadius={3}
color={Colors.NextLbryGreen}
height={3}
style={fileListStyle.progress}
progress={getDownloadProgress(fileInfo)}
/>
)}
</View>
)}
</View>
</TouchableOpacity>
{obscure && <NsfwOverlay onPress={() => navigation.navigate({ routeName: 'Settings', key: 'settingsPage' })} />}
</View>
);
}
}
export default ClaimResultItem;
+3 -1
View File
@@ -10,6 +10,7 @@ import {
makeSelectClaimIsNsfw,
makeSelectShortUrlForUri,
} from 'lbry-redux';
import { doSetPlayerVisible } from 'redux/actions/drawer';
import { selectBlackListedOutpoints, selectFilteredOutpoints, selectRewardContentClaimIds } from 'lbryinc';
import { selectShowNsfw } from 'redux/selectors/settings';
import FileItem from './view';
@@ -31,9 +32,10 @@ const select = (state, props) => ({
const perform = dispatch => ({
resolveUri: uri => dispatch(doResolveUri(uri)),
setPlayerVisible: (visible, uri) => dispatch(doSetPlayerVisible(visible, uri)),
});
export default connect(
select,
perform
perform,
)(FileItem);
+2
View File
@@ -56,6 +56,7 @@ class FileItem extends React.PureComponent {
obscureNsfw,
showDetails,
compactView,
setPlayerVisible,
titleBeforeThumbnail,
} = this.props;
@@ -135,6 +136,7 @@ class FileItem extends React.PureComponent {
null,
false,
fullChannelUri,
setPlayerVisible,
);
}}
/>
+2
View File
@@ -10,6 +10,7 @@ import {
makeSelectTitleForUri,
makeSelectThumbnailForUri,
} from 'lbry-redux';
import { doSetPlayerVisible } from 'redux/actions/drawer';
import { selectBlackListedOutpoints, selectFilteredOutpoints, selectRewardContentClaimIds } from 'lbryinc';
import { selectShowNsfw } from 'redux/selectors/settings';
import FileListItem from './view';
@@ -32,6 +33,7 @@ const select = (state, props) => ({
const perform = dispatch => ({
resolveUri: uri => dispatch(doResolveUri(uri)),
setPlayerVisible: (visible, uri) => dispatch(doSetPlayerVisible(visible, uri)),
});
export default connect(
+56 -35
View File
@@ -1,10 +1,13 @@
import React from 'react';
import { normalizeURI, parseURI } from 'lbry-redux';
import { ActivityIndicator, Platform, Text, TouchableOpacity, View } from 'react-native';
import { navigateToUri, formatBytes } from 'utils/helper';
import { navigateToUri, getDownloadProgress, getStorageForFileInfo } from 'utils/helper';
import Colors from 'styles/colors';
import ChannelIconItem from 'component/channelIconItem';
import channelIconStyle from 'styles/channelIcon';
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
import DateTime from 'component/dateTime';
import FastImage from 'react-native-fast-image';
import FileItemMedia from 'component/fileItemMedia';
import FilePrice from 'component/filePrice';
import Icon from 'react-native-vector-icons/FontAwesome5';
@@ -15,27 +18,10 @@ import fileListStyle from 'styles/fileList';
class FileListItem extends React.PureComponent {
state = {
autoStyle: null,
url: null,
};
getStorageForFileInfo = fileInfo => {
if (!fileInfo.completed) {
const written = formatBytes(fileInfo.written_bytes);
const total = formatBytes(fileInfo.total_bytes);
return `(${written} / ${total})`;
}
return formatBytes(fileInfo.written_bytes);
};
formatTitle = title => {
if (!title) {
return title;
}
return title.length > 80 ? title.substring(0, 77).trim() + '...' : title;
};
getDownloadProgress = fileInfo => {
return Math.ceil((fileInfo.written_bytes / fileInfo.total_bytes) * 100);
};
@@ -45,6 +31,11 @@ class FileListItem extends React.PureComponent {
if (!claim && !batchResolve) {
resolveUri(uri);
}
this.setState({
autoStyle:
ChannelIconItem.AUTO_THUMB_STYLES[Math.floor(Math.random() * ChannelIconItem.AUTO_THUMB_STYLES.length)],
});
}
componentDidUpdate() {
@@ -89,6 +80,7 @@ class FileListItem extends React.PureComponent {
onPress,
navigation,
rewardedContentClaimIds,
setPlayerVisible,
thumbnail,
hideChannel,
onLongPress,
@@ -135,10 +127,13 @@ class FileListItem extends React.PureComponent {
return null;
}
const isChannel = name && name.startsWith('@');
const hasThumbnail = !!thumbnail;
return (
<View style={style}>
<TouchableOpacity
style={style}
style={[style, isChannel ? fileListStyle.channelContainer : null]}
onPress={this.onPressHandler}
onLongPress={() => {
if (onLongPress) {
@@ -146,13 +141,35 @@ class FileListItem extends React.PureComponent {
}
}}
>
<FileItemMedia
style={fileListStyle.thumbnail}
duration={duration}
resizeMode="cover"
title={title || name || normalizeURI(uri).substring(7)}
thumbnail={thumbnail}
/>
{!isChannel && (
<FileItemMedia
style={fileListStyle.thumbnail}
duration={duration}
resizeMode="cover"
title={title || name || normalizeURI(uri).substring(7)}
thumbnail={thumbnail}
/>
)}
{isChannel && (
<View style={fileListStyle.channelThumbnailView}>
<View style={[fileListStyle.channelThumbnailContainer, this.state.autoStyle]}>
{hasThumbnail && (
<FastImage
style={fileListStyle.channelThumbnail}
resizeMode={FastImage.resizeMode.cover}
source={{ uri: thumbnail }}
/>
)}
{!hasThumbnail && (
<Text style={channelIconStyle.autothumbCharacter}>
{title ? title.substring(0, 1).toUpperCase() : claim.name.substring(1, 2).toUpperCase()}
</Text>
)}
</View>
</View>
)}
{selected && (
<View style={fileListStyle.selectedOverlay}>
<Icon name={'check-circle'} solid color={Colors.NextLbryGreen} size={32} />
@@ -193,8 +210,11 @@ class FileListItem extends React.PureComponent {
{(title || name) && (
<View style={fileListStyle.titleContainer}>
<Text style={featuredResult ? fileListStyle.featuredTitle : fileListStyle.title}>
{this.formatTitle(title) || this.formatTitle(name)}
<Text
style={featuredResult ? fileListStyle.featuredTitle : fileListStyle.title}
numberOfLines={hideChannel ? 4 : 3}
>
{title || name}
</Text>
{isRewardContent && <Icon style={fileListStyle.rewardIcon} name="award" size={12} />}
</View>
@@ -206,17 +226,18 @@ class FileListItem extends React.PureComponent {
</View>
)}
{channel && !hideChannel && (
{(channel || isChannel) && !hideChannel && (
<Link
style={fileListStyle.publisher}
text={channel}
text={isChannel ? name : channel}
onPress={() => {
navigateToUri(
navigation,
normalizeURI(shortChannelUri || fullChannelUri),
normalizeURI(isChannel ? uri : shortChannelUri || fullChannelUri),
null,
false,
fullChannelUri,
isChannel ? claim && claim.permanent_url : fullChannelUri,
setPlayerVisible,
);
}}
/>
@@ -224,7 +245,7 @@ class FileListItem extends React.PureComponent {
<View style={fileListStyle.info}>
{fileInfo && !isNaN(fileInfo.written_bytes) && fileInfo.written_bytes > 0 && (
<Text style={fileListStyle.infoText}>{this.getStorageForFileInfo(fileInfo)}</Text>
<Text style={fileListStyle.infoText}>{getStorageForFileInfo(fileInfo)}</Text>
)}
<DateTime style={fileListStyle.publishInfo} textStyle={fileListStyle.infoText} timeAgo uri={uri} />
</View>
@@ -237,7 +258,7 @@ class FileListItem extends React.PureComponent {
color={Colors.NextLbryGreen}
height={3}
style={fileListStyle.progress}
progress={this.getDownloadProgress(fileInfo)}
progress={getDownloadProgress(fileInfo)}
/>
)}
</View>
-146
View File
@@ -1,146 +0,0 @@
import React from 'react';
import { normalizeURI, parseURI } from 'lbry-redux';
import { ActivityIndicator, Platform, Text, TouchableOpacity, View } from 'react-native';
import { navigateToUri, formatBytes } from 'utils/helper';
import Colors from 'styles/colors';
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
import DateTime from 'component/dateTime';
import FileItemMedia from 'component/fileItemMedia';
import FilePrice from 'component/filePrice';
import Icon from 'react-native-vector-icons/FontAwesome5';
import Link from 'component/link';
import NsfwOverlay from 'component/nsfwOverlay';
import ProgressBar from 'component/progressBar';
import fileListStyle from 'styles/fileList';
class FileResultItem extends React.PureComponent {
getStorageForFileInfo = fileInfo => {
if (!fileInfo.completed) {
const written = formatBytes(fileInfo.written_bytes);
const total = formatBytes(fileInfo.total_bytes);
return `(${written} / ${total})`;
}
return formatBytes(fileInfo.written_bytes);
};
formatTitle = title => {
if (!title) {
return title;
}
return title.length > 80 ? title.substring(0, 77).trim() + '...' : title;
};
getDownloadProgress = fileInfo => {
return Math.ceil((fileInfo.written_bytes / fileInfo.total_bytes) * 100);
};
onPressHandler = () => {
const { autoplay, navigation, result } = this.props;
const { claimId, name } = result;
const url = normalizeURI(`${name}#${claimId}`);
navigateToUri(navigation, url, { autoplay }, false, url);
};
render() {
const { featuredResult, fileInfo, navigation, obscureNsfw, result, rewardedContentClaimIds, style } = this.props;
const {
channel,
channel_claim_id: channelClaimId,
claimId,
duration,
fee,
name,
nsfw,
release_time: releaseTime,
thumbnail_url: thumbnailUrl,
title,
} = result;
const obscure = obscureNsfw && nsfw;
const url = normalizeURI(`${name}#${claimId}`);
const hasChannel = !!channel;
const channelUrl = channel ? normalizeURI(`${channel}#${channelClaimId}`) : null;
const isRewardContent = rewardedContentClaimIds.includes(claimId);
return (
<View style={style}>
<TouchableOpacity style={style} onPress={this.onPressHandler}>
<FileItemMedia
style={fileListStyle.thumbnail}
duration={duration}
resizeMode="cover"
title={title || name || normalizeURI(url).substring(7)}
thumbnail={thumbnailUrl}
/>
{fileInfo && fileInfo.completed && fileInfo.download_path && (
<Icon
style={featuredResult ? fileListStyle.featuredDownloadedIcon : fileListStyle.downloadedIcon}
solid
color={Colors.NextLbryGreen}
name={'folder'}
size={16}
/>
)}
<FilePrice
cost={fee ? parseFloat(fee) / 100000000 : 0}
uri={url}
style={fileListStyle.filePriceContainer}
iconStyle={fileListStyle.filePriceIcon}
textStyle={fileListStyle.filePriceText}
/>
<View style={fileListStyle.detailsContainer}>
{(title || name) && (
<View style={fileListStyle.titleContainer}>
<Text style={featuredResult ? fileListStyle.featuredTitle : fileListStyle.title}>
{this.formatTitle(title) || this.formatTitle(name)}
</Text>
{isRewardContent && <Icon style={fileListStyle.rewardIcon} name="award" size={12} />}
</View>
)}
{hasChannel && (
<Link
style={fileListStyle.publisher}
text={channel}
onPress={() => {
navigateToUri(navigation, normalizeURI(channelUrl), null, false, channelUrl);
}}
/>
)}
<View style={fileListStyle.info}>
{fileInfo && !isNaN(fileInfo.written_bytes) && fileInfo.written_bytes > 0 && (
<Text>{this.getStorageForFileInfo(fileInfo)}</Text>
)}
<DateTime
style={fileListStyle.publishInfo}
textStyle={fileListStyle.infoText}
timeAgo
date={releaseTime}
/>
</View>
{fileInfo && fileInfo.download_path && (
<View style={fileListStyle.downloadInfo}>
{!fileInfo.completed && (
<ProgressBar
borderRadius={3}
color={Colors.NextLbryGreen}
height={3}
style={fileListStyle.progress}
progress={this.getDownloadProgress(fileInfo)}
/>
)}
</View>
)}
</View>
</TouchableOpacity>
{obscure && <NsfwOverlay onPress={() => navigation.navigate({ routeName: 'Settings', key: 'settingsPage' })} />}
</View>
);
}
}
export default FileResultItem;
+2 -1
View File
@@ -421,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,
);
}
@@ -440,6 +440,7 @@ class MediaPlayer extends React.PureComponent {
}}
resizeMode={this.state.resizeMode}
playInBackground={this.state.backgroundPlayEnabled}
playWhenInactive={this.state.backgroundPlayEnabled}
style={mediaPlayerStyle.player}
rate={this.state.rate}
volume={this.state.volume}
+3 -2
View File
@@ -4,7 +4,7 @@ import { normalizeURI } from 'lbry-redux';
import { navigateToUri } from 'utils/helper';
import Colors from 'styles/colors';
import FileListItem from 'component/fileListItem';
import FileResultItem from 'component/fileResultItem';
import ClaimResultItem from 'component/claimResultItem';
import fileListStyle from 'styles/fileList';
import relatedContentStyle from 'styles/relatedContent';
@@ -30,8 +30,9 @@ export default class RelatedContent extends React.PureComponent {
{isSearching && <ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />}
{recommendedContent &&
recommendedContent.map(result => (
<FileResultItem
<ClaimResultItem
style={fileListStyle.item}
uri={result ? normalizeURI(`${result.name}#${result.claimId}`) : null}
key={result.claimId}
result={result}
navigation={navigation}
@@ -3,6 +3,8 @@ import { buildURI, normalizeURI } from 'lbry-redux';
import { ActivityIndicator, FlatList, Image, Text, View } from 'react-native';
import { navigateToUri } from 'utils/helper';
import Colors from 'styles/colors';
import ChannelIconItem from 'component/channelIconItem';
import channelIconStyle from 'styles/channelIcon';
import discoverStyle from 'styles/discover';
import FileItem from 'component/fileItem';
import SubscribeButton from 'component/subscribeButton';
@@ -11,11 +13,20 @@ import Link from 'component/link';
import Tag from 'component/tag';
class SuggestedSubscriptionItem extends React.PureComponent {
state = {
autoStyle: null,
};
componentDidMount() {
const { claim, uri, resolveUri } = this.props;
if (!claim) {
resolveUri(uri);
}
this.setState({
autoStyle:
ChannelIconItem.AUTO_THUMB_STYLES[Math.floor(Math.random() * ChannelIconItem.AUTO_THUMB_STYLES.length)],
});
}
render() {
@@ -28,22 +39,26 @@ class SuggestedSubscriptionItem extends React.PureComponent {
}
}
const hasThumbnail = !!thumbnail;
if (isResolvingUri) {
return (
<View style={subscriptionsStyle.itemLoadingContainer}>
<ActivityIndicator size={'small'} color={Colors.LbryGreen} />
<ActivityIndicator size={'small'} color={Colors.NextLbryGreen} />
</View>
);
}
return (
<View style={subscriptionsStyle.suggestedItem}>
<View style={subscriptionsStyle.suggestedItemThumbnailContainer}>
<Image
style={subscriptionsStyle.suggestedItemThumbnail}
resizeMode={'cover'}
source={thumbnail ? { uri: thumbnail } : require('../../assets/default_avatar.jpg')}
/>
<View style={[subscriptionsStyle.suggestedItemThumbnailContainer, this.state.autoStyle]}>
{hasThumbnail && (
<Image style={subscriptionsStyle.suggestedItemThumbnail} resizeMode={'cover'} source={{ uri: thumbnail }} />
)}
{!hasThumbnail && (
<Text style={channelIconStyle.autothumbCharacter}>
{title ? title.substring(0, 1).toUpperCase() : claim ? claim.name.substring(1, 2).toUpperCase() : ''}
</Text>
)}
</View>
<View style={subscriptionsStyle.suggestedItemDetails}>
+3 -1
View File
@@ -6,6 +6,7 @@ import {
selectSearchSuggestions,
SETTINGS,
} from 'lbry-redux';
import { doSetPlayerVisible } from 'redux/actions/drawer';
import { selectCurrentRoute } from 'redux/selectors/drawer';
import { makeSelectClientSetting } from 'redux/selectors/settings';
import UriBar from './view';
@@ -24,9 +25,10 @@ const select = state => {
const perform = dispatch => ({
updateSearchQuery: query => dispatch(doUpdateSearchQuery(query)),
setPlayerVisible: (visible, uri) => dispatch(doSetPlayerVisible(visible, uri)),
});
export default connect(
select,
perform
perform,
)(UriBar);
+11 -8
View File
@@ -83,7 +83,7 @@ class UriBar extends React.PureComponent {
};
handleItemPress = item => {
const { navigation, onSearchSubmitted, updateSearchQuery } = this.props;
const { navigation, onSearchSubmitted, setPlayerVisible, 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);
navigateToUri(navigation, uri, null, false, null, setPlayerVisible);
}
};
@@ -128,7 +128,7 @@ class UriBar extends React.PureComponent {
};
handleSubmitEditing = () => {
const { navigation, onSearchSubmitted, updateSearchQuery } = this.props;
const { navigation, onSearchSubmitted, setPlayerVisible, updateSearchQuery } = this.props;
if (this.state.inputText) {
let inputText = this.state.inputText,
inputTextIsUrl = false;
@@ -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);
navigateToUri(navigation, transformedUrl, null, false, null, setPlayerVisible);
}
}
@@ -170,6 +170,12 @@ class UriBar extends React.PureComponent {
);
};
handleTouchStart = () => {
if (this.state.focused) {
this.setState({ selection: null });
}
};
handleBlur = () => {
this.setState({
focused: false,
@@ -177,10 +183,6 @@ class UriBar extends React.PureComponent {
});
};
onSearchPageBlurred() {
this.setState({ currenValueSet: false });
}
render() {
const {
allowEdit,
@@ -268,6 +270,7 @@ class UriBar extends React.PureComponent {
ref={ref => {
this.textInput = ref;
}}
onTouchStart={this.handleTouchStart}
autoCorrect={false}
style={uriBarStyle.uriText}
selection={this.state.selection}
+1 -1
View File
@@ -134,7 +134,7 @@ const Constants = {
ORDER_BY_EFFECTIVE_AMOUNT: 'effective_amount',
DEFAULT_PAGE_SIZE: 10,
DEFAULT_PAGE_SIZE: 20,
ALL_PLACEHOLDER: '_all',
+3 -2
View File
@@ -21,6 +21,7 @@ import ChannelRewardsDriver from 'component/channelRewardsDriver';
import Colors from 'styles/colors';
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
import EmptyStateView from 'component/emptyStateView';
import FastImage from 'react-native-fast-image';
import FloatingWalletBalance from 'component/floatingWalletBalance';
import Icon from 'react-native-vector-icons/FontAwesome5';
import Link from 'component/link';
@@ -867,9 +868,9 @@ export default class ChannelCreator extends React.PureComponent {
>
<View style={[channelCreatorStyle.channelListAvatar, itemAutoStyle]}>
{itemThumbnailUrl && (
<Image
<FastImage
style={channelCreatorStyle.avatarImage}
resizeMode={'cover'}
resizeMode={FastImage.resizeMode.cover}
source={{ uri: itemThumbnailUrl }}
/>
)}
+3 -2
View File
@@ -11,7 +11,7 @@ import {
selectSubscriptionClaims,
selectUnreadSubscriptions,
} from 'lbryinc';
import { doPushDrawerStack } from 'redux/actions/drawer';
import { doPushDrawerStack, doSetPlayerVisible } from 'redux/actions/drawer';
import { doSetClientSetting, doSetSortByItem, doSetTimeItem } from 'redux/actions/settings';
import { makeSelectClientSetting, selectSortByItem, selectTimeItem } from 'redux/selectors/settings';
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
@@ -41,11 +41,12 @@ const perform = dispatch => ({
pushDrawerStack: () => dispatch(doPushDrawerStack(Constants.DRAWER_ROUTE_DISCOVER)),
removeUnreadSubscriptions: () => dispatch(doRemoveUnreadSubscriptions()),
setClientSetting: (key, value) => dispatch(doSetClientSetting(key, value)),
setPlayerVisible: () => dispatch(doSetPlayerVisible(false)),
setSortByItem: item => dispatch(doSetSortByItem(item)),
setTimeItem: item => dispatch(doSetTimeItem(item)),
});
export default connect(
select,
perform
perform,
)(DiscoverPage);
+5 -3
View File
@@ -86,9 +86,11 @@ class DiscoverPage extends React.PureComponent {
}
onComponentFocused = () => {
const { pushDrawerStack } = this.props;
const { pushDrawerStack, setPlayerVisible } = this.props;
// pushDrawerStack();
NativeModules.Firebase.setCurrentScreen('Your tags');
setPlayerVisible();
};
handleSortByItemSelected = item => {
@@ -135,7 +137,7 @@ class DiscoverPage extends React.PureComponent {
Alert.alert(
__('Enjoying LBRY?'),
__(
'Are you enjoying your experience with the LBRY app? You can leave a review for us on the Play Store.'
'Are you enjoying your experience with the LBRY app? You can leave a review for us on the Play Store.',
),
[
{
@@ -151,7 +153,7 @@ class DiscoverPage extends React.PureComponent {
},
},
],
{ cancelable: false }
{ cancelable: false },
);
}
}
+3 -3
View File
@@ -79,7 +79,7 @@ class DownloadsPage extends React.PureComponent {
const { claims, fileInfos } = this.props;
const claimUris = claims.map(claim => normalizeURI(`${claim.name}#${claim.claim_id}`));
return fileInfos.filter(
fileInfo => !claimUris.includes(normalizeURI(`${fileInfo.claim_name}#${fileInfo.claim_id}`))
fileInfo => !claimUris.includes(normalizeURI(`${fileInfo.claim_name}#${fileInfo.claim_id}`)),
);
};
@@ -135,7 +135,7 @@ class DownloadsPage extends React.PureComponent {
],
{
cancelable: true,
}
},
);
};
@@ -184,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 });
navigateToUri(navigation, item, { autoplay: true }, false, null);
}
}}
onLongPress={claim => this.handleItemLongPress(item, claim)}
+3 -2
View File
@@ -41,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 } from 'redux/selectors/drawer';
import { selectDrawerStack, makeSelectPlayerVisible } from 'redux/selectors/drawer';
import FilePage from './view';
const select = (state, props) => {
@@ -61,6 +61,7 @@ const select = (state, props) => {
fileInfo: makeSelectFileInfoForUri(contentUri)(state),
rewardedContentClaimIds: selectRewardContentClaimIds(state, selectProps),
channelUri: makeSelectChannelForClaimUri(contentUri, true)(state),
isPlayerVisible: makeSelectPlayerVisible(uri)(state), // use navigation uri for this selector
position: makeSelectContentPositionForUri(contentUri)(state),
purchasedUris: selectPurchasedUris(state),
failedPurchaseUris: selectFailedPurchaseUris(state),
@@ -95,7 +96,7 @@ const perform = dispatch => ({
resolveUris: uris => dispatch(doResolveUris(uris)),
sendTip: (amount, claimId, isSupport, successCallback, errorCallback) =>
dispatch(doSendTip(amount, claimId, isSupport, successCallback, errorCallback)),
setPlayerVisible: () => dispatch(doSetPlayerVisible(true)),
setPlayerVisible: (visible, uri) => dispatch(doSetPlayerVisible(visible, uri)),
stopDownload: (uri, fileInfo) => dispatch(doStopDownloadingFile(uri, fileInfo)),
toggleFullscreenMode: mode => dispatch(doToggleFullscreenMode(mode)),
});
+102 -66
View File
@@ -9,6 +9,7 @@ import {
Image,
Linking,
NativeModules,
Platform,
ScrollView,
StatusBar,
StyleSheet,
@@ -64,6 +65,10 @@ 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 = {
@@ -89,6 +94,7 @@ class FilePage extends React.PureComponent {
showImageViewer: false,
showWebView: false,
showTipView: false,
playbackStarted: false,
playerBgHeight: 0,
playerHeight: 0,
uri: null,
@@ -109,8 +115,9 @@ class FilePage extends React.PureComponent {
onComponentFocused = () => {
StatusBar.setHidden(false);
console.log('fileComponent Focused...');
NativeModules.Firebase.setCurrentScreen('File').then(result => {
const { setPlayerVisible } = this.props;
DeviceEventEmitter.addListener('onStoragePermissionGranted', this.handleStoragePermissionGranted);
DeviceEventEmitter.addListener('onStoragePermissionRefused', this.handleStoragePermissionRefused);
@@ -118,6 +125,7 @@ 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);
@@ -158,7 +166,6 @@ class FilePage extends React.PureComponent {
notify,
drawerStack: prevDrawerStack,
} = this.props;
const { uri } = navigation.state.params;
const {
currentRoute: prevRoute,
failedPurchaseUris,
@@ -169,6 +176,7 @@ class FilePage extends React.PureComponent {
drawerStack,
resolveUris,
} = nextProps;
const uri = this.getPurchaseUrl();
if (Constants.ROUTE_FILE === currentRoute && currentRoute !== prevRoute) {
this.onComponentFocused();
@@ -182,7 +190,7 @@ class FilePage extends React.PureComponent {
if (purchaseUriErrorMessage && purchaseUriErrorMessage.trim().length > 0) {
notify({ message: purchaseUriErrorMessage, isError: true });
}
this.setState({ downloadPressed: false, fileViewLogged: false, mediaLoaded: false });
this.setState({ downloadPressed: false, fileViewLogged: false, mediaLoaded: false, showRecommended: true });
}
const mediaType = Lbry.getMediaType(contentType);
@@ -202,7 +210,7 @@ class FilePage extends React.PureComponent {
NativeModules.UtilityModule.checkDownloads();
}
if (!this.state.streamingMode && isPlayable) {
if ((!fileInfo || (fileInfo && !fileInfo.completed)) && !this.state.streamingMode && isPlayable) {
if (streamingUrl) {
this.setState({ streamingMode: true, currentStreamUrl: streamingUrl });
} else if (fileInfo && fileInfo.streaming_url) {
@@ -227,6 +235,9 @@ class FilePage extends React.PureComponent {
}
shouldComponentUpdate(nextProps, nextState) {
const { fileInfo: prevFileInfo } = this.props;
const { fileInfo } = nextProps;
return (
Object.keys(this.difference(nextProps, this.props)).length > 0 ||
Object.keys(this.difference(nextState, this.state)).length > 0
@@ -258,7 +269,7 @@ class FilePage extends React.PureComponent {
this.setState({ autoGetAttempted: true }, () => this.checkStoragePermissionForDownload());
}
if (((costInfo && costInfo.cost > 0) || !isPlayable) && !this.state.showRecommended) {
if (((costInfo && costInfo.cost > 0) || !isPlayable) && (!fileInfo && !isViewable) && !this.state.showRecommended) {
this.setState({ showRecommended: true });
}
@@ -295,8 +306,6 @@ class FilePage extends React.PureComponent {
handleFullscreenToggle = isFullscreen => {
const { toggleFullscreenMode } = this.props;
this.setState({ fullscreenMode: isFullscreen });
toggleFullscreenMode(isFullscreen);
if (isFullscreen) {
@@ -313,6 +322,7 @@ class FilePage extends React.PureComponent {
NativeModules.UtilityModule.showNavigationBar();
}
this.setState({ fullscreenMode: isFullscreen });
StatusBar.setHidden(isFullscreen);
};
@@ -365,14 +375,14 @@ 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 } = navigation.state.params;
const uri = this.getPurchaseUrl();
stopDownload(uri, fileInfo);
deletePurchasedUri(uri);
if (NativeModules.UtilityModule) {
@@ -388,7 +398,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.'),
});
},
},
@@ -413,8 +423,6 @@ class FilePage extends React.PureComponent {
if (window.currentMediaInfo) {
window.currentMediaInfo = null;
}
window.player = null;
DeviceEventEmitter.removeListener('onStoragePermissionGranted', this.handleStoragePermissionGranted);
DeviceEventEmitter.removeListener('onStoragePermissionRefused', this.handleStoragePermissionRefused);
}
@@ -431,7 +439,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 });
});
});
};
@@ -449,12 +457,14 @@ 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 (fileInfo && fileInfo.download_path) {
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
return this.getEncodedDownloadPath(fileInfo);
}
if (streamingUrl) {
@@ -561,7 +571,7 @@ class FilePage extends React.PureComponent {
NativeModules.Firebase.track('play', payload);
// only fetch recommended content after playback has started
this.setState({ showRecommended: true });
this.setState({ playbackStarted: true, showRecommended: true });
};
onPlaybackFinished = () => {
@@ -617,13 +627,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.fetchCostInfo(uri, this.props);
return;
}
const { cost } = costInfo;
if (costInfo.cost > 0) {
Alert.alert(
__('Confirm Purchase'),
@@ -665,7 +675,7 @@ class FilePage extends React.PureComponent {
if (isPlayable) {
this.startTime = Date.now();
this.setState({ downloadPressed: true, autoPlayMedia: true, stopDownloadConfirmed: false });
setPlayerVisible();
// setPlayerVisible(purchaseUrl);
}
if (isViewable) {
this.setState({ downloadPressed: true });
@@ -674,12 +684,15 @@ class FilePage extends React.PureComponent {
getPurchaseUrl = () => {
const { claim, navigation } = this.props;
const { permanent_url: permanentUrl } = claim;
const permanentUrl = claim ? claim.permanent_url : null;
let purchaseUrl;
if (navigation.state.params) {
const { uri, fullUri } = navigation.state.params;
purchaseUrl = fullUri || uri || permanentUrl;
purchaseUrl = fullUri || permanentUrl || uri;
}
if (!purchaseUrl && permanentUrl) {
purchaseUrl = permanentUrl;
}
return purchaseUrl;
@@ -702,7 +715,7 @@ class FilePage extends React.PureComponent {
};
performDownload = () => {
const { claim, costInfo, purchaseUri } = this.props;
const { claim, costInfo, fileGet, fileInfo, purchasedUris } = this.props;
this.setState(
{
downloadPressed: true,
@@ -710,15 +723,21 @@ class FilePage extends React.PureComponent {
stopDownloadConfirmed: false,
},
() => {
this.confirmPurchaseUri(claim.permanent_url, costInfo, true);
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);
}
NativeModules.UtilityModule.checkDownloads();
},
);
};
onBackButtonPressed = () => {
const { navigation, drawerStack, popDrawerStack } = this.props;
navigateBack(navigation, drawerStack, popDrawerStack);
const { navigation, drawerStack, popDrawerStack, setPlayerVisible } = this.props;
navigateBack(navigation, drawerStack, popDrawerStack, setPlayerVisible);
};
onOpenFilePressed = () => {
@@ -726,25 +745,16 @@ 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';
@@ -760,6 +770,7 @@ class FilePage extends React.PureComponent {
},
],
showImageViewer: true,
showRecommended: true,
},
() => pushDrawerStack(Constants.DRAWER_ROUTE_FILE_VIEW),
);
@@ -771,6 +782,7 @@ class FilePage extends React.PureComponent {
this.setState(
{
showWebView: true,
showRecommended: true,
},
() => {
pushDrawerStack(Constants.DRAWER_ROUTE_FILE_VIEW);
@@ -800,26 +812,52 @@ 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)) {
const html =
'<!doctype html>' +
'<html>' +
' <head>' +
' <meta charset="utf-8"/>' +
' <meta name="viewport" content="width=device-width, user-scalable=no"/>' +
' <style type="text/css">' +
' body { margin: 16px }' +
' img { width: 100%; }' +
' </style>' +
' </head>' +
' <body>' +
' <div id="content"></div>' +
' </body>' +
'</html>';
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>
`;
return { html };
}
@@ -838,6 +876,7 @@ class FilePage extends React.PureComponent {
contentType,
tab,
rewardedContentClaimIds,
isPlayerVisible,
isResolvingUri,
blackListedOutpoints,
myClaimUris,
@@ -845,6 +884,7 @@ class FilePage extends React.PureComponent {
position,
purchaseUri,
pushDrawerStack,
setPlayerVisible,
thumbnail,
title,
viewCount,
@@ -996,6 +1036,8 @@ class FilePage extends React.PureComponent {
source={this.buildWebViewSource()}
style={filePageStyle.viewer}
onLoad={this.handleWebViewLoad}
injectedJavaScript={this.linkHandlerScript}
onMessage={this.handleWebViewMessage}
/>
)}
{this.state.showImageViewer && (
@@ -1091,7 +1133,9 @@ class FilePage extends React.PureComponent {
{!innerContent &&
(this.state.streamingMode || (canLoadMedia && fileInfo && isPlayable)) &&
this.state.fullscreenMode && <View style={fsPlayerBgStyle} />}
{!innerContent && (this.state.streamingMode || (canLoadMedia && fileInfo && isPlayable)) && (
{isPlayerVisible &&
!innerContent &&
(this.state.streamingMode || (canLoadMedia && fileInfo && isPlayable)) && (
<MediaPlayer
claim={claim}
assignPlayer={ref => {
@@ -1160,7 +1204,7 @@ class FilePage extends React.PureComponent {
<Text style={filePageStyle.largeButtonText}>{__('Tip')}</Text>
</TouchableOpacity>
{!canEdit && !isPlayable && (
{!canEdit && (
<View style={filePageStyle.sharedLargeButton}>
{(!fileInfo || (fileInfo.written_bytes <= 0 && !completed)) && (
<TouchableOpacity style={filePageStyle.innerLargeButton} onPress={this.onDownloadPressed}>
@@ -1171,7 +1215,6 @@ class FilePage extends React.PureComponent {
{!completed &&
fileInfo &&
!fileInfo.stopped &&
fileInfo.written_bytes > 0 &&
fileInfo.written_bytes < fileInfo.total_bytes &&
!this.state.stopDownloadConfirmed && (
@@ -1231,6 +1274,7 @@ class FilePage extends React.PureComponent {
null,
false,
fullChannelUri,
setPlayerVisible,
);
}}
/>
@@ -1249,14 +1293,6 @@ 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}
+35 -12
View File
@@ -140,6 +140,7 @@ class PublishPage extends React.PureComponent {
// other
publishStarted: false,
storagePermissionRequired: false,
};
didFocusListener;
@@ -195,6 +196,18 @@ 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, hasFormState, pushDrawerStack, setPlayerVisible, navigation } = this.props;
NativeModules.Firebase.setCurrentScreen('Publish').then(result => {
@@ -204,18 +217,19 @@ 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 }));
this.setState(
{
loadingVideos: true,
},
() => {
NativeModules.Gallery.getVideos().then(videos => this.setState({ videos, loadingVideos: false }));
},
);
NativeModules.UtilityModule.canReadWriteStorage().then(canReadWrite => {
if (!canReadWrite) {
this.setState({ storagePermissionRequired: true }, () =>
NativeModules.UtilityModule.requestStoragePermission(),
);
} else {
// Can only load videos when the storage permission is granted
this.loadVideos();
}
});
// Check if this is an edit action
let isEditMode = false,
@@ -913,6 +927,7 @@ class PublishPage extends React.PureComponent {
handleStoragePermissionGranted = () => {
// update the configured download folder
this.loadVideos();
NativeModules.UtilityModule.getDownloadDirectory().then(downloadDirectory => {
Lbry.settings_set({
key: 'download_dir',
@@ -942,6 +957,7 @@ class PublishPage extends React.PureComponent {
currentPhase,
checkedThumbnails,
loadingVideos,
storagePermissionRequired,
thumbnailPath,
videos,
} = this.state;
@@ -983,13 +999,20 @@ class PublishPage extends React.PureComponent {
</View>
</View>
</View>
{(loadingVideos || !allThumbnailsChecked) && (
{storagePermissionRequired && (
<View style={publishStyle.relativeCentered}>
<Text style={publishStyle.noVideos}>
{__('The storage permission is required to be able to display and publish your videos.')}
</Text>
</View>
)}
{!storagePermissionRequired && (loadingVideos || !allThumbnailsChecked) && (
<View style={publishStyle.loadingView}>
<ActivityIndicator size="small" color={Colors.NextLbryGreen} />
<Text style={publishStyle.loadingText}>{__('Please wait while we load your videos...')}</Text>
</View>
)}
{!loadingVideos && (!videos || videos.length === 0) && (
{!storagePermissionRequired && !loadingVideos && (!videos || videos.length === 0) && (
<View style={publishStyle.relativeCentered}>
<Text style={publishStyle.noVideos}>
{__('We could not find any videos on your device. Take a photo or record a video to get started.')}
+7 -5
View File
@@ -5,6 +5,7 @@ import {
doResolvedSearch,
doUpdateSearchQuery,
makeSelectResolvedSearchResults,
makeSelectResolvedSearchResultsLastPageReached,
makeSelectSearchUris,
selectClaimSearchByQuery,
selectIsSearching,
@@ -17,20 +18,21 @@ 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, numSearchResults)(state))(state),
results: makeSelectResolvedSearchResults(makeSelectQueryWithOptions(null, numSearchResults)(state))(state),
uris: makeSelectSearchUris(makeSelectQueryWithOptions(null, Constants.DEFAULT_PAGE_SIZE)(state))(state),
results: makeSelectResolvedSearchResults(makeSelectQueryWithOptions(null, Constants.DEFAULT_PAGE_SIZE)(state))(state),
lastPageReached: makeSelectResolvedSearchResultsLastPageReached(
makeSelectQueryWithOptions(null, Constants.DEFAULT_PAGE_SIZE)(state),
)(state),
});
const perform = dispatch => ({
search: query => dispatch(doResolvedSearch(query, numSearchResults, null, false, {})),
search: (query, from) => dispatch(doResolvedSearch(query, Constants.DEFAULT_PAGE_SIZE, from, false, {})),
claimSearch: options => dispatch(doClaimSearch(options)),
updateSearchQuery: query => dispatch(doUpdateSearchQuery(query)),
pushDrawerStack: () => dispatch(doPushDrawerStack(Constants.DRAWER_ROUTE_SEARCH)),
+43 -8
View File
@@ -15,14 +15,17 @@ import Colors from 'styles/colors';
import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api
import PageHeader from 'component/pageHeader';
import FileListItem from 'component/fileListItem';
import FileResultItem from 'component/fileResultItem';
import ClaimResultItem from 'component/claimResultItem';
import FloatingWalletBalance from 'component/floatingWalletBalance';
import UriBar from 'component/uriBar';
import searchStyle from 'styles/search';
const softLimit = 500;
class SearchPage extends React.PureComponent {
state = {
currentQuery: null,
currentFrom: 0,
currentUri: null,
showTagResult: false,
claimSearchRun: false,
@@ -56,6 +59,7 @@ 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,
@@ -64,7 +68,7 @@ class SearchPage extends React.PureComponent {
resultsResolved: false,
tagResultDisplayed: false,
});
search(searchQuery);
search(searchQuery, 0);
}
});
};
@@ -83,12 +87,13 @@ class SearchPage extends React.PureComponent {
if (query && query.trim().length > 0 && query !== this.state.currentQuery) {
this.setState({
currentFrom: 0,
currentQuery: query,
currentUri: isURIValid(query) ? normalizeURI(query) : null,
resultsResolved: false,
tagResultDisplayed: false,
});
search(query);
search(query, 0);
}
}
@@ -134,13 +139,15 @@ 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);
search(keywords, 0);
};
listEmptyComponent = () => {
@@ -186,6 +193,21 @@ 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;
@@ -193,13 +215,13 @@ class SearchPage extends React.PureComponent {
<View style={searchStyle.container}>
<UriBar value={query} navigation={navigation} onSearchSubmitted={this.handleSearchSubmitted} />
{isSearching && (
{isSearching && this.state.currentFrom === 0 && (
<View style={searchStyle.busyContainer}>
<ActivityIndicator size="large" color={Colors.NextLbryGreen} style={searchStyle.loading} />
</View>
)}
{!isSearching && (
{(!isSearching || this.state.currentFrom > 0) && (
<FlatList
extraData={this.state}
style={searchStyle.scrollContainer}
@@ -207,16 +229,29 @@ class SearchPage extends React.PureComponent {
keyboardShouldPersistTaps={'handled'}
data={results}
keyExtractor={(item, index) => item.claimId}
initialNumToRender={8}
initialNumToRender={10}
maxToRenderPerBatch={20}
onEndReached={this.handleVerticalEndReached}
onEndReachedThreshold={0.2}
removeClippedSubviews
ListEmptyComponent={!isSearching ? this.listEmptyComponent() : null}
ListHeaderComponent={this.listHeaderComponent(this.state.showTagResult, this.state.currentQuery)}
renderItem={({ item }) => (
<FileResultItem key={item.claimId} result={item} style={searchStyle.resultItem} navigation={navigation} />
<ClaimResultItem
key={item.claimId}
uri={item ? normalizeURI(`${item.name}#${item.claimId}`) : null}
result={item}
style={searchStyle.resultItem}
navigation={navigation}
/>
)}
/>
)}
{this.state.currentFrom > 0 && isSearching && (
<View style={searchStyle.moreLoading}>
<ActivityIndicator size="small" color={Colors.NextLbryGreen} />
</View>
)}
<FloatingWalletBalance navigation={navigation} />
</View>
);
+1 -3
View File
@@ -4,7 +4,6 @@ import {
doAuthenticate,
doBlackListedOutpointsSubscribe,
doFilteredOutpointsSubscribe,
doCheckSubscriptionsInit,
doFetchMySubscriptions,
doFetchRewardedContent,
doGetSync,
@@ -27,7 +26,6 @@ const perform = dispatch => ({
balanceSubscribe: () => dispatch(doBalanceSubscribe()),
blacklistedOutpointsSubscribe: () => dispatch(doBlackListedOutpointsSubscribe()),
filteredOutpointsSubscribe: () => dispatch(doFilteredOutpointsSubscribe()),
checkSubscriptionsInit: () => dispatch(doCheckSubscriptionsInit()),
fetchRewardedContent: () => dispatch(doFetchRewardedContent()),
fetchSubscriptions: callback => dispatch(doFetchMySubscriptions(callback)),
getSync: (password, callback) => dispatch(doGetSync(password, callback)),
@@ -42,5 +40,5 @@ const perform = dispatch => ({
export default connect(
select,
perform
perform,
)(SplashScreen);
-2
View File
@@ -130,7 +130,6 @@ class SplashScreen extends React.PureComponent {
authenticate,
balanceSubscribe,
blacklistedOutpointsSubscribe,
checkSubscriptionsInit,
filteredOutpointsSubscribe,
getSync,
updateBlockHeight,
@@ -142,7 +141,6 @@ class SplashScreen extends React.PureComponent {
balanceSubscribe();
blacklistedOutpointsSubscribe();
filteredOutpointsSubscribe();
checkSubscriptionsInit();
if (user && user.id && user.has_verified_email) {
// user already authenticated
+1 -1
View File
@@ -73,7 +73,7 @@ class SubscriptionsPage extends React.PureComponent {
};
componentDidMount() {
// this.onComponentFocused();
this.onComponentFocused();
}
componentWillReceiveProps(nextProps) {
+2 -2
View File
@@ -11,8 +11,8 @@ export const doPopDrawerStack = () => dispatch =>
type: Constants.ACTION_POP_DRAWER_STACK,
});
export const doSetPlayerVisible = visible => dispatch =>
export const doSetPlayerVisible = (visible, uri) => dispatch =>
dispatch({
type: Constants.ACTION_SET_PLAYER_VISIBLE,
data: { visible },
data: { visible, uri },
});
+16 -2
View File
@@ -4,13 +4,27 @@ const reducers = {};
const defaultState = {
stack: [{ route: Constants.DRAWER_ROUTE_DISCOVER, params: {} }], // Discover is always the first drawer route
playerVisible: false,
playerVisibleByUri: {},
currentRoute: null,
};
reducers[Constants.ACTION_SET_PLAYER_VISIBLE] = (state, action) =>
Object.assign({}, state, {
reducers[Constants.ACTION_SET_PLAYER_VISIBLE] = (state, action) => {
const { visible, uri } = action.data;
const playerVisibleByUri = Object.assign({}, state.playerVisibleByUri);
if (!uri) {
Object.keys(playerVisibleByUri).forEach(playerUri => {
playerVisibleByUri[playerUri] = visible;
});
} else {
playerVisibleByUri[uri] = visible;
}
return Object.assign({}, state, {
playerVisible: action.data.visible,
playerVisibleByUri,
});
};
reducers[Constants.ACTION_PUSH_DRAWER_STACK] = (state, action) => {
const { routeName, params } = action.data;
+15 -4
View File
@@ -4,14 +4,25 @@ export const selectState = state => state.drawer || {};
export const selectDrawerStack = createSelector(
selectState,
state => state.stack
state => state.stack,
);
export const selectIsPlayerVisible = createSelector(
selectState,
state => state.playerVisible
state => state.playerVisible,
);
export const selectPlayerVisibleByUri = createSelector(
selectState,
state => state.playerVisibleByUri,
);
export const makeSelectPlayerVisible = uri =>
createSelector(
selectPlayerVisibleByUri,
byUri => (byUri ? byUri[uri] : false),
);
export const selectLastDrawerRoute = createSelector(
selectState,
state => {
@@ -20,10 +31,10 @@ export const selectLastDrawerRoute = createSelector(
}
return null;
}
},
);
export const selectCurrentRoute = createSelector(
selectState,
state => state.currentRoute
state => state.currentRoute,
);
+9 -9
View File
@@ -32,14 +32,14 @@ const aboutStyle = StyleSheet.create({
title: {
color: Colors.LbryGreen,
fontSize: 24,
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
marginTop: 16,
marginLeft: 12,
marginRight: 12,
marginBottom: 8,
},
paragraph: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
lineHeight: 24,
marginLeft: 12,
@@ -53,13 +53,13 @@ const aboutStyle = StyleSheet.create({
},
link: {
color: Colors.LbryGreen,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
marginBottom: 24,
},
listLink: {
color: Colors.LbryGreen,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 15,
alignSelf: 'flex-end',
},
@@ -67,30 +67,30 @@ const aboutStyle = StyleSheet.create({
alignSelf: 'stretch',
},
socialTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
marginLeft: 12,
marginRight: 12,
marginBottom: 8,
fontSize: 20,
},
releaseInfoTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
marginLeft: 12,
marginRight: 12,
marginBottom: 12,
fontSize: 20,
},
text: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 15,
},
valueText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
textAlign: 'right',
fontSize: 15,
},
lineValueText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 15,
},
});
+1 -1
View File
@@ -29,7 +29,7 @@ const buttonStyle = StyleSheet.create({
color: Colors.DarkGrey,
},
text: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
textWithIcon: {
+15 -15
View File
@@ -17,7 +17,7 @@ const channelCreatorStyle = StyleSheet.create({
backgroundColor: Colors.PageBackground,
},
channelPicker: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
height: 52,
width: '100%',
@@ -27,7 +27,7 @@ const channelCreatorStyle = StyleSheet.create({
alignItems: 'center',
},
label: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
balance: {
@@ -36,24 +36,24 @@ const channelCreatorStyle = StyleSheet.create({
marginLeft: 24,
},
balanceText: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 14,
marginLeft: 4,
},
channelNameInput: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
paddingLeft: 20,
},
bidAmountInput: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
marginLeft: 16,
textAlign: 'right',
width: 80,
},
helpText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
color: Colors.DescriptionGrey,
},
@@ -68,7 +68,7 @@ const channelCreatorStyle = StyleSheet.create({
position: 'absolute',
left: 4,
top: 13,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
buttonContainer: {
@@ -90,7 +90,7 @@ const channelCreatorStyle = StyleSheet.create({
alignSelf: 'flex-end',
},
inlineError: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
color: Colors.Red,
marginTop: 2,
@@ -151,12 +151,12 @@ const channelCreatorStyle = StyleSheet.create({
alignItems: 'center',
},
channelListTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 18,
marginBottom: 4,
},
channelListName: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
channelListAvatar: {
@@ -189,13 +189,13 @@ const channelCreatorStyle = StyleSheet.create({
marginBottom: 4,
},
textInputTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
marginBottom: -10,
marginLeft: 4,
},
inputText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
toggleContainer: {
@@ -209,7 +209,7 @@ const channelCreatorStyle = StyleSheet.create({
marginRight: 16,
},
cardTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 20,
marginBottom: 8,
},
@@ -243,7 +243,7 @@ const channelCreatorStyle = StyleSheet.create({
},
editIcon: {
color: Colors.White,
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 12,
},
uploadProgress: {
@@ -262,7 +262,7 @@ const channelCreatorStyle = StyleSheet.create({
},
uploadText: {
color: Colors.White,
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 12,
marginLeft: 4,
},
+3 -3
View File
@@ -10,7 +10,7 @@ const channelIconStyle = StyleSheet.create({
alignSelf: 'flex-start',
},
placeholderText: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 14,
},
thumbnailContainer: {
@@ -39,14 +39,14 @@ const channelIconStyle = StyleSheet.create({
justifyContent: 'center',
},
title: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
width: 80,
marginTop: 4,
textAlign: 'center',
},
autothumbCharacter: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 48,
color: Colors.White,
},
+7 -7
View File
@@ -23,7 +23,7 @@ const channelPageStyle = StyleSheet.create({
},
title: {
color: Colors.LbryGreen,
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 30,
margin: 16,
},
@@ -34,7 +34,7 @@ const channelPageStyle = StyleSheet.create({
padding: 24,
},
infoText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 20,
textAlign: 'center',
},
@@ -62,7 +62,7 @@ const channelPageStyle = StyleSheet.create({
},
channelName: {
color: Colors.White,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 18,
padding: 2,
backgroundColor: '#000000aa',
@@ -98,7 +98,7 @@ const channelPageStyle = StyleSheet.create({
justifyContent: 'flex-end',
},
tabTitle: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 14,
color: Colors.White,
},
@@ -131,12 +131,12 @@ const channelPageStyle = StyleSheet.create({
padding: 24,
},
aboutTitle: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 16,
lineHeight: 24,
},
aboutText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
lineHeight: 24,
},
@@ -182,7 +182,7 @@ const channelPageStyle = StyleSheet.create({
marginRight: 8,
},
followerCount: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
color: Colors.White,
marginTop: 2,
+9 -9
View File
@@ -6,13 +6,13 @@ const channelSelectorStyle = StyleSheet.create({
flex: 1,
},
channelPicker: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
height: 52,
width: '100%',
},
channelPickerItem: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
bidRow: {
@@ -21,7 +21,7 @@ const channelSelectorStyle = StyleSheet.create({
alignItems: 'center',
},
label: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
balance: {
@@ -30,24 +30,24 @@ const channelSelectorStyle = StyleSheet.create({
marginLeft: 24,
},
balanceText: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 14,
marginLeft: 4,
},
channelNameInput: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
paddingLeft: 20,
},
bidAmountInput: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
marginLeft: 16,
textAlign: 'right',
width: 80,
},
helpText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
},
createChannelContainer: {
@@ -59,7 +59,7 @@ const channelSelectorStyle = StyleSheet.create({
position: 'absolute',
left: 4,
top: 13,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
buttonContainer: {
@@ -80,7 +80,7 @@ const channelSelectorStyle = StyleSheet.create({
backgroundColor: Colors.NextLbryGreen,
},
inlineError: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
color: Colors.Red,
marginTop: 2,
+1 -1
View File
@@ -13,7 +13,7 @@ const claimListStyle = StyleSheet.create({
},
noContentText: {
color: Colors.DescriptionGrey,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
margin: 16,
textAlign: 'center',
+22 -22
View File
@@ -55,11 +55,11 @@ const discoverStyle = StyleSheet.create({
alignItems: 'center',
},
pageTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 24,
},
customizeLink: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
trendingContainer: {
@@ -74,7 +74,7 @@ const discoverStyle = StyleSheet.create({
flexDirection: 'row',
},
title: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 20,
textAlign: 'center',
marginLeft: 10,
@@ -95,7 +95,7 @@ const discoverStyle = StyleSheet.create({
marginBottom: 56,
},
footerTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 20,
marginBottom: 10,
},
@@ -108,7 +108,7 @@ const discoverStyle = StyleSheet.create({
marginBottom: 12,
},
categoryName: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 18,
color: Colors.Black,
},
@@ -127,7 +127,7 @@ const discoverStyle = StyleSheet.create({
justifyContent: 'center',
},
moreText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
color: Colors.White,
fontSize: 24,
},
@@ -142,18 +142,18 @@ const discoverStyle = StyleSheet.create({
justifyContent: 'center',
},
fileItemName: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
marginTop: 8,
fontSize: 14,
},
channelName: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 12,
marginTop: 4,
color: Colors.LbryGreen,
},
anonChannelName: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 12,
marginTop: 4,
color: Colors.DescriptionGrey,
@@ -176,7 +176,7 @@ const discoverStyle = StyleSheet.create({
borderRadius: 4,
},
filePriceText: {
fontFamily: 'Inter-UI-Bold',
fontFamily: 'Inter-Bold',
fontSize: 12,
textAlign: 'center',
color: '#0c604b',
@@ -205,7 +205,7 @@ const discoverStyle = StyleSheet.create({
color: Colors.White,
fontSize: 14,
textAlign: 'center',
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
},
rewardTitleContainer: {
alignItems: 'center',
@@ -222,11 +222,11 @@ const discoverStyle = StyleSheet.create({
flex: 0.9,
},
menuText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
titleText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
},
detailsRow: {
flexDirection: 'row',
@@ -236,7 +236,7 @@ const discoverStyle = StyleSheet.create({
marginTop: 2,
},
dateTimeText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
color: Colors.DescriptionGrey,
},
@@ -259,7 +259,7 @@ const discoverStyle = StyleSheet.create({
flex: 1,
},
tagPageTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 24,
},
tagPageClaimList: {
@@ -288,7 +288,7 @@ const discoverStyle = StyleSheet.create({
alignItems: 'center',
},
tagSortText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
marginRight: 4,
},
@@ -296,7 +296,7 @@ const discoverStyle = StyleSheet.create({
marginTop: -6,
},
pickerLabel: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
color: Colors.DescriptionGrey,
marginRight: 6,
@@ -307,7 +307,7 @@ const discoverStyle = StyleSheet.create({
marginBottom: 8,
},
menuGroupName: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
color: Colors.DescriptionGrey,
textTransform: 'uppercase',
@@ -337,7 +337,7 @@ const discoverStyle = StyleSheet.create({
},
menuItem: {
marginLeft: 8,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
signInContainer: {
@@ -353,7 +353,7 @@ const discoverStyle = StyleSheet.create({
left: 16,
},
signedInEmail: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 15,
color: Colors.White,
},
@@ -388,13 +388,13 @@ const discoverStyle = StyleSheet.create({
},
signInMenuItemText: {
color: Colors.DescriptionGrey,
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 14,
textAlign: 'center',
},
signInMenuItemButtonText: {
color: Colors.White,
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 14,
textAlign: 'center',
},
+1 -1
View File
@@ -30,7 +30,7 @@ const downloadsStyle = StyleSheet.create({
paddingBottom: 16,
},
noDownloadsText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
lineHeight: 24,
marginLeft: 16,
+1 -1
View File
@@ -30,7 +30,7 @@ const emptyStateStyle = StyleSheet.create({
message: {
marginTop: 24,
textAlign: 'center',
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 18,
lineHeight: 28,
marginBottom: 24,
+1 -1
View File
@@ -11,7 +11,7 @@ const fileDownloadButtonStyle = StyleSheet.create({
backgroundColor: Colors.LbryGreen,
},
text: {
fontFamily: 'Inter-UI-Medium',
fontFamily: 'Inter-Medium',
color: Colors.White,
fontSize: 14,
textAlign: 'center',
+3 -3
View File
@@ -10,7 +10,7 @@ const fileItemMediaStyle = StyleSheet.create({
alignItems: 'center',
},
autothumbText: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
textAlign: 'center',
color: Colors.White,
fontSize: 40,
@@ -22,7 +22,7 @@ const fileItemMediaStyle = StyleSheet.create({
},
text: {
color: '#ffffff',
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
marginTop: 8,
},
@@ -45,7 +45,7 @@ const fileItemMediaStyle = StyleSheet.create({
paddingRight: 2,
},
durationText: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 12,
color: Colors.White,
},
+35 -13
View File
@@ -22,13 +22,13 @@ const fileListStyle = StyleSheet.create({
flex: 1,
},
featuredUri: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 24,
color: Colors.White,
},
featuredTitle: {
fontFamily: 'Inter-UI-SemiBold',
fontSize: screenWidthPixels <= 720 ? 12 : 16,
fontFamily: 'Inter-SemiBold',
fontSize: screenWidthPixels <= 720 ? 11 : 16,
color: Colors.White,
},
thumbnail: {
@@ -39,6 +39,25 @@ const fileListStyle = StyleSheet.create({
alignItems: 'center',
justifyContent: 'center',
},
channelThumbnailView: {
width: thumbnailWidth,
height: thumbnailHeight,
marginRight: screenWidthPixels <= 720 ? 10 : 12,
alignItems: 'center',
justifyContent: 'center',
},
channelThumbnailContainer: {
width: thumbnailHeight, // maintain same width and height
height: thumbnailHeight,
borderRadius: 140,
overflow: 'hidden',
alignItems: 'center',
justifyContent: 'center',
},
channelThumbnail: {
width: '100%',
height: '100%',
},
selectedOverlay: {
position: 'absolute',
left: 0,
@@ -50,20 +69,23 @@ const fileListStyle = StyleSheet.create({
backgroundColor: '#000000aa',
},
title: {
fontFamily: 'Inter-UI-SemiBold',
fontSize: screenWidthPixels <= 720 ? 12 : 14,
fontFamily: 'Inter-SemiBold',
fontSize: screenWidthPixels <= 720 ? 11 : 14,
},
uri: {
fontFamily: 'Inter-UI-SemiBold',
fontSize: screenWidthPixels <= 720 ? 12 : 14,
fontFamily: 'Inter-SemiBold',
fontSize: screenWidthPixels <= 720 ? 11 : 14,
marginBottom: 8,
},
publisher: {
fontFamily: 'Inter-UI-SemiBold',
fontSize: screenWidthPixels <= 720 ? 11 : 12,
fontFamily: 'Inter-SemiBold',
fontSize: screenWidthPixels <= 720 ? 10 : 12,
marginTop: screenWidthPixels <= 720 ? 1 : 3,
color: Colors.LbryGreen,
},
channelContainer: {
alignItems: 'center',
},
loading: {
position: 'absolute',
},
@@ -73,15 +95,15 @@ const fileListStyle = StyleSheet.create({
justifyContent: 'space-between',
},
infoText: {
fontFamily: 'Inter-UI-Regular',
fontSize: screenWidthPixels <= 720 ? 11 : 12,
fontFamily: 'Inter-Regular',
fontSize: screenWidthPixels <= 720 ? 10 : 12,
color: Colors.ChannelGrey,
},
downloadInfo: {
marginTop: 2,
},
progress: {
marginTop: screenWidthPixels <= 720 ? 2 : 4,
marginTop: screenWidthPixels <= 720 ? 1 : 4,
},
progressCompleted: {
backgroundColor: Colors.LbryGreen,
@@ -134,7 +156,7 @@ const fileListStyle = StyleSheet.create({
borderRadius: 4,
},
filePriceText: {
fontFamily: 'Inter-UI-Bold',
fontFamily: 'Inter-Bold',
fontSize: 12,
textAlign: 'center',
color: '#0c604b',
+22 -22
View File
@@ -38,7 +38,7 @@ const filePageStyle = StyleSheet.create({
marginBottom: -17,
},
emptyClaimText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
textAlign: 'center',
fontSize: 20,
marginLeft: 24,
@@ -54,7 +54,7 @@ const filePageStyle = StyleSheet.create({
flex: 1,
},
title: {
fontFamily: 'Inter-UI-Bold',
fontFamily: 'Inter-Bold',
fontSize: 16,
flex: 18,
alignSelf: 'flex-start',
@@ -88,17 +88,17 @@ const filePageStyle = StyleSheet.create({
marginTop: 6,
},
channelName: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 14,
color: Colors.LbryGreen,
},
anonChannelName: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
color: Colors.DescriptionGrey,
},
publishDateText: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 12,
color: Colors.DescriptionGrey,
},
@@ -107,7 +107,7 @@ const filePageStyle = StyleSheet.create({
},
description: {
color: Colors.DescriptionGrey,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 13,
lineHeight: 18,
marginTop: -8,
@@ -179,7 +179,7 @@ const filePageStyle = StyleSheet.create({
borderRadius: 4,
},
filePriceText: {
fontFamily: 'Inter-UI-Bold',
fontFamily: 'Inter-Bold',
fontSize: 12,
textAlign: 'center',
color: '#0c604b',
@@ -234,19 +234,19 @@ const filePageStyle = StyleSheet.create({
paddingRight: 24,
},
dmcaText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 18,
lineHeight: 24,
},
dmcaLink: {
color: Colors.LbryGreen,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 18,
lineHeight: 24,
marginTop: 24,
},
infoText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 20,
textAlign: 'center',
marginLeft: 10,
@@ -293,7 +293,7 @@ const filePageStyle = StyleSheet.create({
marginBottom: 14,
},
input: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
tipAmountInput: {
@@ -315,7 +315,7 @@ const filePageStyle = StyleSheet.create({
marginTop: -8,
},
text: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
lineHeight: 24,
},
@@ -336,12 +336,12 @@ const filePageStyle = StyleSheet.create({
flexDirection: 'row',
},
tagTitle: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
flex: 0.2,
marginTop: 4,
},
tagList: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
flex: 0.8,
flexDirection: 'row',
flexWrap: 'wrap',
@@ -363,7 +363,7 @@ const filePageStyle = StyleSheet.create({
marginRight: 8,
},
rewardDriverText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
color: Colors.White,
fontSize: 14,
},
@@ -402,8 +402,8 @@ const filePageStyle = StyleSheet.create({
color: Colors.DescriptionGrey,
},
largeButtonText: {
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
fontFamily: 'Inter-Regular',
fontSize: 12,
marginTop: 4,
},
largeButtonsRow: {
@@ -430,7 +430,7 @@ const filePageStyle = StyleSheet.create({
},
unsupportedContentFilename: {
color: Colors.LbryGreen,
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 16,
},
unsupportedContentImage: {
@@ -439,11 +439,11 @@ const filePageStyle = StyleSheet.create({
marginRight: 24,
},
unsupportedContentTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 20,
},
unsupportedContentText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
marginTop: 4,
},
@@ -451,7 +451,7 @@ const filePageStyle = StyleSheet.create({
marginTop: 16,
},
viewCount: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
color: Colors.DescriptionGrey,
marginLeft: 12,
@@ -463,7 +463,7 @@ const filePageStyle = StyleSheet.create({
marginLeft: 24,
},
balanceText: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 14,
marginLeft: 4,
},
+12 -12
View File
@@ -17,7 +17,7 @@ const firstRunStyle = StyleSheet.create({
backgroundColor: Colors.LbryGreen,
},
title: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 40,
marginLeft: 32,
marginRight: 32,
@@ -25,7 +25,7 @@ const firstRunStyle = StyleSheet.create({
color: Colors.White,
},
paragraph: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 18,
lineHeight: 24,
marginLeft: 32,
@@ -34,7 +34,7 @@ const firstRunStyle = StyleSheet.create({
color: Colors.White,
},
spacedParagraph: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 18,
lineHeight: 28,
marginLeft: 32,
@@ -43,7 +43,7 @@ const firstRunStyle = StyleSheet.create({
color: Colors.White,
},
infoParagraph: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
lineHeight: 20,
marginLeft: 32,
@@ -55,7 +55,7 @@ const firstRunStyle = StyleSheet.create({
marginTop: 36,
},
rowParagraph: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
lineHeight: 24,
color: Colors.White,
@@ -67,7 +67,7 @@ const firstRunStyle = StyleSheet.create({
marginRight: 8,
},
emailInput: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 24,
lineHeight: 24,
marginLeft: 32,
@@ -76,7 +76,7 @@ const firstRunStyle = StyleSheet.create({
textAlign: 'center',
},
passwordInput: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 24,
lineHeight: 24,
marginLeft: 32,
@@ -102,7 +102,7 @@ const firstRunStyle = StyleSheet.create({
actionButton: {
backgroundColor: Colors.White,
alignSelf: 'center',
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
paddingLeft: 16,
paddingRight: 16,
@@ -114,18 +114,18 @@ const firstRunStyle = StyleSheet.create({
paddingRight: 32,
},
buttonText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 18,
color: Colors.White,
},
smallButtonText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
color: Colors.White,
marginBottom: -2,
},
smallLeftButtonText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
color: Colors.White,
marginBottom: 6,
@@ -183,7 +183,7 @@ const firstRunStyle = StyleSheet.create({
},
passwordWarningText: {
color: Colors.NextLbryGreen,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
centered: {
+1 -1
View File
@@ -42,7 +42,7 @@ const floatingButtonStyle = StyleSheet.create({
},
text: {
color: Colors.White,
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 16,
},
bottomRight: {
+2 -2
View File
@@ -78,7 +78,7 @@ const mediaPlayerStyle = StyleSheet.create({
bottom: 14,
},
elapsedDuration: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
position: 'absolute',
left: 8,
bottom: 24,
@@ -86,7 +86,7 @@ const mediaPlayerStyle = StyleSheet.create({
color: '#ffffff',
},
totalDuration: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
position: 'absolute',
right: 48,
bottom: 24,
+2 -2
View File
@@ -29,7 +29,7 @@ const modalPickerStyle = StyleSheet.create({
padding: 12,
},
title: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 12,
marginTop: 4,
textTransform: 'uppercase',
@@ -54,7 +54,7 @@ const modalPickerStyle = StyleSheet.create({
itemLabel: {
marginLeft: 8,
alignSelf: 'flex-start',
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
itemSelected: {
+1 -1
View File
@@ -42,7 +42,7 @@ const modalTagSelectorStyle = StyleSheet.create({
marginBottom: 12,
},
title: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 24,
},
buttons: {
+6 -6
View File
@@ -6,7 +6,7 @@ const modalTipStyle = StyleSheet.create({
padding: 16,
},
title: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 24,
},
row: {
@@ -19,7 +19,7 @@ const modalTipStyle = StyleSheet.create({
marginRight: 24,
},
tipAmountInput: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
alignSelf: 'flex-start',
textAlign: 'right',
@@ -27,7 +27,7 @@ const modalTipStyle = StyleSheet.create({
letterSpacing: 1,
},
currency: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
marginLeft: 4,
},
@@ -49,7 +49,7 @@ const modalTipStyle = StyleSheet.create({
marginLeft: 24,
},
balanceText: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 14,
marginLeft: 4,
},
@@ -57,12 +57,12 @@ const modalTipStyle = StyleSheet.create({
marginTop: 4,
},
infoText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
color: Colors.DescriptionGrey,
},
learnMoreLink: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
color: Colors.LbryGreen,
},
+1 -1
View File
@@ -42,7 +42,7 @@ const pageHeaderStyle = StyleSheet.create({
flexDirection: 'row',
},
titleText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: Platform.OS === 'ios' ? 17 : 20,
fontWeight: Platform.OS === 'ios' ? '700' : '500',
color: 'rgba(0, 0, 0, .9)',
+22 -22
View File
@@ -23,7 +23,7 @@ const publishStyle = StyleSheet.create({
height: 90,
},
inputText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
card: {
@@ -57,7 +57,7 @@ const publishStyle = StyleSheet.create({
alignSelf: 'flex-end',
},
cardTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 20,
marginBottom: 8,
},
@@ -84,7 +84,7 @@ const publishStyle = StyleSheet.create({
},
actionText: {
color: Colors.White,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
marginTop: 8,
},
@@ -119,12 +119,12 @@ const publishStyle = StyleSheet.create({
},
priceInput: {
width: 80,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
textAlign: 'right',
},
currency: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
},
cardRow: {
flex: 1,
@@ -155,12 +155,12 @@ const publishStyle = StyleSheet.create({
},
loadingText: {
color: Colors.White,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
marginLeft: 8,
},
listEmptyText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
titleRow: {
@@ -168,7 +168,7 @@ const publishStyle = StyleSheet.create({
justifyContent: 'space-between',
},
cardText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
cameraPreview: {
@@ -192,12 +192,12 @@ const publishStyle = StyleSheet.create({
padding: 16,
},
successTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 28,
marginBottom: 16,
},
successText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
marginBottom: 16,
lineHeight: 20,
@@ -211,7 +211,7 @@ const publishStyle = StyleSheet.create({
successUrl: {
flex: 0.9,
fontSize: 32,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
color: Colors.NextLbryGreen,
marginRight: 16,
},
@@ -305,7 +305,7 @@ const publishStyle = StyleSheet.create({
paddingBottom: 12,
},
rewardDriverText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
color: Colors.White,
fontSize: 14,
},
@@ -325,7 +325,7 @@ const publishStyle = StyleSheet.create({
marginBottom: 4,
},
textInputTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
marginBottom: -10,
marginLeft: 4,
@@ -346,7 +346,7 @@ const publishStyle = StyleSheet.create({
},
thumbnailUploadText: {
color: Colors.White,
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 12,
marginLeft: 4,
},
@@ -357,7 +357,7 @@ const publishStyle = StyleSheet.create({
marginBottom: 16,
},
toggleText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
marginLeft: 8,
},
@@ -398,7 +398,7 @@ const publishStyle = StyleSheet.create({
padding: 16,
},
noPublishText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
publishNowButton: {
@@ -423,21 +423,21 @@ const publishStyle = StyleSheet.create({
},
noVideos: {
color: Colors.White,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
cameraInfo: {
color: Colors.White,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
warningText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
color: Colors.DescriptionGrey,
},
helpText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
color: Colors.DescriptionGrey,
},
@@ -463,7 +463,7 @@ const publishStyle = StyleSheet.create({
},
editIcon: {
color: Colors.White,
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 12,
},
balance: {
@@ -472,7 +472,7 @@ const publishStyle = StyleSheet.create({
marginLeft: 24,
},
balanceText: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 14,
marginLeft: 4,
},
+1 -1
View File
@@ -12,7 +12,7 @@ const relatedContentStyle = StyleSheet.create({
borderTopWidth: 1,
},
title: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 18,
},
itemList: {
+21 -21
View File
@@ -37,7 +37,7 @@ const rewardStyle = StyleSheet.create({
marginTop: 36,
},
enrollDescText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 18,
lineHeight: 28,
color: Colors.White,
@@ -67,36 +67,36 @@ const rewardStyle = StyleSheet.create({
paddingBottom: 16,
},
text: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
lineHeight: 24,
},
infoText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 18,
marginLeft: 12,
},
title: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 22,
marginBottom: 6,
color: Colors.LbryGreen,
},
subtitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 18,
marginBottom: 6,
color: Colors.LbryGreen,
},
subcardText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 15,
lineHeight: 20,
marginLeft: 2,
marginRight: 2,
},
subcardTextInput: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
marginTop: 2,
marginBottom: 2,
@@ -122,7 +122,7 @@ const rewardStyle = StyleSheet.create({
},
link: {
color: Colors.LbryGreen,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
textLink: {
@@ -148,21 +148,21 @@ const rewardStyle = StyleSheet.create({
alignItems: 'center',
},
rewardAmount: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 26,
textAlign: 'center',
},
rewardCurrency: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
},
rewardTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
color: Colors.LbryGreen,
marginBottom: 4,
},
rewardDescription: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
lineHeight: 18,
marginBottom: 4,
@@ -195,7 +195,7 @@ const rewardStyle = StyleSheet.create({
},
summaryText: {
color: Colors.White,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 28,
marginLeft: 12,
},
@@ -208,19 +208,19 @@ const rewardStyle = StyleSheet.create({
marginRight: 32,
},
phoneInputText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
letterSpacing: 1.3,
color: Colors.White,
},
verifyingText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
marginLeft: 12,
alignSelf: 'flex-start',
},
verificationCodeInput: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
color: Colors.White,
fontSize: 24,
letterSpacing: 12,
@@ -244,11 +244,11 @@ const rewardStyle = StyleSheet.create({
},
notInterestedLink: {
fontSize: 14,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
color: Colors.White,
},
learnMoreLink: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
color: Colors.White,
textDecorationLine: 'underline',
},
@@ -258,7 +258,7 @@ const rewardStyle = StyleSheet.create({
paddingRight: 16,
},
customCodeInput: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
letterSpacing: 1.3,
marginTop: -8,
@@ -285,7 +285,7 @@ const rewardStyle = StyleSheet.create({
verificationTitle: {
fontSize: 32,
color: Colors.White,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
marginLeft: 32,
marginRight: 32,
marginBottom: 24,
@@ -300,7 +300,7 @@ const rewardStyle = StyleSheet.create({
fontSize: 14,
},
paragraphText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
color: Colors.White,
fontSize: 12,
lineHeight: 16,
+11 -5
View File
@@ -44,19 +44,19 @@ const searchStyle = StyleSheet.create({
backgroundColor: Colors.DarkerGrey,
},
tagResultTitle: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 24,
color: Colors.White,
},
tagResultDescription: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
color: Colors.VeryLightGrey,
},
searchInput: {
width: '100%',
height: '100%',
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
noResults: {
@@ -67,19 +67,25 @@ const searchStyle = StyleSheet.create({
alignItems: 'center',
},
noResultsText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
marginTop: 16,
marginLeft: 16,
marginRight: 16,
},
boldText: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 16,
},
loading: {
position: 'absolute',
},
moreLoading: {
width: '100%',
height: 48,
alignItems: 'center',
justifyContent: 'center',
},
});
export default searchStyle;
+5 -5
View File
@@ -38,23 +38,23 @@ const settingsStyle = StyleSheet.create({
},
label: {
fontSize: 14,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
lineHeight: 18,
},
description: {
color: '#aaaaaa',
fontSize: 12,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
lineHeight: 18,
},
sectionTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 20,
marginBottom: 4,
},
sectionDescription: {
color: '#aaaaaa',
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
lineHeight: 18,
marginBottom: 8,
@@ -66,7 +66,7 @@ const settingsStyle = StyleSheet.create({
width: '85%',
},
languagePickerItem: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
pickerRow: {
+5 -5
View File
@@ -8,14 +8,14 @@ const splashStyle = StyleSheet.create({
backgroundColor: Colors.LbryGreen,
},
title: {
fontFamily: 'Inter-UI-Bold',
fontFamily: 'Inter-Bold',
fontSize: 64,
textAlign: 'center',
marginBottom: 48,
color: Colors.White,
},
errorTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 28,
marginBottom: 24,
marginLeft: 24,
@@ -23,7 +23,7 @@ const splashStyle = StyleSheet.create({
color: Colors.White,
},
paragraph: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
lineHeight: 24,
marginBottom: 20,
@@ -48,7 +48,7 @@ const splashStyle = StyleSheet.create({
width: '50%',
},
details: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
marginLeft: 16,
marginRight: 16,
@@ -56,7 +56,7 @@ const splashStyle = StyleSheet.create({
textAlign: 'center',
},
message: {
fontFamily: 'Inter-UI-Bold',
fontFamily: 'Inter-Bold',
fontSize: 18,
color: Colors.White,
marginLeft: 16,
+5 -5
View File
@@ -16,16 +16,16 @@ const storageStatsStyle = StyleSheet.create({
padding: 16,
},
totalSize: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 36,
},
annotation: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
marginTop: -4,
},
statsText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
distributionBar: {
@@ -57,12 +57,12 @@ const storageStatsStyle = StyleSheet.create({
height: 16,
},
legendText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
flex: 0.3,
},
legendSize: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
flex: 0.6,
textAlign: 'right',
+14 -12
View File
@@ -37,7 +37,7 @@ const subscriptionsStyle = StyleSheet.create({
paddingTop: 24,
},
infoText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
marginTop: 8,
marginBottom: 8,
@@ -57,7 +57,7 @@ const subscriptionsStyle = StyleSheet.create({
marginTop: 16,
},
contentText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
marginLeft: 24,
marginRight: 24,
@@ -96,7 +96,7 @@ const subscriptionsStyle = StyleSheet.create({
justifyContent: 'center',
},
fileItemName: {
fontFamily: 'Inter-UI-Bold',
fontFamily: 'Inter-Bold',
marginTop: 8,
fontSize: 18,
},
@@ -109,7 +109,7 @@ const subscriptionsStyle = StyleSheet.create({
borderBottomWidth: 1,
},
channelTitle: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 20,
marginLeft: 24,
marginTop: 16,
@@ -136,16 +136,16 @@ const subscriptionsStyle = StyleSheet.create({
color: Colors.LbryGreen,
},
inactiveMode: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
},
activeMode: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
},
claimList: {
flex: 1,
},
pageTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 24,
},
titleRow: {
@@ -171,7 +171,7 @@ const subscriptionsStyle = StyleSheet.create({
marginRight: 24,
},
tagSortText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
marginRight: 4,
},
@@ -199,6 +199,8 @@ const subscriptionsStyle = StyleSheet.create({
height: 70,
borderRadius: 140,
overflow: 'hidden',
alignItems: 'center',
justifyContent: 'center',
},
suggestedItemThumbnail: {
width: '100%',
@@ -216,13 +218,13 @@ const subscriptionsStyle = StyleSheet.create({
top: 0,
},
suggestedItemTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
marginBottom: 4,
width: '85%',
},
suggestedItemName: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 14,
marginBottom: 4,
color: Colors.LbryGreen,
@@ -233,7 +235,7 @@ const subscriptionsStyle = StyleSheet.create({
flexWrap: 'wrap',
},
suggestedSubTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 20,
marginLeft: 16,
marginRight: 16,
@@ -251,7 +253,7 @@ const subscriptionsStyle = StyleSheet.create({
alignItems: 'center',
},
suggestedLink: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
modalContainer: {
+3 -3
View File
@@ -7,7 +7,7 @@ const tagStyle = StyleSheet.create({
marginBottom: 4,
},
tagSearchInput: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
content: {
@@ -22,7 +22,7 @@ const tagStyle = StyleSheet.create({
marginRight: 8,
},
text: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
marginRight: 8,
},
@@ -34,7 +34,7 @@ const tagStyle = StyleSheet.create({
marginTop: 8,
},
nsfwTagsTitle: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
marginBottom: 4,
},
+5 -5
View File
@@ -24,29 +24,29 @@ const transactionListStyle = StyleSheet.create({
alignSelf: 'stretch',
},
text: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
link: {
color: Colors.LbryGreen,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
amount: {
textAlign: 'right',
},
smallText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
color: '#aaaaaa',
},
smallLink: {
color: Colors.LbryGreen,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
},
noTransactions: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
textAlign: 'center',
padding: 16,
color: '#aaaaaa',
+4 -5
View File
@@ -29,9 +29,8 @@ const uriBarStyle = StyleSheet.create({
borderRadius: 24,
paddingLeft: 12,
paddingRight: 12,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
height: 44,
lineHeight: 18,
flex: 17,
},
@@ -66,11 +65,11 @@ const uriBarStyle = StyleSheet.create({
flex: 1,
},
itemText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
itemDesc: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
color: Colors.UriDescBlue,
},
@@ -108,7 +107,7 @@ const uriBarStyle = StyleSheet.create({
alignItems: 'center',
},
itemCount: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 20,
marginLeft: 30,
},
+24 -24
View File
@@ -26,7 +26,7 @@ const walletStyle = StyleSheet.create({
flexDirection: 'row',
},
address: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
letterSpacing: 0.8,
borderWidth: 1,
borderRadius: 16,
@@ -69,12 +69,12 @@ const walletStyle = StyleSheet.create({
margin: 16,
},
title: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 20,
marginBottom: 24,
},
transactionsTitle: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 20,
},
transactionsHeader: {
@@ -86,16 +86,16 @@ const walletStyle = StyleSheet.create({
borderBottomColor: '#eeeeee',
},
text: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
link: {
color: Colors.LbryGreen,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
smallText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 12,
},
balanceCard: {
@@ -111,14 +111,14 @@ const walletStyle = StyleSheet.create({
},
balanceTitle: {
color: Colors.White,
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 20,
marginLeft: 16,
marginTop: 16,
},
balanceCaption: {
color: '#caedB9',
fontFamily: 'Inter-UI-Medium',
fontFamily: 'Inter-Medium',
fontSize: 14,
marginLeft: 16,
marginTop: 8,
@@ -126,7 +126,7 @@ const walletStyle = StyleSheet.create({
},
balance: {
color: Colors.White,
fontFamily: 'Inter-UI-Bold',
fontFamily: 'Inter-Bold',
fontSize: 36,
marginLeft: 16,
marginBottom: 16,
@@ -137,19 +137,19 @@ const walletStyle = StyleSheet.create({
marginLeft: 24,
},
balanceText: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 14,
marginLeft: 4,
},
infoText: {
color: '#aaaaaa',
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
padding: 16,
textAlign: 'center',
},
input: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
amountInput: {
@@ -172,14 +172,14 @@ const walletStyle = StyleSheet.create({
},
warningParagraph: {
color: Colors.White,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
lineHeight: 24,
marginBottom: 16,
},
warningText: {
color: Colors.White,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
lineHeight: 24,
marginBottom: 8,
@@ -222,7 +222,7 @@ const walletStyle = StyleSheet.create({
},
rewardDriverText: {
color: Colors.White,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
lineHeight: 16,
},
@@ -237,7 +237,7 @@ const walletStyle = StyleSheet.create({
marginRight: 16,
},
syncDriverTitle: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 20,
paddingLeft: 16,
marginTop: 16,
@@ -247,7 +247,7 @@ const walletStyle = StyleSheet.create({
},
syncDriverLink: {
color: Colors.LbryGreen,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 14,
},
actionRow: {
@@ -291,11 +291,11 @@ const walletStyle = StyleSheet.create({
justifyContent: 'flex-end',
},
labelText: {
fontFamily: 'Inter-UI-SemiBold',
fontFamily: 'Inter-SemiBold',
fontSize: 16,
},
valueText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
},
rightLink: {
@@ -316,7 +316,7 @@ const walletStyle = StyleSheet.create({
},
loadingText: {
color: '#aaaaaa',
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 16,
marginLeft: 8,
},
@@ -331,11 +331,11 @@ const walletStyle = StyleSheet.create({
},
continueLink: {
fontSize: 14,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
color: Colors.White,
},
learnMoreLink: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
color: Colors.NextLbryGreen,
},
signInButton: {
@@ -353,7 +353,7 @@ const walletStyle = StyleSheet.create({
marginTop: 36,
},
onboardingText: {
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 18,
lineHeight: 28,
color: Colors.White,
@@ -363,7 +363,7 @@ const walletStyle = StyleSheet.create({
},
signInTitle: {
color: Colors.White,
fontFamily: 'Inter-UI-Regular',
fontFamily: 'Inter-Regular',
fontSize: 28,
},
});
+35 -6
View File
@@ -54,9 +54,10 @@ export function dispatchNavigateToUri(dispatch, nav, uri, isNavigatingBack, full
if (!isNavigatingBack) {
dispatch(doPushDrawerStack(uri));
dispatch(doSetPlayerVisible(true));
}
dispatch(doSetPlayerVisible(false));
if (nav && nav.routes && nav.routes.length > 0 && nav.routes[0].routeName === 'Main') {
const mainRoute = nav.routes[0];
const discoverRoute = mainRoute.routes[0];
@@ -113,7 +114,7 @@ function parseUriVars(vars) {
return uriVars;
}
export function navigateToUri(navigation, uri, additionalParams, isNavigatingBack, fullUri) {
export function navigateToUri(navigation, uri, additionalParams, isNavigatingBack, fullUri, setPlayerVisible) {
if (!navigation) {
return;
}
@@ -135,6 +136,10 @@ export function navigateToUri(navigation, uri, additionalParams, isNavigatingBac
uriVars = parseUriVars(uriVarsStr);
}
if (setPlayerVisible) {
setPlayerVisible(false);
}
const { store } = window;
const params = Object.assign({ uri, uriVars, fullUri: fullUri }, additionalParams);
if (navigation.state.routeName === 'File') {
@@ -142,7 +147,6 @@ export function navigateToUri(navigation, uri, additionalParams, isNavigatingBac
navigation.dispatch(stackAction);
if (store && store.dispatch && !isNavigatingBack) {
store.dispatch(doPushDrawerStack(uri));
store.dispatch(doSetPlayerVisible(true));
}
return;
}
@@ -150,11 +154,10 @@ export function navigateToUri(navigation, uri, additionalParams, isNavigatingBac
navigation.navigate({ routeName: 'File', key: uri, params });
if (store && store.dispatch && !isNavigatingBack) {
store.dispatch(doPushDrawerStack(uri));
store.dispatch(doSetPlayerVisible(true));
}
}
export function navigateBack(navigation, drawerStack, popDrawerStack) {
export function navigateBack(navigation, drawerStack, popDrawerStack, setPlayerVisible) {
if (drawerStack[drawerStack.length - 1].route === Constants.DRAWER_ROUTE_FILE_VIEW) {
// inner file_view (web / image view) is handled differently
if (popDrawerStack) {
@@ -166,12 +169,15 @@ export function navigateBack(navigation, drawerStack, popDrawerStack) {
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);
navigateToUri(navigation, route, null, true, null, setPlayerVisible);
} else {
let targetRoute = route;
let targetParams = params;
@@ -201,6 +207,7 @@ export function dispatchNavigateBack(dispatch, nav, drawerStack) {
}
dispatch(doPopDrawerStack());
dispatch(doSetPlayerVisible(false));
const target = drawerStack[drawerStack.length > 1 ? drawerStack.length - 2 : 0];
const { route } = target;
@@ -370,3 +377,25 @@ export function uploadImageAsset(filePath, success, failure) {
export function formatLbryUrlForWeb(url) {
return url.replace('lbry://', '/').replace(/#/g, ':');
}
export function getDownloadProgress(fileInfo) {
return Math.ceil((fileInfo.written_bytes / fileInfo.total_bytes) * 100);
}
export function getStorageForFileInfo(fileInfo) {
if (!fileInfo.completed) {
const written = formatBytes(fileInfo.written_bytes);
const total = formatBytes(fileInfo.total_bytes);
return `(${written} / ${total})`;
}
return formatBytes(fileInfo.written_bytes);
}
export function formatTitle(title) {
if (!title) {
return title;
}
return title.length > 80 ? title.substring(0, 77).trim() + '...' : title;
}