mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-17 02:13:34 +03:00
fixed wallet issues
This commit is contained in:
parent
f55fa02640
commit
8acffb7d02
@ -54,7 +54,7 @@ const WalletLineItem = ({
|
||||
</Text>
|
||||
</View>
|
||||
)}
|
||||
{description && (
|
||||
{!!description && (
|
||||
<Text style={[styles.description, !iconName && styles.onlyText]}>{description}</Text>
|
||||
)}
|
||||
</View>
|
||||
|
@ -36,6 +36,7 @@ export default EStyleSheet.create({
|
||||
},
|
||||
insetIconStyle: {
|
||||
marginRight: 20,
|
||||
color: '$primaryDarkText',
|
||||
},
|
||||
activityIndicator: {
|
||||
marginRight: 20,
|
||||
@ -58,6 +59,13 @@ export default EStyleSheet.create({
|
||||
},
|
||||
// TODO: look at here
|
||||
dropdownIconStyle: {
|
||||
marginBottom: 7,
|
||||
width: 25,
|
||||
height: 25,
|
||||
left: -5,
|
||||
marginBottom: 3,
|
||||
color: '#c1c5c7',
|
||||
},
|
||||
dropdownStyle: {
|
||||
maxWidth: 150,
|
||||
},
|
||||
});
|
||||
|
@ -17,6 +17,7 @@ import DARK_COVER_IMAGE from '../../../assets/dark_cover_image.png';
|
||||
import { TextWithIcon } from '../../basicUIElements';
|
||||
import { PercentBar } from '../../percentBar';
|
||||
import { IconButton } from '../../iconButton';
|
||||
import { DropdownButton } from '../../dropdownButton';
|
||||
|
||||
// Utils
|
||||
import { makeCountFriendly } from '../../../utils/formatter';
|
||||
@ -46,6 +47,16 @@ class ProfileSummaryView extends PureComponent {
|
||||
Linking.openURL(url);
|
||||
};
|
||||
|
||||
_handleOnDropdownSelect = (index) => {
|
||||
const { isMuted, handleMuteUnmuteUser } = this.props;
|
||||
|
||||
// This funciton should have switch case but now only has one option therefor
|
||||
// temporarily I created with if statments
|
||||
if (index === '0' && handleMuteUnmuteUser) {
|
||||
handleMuteUnmuteUser(!isMuted);
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { isShowPercentText } = this.state;
|
||||
const {
|
||||
@ -54,8 +65,8 @@ class ProfileSummaryView extends PureComponent {
|
||||
followerCount,
|
||||
followingCount,
|
||||
handleFollowUnfollowUser,
|
||||
handleMuteUnmuteUser,
|
||||
handleOnFollowsPress,
|
||||
handleUIChange,
|
||||
hoursRC,
|
||||
hoursVP,
|
||||
intl,
|
||||
@ -69,9 +80,8 @@ class ProfileSummaryView extends PureComponent {
|
||||
location,
|
||||
percentRC,
|
||||
percentVP,
|
||||
handleUIChange,
|
||||
} = this.props;
|
||||
|
||||
const dropdownOpions = [];
|
||||
const votingPowerHoursText = hoursVP && `• Full in ${hoursVP} hours`;
|
||||
const votingPowerText = `Voting power: ${percentVP}% ${votingPowerHoursText || ''}`;
|
||||
const rcPowerHoursText = hoursRC && `• Full in ${hoursRC} hours`;
|
||||
@ -81,9 +91,10 @@ class ProfileSummaryView extends PureComponent {
|
||||
const isColumn = rowLength && DEVICE_WIDTH / rowLength <= 7.3;
|
||||
|
||||
const followButtonIcon = !isFollowing ? 'account-plus' : 'account-minus';
|
||||
const ignoreButtonIcon = !isMuted ? 'ban' : 'minus';
|
||||
const coverImageUrl = `http://img.esteem.app/400x0/${coverImage}`;
|
||||
|
||||
dropdownOpions.push(!isMuted ? 'MUTE' : 'UNMUTE');
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<View style={[isColumn ? styles.textWithIconWrapperColumn : styles.textWithIconWrapper]}>
|
||||
@ -183,21 +194,20 @@ class ProfileSummaryView extends PureComponent {
|
||||
iconType="MaterialCommunityIcons"
|
||||
onPress={() => handleFollowUnfollowUser(!isFollowing)}
|
||||
size={20}
|
||||
style={styles.insetIconStyle}
|
||||
color="#c1c5c7"
|
||||
/>
|
||||
)}
|
||||
{isProfileLoading ? (
|
||||
<ActivityIndicator style={styles.activityIndicator} />
|
||||
) : (
|
||||
<IconButton
|
||||
backgroundColor="transparent"
|
||||
name={ignoreButtonIcon}
|
||||
iconType="SimpleLineIcons"
|
||||
onPress={() => handleMuteUnmuteUser(!isMuted)}
|
||||
size={16}
|
||||
style={styles.insetIconStyle}
|
||||
color="#c1c5c7"
|
||||
<DropdownButton
|
||||
isHasChildIcon
|
||||
iconName="more-vert"
|
||||
options={dropdownOpions}
|
||||
onSelect={this._handleOnDropdownSelect}
|
||||
noHighlight
|
||||
iconStyle={styles.dropdownIconStyle}
|
||||
dropdownStyle={styles.dropdownStyle}
|
||||
/>
|
||||
)}
|
||||
</Fragment>
|
||||
|
@ -6,6 +6,7 @@
|
||||
"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"
|
||||
},
|
||||
|
@ -1,13 +1,16 @@
|
||||
{
|
||||
"wallet": {
|
||||
"curation_reward": "Curation Reward",
|
||||
"author_reward": "Author Reward",
|
||||
"comment_benefactor_reward": "Comment Benefactor Reward",
|
||||
"claim_reward_balance_ok": "Reward balance claimed",
|
||||
"claim_reward_balance": "Claim Reward Balance",
|
||||
"transfer": "Transfer",
|
||||
"comment_benefactor_reward": "Comment Benefactor Reward",
|
||||
"curation_reward": "Curation Reward",
|
||||
"fill_order": "Fill Order",
|
||||
"transactions": "Transactions",
|
||||
"transfer_from_savings": "Tasarruflardan Transfer",
|
||||
"transfer_to_vesting": "Transfer To Vesting",
|
||||
"withdraw_vesting": "withdraw_vesting",
|
||||
"fill_order": "Fill Order"
|
||||
"transfer": "Transfer",
|
||||
"withdraw_vesting": "Withdraw Vesting"
|
||||
},
|
||||
"notification": {
|
||||
"vote": "beğendi",
|
||||
|
@ -1,5 +1,5 @@
|
||||
// import parseDate from './parseDate';
|
||||
import parseToken from './parseToken';
|
||||
import parseDate from './parseDate';
|
||||
import { vestsToSp } from './conversions';
|
||||
|
||||
export const getTransactionData = (transaction, walletData, formatNumber) => {
|
||||
@ -14,7 +14,7 @@ export const getTransactionData = (transaction, walletData, formatNumber) => {
|
||||
const opData = transaction[1].op[1];
|
||||
const { timestamp } = transaction[1];
|
||||
|
||||
result.transDate = parseDate(timestamp);
|
||||
result.transDate = timestamp;
|
||||
result.icon = 'local-activity';
|
||||
|
||||
switch (result.opName) {
|
||||
@ -85,7 +85,7 @@ export const getTransactionData = (transaction, walletData, formatNumber) => {
|
||||
result.value = `${formatNumber(vestsToSp(opVestingShares, walletData.steemPerMVests), {
|
||||
minimumFractionDigits: 3,
|
||||
})} SP`;
|
||||
result.icon = 'money';
|
||||
result.icon = 'attach-money';
|
||||
result.details = `@${acc}`;
|
||||
break;
|
||||
case 'fill_order':
|
||||
|
Loading…
Reference in New Issue
Block a user