Merge pull request #420 from lbryio/pre-release-fixes

some tweaks before release
This commit is contained in:
Akinwale Ariwodola 2019-01-31 15:57:02 +01:00 committed by GitHub
commit 4c5558fa29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 49 additions and 11 deletions

View file

@ -32,12 +32,15 @@ class DateTime extends React.PureComponent<Props> {
return date ? <View style={style}><Text style={textStyle}>{moment(date).from(moment())}</Text></View> : null; return date ? <View style={style}><Text style={textStyle}>{moment(date).from(moment())}</Text></View> : null;
} }
// TODO: formatOptions not working as expected in RN
// date.toLocaleDateString([locale, 'en-US'], formatOptions)}
return ( return (
<View style={style}> <View style={style}>
<Text style={textStyle}> <Text style={textStyle}>
{date && {date &&
(show === DateTime.SHOW_BOTH || show === DateTime.SHOW_DATE) && (show === DateTime.SHOW_BOTH || show === DateTime.SHOW_DATE) &&
date.toLocaleDateString([locale, 'en-US'], formatOptions)} moment(date).format('MMMM D, YYYY')}
{show === DateTime.SHOW_BOTH && ' '} {show === DateTime.SHOW_BOTH && ' '}
{date && {date &&
(show === DateTime.SHOW_BOTH || show === DateTime.SHOW_TIME) && (show === DateTime.SHOW_BOTH || show === DateTime.SHOW_TIME) &&

View file

@ -35,6 +35,8 @@ export default class Link extends React.PureComponent {
render() { render() {
const { const {
ellipsizeMode,
numberOfLines,
onPress, onPress,
style, style,
text text
@ -54,7 +56,13 @@ export default class Link extends React.PureComponent {
} }
return ( return (
<Text style={styles} onPress={onPress ? onPress : this.handlePress}>{text}</Text> <Text
style={styles}
numberOfLines={numberOfLines}
ellipsizeMode={ellipsizeMode}
onPress={onPress ? onPress : this.handlePress}>
{text}
</Text>
); );
} }
}; };

View file

@ -20,6 +20,7 @@ import ImageViewer from 'react-native-image-zoom-viewer';
import Button from 'component/button'; import Button from 'component/button';
import Colors from 'styles/colors'; import Colors from 'styles/colors';
import ChannelPage from 'page/channel'; import ChannelPage from 'page/channel';
import DateTime from 'component/dateTime';
import FileDownloadButton from 'component/fileDownloadButton'; import FileDownloadButton from 'component/fileDownloadButton';
import FileItemMedia from 'component/fileItemMedia'; import FileItemMedia from 'component/fileItemMedia';
import FilePrice from 'component/filePrice'; import FilePrice from 'component/filePrice';
@ -567,13 +568,23 @@ class FilePage extends React.PureComponent {
<Text style={filePageStyle.title} selectable={true}>{title}</Text> <Text style={filePageStyle.title} selectable={true}>{title}</Text>
{channelName && {channelName &&
<View style={filePageStyle.channelRow}> <View style={filePageStyle.channelRow}>
<Link style={filePageStyle.channelName} <View style={filePageStyle.publishInfo}>
selectable={true} <Link style={filePageStyle.channelName}
text={channelName} selectable={true}
onPress={() => { text={channelName}
const channelUri = normalizeURI(channelName); numberOfLines={1}
navigateToUri(navigation, channelUri); ellipsizeMode={"tail"}
}} /> onPress={() => {
const channelUri = normalizeURI(channelName);
navigateToUri(navigation, channelUri);
}} />
<DateTime
style={filePageStyle.publishDate}
textStyle={filePageStyle.publishDateText}
block={height}
formatOptions={{ day: 'numeric', month: 'long', year: 'numeric' }}
show={DateTime.SHOW_DATE} />
</View>
<View style={filePageStyle.subscriptionRow}> <View style={filePageStyle.subscriptionRow}>
<SubscribeButton <SubscribeButton
style={filePageStyle.actionButton} style={filePageStyle.actionButton}

View file

@ -68,14 +68,25 @@ const filePageStyle = StyleSheet.create({
}, },
subscriptionRow: { subscriptionRow: {
flexDirection: 'row', flexDirection: 'row',
alignSelf: 'flex-end' marginTop: 8
},
publishInfo: {
width: '50%',
marginTop: 6,
}, },
channelName: { channelName: {
fontFamily: 'Inter-UI-SemiBold', fontFamily: 'Inter-UI-SemiBold',
fontSize: 20, fontSize: 20,
marginTop: 6,
color: Colors.LbryGreen color: Colors.LbryGreen
}, },
publishDateText: {
fontFamily: 'Inter-UI-SemiBold',
fontSize: 12,
color: Colors.DescriptionGrey
},
publishDate: {
marginTop: 4
},
description: { description: {
color: Colors.DescriptionGrey, color: Colors.DescriptionGrey,
fontFamily: 'Inter-UI-Regular', fontFamily: 'Inter-UI-Regular',

View file

@ -1,4 +1,5 @@
import keyring import keyring
import logging
import platform import platform
from jnius import autoclass from jnius import autoclass
from keyring.backend import KeyringBackend from keyring.backend import KeyringBackend
@ -12,6 +13,7 @@ lbrynet_android_utils = autoclass('io.lbry.browser.Utils')
service = autoclass('io.lbry.browser.LbrynetService').serviceInstance service = autoclass('io.lbry.browser.LbrynetService').serviceInstance
platform.platform = lambda: 'Android %s (API %s)' % (lbrynet_android_utils.getAndroidRelease(), lbrynet_android_utils.getAndroidSdk()) platform.platform = lambda: 'Android %s (API %s)' % (lbrynet_android_utils.getAndroidRelease(), lbrynet_android_utils.getAndroidSdk())
build_type.BUILD = 'dev' if lbrynet_android_utils.isDebug() else 'release' build_type.BUILD = 'dev' if lbrynet_android_utils.isDebug() else 'release'
log = logging.getLogger(__name__)
# Keyring backend # Keyring backend
class LbryAndroidKeyring(KeyringBackend): class LbryAndroidKeyring(KeyringBackend):
@ -55,6 +57,9 @@ def start():
log_support.configure_logging(conf.settings.get_log_filename(), True, []) log_support.configure_logging(conf.settings.get_log_filename(), True, [])
log_support.configure_loggly_handler() log_support.configure_loggly_handler()
log.info('Final Settings: %s', conf.settings.get_current_settings_dict())
log.info('Starting lbrynet-daemon');
if check_connection(): if check_connection():
daemon = Daemon() daemon = Daemon()
daemon.start_listening() daemon.start_listening()