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_PODFILE_DIR_PATH = ${SRCROOT}/.
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_PODFILE_DIR_PATH = ${SRCROOT}/.
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_PODFILE_DIR_PATH = ${SRCROOT}/.
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_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
USER_HEADER_SEARCH_PATHS = $(inherited) $(SRCROOT)/FLAnimatedImage/FLAnimatedImage

View File

@ -112,7 +112,7 @@ class CommentView extends PureComponent {
/>
<ActionSheet
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' })}
destructiveButtonIndex={0}
cancelButtonIndex={1}

View File

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

View File

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

View File

@ -35,14 +35,25 @@
"post": "Post",
"comment": "Comment",
"checkin": "Checki-in",
"vote": "Vote",
"reblog": "Reblog",
"login": "Login",
"checkin_extra": "Bonus",
"post_title": "Points for post",
"comment_title": "Points for comment",
"vote_title": "Points for vote",
"reblog_title": "Points for reblog",
"login_title": "Points for login",
"login_title": "Points for login",
"checkin_title": "Points for usage",
"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": {
"comingsoon": "Messages feature is coming soon!"

View File

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