updated design

This commit is contained in:
u-e 2019-04-24 23:59:46 +03:00
parent c7f06404da
commit 6872904c68
4 changed files with 48 additions and 22 deletions

View File

@ -3,7 +3,7 @@ import EStyleSheet from 'react-native-extended-stylesheet';
export default EStyleSheet.create({ export default EStyleSheet.create({
pointText: { pointText: {
color: '$primaryBlue', color: '$primaryBlue',
fontSize: 24, fontSize: 26,
marginTop: 24, marginTop: 24,
justifyContent: 'center', justifyContent: 'center',
alignSelf: 'center', alignSelf: 'center',
@ -31,6 +31,10 @@ export default EStyleSheet.create({
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
}, },
iconButton: {
marginTop: 3,
marginLeft: 1,
},
activeIconWrapper: { activeIconWrapper: {
backgroundColor: '$primaryBlue', backgroundColor: '$primaryBlue',
}, },
@ -43,7 +47,7 @@ export default EStyleSheet.create({
}, },
badge: { badge: {
position: 'absolute', position: 'absolute',
right: -7, right: -9,
top: 20, top: 20,
backgroundColor: '$primaryBlue', backgroundColor: '$primaryBlue',
justifyContent: 'center', justifyContent: 'center',

View File

@ -84,7 +84,9 @@ class PointsView extends Component {
<View styles={styles.iconWrapper}> <View styles={styles.iconWrapper}>
<View style={styles.iconWrapper}> <View style={styles.iconWrapper}>
<IconButton <IconButton
disabled
iconStyle={styles.icon} iconStyle={styles.icon}
style={styles.iconButton}
iconType="MaterialCommunityIcons" iconType="MaterialCommunityIcons"
name="pencil" name="pencil"
badgeCount={50} badgeCount={50}
@ -97,9 +99,11 @@ class PointsView extends Component {
<View styles={styles.iconWrapper}> <View styles={styles.iconWrapper}>
<View style={styles.iconWrapper}> <View style={styles.iconWrapper}>
<IconButton <IconButton
disabled
style={styles.iconButton}
iconStyle={styles.icon} iconStyle={styles.icon}
iconType="MaterialIcons" iconType="MaterialCommunityIcons"
name="comment" name="comment-text"
badgeCount={15} badgeCount={15}
badgeStyle={styles.badge} badgeStyle={styles.badge}
badgeTextStyle={styles.badgeText} badgeTextStyle={styles.badgeText}
@ -110,6 +114,8 @@ class PointsView extends Component {
<View styles={styles.iconWrapper}> <View styles={styles.iconWrapper}>
<View style={[styles.iconWrapper, isActiveIcon && styles.activeIconWrapper]}> <View style={[styles.iconWrapper, isActiveIcon && styles.activeIconWrapper]}>
<IconButton <IconButton
disabled
style={styles.iconButton}
iconStyle={[styles.icon, isActiveIcon && styles.activeIcon]} iconStyle={[styles.icon, isActiveIcon && styles.activeIcon]}
iconType="MaterialCommunityIcons" iconType="MaterialCommunityIcons"
name="clock-outline" name="clock-outline"
@ -123,23 +129,28 @@ class PointsView extends Component {
</View> </View>
<View style={styles.listWrapper}> <View style={styles.listWrapper}>
<FlatList {userActivities && userActivities.length < 1
data={userActivities} ? <Text style={styles.subText}>{intl.formatMessage({ id: 'points.no_activity' })}</Text>
renderItem={({ item, index }) => ( : (
<WalletLineItem <FlatList
key={item.id.toString()} data={userActivities}
index={index + 1} renderItem={({ item, index }) => (
text={intl.formatMessage({ id: item.textKey })} <WalletLineItem
description={getTimeFromNow(item.created)} key={item.id.toString()}
isCircleIcon index={index + 1}
isThin text={intl.formatMessage({ id: item.textKey })}
isBlackText description={getTimeFromNow(item.created)}
iconName={item.icon} isCircleIcon
iconType={item.iconType} isThin
rightText={`${item.amount} ESTEEM`} isBlackText
iconName={item.icon}
iconType={item.iconType}
rightText={`${item.amount} ESTM`}
/>
)}
/> />
)} )
/> }
</View> </View>
</ScrollView> </ScrollView>
</Fragment> </Fragment>

View File

@ -41,7 +41,8 @@
"reblog_title": "Points for reblog", "reblog_title": "Points for reblog",
"login_title": "Points for login", "login_title": "Points for login",
"checkin_title": "Points for usage", "checkin_title": "Points for usage",
"checkin_extra_title": "Usage bonus" "checkin_extra_title": "Usage bonus",
"no_activity": "No activity here!"
}, },
"messages": { "messages": {
"comingsoon": "Messages feature is coming soon!" "comingsoon": "Messages feature is coming soon!"

View File

@ -76,7 +76,17 @@ class NotificationScreen extends PureComponent {
})} })}
style={styles.tabbarItem} style={styles.tabbarItem}
> >
<Points /> {isLoggedIn ? (
<Points />
) : (
<NoPost
isButtonText
defaultText={intl.formatMessage({
id: 'profile.login_to_see',
})}
handleOnButtonPress={handleLoginPress}
/>
)}
</View> </View>
<View <View
tabLabel={intl.formatMessage({ tabLabel={intl.formatMessage({