Merge branch 'development' of github.com:esteemapp/esteem-mobile into bugfix/wrong-time

This commit is contained in:
Mustafa Buyukcelebi 2019-10-22 17:51:15 +03:00
commit 319101a08b
64 changed files with 540 additions and 630 deletions

View File

@ -168,7 +168,7 @@ android {
release {
// Caution! In production, you need to generate your own keystore file.
// see https://facebook.github.io/react-native/docs/signed-apk-android.
signingConfig signingConfigs.debug
// signingConfig signingConfigs.debug
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}

View File

@ -1,45 +1,34 @@
import React, { Component } from 'react';
import React, { useState } from 'react';
import { View, TouchableOpacity } from 'react-native';
import styles from './checkboxStyles';
class CheckBoxView extends Component {
constructor(props) {
super(props);
this.state = { isCheck: false };
}
const CheckBoxView = ({ clicked, value, isChecked, style, locked }) => {
const [isCheck, setIsCheck] = useState(false);
_checkClicked = async () => {
const { clicked, value } = this.props;
const _checkClicked = () => {
setIsCheck(!isCheck);
await this.setState(prevState => ({
isCheck: !prevState.isCheck,
}));
const { isCheck } = this.state;
if (clicked) clicked(value, isCheck);
if (clicked) {
clicked(value, !isCheck);
}
};
render() {
const { style, isChecked, locked } = this.props;
const { isCheck } = this.state;
if (locked) {
return (
<View style={styles.bigSquare}>
<View style={[styles.smallSquare, isChecked && styles.checked]} />
</View>
);
}
if (locked) {
return (
<TouchableOpacity onPress={this._checkClicked} style={style}>
<View style={styles.bigSquare}>
<View style={[styles.smallSquare, isCheck && styles.checked]} />
</View>
</TouchableOpacity>
<View style={styles.bigSquare}>
<View style={[styles.smallSquare, isChecked && styles.checked]} />
</View>
);
}
}
return (
<TouchableOpacity onPress={_checkClicked} style={style}>
<View style={styles.bigSquare}>
<View style={[styles.smallSquare, isCheck && styles.checked]} />
</View>
</TouchableOpacity>
);
};
export default CheckBoxView;

View File

@ -248,6 +248,7 @@ class CommentsContainer extends Component {
selectedPermlink: _selectedPermlink,
isOwnProfile,
isHideImage,
isShowSubComments,
} = this.props;
return (
@ -271,6 +272,7 @@ class CommentsContainer extends Component {
isOwnProfile={isOwnProfile}
isHideImage={isHideImage}
handleOnVotersPress={this._handleOnVotersPress}
isShowSubComments={isShowSubComments}
/>
);
}

View File

@ -1,3 +0,0 @@
import ErrorBoundary from './view/errorBoundaryView';
export { ErrorBoundary };

View File

@ -1,32 +0,0 @@
import React, { Component, Fragment } from 'react';
import Text from 'react-native';
export default class ErrorBoundary extends Component {
constructor(props) {
super(props);
this.state = { hasError: false };
}
componentDidCatch(error, info) {
if (__DEV__) {
return;
}
this.setState({ hasError: true, info, error });
}
render() {
const { hasError, info, error } = this.state;
const { children } = this.props;
if (hasError) {
return (
<Fragment>
<Text>Something went wrong.</Text>
<Text>{error}</Text>
<Text>{info}</Text>
</Fragment>
);
}
return children;
}
}

View File

@ -1,7 +1,7 @@
import React, { PureComponent } from 'react';
import React, { useState, useEffect } from 'react';
import { View, Text, Image, TouchableHighlight } from 'react-native';
import { injectIntl } from 'react-intl';
// Constants
import { useIntl } from 'react-intl';
import get from 'lodash/get';
// Components
import { UserAvatar } from '../../userAvatar';
@ -9,92 +9,69 @@ import { UserAvatar } from '../../userAvatar';
// Styles
import styles from './notificationLineStyles';
class NotificationLineView extends PureComponent {
/* Props
* ------------------------------------------------
* @prop { type } name - Description....
*/
const NotificationLineView = ({ notification, handleOnPressNotification }) => {
const [isRead, setIsRead] = useState(notification.read);
const intl = useIntl();
let _title;
let titleExtra = '';
constructor(props) {
super(props);
this.state = {
isRead: props.notification.read,
};
}
// Component Life Cycles
UNSAFE_componentWillReceiveProps(nextProps) {
const { notification } = this.props;
if (notification.read !== nextProps.notification.read) {
this.setState({ isRead: nextProps.notification.read });
}
}
useEffect(() => {
setIsRead(notification.read);
}, [notification]);
// Component Functions
_handleOnNotificationPress = () => {
const { handleOnPressNotification, notification } = this.props;
const { isRead } = this.state;
if (!isRead) this.setState({ isRead: true });
const _handleOnNotificationPress = () => {
if (!isRead) {
setIsRead(true);
}
handleOnPressNotification(notification);
};
render() {
const {
notification,
intl: { formatMessage },
} = this.props;
const { isRead } = this.state;
if (notification.type === 'transfer') {
titleExtra = notification.amount;
} else if (notification.weight) {
const _percent = `${parseFloat((notification.weight / 100).toFixed(2))}% `;
let _title = formatMessage({
id: `notification.${notification.type}`,
});
titleExtra = _percent;
}
if (notification.weight) {
const _percent = `${parseFloat((notification.weight / 100).toFixed(2))}% `;
if (notification.weight < 0) {
_title = formatMessage({
id: 'notification.unvote',
});
}
_title = `${titleExtra} ${intl.formatMessage({
id: `notification.${notification.type}`,
})}`;
_title = _percent + _title;
}
return (
<TouchableHighlight onPress={() => this._handleOnNotificationPress()}>
<View
key={Math.random()}
style={[styles.notificationWrapper, !isRead && styles.isNewNotification]}
>
<UserAvatar
username={notification.source}
style={[styles.avatar, !notification.avatar && styles.hasNoAvatar]}
/>
<View style={styles.body}>
<View style={styles.titleWrapper}>
<Text style={styles.name}>{notification.source} </Text>
<Text style={styles.title}>{_title}</Text>
</View>
{notification.description && (
<Text numberOfLines={1} style={styles.description}>
{notification.description}
</Text>
)}
return (
<TouchableHighlight onPress={_handleOnNotificationPress}>
<View
key={`${get(notification, 'id')}${_title}`}
style={[styles.notificationWrapper, !isRead && styles.isNewNotification]}
>
<UserAvatar
username={notification.source}
style={[styles.avatar, !notification.avatar && styles.hasNoAvatar]}
/>
<View style={styles.body}>
<View style={styles.titleWrapper}>
<Text style={styles.name}>{notification.source} </Text>
<Text style={styles.title}>{_title}</Text>
</View>
{notification.image && (
<Image
style={styles.image}
source={{ uri: notification.image }}
defaultSource={require('../../../assets/no_image.png')}
/>
{notification.description && (
<Text numberOfLines={1} style={styles.description}>
{notification.description}
</Text>
)}
</View>
</TouchableHighlight>
);
}
}
export default injectIntl(NotificationLineView);
{get(notification, 'image', null) && (
<Image
style={styles.image}
source={{ uri: notification.image }}
defaultSource={require('../../../assets/no_image.png')}
/>
)}
</View>
</TouchableHighlight>
);
};
export default NotificationLineView;

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "আপনাকে অননুসরণ করেছে",
"ignore": "আপনাকে উপেক্ষা করেছে",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,8 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"comingsoon": "Feature is coming soon!",
"transfer": "transferred",
"notification": "Notifications",
"leaderboard": "Leaderboard",
"epoint": "Points",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "dejó de seguirte",
"ignore": "te ignoró",
"reblog": "reblogueó tu publicación",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notificaciones",
"leaderboard": "Tabla de posiciones",

View File

@ -19,7 +19,7 @@
"unfollow": "lopetti seuraamisesi",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unlaistida þuk",
"ignore": "ignored you",
"reblog": "aftrablaugida þein waurd",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "te prestao/la pratiti",
"ignore": "te ignorira",
"reblog": "je podijelio tvoju objavu",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Obavijesti",
"leaderboard": "Rang lista",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "non ti segue più",
"ignore": "ti ha ignorato",
"reblog": "ha ripostato il tuo post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifiche",
"leaderboard": "Classifica",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "ontvolgt je",
"ignore": "heeft je genegeerd",
"reblog": "deelde je bericht",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notificaties",
"leaderboard": "Scorebord",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -1,362 +1,362 @@
{
"wallet": {
"curation_reward": "Curation Reward",
"author_reward": "Author Reward",
"comment_benefactor_reward": "Comment Benefactor Reward",
"claim_reward_balance": "Claim Reward Balance",
"transfer": "Transfer",
"transfer_to_vesting": "Transfer To Vesting",
"transfer_from_savings": "Transfer From Savings",
"withdraw_vesting": "Power Down",
"fill_order": "Fill Order"
"curation_reward": "Кураторська винагорода",
"author_reward": "Авторська винагорода",
"comment_benefactor_reward": "Винагорода коментатору",
"claim_reward_balance": "Зарахувати винагороду на баланс",
"transfer": "Переказ",
"transfer_to_vesting": "Підвищення сили голосу",
"transfer_from_savings": "Переказ із заощаджень",
"withdraw_vesting": "Зменшення Сили голосу",
"fill_order": "Заповніть замовлення"
},
"notification": {
"vote": "likes your post",
"unvote": "unvoted your post",
"reply": "replied to your post",
"mention": "mentioned you",
"follow": "followed you",
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",
"epoint": "Points",
"leaderboard_title": "Top Users",
"recent": "Recent",
"yesterday": "Yesterday",
"this_week": "This Week",
"this_month": "This Month",
"older_then": "Older Than A Month"
"vote": "сподобалася ваша публікація",
"unvote": "проголосував(-ла) за ваш допис",
"reply": "відповів(-ла) на ваш допис",
"mention": "згадав (-ла) вас",
"follow": "підписався(-лась) на вас",
"unfollow": "підписався(-лась) на вас",
"ignore": "ігнорував тебе",
"reblog": "рестімнув ваш допис",
"transfer": "відправлено steem",
"comingsoon": "Функція незабаром стане доступною!",
"notification": "Сповіщення",
"leaderboard": "Дошка лідерів",
"epoint": "Бали",
"leaderboard_title": "Топ користувачів",
"recent": "Останні",
"yesterday": "Вчора",
"this_week": "Цього тижня",
"this_month": "Цього місяця",
"older_then": "Понад місяць"
},
"leaderboard": {
"daily": "Daily",
"weekly": "Weekly",
"monthly": "Monthly"
"daily": "Щоденно",
"weekly": "Щотижня",
"monthly": "Щомісяця"
},
"points": {
"post": "Post",
"esteemPoints": "eSteem Points",
"comment": "Comment",
"checkin": "Check-in",
"vote": "Vote",
"reblog": "Reblog",
"login": "Login",
"incoming_transfer_title": "Incoming transfer",
"outgoing_transfer_title": "Outgoing transfer",
"checkin_extra": "Bonus",
"delegation": "Delegation",
"delegation_title": "Delegation reward",
"delegation_desc": "You can earn 1 point per day for each 100sp delegation",
"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",
"checkin_title": "Points for heartbeat",
"checkin_extra_title": "Usage bonus",
"no_activity": "No activity here!",
"post": "Допис",
"esteemPoints": "eSteem Бали",
"comment": "Коментувати",
"checkin": "Зареєструвати",
"vote": "Проголосувати",
"reblog": "Рестімнути",
"login": "Логін",
"incoming_transfer_title": "Вхідний переказ",
"outgoing_transfer_title": "Вихідний переказ",
"checkin_extra": "Бонус",
"delegation": "Делегування",
"delegation_title": "Винагорода за делегацію",
"delegation_desc": "За кожні делеговані 100SP ви можете отримувати 1 бал за день",
"post_title": "Бали за допис",
"comment_title": "Бали за коментар",
"vote_title": "Бали за голос",
"reblog_title": "Бали за рестім",
"login_title": "Бали за авторизацію",
"checkin_title": "Бали за вподобайки",
"checkin_extra_title": "Бонус за користування",
"no_activity": "Тут немає жодної активності!",
"outgoing_transfer_description": "",
"incoming_transfer_description": "",
"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.",
"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.",
"dropdown_transfer": "Gift",
"dropdown_promote": "Promote",
"dropdown_boost": "Boost",
"from": "From",
"to": "To"
"post_desc": "Ви можете заробити очки, регулярно публікуючи повідомлення. Повідомлення дає 15 балів.",
"comment_desc": "Кожен зроблений вами коментар допомагає вам розширити свою аудиторію та зав'язати дружбу, але також заробляє 5 балів.",
"checkin_desc": "Увійшовши в додаток eSteem, ви отримаєте 0,25 бала та допоможете залишатися на зв’язку зі своїми друзями.",
"vote_desc": "Голосуючи, ви винагороджуєте інших авторів і показуєте своє схвалення, а також отримуєте бали у кількості 0,01 x Сила голосу.",
"reblog_desc": " Діліться з друзями дописами, що вам подобаються, та отримуйте 1 бал.",
"login_desc": "При авторизації в додатку eSteem вам автоматично нараховується 100 балів.",
"checkin_extra_desc": "Регулярне використання додатку дає вам шанс отримати ще 10 бонусних балів. Більше активності - більше винагород.",
"dropdown_transfer": "Подарунок",
"dropdown_promote": "Просувати",
"dropdown_boost": "Підсилити",
"from": "Від",
"to": "Кому"
},
"messages": {
"comingsoon": "Messages feature is coming soon!"
"comingsoon": "Функція повідомлень незабаром стане доступною!"
},
"profile": {
"following": "Following",
"follower": "Follower",
"following": "Слідкує",
"follower": "Читачі",
"post": "Post",
"details": "Profile Details",
"comments": "Comments",
"replies": "Replies",
"wallet": "Wallet",
"wallet_details": "Wallet Details",
"unclaimed_rewards": "Unclaimed Rewards",
"full_in": "Full in",
"hours": "hours",
"voting_power": "Voting power",
"login_to_see": "Login to see",
"havent_commented": "haven't commented anything yet",
"havent_posted": "haven't posted anything yet",
"steem_power": "Steem Power",
"next_power_text": "Next power down is in",
"days": "days",
"day": "day",
"steem_dollars": "Steem Dollars",
"savings": "Savings",
"details": "Деталі профілю",
"comments": "Коментарі",
"replies": "Відповіді",
"wallet": "Гаманець",
"wallet_details": "Деталі гаманця",
"unclaimed_rewards": "Не отримана винагорода",
"full_in": "Повна",
"hours": "годин(и)",
"voting_power": "Сила голосу",
"login_to_see": "Увійдіть, щоб побачити",
"havent_commented": "ще нічого не коментував",
"havent_posted": "ще нічого не опублікував",
"steem_power": "Потужність акаунту",
"next_power_text": "Наступне вимкнення живлення відбувається через",
"days": "днів",
"day": "день",
"steem_dollars": "Стім Долар",
"savings": "Заощадження",
"edit": {
"display_name": "Display Name",
"about": "About",
"location": "Location",
"website": "Website"
"display_name": "Відображуване ім'я",
"about": "Про додаток",
"location": "Місцеперебування",
"website": "Веб-сторінка"
}
},
"settings": {
"settings": "Settings",
"general": "General",
"currency": "Currency",
"language": "Language",
"server": "Server",
"dark_theme": "Dark Theme",
"push_notification": "Push Notification",
"settings": "Налаштування",
"general": "Загальні",
"currency": "Валюта",
"language": "Мова",
"server": "Сервер",
"dark_theme": "Темна тема",
"push_notification": "Push-сповіщення",
"notification": {
"follow": "Follow",
"vote": "Vote",
"comment": "Comment",
"mention": "Mention",
"reblog": "Reblog",
"transfers": "Transfers"
"follow": "Слідкувати",
"vote": "Проголосувати",
"comment": "Коментувати",
"mention": "Згадування",
"reblog": "Рестім",
"transfers": "Перекази"
},
"pincode": "Pincode",
"reset_pin": "Reset Pin Code",
"reset": "Reset",
"nsfw_content": "NSFW Content",
"send_feedback": "Send Feedback",
"send": "Send",
"default_footer": "Default Footer",
"reset_pin": "Скинути Pin-код",
"reset": "Скинути",
"nsfw_content": "NSFW вміст",
"send_feedback": "Надіслати відгук",
"send": "Надіслати",
"default_footer": "Звичайний Підвал",
"nsfw": {
"always_show": "Always show",
"always_hide": "Always hide",
"always_warn": "Always warn"
"always_show": "Завжди показувати",
"always_hide": "Завжди приховувати",
"always_warn": "Завжди попереджати"
},
"feedback_success": "Email successfully open",
"feedback_fail": "Email client could not open",
"server_fail": "Server not available"
"feedback_success": "Електронний лист успішно відкрито",
"feedback_fail": "Не вдалося відкрити клієнт електронної пошти",
"server_fail": "Сервер недоступний"
},
"voters": {
"voters_info": "Voters Info",
"no_user": "User is not found."
"voters_info": "Інформація голосувань",
"no_user": "Користувач не знайдений."
},
"login": {
"signin": "Sign in",
"signup": "Sign up",
"signin_title": "To get all the benefits of using eSteem",
"username": "Username",
"password": "Password or WIF",
"description": "User credentials are kept locally on the device. Credentials are removed upon logout!",
"cancel": "cancel",
"login": "LOGIN",
"steemconnect_description": "If you don't want to keep your password encrypted and saved on your device, you can use Steemconnect.",
"steemconnect_fee_description": "Steemconnect may charge some fees from your reward transactions"
"signin": "Увійти",
"signup": "Зареєструватися",
"signin_title": "Щоб отримати всі переваги використовуйте eSteem",
"username": "Ім'я користувача",
"password": "Пароль або WIF (приватний ключ)",
"description": "Дані користувача зберігаються локально на пристрої. Посвідчення видаляється після виходу з системи!",
"cancel": "скасувати",
"login": "ЛОГІН",
"steemconnect_description": "Якщо ви не хочете зберігати свій зашифрований пароль і зберігати на своєму пристрої, ви можете використовувати Steemconnect.",
"steemconnect_fee_description": "Примітка: Steemconnect може стягувати деяку плату з ваших транзакцій винагород"
},
"home": {
"feed": "Feed",
"popular": "Popular"
"feed": "Стрічка",
"popular": "Популярне"
},
"side_menu": {
"profile": "Profile",
"bookmarks": "Bookmarks",
"favorites": "Favorites",
"drafts": "Drafts",
"schedules": "Schedules",
"gallery": "Gallery",
"settings": "Settings",
"add_account": "Add Account",
"logout": "Logout",
"cancel": "Cancel",
"logout_text": "Are you sure you want to logout?"
"profile": "Профіль",
"bookmarks": "Закладки",
"favorites": "Улюблені",
"drafts": "Чернетки",
"schedules": "Розклади",
"gallery": "Світлини",
"settings": "Налаштування",
"add_account": "Додати обліковий запис",
"logout": "Вийти",
"cancel": "Скасувати",
"logout_text": "Впевнені, що хочете вийти?"
},
"header": {
"title": "Login to customize your feed",
"search": "Search..."
"title": "Увійдіть, щоб налаштувати свій канал",
"search": "Пошук..."
},
"basic_header": {
"publish": "Publish",
"search": "Search",
"update": "Update",
"reply": "Reply"
"publish": "Опублікувати",
"search": "Пошук",
"update": "Оновити",
"reply": "Відповісти"
},
"editor": {
"title": "Title",
"tags": "tags",
"default_placeholder": "What would you like to write about today?",
"reply_placeholder": "What would you like to write about above post?",
"publish": "Publish",
"reply": "Reply",
"open_gallery": "Open Gallery",
"capture_photo": "Capture a photo"
"title": "Заголовок",
"tags": "теги",
"default_placeholder": "Що б ви хотіли написати сьогодні?",
"reply_placeholder": "Що ви хотіли б написати про вищезгаданий допис?",
"publish": "Опублікувати",
"reply": "Відповісти",
"open_gallery": "Відкрити список світлин",
"capture_photo": "Зробити світлину"
},
"pincode": {
"enter_text": "Enter pin to unlock",
"set_new": "Set new pin",
"write_again": "Write again",
"forgot_text": "Oh, I forgot it..."
"write_again": "Напишіть ще раз",
"forgot_text": "Ой, я його забув..."
},
"alert": {
"success": "Success!",
"successful": "Successful",
"allRead": "Marked all notifications as read",
"claim_reward_balance_ok": "Reward balance claimed",
"fail": "Fail!",
"move": "Move",
"move_question": "Are you sure to move to drafts?",
"success_shared": "Your post successfully shared",
"success_moved": "Moved to draft",
"permission_denied": "Permission denied",
"permission_text": "Please, go to phone Settings and change eSteem app permissions.",
"success": "Успіх!",
"successful": "Вдало",
"allRead": "Позначив усі сповіщення як прочитані",
"claim_reward_balance_ok": "Винагорода зарахована на баланс",
"fail": "Невдало!",
"move": "Перемістити",
"move_question": "Ви впевнені що хочете перейти до чернетки?",
"success_shared": "Ваш допис успішно поширили",
"success_moved": "Переміщено до чернеток",
"permission_denied": "У доступі відмовлено",
"permission_text": "Перейдіть у Налаштування телефону та змініть дозволи програми eSteem.",
"success_rebloged": "Rebloged!",
"already_rebloged": "You have already reblogged!",
"warning": "Warning",
"already_rebloged": "Ви вже повторно рестімнули!",
"warning": "Увага",
"invalid_pincode": "Invalid pin code, please check and try again.",
"remove_alert": "Are you sure want to remove?",
"clear_alert": "Are you sure you want to clear?",
"clear_user_alert": "Are you sure you want to clear all user data?",
"clear": "Clear",
"cancel": "Cancel",
"delete": "Delete",
"copied": "Copied!",
"no_internet": "No connection!",
"confirm": "Confirm",
"removed": "Removed",
"same_user": "This user already added to list",
"unknow_error": "An error occurred",
"error": "Error",
"fetch_error": "Fetching data failed, please try again or notify us at info@esteem.app",
"connection_fail": "Connection Failed!",
"connection_success": "Successfully connected!",
"checking": "Checking...",
"not_existing_post": "The post does not exist! Please check permlink and author.",
"google_play_version": "We noticed that your device has old version of Google Play. Please update Google Play services and try again!"
"clear_alert": "Ви впевнені, що бажаєте видалити?",
"clear_user_alert": "Ви впевнені, що хочете видалили всі ваші дані?",
"clear": "Очистити",
"cancel": "Скасувати",
"delete": "Видалити",
"copied": "Скопійовано!",
"no_internet": "Відсутнє з'єднання!",
"confirm": "Підтвердити",
"removed": "Вилучено",
"same_user": "Цього користувача уже додано до списку",
"unknow_error": "Виникла помилка",
"error": "Помилка",
"fetch_error": "Не вдалося отримати дані. Повторіть спробу або повідомте нам на пошту info@esteem.app",
"connection_fail": "Помилка з’єднання!",
"connection_success": "Успішне підключення!",
"checking": "Перевірка...",
"not_existing_post": "Допису не існує! Будь ласка, перевірте першоджерело та автора.",
"google_play_version": "Ми помітили, що на вашому пристрої є стара версія Google Play. Оновіть служби Google Play і повторіть спробу!"
},
"post": {
"reblog_alert": "Are you sure, you want to reblog?",
"removed_hint": "The post was removed by",
"copy_link": "Copy Link",
"reblogged": "reblogged by",
"sponsored": "SPONSORED",
"open_thread": "Open Thread"
"reblog_alert": "Ви впевнені, що хочете рестімнути?",
"removed_hint": "Допис видалено користувачем",
"copy_link": "Скопіювати посилання",
"reblogged": "рестімнуто",
"sponsored": "СПОНСОРОВАНО",
"open_thread": "Відкрита тема"
},
"drafts": {
"title": "Drafts",
"load_error": "Could not load drafts",
"empty_list": "Nothing here",
"deleted": "Draft deleted"
"title": "Чернетки",
"load_error": "Не вдалося завантажити чернетки",
"empty_list": "Тут поки що нічого немає",
"deleted": "Чернетку видалено"
},
"schedules": {
"title": "Schedules",
"empty_list": "Nothing here",
"deleted": "Scheduled post deleted",
"move": "Move to drafts",
"moved": "Moved to drafts"
"title": "Розклади",
"empty_list": "Тут поки що нічого немає",
"deleted": "Запланований допис видалено",
"move": "Перемістити до чернеток",
"moved": "Переміщено до чернеток"
},
"bookmarks": {
"title": "Bookmarks",
"load_error": "Could not load bookmarks",
"empty_list": "Nothing here",
"deleted": "Bookmark removed",
"search": "Search in bookmarks",
"added": "Added to bookmarks",
"add": "Add to bookmarks"
"title": "Закладки",
"load_error": "Не вдалося завантажити закладки",
"empty_list": "Тут поки що нічого немає",
"deleted": "Закладку видалено",
"search": "Пошук у закладках",
"added": "Додано до закладок",
"add": "Додати до закладок"
},
"favorites": {
"title": "Favorites",
"load_error": "Could not load favorites",
"empty_list": "Nothing here",
"search": "Search in favorites"
"title": "Улюблені",
"load_error": "Не вдалося завантажити в розділі улюблені",
"empty_list": "Тут поки що нічого немає",
"search": "Пошук в улюблених"
},
"auth": {
"invalid_pin": "Invalid pin code, please check and try again",
"invalid_username": "Invalid username, please check and try again",
"already_logged": "You are already logged in, please try to add another account",
"invalid_credentials": "Invalid credentials, please check and try again",
"unknow_error": "Unknown error, please contact us at support@esteem.app"
"invalid_username": "Недійсне ім’я користувача. Перевірте та повторіть спробу",
"already_logged": "Ви вже ввійшли, спробуйте додати інший обліковий запис",
"invalid_credentials": "Недійсні облікові дані. Перевірте та повторіть спробу",
"unknow_error": "Невідома помилка, зв'яжіться з нами за адресою support@esteem.app"
},
"payout": {
"potential_payout": "Potential Payout",
"promoted": "Promoted",
"author_payout": "Author Payout",
"curation_payout": "Curation Payout",
"payout_date": "Payout"
"potential_payout": "Потенційна виплата",
"promoted": "Просунуто",
"author_payout": "Авторська винагорода",
"curation_payout": "Кураторська винагорода",
"payout_date": "Виплата"
},
"post_dropdown": {
"copy": "copy link",
"reblog": "reblog",
"reply": "reply",
"share": "share",
"bookmarks": "add to bookmarks",
"promote": "promote",
"boost": "boost"
"copy": "копіювати джерело",
"reblog": "рестім",
"reply": "відповісти",
"share": "поширити",
"bookmarks": "додати до закладок",
"promote": "просувати",
"boost": "підсилити"
},
"deep_link": {
"no_existing_user": "No existing user",
"no_existing_post": "No existing post"
"no_existing_user": "Неіснуючий користувач",
"no_existing_post": "Неіснуючий допис"
},
"search": {
"posts": "Posts",
"comments": "Comments"
"posts": "Дописи",
"comments": "Коментарі"
},
"comment_filter": {
"trending": "trending",
"reputation": "reputation",
"votes": "votes",
"age": "age"
"trending": "популярне",
"reputation": "репутація",
"votes": "голоси",
"age": "вік"
},
"transfer": {
"from": "From",
"to": "To",
"amount_information": "Drag the slider to adjust the amount",
"amount": "Amount",
"memo": "Memo",
"information": "Are you sure to transfer funds?",
"amount_desc": "Balance",
"memo_desc": "This memo is public",
"to_placeholder": "Username",
"memo_placeholder": "Enter your notes here",
"transfer_token": "Transfer",
"points": "Gift ESTM to someone",
"transfer_to_saving": "Transfer To Saving",
"powerUp": "Power Up",
"withdraw_to_saving": "Withdraw To Saving",
"steemconnect_title": "Steemconnect Transfer",
"next": "NEXT",
"delegate": "Delegate",
"power_down": "Power Down",
"withdraw_steem": "Withdraw Steem",
"withdraw_sbd": "Withdraw Steem Dollar"
"from": "Від",
"to": "Кому",
"amount_information": "Перетягніть повзунок, щоб відрегулювати суму",
"amount": "Сума",
"memo": "Примітка",
"information": "Ви впевнені, що хочете перерахувати кошти?",
"amount_desc": "Баланс",
"memo_desc": "Ця примітка є публічною",
"to_placeholder": "Ім'я користувача",
"memo_placeholder": "Введіть сюди свої примітки",
"transfer_token": "Переказ",
"points": "Подарувати комусь ESTM",
"transfer_to_saving": "Перевести до Заощаджень",
"powerUp": "Збільшення Силу Голосу",
"withdraw_to_saving": "Вивести на збереження",
"steemconnect_title": "Передача Steemconnect",
"next": "НАСТУПНА",
"delegate": "Делегувати",
"power_down": "Зменшення Сили голосу",
"withdraw_steem": "Вивести Steem",
"withdraw_sbd": "Вивести Стім долар"
},
"boost": {
"title": "Get eSteem Points",
"buy": "GET ESTM",
"next": "NEXT"
"title": "Отримати eSteem бали",
"buy": "Отримати ESTM",
"next": "НАСТУПНА"
},
"free_estm": {
"title": "Free ESTM",
"button": "SPIN & WIN",
"get_spin": "5 SPINS",
"spin_right": "Spin Left",
"timer_text": "Next free spin in"
"title": "Безкоштовні ESTM",
"button": "Обертай та Вигравай",
"get_spin": "5 Обертів",
"spin_right": "Оберни ліворуч",
"timer_text": "Наступне обертання буде безкоштовним"
},
"promote": {
"title": "Promote",
"days": "days",
"user": "User",
"permlink": "Post",
"permlinkPlaceholder": "author/permlink",
"information": "Are you sure to promote?"
"title": "Просувати",
"days": "днів",
"user": "Користувач",
"permlink": "Допис",
"permlinkPlaceholder": "автор/постійне посилання",
"information": "Справді бажаєте просувати допис?"
},
"boostPost": {
"title": "Boost"
"title": "Підсилити"
},
"voters_dropdown": {
"rewards": "REWARDS",
"percent": "PERCENT",
"time": "TIME"
"rewards": "НАГОРОДИ",
"percent": "ТОЧНО",
"time": "ЧАС"
},
"reblog": {
"title": "Reblog Info"
"title": "Рестім інформація"
}
}

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "unfollowed you",
"ignore": "ignored you",
"reblog": "reblogged your post",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Notifications",
"leaderboard": "Leaderboard",

View File

@ -19,7 +19,7 @@
"unfollow": "ko ba o lo mo",
"ignore": "ti ko eti ikun",
"reblog": "ti se eda oro re",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "Awon Akiyesi",
"leaderboard": "Ate asiwaju",

View File

@ -19,7 +19,7 @@
"unfollow": "取消关注了您",
"ignore": "忽视了您",
"reblog": "转发了您的帖子",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "通知",
"leaderboard": "排行榜",

View File

@ -19,7 +19,7 @@
"unfollow": "取消關注了您",
"ignore": "忽略了您",
"reblog": "轉發了您的帖子",
"transfer": "transfered steem",
"transfer": "transferred",
"comingsoon": "Feature is coming soon!",
"notification": "通知",
"leaderboard": "排行榜",

View File

@ -3,6 +3,7 @@ import { Provider, connect } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react';
import { IntlProvider } from 'react-intl';
import { useScreens } from 'react-native-screens';
import { setTopLevelNavigator } from './navigation/service';
import { flattenMessages } from './utils/flattenMessages';
import messages from './config/locales';
@ -29,7 +30,11 @@ const App = connect(mapStateToProps)(_renderApp);
export default () => {
return (
<Provider store={store}>
<App />
<App
ref={navigatorRef => {
setTopLevelNavigator(navigatorRef);
}}
/>
</Provider>
);
};

16
src/navigation/service.js Normal file
View File

@ -0,0 +1,16 @@
import { NavigationActions } from 'react-navigation';
let _navigator;
export const setTopLevelNavigator = navigatorRef => {
_navigator = navigatorRef;
};
export const navigate = (routeName, params) => {
_navigator.dispatch(
NavigationActions.navigate({
routeName,
params,
}),
);
};

View File

@ -1,7 +1,7 @@
import React, { Component } from 'react';
import { Alert } from 'react-native';
import { connect } from 'react-redux';
import { get, some, isEmpty } from 'lodash';
import get from 'lodash/get';
import { injectIntl } from 'react-intl';
// Actions and Services
@ -118,7 +118,9 @@ class NotificationContainer extends Component {
const { username, dispatch, intl, isConnected } = this.props;
const { notifications } = this.state;
if (!isConnected) return;
if (!isConnected) {
return;
}
this.setState({ isNotificationRefreshing: true });

View File

@ -1,4 +1,6 @@
import React, { PureComponent } from 'react';
import React, { useState } from 'react';
import { useIntl } from 'react-intl';
import { Text, TouchableOpacity, View } from 'react-native';
import { NumericKeyboard, PinAnimatedInput } from '../../../components';
@ -6,84 +8,72 @@ import { UserAvatar } from '../../../components';
import styles from './pinCodeStyles';
class PinCodeScreen extends PureComponent {
constructor(props) {
super(props);
this.state = {
pin: '',
loading: false,
};
}
const PinCodeScreen = ({
informationText,
showForgotButton,
username,
handleForgotButton,
setPinCode,
}) => {
const [pin, setPin] = useState('');
const [loading, setLoading] = useState(false);
const intl = useIntl();
// Component Life Cycles
// Component Functions
_handleKeyboardOnPress = async value => {
const { setPinCode } = this.props;
const { pin, loading } = this.state;
const _handleKeyboardOnPress = async value => {
if (loading) {
return;
}
if (value === 'clear') {
this.setState({ pin: '' });
setPin('');
return;
}
const newPin = `${pin}${value}`;
if (pin.length < 3) {
this.setState({ pin: newPin });
setPin(newPin);
} else if (pin.length === 3) {
await this.setState({ pin: newPin, loading: true });
await setPin(newPin);
await setLoading(true);
setPinCode(`${pin}${value}`)
.then(() => {
// TODO: fix unmounted component error
this.setState({ pin: '', loading: false });
})
.catch(() => {
this.setState({ pin: '', loading: false });
});
await setPinCode(`${pin}${value}`);
setPin('');
setLoading(false);
} else if (pin.length > 3) {
this.setState({ pin: `${value}` });
setPin(`${value}`);
}
};
render() {
const { informationText, showForgotButton, username, intl, handleForgotButton } = this.props;
const { pin, loading } = this.state;
return (
<View style={styles.container}>
<View style={styles.logoView}>
<UserAvatar noAction username={username} size="xl" style={styles.avatar} />
</View>
<View style={styles.titleView}>
<Text style={styles.title}>{`@${username}`}</Text>
</View>
<View style={styles.informationView}>
<Text style={styles.informationText}>{informationText}</Text>
</View>
<View style={styles.animatedView}>
<PinAnimatedInput pin={pin} loading={loading} />
</View>
<View style={styles.numericKeyboardView}>
<NumericKeyboard onPress={this._handleKeyboardOnPress} />
</View>
{showForgotButton ? (
<TouchableOpacity onPress={() => handleForgotButton()} style={styles.forgotButtonView}>
<Text style={styles.forgotButtonText}>
{intl.formatMessage({
id: 'pincode.forgot_text',
})}
</Text>
</TouchableOpacity>
) : (
<View style={styles.forgotButtonView} />
)}
return (
<View style={styles.container}>
<View style={styles.logoView}>
<UserAvatar noAction username={username} size="xl" style={styles.avatar} />
</View>
);
}
}
<View style={styles.titleView}>
<Text style={styles.title}>{`@${username}`}</Text>
</View>
<View style={styles.informationView}>
<Text style={styles.informationText}>{informationText}</Text>
</View>
<View style={styles.animatedView}>
<PinAnimatedInput pin={pin} loading={loading} />
</View>
<View style={styles.numericKeyboardView}>
<NumericKeyboard onPress={_handleKeyboardOnPress} />
</View>
{showForgotButton ? (
<TouchableOpacity onPress={() => handleForgotButton()} style={styles.forgotButtonView}>
<Text style={styles.forgotButtonText}>
{intl.formatMessage({
id: 'pincode.forgot_text',
})}
</Text>
</TouchableOpacity>
) : (
<View style={styles.forgotButtonView} />
)}
</View>
);
};
export default PinCodeScreen;

View File

@ -1,4 +1,4 @@
import React, { PureComponent } from 'react';
import React from 'react';
import { connect } from 'react-redux';
// Component
@ -7,33 +7,14 @@ import PointsScreen from '../screen/pointsScreen';
// Constants
import ROUTES from '../../../constants/routeNames';
/*
* Props Name Description Value
*@props --> props name here description here Value Type Here
*
*/
class PointsContainer extends PureComponent {
constructor(props) {
super(props);
this.state = {};
}
// Component Life Cycle Functions
// Component Functions
_handleOnPressLogin = () => {
const { navigation } = this.props;
const PointsContainer = ({ isLoggedIn, navigation }) => {
const _handleOnPressLogin = () => {
navigation.navigate(ROUTES.SCREENS.LOGIN);
};
render() {
const { isLoggedIn } = this.props;
return <PointsScreen isLoggedIn={isLoggedIn} handleLoginPress={_handleOnPressLogin} />;
};
return <PointsScreen isLoggedIn={isLoggedIn} handleLoginPress={this._handleOnPressLogin} />;
}
}
const matStateToProps = state => ({
isLoggedIn: state.application.isLoggedIn,
});

View File

@ -1,6 +1,6 @@
import React, { PureComponent, Fragment } from 'react';
import { injectIntl } from 'react-intl';
import { View, SafeAreaView } from 'react-native';
import React, { Fragment } from 'react';
import { useIntl } from 'react-intl';
import { SafeAreaView } from 'react-native';
// Containers
import { PointsContainer } from '../../../containers';
@ -11,68 +11,52 @@ import { Header, Points, NoPost } from '../../../components';
// Styles
import styles from './pointsStyles';
class PointsScreen extends PureComponent {
/* Props
* ------------------------------------------------
* @prop { type } name - Description....
*/
const PointsScreen = ({ isLoggedIn, handleLoginPress }) => {
const intl = useIntl();
constructor(props) {
super(props);
this.state = {};
}
return (
<Fragment>
<Header />
<SafeAreaView style={styles.container}>
{isLoggedIn ? (
<PointsContainer>
{({
handleOnDropdownSelected,
claimPoints,
fetchUserActivity,
isClaiming,
isDarkTheme,
isLoading,
refreshing,
userActivities,
userPoints,
}) => (
<Points
claimPoints={claimPoints}
fetchUserActivity={fetchUserActivity}
isClaiming={isClaiming}
isDarkTheme={isDarkTheme}
isLoading={isLoading}
refreshing={refreshing}
userActivities={userActivities}
userPoints={userPoints}
handleOnDropdownSelected={handleOnDropdownSelected}
/>
)}
</PointsContainer>
) : (
<NoPost
style={styles.noPostContainer}
isButtonText
defaultText={intl.formatMessage({
id: 'profile.login_to_see',
})}
handleOnButtonPress={handleLoginPress}
/>
)}
</SafeAreaView>
</Fragment>
);
};
// Component Life Cycles
// Component Functions
render() {
const { intl, isLoggedIn, handleLoginPress } = this.props;
return (
<Fragment>
<Header />
<SafeAreaView style={styles.container}>
{isLoggedIn ? (
<PointsContainer>
{({
handleOnDropdownSelected,
claimPoints,
fetchUserActivity,
isClaiming,
isDarkTheme,
isLoading,
refreshing,
userActivities,
userPoints,
}) => (
<Points
claimPoints={claimPoints}
fetchUserActivity={fetchUserActivity}
isClaiming={isClaiming}
isDarkTheme={isDarkTheme}
isLoading={isLoading}
refreshing={refreshing}
userActivities={userActivities}
userPoints={userPoints}
handleOnDropdownSelected={handleOnDropdownSelected}
/>
)}
</PointsContainer>
) : (
<NoPost
style={styles.noPostContainer}
isButtonText
defaultText={intl.formatMessage({
id: 'profile.login_to_see',
})}
handleOnButtonPress={handleLoginPress}
/>
)}
</SafeAreaView>
</Fragment>
);
}
}
export default injectIntl(PointsScreen);
export default PointsScreen;