From 765cec3ee53c3ae1aefdff36a730764c2db00030 Mon Sep 17 00:00:00 2001
From: Nadir Hussain Laskar
- The amount available to delegate is {maxAmount.toFixed()}{' '} - {selectedToken.symbol}. Please select a different currency or different - source DAC/Campaign. -
- )} - {delegations.length > 0 && ( -- {model.type.toLowerCase() === DAC.type && ( - - You're pledging: as long as the DAC owner does not lock your money you - can take it back any time. - - )} - {model.type.toLowerCase() !== DAC.type && ( - - You're committing your funds to this {model.type}, if you have filled out - contact information in your Profile you will be - notified about how your funds are spent - - )} -
- )} - - {validProvider && - !currentUser && ( -+ {model.type.toLowerCase() === DAC.type && ( + + You're pledging: as long as the DAC owner does not lock your money you can + take it back any time. + + )} + {model.type.toLowerCase() !== DAC.type && ( + + You're committing your funds to this {model.type}, if you have filled out + contact information in your Profile you will be + notified about how your funds are spent + + )} +
+ )} - How much {selectedToken.symbol} do you want to donate? + {validProvider && !currentUser && ( +No donations have been made yet. Be the first to donate now!
- )} + {!isLoading && donations.length === 0 && ( +No donations have been made yet. Be the first to donate now!
+ )}Attach an expense, invoice or anything else that requires payment.
Attach an expense, invoice or anything else that requires payment.
-Note: Due to the current gas limitations you will be required to withdrawal multiple times. You have {donationsCount} donations to{' '} - {isRecipient ? 'withdraw' : 'disburse'} and the current max is 15. + {isRecipient ? 'withdraw' : 'disburse'} and the current max is 15 + .
)}diff --git a/src/components/views/Campaigns.jsx b/src/components/views/Campaigns.jsx index afc2381aa..1b4bc086e 100644 --- a/src/components/views/Campaigns.jsx +++ b/src/components/views/Campaigns.jsx @@ -17,39 +17,36 @@ const Campaigns = () => (
- These Campaigns work hard to solve causes. Help them realise their goals by - giving Ether or tokens! -
-+ These Campaigns work hard to solve causes. Help them realise their goals by giving + Ether or tokens! +
+There are no Campaigns yet!
- -There are no Campaigns yet!
+ +
Oops, something went wrong... The Giveth dapp could not load
diff --git a/src/components/views/DACs.jsx b/src/components/views/DACs.jsx
index 0f75b9b26..27ca6aa57 100644
--- a/src/components/views/DACs.jsx
+++ b/src/components/views/DACs.jsx
@@ -19,37 +19,35 @@ const DACs = () => (
{!hasError && isLoading &&
- These Communities are solving causes. Help them realise their goals by joining - them and giving Ether or tokens! -
-+ These Communities are solving causes. Help them realise their goals by joining + them and giving Ether or tokens! +
+There are no Decentralized Altruistic Communities (DACs) yet!
- -There are no Decentralized Altruistic Communities (DACs) yet!
+ +Oops, something went wrong... The Giveth dapp could not load any diff --git a/src/components/views/Delegations.jsx b/src/components/views/Delegations.jsx index c2fd9006a..26eb816a2 100644 --- a/src/components/views/Delegations.jsx +++ b/src/components/views/Delegations.jsx @@ -59,126 +59,123 @@ const Delegations = ({ balance, currentUser }) => ( {!isLoading && (
} - | Date | -Donated to | -Amount | -Received from | -Address | -Status | -||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
- {/* When donated to a dac, allow delegation
+ {delegations && delegations.length > 0 && (
+
+
- )}
+
| + {moment(d.createdAt).format('MM/DD/YYYY')} + | + ++ + {d.donatedTo.type} {d.donatedTo.name} + + | ++ {d.isPending && ( + + + + + )} + {convertEthHelper(d.amountRemaining)}{' '} + {(d.token && d.token.symbol) || config.nativeTokenName} + | +
+
+ |
+ {d.giverAddress} | +{d.statusDescription} | +
} - | Status | -Date | -Donated to | -Amount | -Address | -- {donations.some(d => d.isPending) && 'Confirmations'} - | -||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
- {d.canRefund(currentUser, isForeignNetwork) && (
+ {donations && donations.length > 0 && (
+
| {d.giverAddress} | + )} + ++ {donations.some(dn => dn.isPending) && + `${d.confirmations}/${d.requiredConfirmations}`} + | +
- - A Campaign solves a specific cause by executing a project via its Milestones. - Funds raised by a Campaign need to be delegated to its Milestones in order to - be paid out. + A Campaign solves a specific cause by + executing a project via its Milestones. Funds raised by a Campaign need to be + delegated to its Milestones in order to be paid out.
- - A DAC aims to solve a cause by building a Community, raising funds and - delegating those funds to Campaigns that solve its cause. Should you create a - Campaign or Community? Read more{' '} + A DAC aims to solve a cause by building + a Community, raising funds and delegating those funds to Campaigns that solve + its cause. Should you create a Campaign or Community? Read more{' '} here - . + + .
- Here are a few of the latest Milestones. Help them realise their goals by giving - Ether or tokens! -
-+ Here are a few of the latest Milestones. Help them realise their goals by giving + Ether or tokens! +
+There are no Milestones yet!
- -There are no Milestones yet!
+ +Oops, something went wrong... The Giveth dapp could not load diff --git a/src/components/views/MyCampaigns.jsx b/src/components/views/MyCampaigns.jsx index 0bda46c4f..3009d4d6b 100644 --- a/src/components/views/MyCampaigns.jsx +++ b/src/components/views/MyCampaigns.jsx @@ -155,136 +155,132 @@ class MyCampaigns extends Component { {!isLoading && (
} - | Name | -Donations | -Amount | -Status | -- {isPendingCampaign && 'Confirmations'} - | -||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
- {c.owner.address === currentUser.address &&
- c.isActive && (
- |
- )}
- - - {getTruncatedText(c.title, 45)} - - {c.reviewerAddress === currentUser.address && ( - - - I'm reviewer - - )} - | -
- {c.donationCounters.length > 0 &&
- c.donationCounters.map(counter => (
- - {counter.donationCount} donation(s) in {counter.symbol} - - ))} - {c.donationCounters.length === 0 && -} - |
-
- {c.donationCounters.length > 0 &&
- c.donationCounters.map(counter => (
- - {convertEthHelper(counter.totalDonated)}{' '} - {counter.symbol} - - ))} - {c.donationCounters.length === 0 && -} - |
-
- {(c.status === Campaign.PENDING ||
- (Object.keys(c).includes('mined') && !c.mined)) && (
-
-
-
-
+ {campaigns && campaigns.data.length > 0 && (
+
+
- )}
+ {(c.reviewerAddress === currentUser.address ||
+ c.owner.address === currentUser.address) &&
+ isForeignNetwork &&
+ c.isActive && (
+
|
+ )}
+ + + {getTruncatedText(c.title, 45)} + + {c.reviewerAddress === currentUser.address && ( + + + I'm reviewer + + )} + | +
+ {c.donationCounters.length > 0 &&
+ c.donationCounters.map(counter => (
+ + {counter.donationCount} donation(s) in {counter.symbol} + + ))} + {c.donationCounters.length === 0 && -} + |
+
+ {c.donationCounters.length > 0 &&
+ c.donationCounters.map(counter => (
+ + {convertEthHelper(counter.totalDonated)} {counter.symbol} + + ))} + {c.donationCounters.length === 0 && -} + |
+ + {(c.status === Campaign.PENDING || + (Object.keys(c).includes('mined') && !c.mined)) && ( + + + + + )} + {c.status} + | ++ {(isPendingCampaign || + c.requiredConfirmations !== c.confirmations) && + `${c.confirmations}/${c.requiredConfirmations}`} + | +
} - | Name | -Number of donations | -Amount donated | -Status | -- {isPendingDac && 'Confirmations'} - | -||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
- |
- )}
- - {getTruncatedText(d.title, 45)} - | -
- {d.donationCounters.length > 0 &&
- d.donationCounters.map(counter => (
- - {counter.donationCount} donation(s) in {counter.symbol} - - ))} - {d.donationCounters.length === 0 && -} - |
-
- {d.donationCounters.length > 0 &&
- d.donationCounters.map(counter => (
- - {convertEthHelper(counter.totalDonated)} {counter.symbol} - - ))} - - {d.donationCounters.length === 0 && -} - |
-
- {d.status === DAC.PENDING && (
-
-
-
-
- )}
- {d.status}
+ {dacs && dacs.data.length > 0 && (
+
+
- )}
-
- {dacs &&
- dacs.data.length === 0 && (
-
+ )}
+
+ {getTruncatedText(d.title, 45)}
+ |
+
+ {d.donationCounters.length > 0 &&
+ d.donationCounters.map(counter => (
+ |
+ + {counter.donationCount} donation(s) in {counter.symbol} + + ))} + {d.donationCounters.length === 0 && -} +
+ {d.donationCounters.length > 0 &&
+ d.donationCounters.map(counter => (
+ |
+ + {convertEthHelper(counter.totalDonated)} {counter.symbol} + + ))} + + {d.donationCounters.length === 0 && -} +
+ {d.status === DAC.PENDING && (
+
+
+
+
+ )}
+ {d.status}
+ |
+
+ {(isPendingDac || d.requiredConfirmations !== d.confirmations) &&
+ `${d.confirmations}/${d.requiredConfirmations}`}
+ |
+ |
{userAddress}
} -{email}
-{linkedin}
-{userAddress}
} +{email}
+{linkedin}
+Created | -Name | -Status | -Requested | -Donations | -Donated | -Reviewer | -||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
- {m.createdAt && ( - {moment.utc(m.createdAt).format('Do MMM YYYY')} - )} - | -
-
-
- MILESTONE {getTruncatedText(m.title, 35)}
-
-
- - - - CAMPAIGN {getTruncatedText(m.campaign.title, 40)} + {milestones && milestones.data.length > 0 && ( +
+
- )}
+ {m.reviewerAddress === userAddress && (
+
+
+ Reviewer
+
+ )}
+ {m.recipientAddress === userAddress && (
+
+
+ Recipient
+
+ )}
+
+
|
+ + {(m.status === 'Pending' || + (Object.keys(m).includes('mined') && !m.mined)) && ( + + + + + )} + {m.status === 'NeedsReview' && reviewDue(m.updatedAt) && ( + + + + + )} + {getReadableStatus(m.status)} + | ++ {convertEthHelper(m.maxAmount)} {m.token.symbol} + | +{m.donationCount || 0} | ++ {convertEthHelper(m.currentBalance)} {m.token.symbol} + | ++ {m.reviewer && m.reviewerAddress && ( + + {m.reviewer.name || 'Anomynous user'} + + )} + | +
Name | -Donations | -Amount | -Status | -||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
-
- {getTruncatedText(c.title, 45)}
-
-
- {c.ownerAddress === userAddress && (
-
-
- Owner
-
- )}
- {c.reviewerAddress === userAddress && (
-
-
- Reviewer
-
- )}
-
- |
- {c.donationCount || 0} | -- {convertEthHelper(c.totalDonated)} {config.nativeTokenName} - | -
- {(c.status === Campaign.PENDING ||
- (Object.keys(c).includes('mined') && !c.mined)) && (
-
-
-
+ {campaigns && campaigns.data.length > 0 && (
+
+
- )}
+ {c.reviewerAddress === userAddress && (
+
+
+ Reviewer
+
+ )}
+
+
|
+ {c.donationCount || 0} | ++ {convertEthHelper(c.totalDonated)} {config.nativeTokenName} + | ++ {(c.status === Campaign.PENDING || + (Object.keys(c).includes('mined') && !c.mined)) && ( + + + + + )} + {c.status} + | +
Name | -Number of donations | -Amount donated | -Status | -||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
-
- {getTruncatedText(d.title, 45)}
-
-
- {d.ownerAddress === userAddress && (
-
-
- Owner
-
- )}
-
- |
- {d.donationCount} | -- {convertEthHelper(d.totalDonated)} config.nativeTokenName - | -
- {d.status === DAC.PENDING && (
-
-
-
+ {dacs && dacs.data.length > 0 && (
+
+
- )}
+
+
|
+ {d.donationCount} | ++ {convertEthHelper(d.totalDonated)} config.nativeTokenName + | ++ {d.status === DAC.PENDING && ( + + + + + )} + {d.status} + | +
Date | -Donated to | -Amount | -Status | -Address | -||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
- {moment(d.createdAt).format('MM/DD/YYYY')} - | - -- {d.intendedProjectId > 0 && ( - - - Delegated - - )} - - {d.donatedTo.type} {d.donatedTo.name} - - | -- {convertEthHelper(d.amount)} {d.token.symbol} - | - -- {d.isPending && ( - - - - - )} - {!d.isPending && - d.amountRemaining > 0 && {d.status}} - {!d.isPending && - d.amountRemaining === '0' && - (d.delegateId ? 'Delegated' : Donation.COMMITTED)} - | - - {etherScanUrl && ( -- - {d.giverAddress} - - | + {donations && donations.data.length > 0 && ( +
Date | +Donated to | +Amount | +Status | +Address | +
---|---|---|---|---|
+ {moment(d.createdAt).format('MM/DD/YYYY')} + | + ++ {d.intendedProjectId > 0 && ( + + + Delegated + )} - {!etherScanUrl && ( - | {d.giverAddress} | + + {d.donatedTo.type} {d.donatedTo.name} + + ++ {convertEthHelper(d.amount)} {d.token.symbol} + | + ++ {d.isPending && ( + + + + )} - |
+ + {this.props.currentUser.address} + +
+ + {insufficientBalance && (+ We noticed that you do not have a sufficient balance in your wallet. Your wallet + should be automatically topped up, however if you are a frequent user or use + this wallet on the {config.foreignNetworkName} network, we may + not be able to replenish it fast enough. +
++ {config.foreignNetworkName} balance:{' '} + {this.props.wallet.getBalance()} ETH +
++ You can visit the{' '} + + faucet + {' '} + to get more ETH +
- - {this.props.currentUser.address} - -
- - {insufficientBalance && ( + )} + +
+
+ + Bridged -{t} + + balance: {this.props.wallet.getTokenBalance(tokenAddresses[t])} +
+ ) : ( ++ Bridged - {t} balance:{' '} + {this.props.wallet.getTokenBalance(tokenAddresses[t])} +
+ ), + )}- We noticed that you do not have a sufficient balance in your wallet. Your - wallet should be automatically topped up, however if you are a frequent user - or use this wallet on the {config.foreignNetworkName}{' '} - network, we may not be able to replenish it fast enough. -
-- {config.foreignNetworkName} balance:{' '} - {this.props.wallet.getBalance()} ETH -
-- You can visit the{' '} - - faucet - {' '} - to get more ETH -
-
-
- - - Bridged - - {t} - - - balance: {this.props.wallet.getTokenBalance(tokenAddresses[t])} -
- ) : ( -- Bridged - {t} balance:{' '} - {this.props.wallet.getTokenBalance(tokenAddresses[t])} -
- ), - )} -This Milestone has reached its funding goal!
} - {milestone.isCapped && - !milestone.fullyFunded && ( -- Amount requested: {convertEthHelper(milestone.maxAmount)}{' '} - {milestone.token.symbol} -
- )} + {milestone.isCapped && !milestone.fullyFunded && ( ++ Amount requested: {convertEthHelper(milestone.maxAmount)} {milestone.token.symbol} +
+ )}Campaign: {campaign.title}
These receipts show how the money of this Milestone was spent.
- - {/* MilesteneItem needs to be wrapped in a form or it won't mount */} - -These receipts show how the money of this Milestone was spent.
+ + {/* MilesteneItem needs to be wrapped in a form or it won't mount */} +- {convertEthHelper(dc.currentBalance)} {dc.symbol} -
- ))} -+ {convertEthHelper(dc.currentBalance)} {dc.symbol} +
+ ))} +- The Giveth dapp could not load for some reason. - Please try again... -
-+ The Giveth dapp could not load for some reason. Please + try again... +
+These receipts show how the money of this Milestone was spent.
- - {/* MilesteneItem needs to be wrapped in a form or it won't mount */} - -These receipts show how the money of this Milestone was spent.
+ + {/* MilesteneItem needs to be wrapped in a form or it won't mount */} +- {convertEthHelper(dc.currentBalance)} {dc.symbol} -
- ))} -+ {convertEthHelper(dc.currentBalance)} {dc.symbol} +
+ ))} +This Milestone has reached its funding goal!
} - {milestone.isCapped && - !milestone.fullyFunded && ( -- Amount requested: {convertEthHelper(milestone.maxAmount)}{' '} - {milestone.token.symbol} -
- )} + {milestone.isCapped && !milestone.fullyFunded && ( ++ Amount requested: {convertEthHelper(milestone.maxAmount)} {milestone.token.symbol} +
+ )}Campaign: {campaign.title}
These receipts show how the money of this Milestone was spent.
- - {/* MilesteneItem needs to be wrapped in a form or it won't mount */} - -These receipts show how the money of this Milestone was spent.
+ + {/* MilesteneItem needs to be wrapped in a form or it won't mount */} +- {convertEthHelper(dc.currentBalance)} {dc.symbol} -
- ))} -+ {convertEthHelper(dc.currentBalance)} {dc.symbol} +
+ ))} +