FontAwesome 5 everywhere

This commit is contained in:
Akinwale Ariwodola 2018-08-08 18:11:25 +01:00
parent 55275e48de
commit 9882d9d1c9
6 changed files with 21 additions and 23 deletions

View file

@ -29,7 +29,7 @@ import {
} from 'react-native'; } from 'react-native';
import { SETTINGS, doHideNotification, selectNotification } from 'lbry-redux'; import { SETTINGS, doHideNotification, selectNotification } from 'lbry-redux';
import { makeSelectClientSetting } from '../redux/selectors/settings'; import { makeSelectClientSetting } from '../redux/selectors/settings';
import Feather from 'react-native-vector-icons/Feather'; import Icon from 'react-native-vector-icons/FontAwesome5';
import discoverStyle from '../styles/discover'; import discoverStyle from '../styles/discover';
import searchStyle from '../styles/search'; import searchStyle from '../styles/search';
import SearchRightHeaderIcon from "../component/searchRightHeaderIcon"; import SearchRightHeaderIcon from "../component/searchRightHeaderIcon";
@ -39,7 +39,7 @@ const discoverStack = StackNavigator({
screen: DiscoverPage, screen: DiscoverPage,
navigationOptions: ({ navigation }) => ({ navigationOptions: ({ navigation }) => ({
title: 'Discover', title: 'Discover',
headerLeft: <Feather name="menu" size={24} style={discoverStyle.drawerHamburger} onPress={() => navigation.navigate('DrawerOpen')} />, headerLeft: <Icon name="bars" size={24} style={discoverStyle.drawerHamburger} onPress={() => navigation.navigate('DrawerOpen')} />,
}) })
}, },
File: { File: {
@ -64,7 +64,7 @@ const trendingStack = StackNavigator({
screen: TrendingPage, screen: TrendingPage,
navigationOptions: ({ navigation }) => ({ navigationOptions: ({ navigation }) => ({
title: 'Trending', title: 'Trending',
headerLeft: <Feather name="menu" size={24} style={discoverStyle.drawerHamburger} onPress={() => navigation.navigate('DrawerOpen')} />, headerLeft: <Icon name="bars" size={24} style={discoverStyle.drawerHamburger} onPress={() => navigation.navigate('DrawerOpen')} />,
}) })
} }
}); });
@ -74,7 +74,7 @@ const walletStack = StackNavigator({
screen: WalletPage, screen: WalletPage,
navigationOptions: ({ navigation }) => ({ navigationOptions: ({ navigation }) => ({
title: 'Wallet', title: 'Wallet',
headerLeft: <Feather name="menu" size={24} style={discoverStyle.drawerHamburger} onPress={() => navigation.navigate('DrawerOpen')} />, headerLeft: <Icon name="bars" size={24} style={discoverStyle.drawerHamburger} onPress={() => navigation.navigate('DrawerOpen')} />,
}) })
}, },
TransactionHistory: { TransactionHistory: {
@ -144,7 +144,7 @@ class AppWithNavigationState extends React.Component {
} }
} }
} }
return false; return false;fo
}.bind(this)); }.bind(this));
} }

View file

@ -8,7 +8,7 @@ import {
TouchableOpacity, TouchableOpacity,
View View
} from 'react-native'; } from 'react-native';
import Feather from 'react-native-vector-icons/Feather'; import Icon from 'react-native-vector-icons/FontAwesome5';
import pageHeaderStyle from '../../styles/pageHeader'; import pageHeaderStyle from '../../styles/pageHeader';
const APPBAR_HEIGHT = Platform.OS === 'ios' ? 44 : 56; const APPBAR_HEIGHT = Platform.OS === 'ios' ? 44 : 56;
@ -21,7 +21,7 @@ class PageHeader extends React.PureComponent {
pageHeaderStyle.container, pageHeaderStyle.container,
{ height: APPBAR_HEIGHT } { height: APPBAR_HEIGHT }
]; ];
return ( return (
<View style={containerStyles}> <View style={containerStyles}>
<View style={pageHeaderStyle.flexOne}> <View style={pageHeaderStyle.flexOne}>
@ -35,7 +35,7 @@ class PageHeader extends React.PureComponent {
</AnimatedText> </AnimatedText>
</View> </View>
<TouchableOpacity style={pageHeaderStyle.left}> <TouchableOpacity style={pageHeaderStyle.left}>
<Feather name="arrow-left" size={24} onPress={onBackPressed} style={pageHeaderStyle.backIcon} /> <Icon name="arrow-left" size={24} onPress={onBackPressed} style={pageHeaderStyle.backIcon} />
</TouchableOpacity> </TouchableOpacity>
</View> </View>
</View> </View>

View file

@ -2,37 +2,37 @@
import React from 'react'; import React from 'react';
import { SEARCH_TYPES, normalizeURI } from 'lbry-redux'; import { SEARCH_TYPES, normalizeURI } from 'lbry-redux';
import { Text, TouchableOpacity, View } from 'react-native'; import { Text, TouchableOpacity, View } from 'react-native';
import Feather from 'react-native-vector-icons/Feather'; import Icon from 'react-native-vector-icons/FontAwesome5';
import uriBarStyle from '../../../styles/uriBar'; import uriBarStyle from '../../../styles/uriBar';
class UriBarItem extends React.PureComponent { class UriBarItem extends React.PureComponent {
render() { render() {
const { item, onPress } = this.props; const { item, onPress } = this.props;
const { shorthand, type, value } = item; const { shorthand, type, value } = item;
let icon; let icon;
switch (type) { switch (type) {
case SEARCH_TYPES.CHANNEL: case SEARCH_TYPES.CHANNEL:
icon = <Feather name="at-sign" size={18} /> icon = <Icon name="at" size={18} />
break; break;
case SEARCH_TYPES.SEARCH: case SEARCH_TYPES.SEARCH:
icon = <Feather name="search" size={18} /> icon = <Icon name="search" size={18} />
break; break;
case SEARCH_TYPES.FILE: case SEARCH_TYPES.FILE:
default: default:
icon = <Feather name="file" size={18} /> icon = <Icon name="file" size={18} />
break; break;
} }
return ( return (
<TouchableOpacity style={uriBarStyle.item} onPress={onPress}> <TouchableOpacity style={uriBarStyle.item} onPress={onPress}>
{icon} {icon}
<Text style={uriBarStyle.itemText} numberOfLines={1}>{shorthand || value} - {type === 'search' ? 'Search' : value}</Text> <Text style={uriBarStyle.itemText} numberOfLines={1}>{shorthand || value} - {type === 'search' ? 'Search' : value}</Text>
</TouchableOpacity> </TouchableOpacity>
) )
} }
} }
export default UriBarItem; export default UriBarItem;

View file

@ -24,14 +24,14 @@ class WalletAddress extends React.PureComponent<Props> {
render() { render() {
const { receiveAddress, getNewAddress, gettingNewAddress } = this.props; const { receiveAddress, getNewAddress, gettingNewAddress } = this.props;
return ( return (
<View style={walletStyle.card}> <View style={walletStyle.card}>
<Text style={walletStyle.title}>Receive Credits</Text> <Text style={walletStyle.title}>Receive Credits</Text>
<Text style={[walletStyle.text, walletStyle.bottomMarginMedium]}>Use this wallet address to receive credits sent by another user (or yourself).</Text> <Text style={[walletStyle.text, walletStyle.bottomMarginMedium]}>Use this wallet address to receive credits sent by another user (or yourself).</Text>
<Address address={receiveAddress} style={walletStyle.bottomMarginSmall} /> <Address address={receiveAddress} style={walletStyle.bottomMarginSmall} />
<Button style={[walletStyle.button, walletStyle.bottomMarginLarge]} <Button style={[walletStyle.button, walletStyle.bottomMarginLarge]}
icon={'refresh'} icon={'sync'}
text={'Get New Address'} text={'Get New Address'}
onPress={getNewAddress} onPress={getNewAddress}
disabled={gettingNewAddress} disabled={gettingNewAddress}

View file

@ -14,7 +14,6 @@ import FileItem from '../../component/fileItem';
import discoverStyle from '../../styles/discover'; import discoverStyle from '../../styles/discover';
import Colors from '../../styles/colors'; import Colors from '../../styles/colors';
import UriBar from '../../component/uriBar'; import UriBar from '../../component/uriBar';
import Feather from 'react-native-vector-icons/Feather';
class DiscoverPage extends React.PureComponent { class DiscoverPage extends React.PureComponent {
componentDidMount() { componentDidMount() {
@ -23,7 +22,7 @@ class DiscoverPage extends React.PureComponent {
if (startTime !== null && !isNaN(parseInt(startTime, 10))) { if (startTime !== null && !isNaN(parseInt(startTime, 10))) {
// We don't need this value anymore once we've retrieved it // We don't need this value anymore once we've retrieved it
AsyncStorage.removeItem('firstLaunchTime'); AsyncStorage.removeItem('firstLaunchTime');
// We know this is the first app launch because firstLaunchTime is set and it's a valid number // We know this is the first app launch because firstLaunchTime is set and it's a valid number
const start = parseInt(startTime, 10); const start = parseInt(startTime, 10);
const now = moment().unix(); const now = moment().unix();
@ -39,7 +38,7 @@ class DiscoverPage extends React.PureComponent {
}); });
} }
}); });
this.props.fetchFeaturedUris(); this.props.fetchFeaturedUris();
} }

View file

@ -14,7 +14,6 @@ import FileItem from '../../component/fileItem';
import discoverStyle from '../../styles/discover'; import discoverStyle from '../../styles/discover';
import Colors from '../../styles/colors'; import Colors from '../../styles/colors';
import UriBar from '../../component/uriBar'; import UriBar from '../../component/uriBar';
import Feather from 'react-native-vector-icons/Feather';
class TrendingPage extends React.PureComponent { class TrendingPage extends React.PureComponent {
componentDidMount() { componentDidMount() {