Merge pull request #771 from esteemapp/feature/epoint-design

Feature/epoint design
This commit is contained in:
Mustafa Buyukcelebi 2019-04-29 17:18:17 +03:00 committed by GitHub
commit 21f6eb8d7f
9 changed files with 101 additions and 57 deletions

View File

@ -9,3 +9,4 @@ PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods PODS_ROOT = ${SRCROOT}/Pods
USER_HEADER_SEARCH_PATHS = $(inherited) $(SRCROOT)/FLAnimatedImage/FLAnimatedImage

View File

@ -9,3 +9,4 @@ PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods PODS_ROOT = ${SRCROOT}/Pods
USER_HEADER_SEARCH_PATHS = $(inherited) $(SRCROOT)/FLAnimatedImage/FLAnimatedImage

View File

@ -8,3 +8,4 @@ PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods PODS_ROOT = ${SRCROOT}/Pods
USER_HEADER_SEARCH_PATHS = $(inherited) $(SRCROOT)/FLAnimatedImage/FLAnimatedImage

View File

@ -8,3 +8,4 @@ PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods PODS_ROOT = ${SRCROOT}/Pods
USER_HEADER_SEARCH_PATHS = $(inherited) $(SRCROOT)/FLAnimatedImage/FLAnimatedImage

View File

@ -112,7 +112,7 @@ class CommentView extends PureComponent {
/> />
<ActionSheet <ActionSheet
ref={o => (this.ActionSheet = o)} ref={o => (this.ActionSheet = o)}
options={['Reblog', intl.formatMessage({ id: 'alert.cancel' })]} options={[intl.formatMessage({ id: 'alert.delete' }), intl.formatMessage({ id: 'alert.cancel' })]}
title={intl.formatMessage({ id: 'alert.delete' })} title={intl.formatMessage({ id: 'alert.delete' })}
destructiveButtonIndex={0} destructiveButtonIndex={0}
cancelButtonIndex={1} cancelButtonIndex={1}

View File

@ -17,11 +17,15 @@ export default EStyleSheet.create({
marginTop: 5, marginTop: 5,
}, },
iconsWrapper: { iconsWrapper: {
marginVertical: 32, marginVertical: 24,
marginHorizontal: 32,
justifyContent: 'center', justifyContent: 'center',
alignSelf: 'center', alignSelf: 'center',
flexDirection: 'row', flexDirection: 'row',
}, },
iconsList: {
height: 55,
},
iconWrapper: { iconWrapper: {
marginHorizontal: 16, marginHorizontal: 16,
width: 36, width: 36,
@ -32,7 +36,7 @@ export default EStyleSheet.create({
alignItems: 'center', alignItems: 'center',
}, },
iconButton: { iconButton: {
marginTop: 3, marginTop: 1,
marginLeft: 1, marginLeft: 1,
}, },
activeIconWrapper: { activeIconWrapper: {
@ -97,4 +101,5 @@ export default EStyleSheet.create({
scrollContainer: { scrollContainer: {
flex: 1, flex: 1,
}, },
}); });

View File

@ -13,6 +13,9 @@ import { MainButton } from '../../mainButton';
// Utils // Utils
import { getTimeFromNow } from '../../../utils/time'; import { getTimeFromNow } from '../../../utils/time';
// Constants
import POINTS, { POINTS_KEYS } from '../../../constants/options/points';
// Styles // Styles
import styles from './pointsStyles'; import styles from './pointsStyles';
@ -83,51 +86,28 @@ class PointsView extends Component {
} }
<View style={styles.iconsWrapper}> <View style={styles.iconsWrapper}>
<View styles={styles.iconWrapper}> <FlatList
<View style={styles.iconWrapper}> style={styles.iconsList}
<IconButton data={POINTS_KEYS}
disabled horizontal
iconStyle={styles.icon} renderItem={({ item }) => (
style={styles.iconButton} <View styles={styles.iconWrapper}>
iconType="MaterialCommunityIcons" <View style={styles.iconWrapper}>
name="pencil" <IconButton
badgeCount={50} disabled
badgeStyle={styles.badge} iconStyle={styles.icon}
badgeTextStyle={styles.badgeText} style={styles.iconButton}
/> iconType={POINTS[item.type].iconType}
</View> name={POINTS[item.type].icon}
<Text style={styles.subText}>{intl.formatMessage({ id: 'points.post' })}</Text> badgeCount={POINTS[item.type].point}
</View> badgeStyle={styles.badge}
<View styles={styles.iconWrapper}> badgeTextStyle={styles.badgeText}
<View style={styles.iconWrapper}> />
<IconButton </View>
disabled <Text style={styles.subText}>{intl.formatMessage({ id: POINTS[item.type].nameKey })}</Text>
style={styles.iconButton} </View>
iconStyle={styles.icon} )}
iconType="MaterialCommunityIcons" />
name="comment-text"
badgeCount={15}
badgeStyle={styles.badge}
badgeTextStyle={styles.badgeText}
/>
</View>
<Text style={styles.subText}>{intl.formatMessage({ id: 'points.comment' })}</Text>
</View>
<View styles={styles.iconWrapper}>
<View style={[styles.iconWrapper, isActiveIcon && styles.activeIconWrapper]}>
<IconButton
disabled
style={styles.iconButton}
iconStyle={[styles.icon, isActiveIcon && styles.activeIcon]}
iconType="MaterialCommunityIcons"
name="clock-outline"
badgeCount={50}
badgeStyle={[styles.badge, isActiveIcon && styles.activeBadge]}
badgeTextStyle={styles.badgeText}
/>
</View>
<Text style={styles.subText}>{intl.formatMessage({ id: 'points.checkin' })}</Text>
</View>
</View> </View>
<View style={styles.listWrapper}> <View style={styles.listWrapper}>

View File

@ -35,6 +35,10 @@
"post": "Post", "post": "Post",
"comment": "Comment", "comment": "Comment",
"checkin": "Checki-in", "checkin": "Checki-in",
"vote": "Vote",
"reblog": "Reblog",
"login": "Login",
"checkin_extra": "Bonus",
"post_title": "Points for post", "post_title": "Points for post",
"comment_title": "Points for comment", "comment_title": "Points for comment",
"vote_title": "Points for vote", "vote_title": "Points for vote",
@ -42,7 +46,14 @@
"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!" "no_activity": "No activity here!",
"post_desc": "You can earn point by posting regularly. Posting gives you 15 points.",
"comment_desc": "Each comment you make helps you to grow your audience and make friendship but also earns you 5 points.",
"checkin_desc": "Checking in on eSteem app gives you 0.25 points and helps you stay connected with your friends and community.",
"vote_desc": "By voting you give reward to other creators and show your appreciation but also earn 0.01 x vote weight points.",
"reblog_desc": " Share what post you like with your friends and earn 1 points.",
"login_desc": "When you login into eSteem app you are entitled to earn 100 points automatically.",
"checkin_extra_desc": "Consistent use of app gives you extra chances to earn more 10 points, be more active and earn more."
}, },
"messages": { "messages": {
"comingsoon": "Messages feature is coming soon!" "comingsoon": "Messages feature is coming soon!"

View File

@ -1,38 +1,82 @@
export default { export default {
100: { 100: {
icon: 'post', icon: 'pencil',
textKey: 'points.post_title', textKey: 'points.post_title',
iconType: 'MaterialIcons', nameKey: 'points.post',
descriptionKey: 'points.post_desc',
iconType: 'MaterialCommunityIcons',
point: 15,
}, },
110: { 110: {
icon: 'comment', icon: 'comment-text-outline',
textKey: 'points.comment_title', textKey: 'points.comment_title',
iconType: 'MaterialIcons', nameKey: 'points.comment',
descriptionKey: 'points.comment_desc',
iconType: 'MaterialCommunityIcons',
point: 5,
}, },
120: { 120: {
icon: 'upcircle', icon: 'upcircle',
textKey: 'points.vote_title', textKey: 'points.vote_title',
nameKey: 'points.vote',
descriptionKey: 'points.vote_desc',
iconType: 'AntDesign', iconType: 'AntDesign',
point: 0.1,
}, },
130: { 130: {
icon: 'repeat', icon: 'repeat',
textKey: 'points.reblog_title', textKey: 'points.reblog_title',
nameKey: 'points.reblog',
descriptionKey: 'points.reblog_desc',
iconType: 'MaterialIcons', iconType: 'MaterialIcons',
point: 1,
}, },
10: { 10: {
icon: 'check-circle', icon: 'ticket',
textKey: 'points.checkin_title', textKey: 'points.checkin_title',
nameKey: 'points.checkin',
descriptionKey: 'points.checkin_desc',
iconType: 'MaterialCommunityIcons', iconType: 'MaterialCommunityIcons',
point: 0.2,
}, },
20: { 20: {
icon: 'person', icon: 'person',
textKey: 'points.login_title', textKey: 'points.login_title',
nameKey: 'points.login',
descriptionKey: 'points.login_desc',
iconType: 'MaterialIcons', iconType: 'MaterialIcons',
point: 100,
}, },
30: { 30: {
icon: 'check-decagram', icon: 'check-decagram',
textKey: 'points.checkin_extra_title', textKey: 'points.checkin_extra_title',
nameKey: 'points.checkin_extra',
descriptionKey: 'points.checkin_extra_desc',
iconType: 'MaterialCommunityIcons', iconType: 'MaterialCommunityIcons',
point: 10,
}, },
}; };
export const POINTS_KEYS = [
{
type: 100,
},
{
type: 110,
},
{
type: 120,
},
{
type: 130,
},
{
type: 10,
},
{
type: 20,
},
{
type: 30,
},
];