Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
Claim style improve 20 (#2232)
Browse files Browse the repository at this point in the history
* Reduce image sizes, bigger icon size.

* Progress bar, investing summary, styling etc.

* Progress bar fix smaller % display issue.
  • Loading branch information
fairlighteth authored Jan 20, 2022
1 parent 9f4605d commit ef171d2
Show file tree
Hide file tree
Showing 24 changed files with 98 additions and 95 deletions.
Binary file modified src/custom/assets/cow-swap/CowError.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/custom/assets/cow-swap/attention.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 1 addition & 5 deletions src/custom/assets/cow-swap/check.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/custom/assets/cow-swap/cow-404.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/custom/assets/cow-swap/cow-load.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/custom/assets/cow-swap/cows-side-by-side.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions src/custom/assets/cow-swap/feedback.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/custom/assets/cow-swap/gno.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 1 addition & 7 deletions src/custom/assets/cow-swap/network-gnosis-chain-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 1 addition & 9 deletions src/custom/assets/cow-swap/network-mainnet-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 1 addition & 9 deletions src/custom/assets/cow-swap/network-rinkeby-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/custom/assets/cow-swap/ninja-cow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions src/custom/assets/cow-swap/order-check.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions src/custom/assets/cow-swap/order-cross.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions src/custom/assets/cow-swap/order-open.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions src/custom/assets/cow-swap/order-presignature-pending.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions src/custom/assets/cow-swap/transaction-arrows.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions src/custom/assets/cow-swap/transaction-confirmed.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/custom/assets/cow-swap/usdc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/custom/assets/cow-swap/xdai.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/custom/pages/Claim/ClaimsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ const ClaimsTableRow = ({
</td>
<td>
{' '}
{!isFree && <TokenLogo symbol={`${currencyAmount?.currency?.symbol}`} size={32} />}
<CowProtocolLogo size={32} />
{!isFree && <TokenLogo symbol={`${currencyAmount?.currency?.symbol}`} size={34} />}
<CowProtocolLogo size={34} />
<span>
<b>{isFree ? ClaimType[type] : 'Buy vCOW'}</b>
{!isFree && <i>with {currencyAmount?.currency?.symbol}</i>}
Expand Down
27 changes: 18 additions & 9 deletions src/custom/pages/Claim/InvestmentFlow/InvestSummaryRow.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ClaimType } from 'state/claim/hooks'
import { calculatePercentage } from 'state/claim/hooks/utils'
import { TokenLogo } from 'pages/Claim/styled'
import { TokenLogo, InvestAvailableBar } from 'pages/Claim/styled'
import { ClaimWithInvestmentData } from 'pages/Claim/types'
import CowProtocolLogo from 'components/CowProtocolLogo'
import { formatSmart } from 'utils/format'
Expand All @@ -23,11 +23,16 @@ export function InvestSummaryRow(props: Props): JSX.Element | null {
<tr>
<td>
{isFree ? (
<b>{ClaimType[type]}</b>
<>
<CowProtocolLogo size={42} />
<span>
<b>{ClaimType[type]}</b>
</span>
</>
) : (
<>
<TokenLogo symbol={symbol} size={32} />
<CowProtocolLogo size={32} />
<TokenLogo symbol={symbol} size={42} />
<CowProtocolLogo size={42} />
<span>
<b>Buy vCOW</b>
<i>with {symbol}</i>
Expand All @@ -37,18 +42,22 @@ export function InvestSummaryRow(props: Props): JSX.Element | null {
</td>

<td>
<i>{formatSmart(vCowAmount) || '0'} vCOW</i>

{!isFree && (
<span>
<b>Investment amount:</b>{' '}
<i>
{formattedCost} {symbol} ({percentage}% of available investing opportunity)
{formattedCost} {symbol}
</i>
<InvestAvailableBar percentage={Number(percentage)} />
{Number(percentage) > 0 && Number(percentage) < 100 && (
<small>
Note: You <b>will not be able</b> to invest the remaining {100 - Number(percentage)}% after claiming.
</small>
)}
</span>
)}
<span>
<b>Amount to receive:</b>
<i>{formatSmart(vCowAmount) || '0'} vCOW</i>
</span>
</td>

<td>
Expand Down
Loading

0 comments on commit ef171d2

Please sign in to comment.