Commit e5ced44d authored by Callil Capuozzo's avatar Callil Capuozzo Committed by GitHub

Design tweaks (#717)

* Prepare for V2 testing

* Bug fixes and tweaks

* Add form link

* Design tweaks

* higher quality favicon

* Favicon... again.
Co-authored-by: default avatarIan Lapham <ianlapham@gmail.com>
parent cdbf440e
public/favicon.ico

325 Bytes | W: | H:

public/favicon.ico

6.91 KB | W: | H:

public/favicon.ico
public/favicon.ico
public/favicon.ico
public/favicon.ico
  • 2-up
  • Swipe
  • Onion skin
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="8" cy="8" r="8" fill="#E1E1E1"/> <circle cx="8" cy="8" r="8" fill="#EDEEF2"/>
<path d="M7.09618 9.67828H8.18831V9.60573C8.20358 8.72745 8.45561 8.33413 9.10477 7.93317C9.78831 7.52076 10.2084 6.94033 10.2084 6.08115C10.2084 4.8401 9.26897 4 7.86754 4C6.58067 4 5.54964 4.75227 5.5 6.12697H6.66086C6.70668 5.31742 7.28329 4.96229 7.86754 4.96229C8.51671 4.96229 9.04368 5.39379 9.04368 6.06969C9.04368 6.63866 8.68854 7.03962 8.23413 7.3222C7.52387 7.75752 7.10382 8.18902 7.09618 9.60573V9.67828ZM7.67279 12C8.08902 12 8.43652 11.6601 8.43652 11.2363C8.43652 10.82 8.08902 10.4764 7.67279 10.4764C7.25274 10.4764 6.90907 10.82 6.90907 11.2363C6.90907 11.6601 7.25274 12 7.67279 12Z" fill="#737373"/> <path d="M7.09618 9.67828H8.18831V9.60573C8.20358 8.72745 8.45561 8.33413 9.10477 7.93317C9.78831 7.52076 10.2084 6.94033 10.2084 6.08115C10.2084 4.8401 9.26897 4 7.86754 4C6.58067 4 5.54964 4.75227 5.5 6.12697H6.66086C6.70668 5.31742 7.28329 4.96229 7.86754 4.96229C8.51671 4.96229 9.04368 5.39379 9.04368 6.06969C9.04368 6.63866 8.68854 7.03962 8.23413 7.3222C7.52387 7.75752 7.10382 8.18902 7.09618 9.60573V9.67828ZM7.67279 12C8.08902 12 8.43652 11.6601 8.43652 11.2363C8.43652 10.82 8.08902 10.4764 7.67279 10.4764C7.25274 10.4764 6.90907 10.82 6.90907 11.2363C6.90907 11.6601 7.25274 12 7.67279 12Z" fill="#565A69"/>
</svg> </svg>
...@@ -167,7 +167,7 @@ export default function CurrencyInputPanel({ ...@@ -167,7 +167,7 @@ export default function CurrencyInputPanel({
{!hideInput && ( {!hideInput && (
<LabelRow> <LabelRow>
<RowBetween> <RowBetween>
<TYPE.body color={theme.text2} fontWeight={500} fontSize={16}> <TYPE.body color={theme.text2} fontWeight={500} fontSize={14}>
{label} {label}
</TYPE.body> </TYPE.body>
...@@ -176,7 +176,7 @@ export default function CurrencyInputPanel({ ...@@ -176,7 +176,7 @@ export default function CurrencyInputPanel({
onClick={onMax} onClick={onMax}
color={theme.text2} color={theme.text2}
fontWeight={500} fontWeight={500}
fontSize={16} fontSize={14}
style={{ display: 'inline' }} style={{ display: 'inline' }}
> >
{!hideBalance && !!token && userTokenBalance {!hideBalance && !!token && userTokenBalance
......
This diff is collapsed.
...@@ -30,7 +30,9 @@ const HeaderFrame = styled.div` ...@@ -30,7 +30,9 @@ const HeaderFrame = styled.div`
${({ theme }) => theme.mediaWidth.upToExtraSmall` ${({ theme }) => theme.mediaWidth.upToExtraSmall`
padding: 10px; padding: 10px;
width: calc(100% - 20px); width: calc(100% - 12px);
position: relative;
`}; `};
z-index: 2; z-index: 2;
` `
...@@ -121,6 +123,11 @@ const MigrateBanner = styled(AutoColumn)` ...@@ -121,6 +123,11 @@ const MigrateBanner = styled(AutoColumn)`
a { a {
color: ${({ theme }) => theme.pink2}; color: ${({ theme }) => theme.pink2};
} }
${({ theme }) => theme.mediaWidth.upToSmall`
padding: 0;
display: none;
`};
` `
export default function Header() { export default function Header() {
......
...@@ -105,7 +105,7 @@ function NavigationTabs({ location: { pathname }, history }) { ...@@ -105,7 +105,7 @@ function NavigationTabs({ location: { pathname }, history }) {
<> <>
{adding || removing ? ( {adding || removing ? (
<Tabs> <Tabs>
<RowBetween style={{ padding: '1rem' }}> <RowBetween style={{ padding: '1rem 1rem 0 1rem' }}>
<Hover onClick={() => history.goBack()}> <Hover onClick={() => history.goBack()}>
<ArrowLink /> <ArrowLink />
</Hover> </Hover>
...@@ -114,7 +114,7 @@ function NavigationTabs({ location: { pathname }, history }) { ...@@ -114,7 +114,7 @@ function NavigationTabs({ location: { pathname }, history }) {
text={ text={
adding adding
? 'When you add liqudiity, you are given pool tokens that represent your position in this pool. These tokens automatically earn fees proportional to your pool share and can be redeemed at any time.' ? 'When you add liqudiity, you are given pool tokens that represent your position in this pool. These tokens automatically earn fees proportional to your pool share and can be redeemed at any time.'
: 'Your liquidity is represented by a pool token (ERC20). Removing will convert your position back into tokens at the current rate and proportional to the amount of each token in the pool. Any fees you accrued are included in the token amounts your receive.' : 'Your liquidity is represented by a pool token (ERC20). Removing will convert your position back into tokens at the current rate and proportional to the amount of each token in the pool. Any fees you accrued are included in the token amounts you receive.'
} }
/> />
</RowBetween> </RowBetween>
......
...@@ -18,6 +18,12 @@ const StyledInput = styled.input` ...@@ -18,6 +18,12 @@ const StyledInput = styled.input`
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
padding: 0px;
-webkit-appearance: textfield;
::-webkit-search-decoration {
-webkit-appearance: none;
}
[type='number'] { [type='number'] {
-moz-appearance: textfield; -moz-appearance: textfield;
......
...@@ -39,7 +39,7 @@ const MobilePopupInner = styled.div` ...@@ -39,7 +39,7 @@ const MobilePopupInner = styled.div`
const FixedPopupColumn = styled(AutoColumn)` const FixedPopupColumn = styled(AutoColumn)`
position: absolute; position: absolute;
top: 128px; top: 112px;
right: 1rem; right: 1rem;
width: 355px; width: 355px;
......
...@@ -149,16 +149,18 @@ function PositionCard({ pairAddress, token0, token1, history, minimal = false, . ...@@ -149,16 +149,18 @@ function PositionCard({ pairAddress, token0, token1, history, minimal = false, .
<AutoColumn gap="8px"> <AutoColumn gap="8px">
<FixedHeightRow> <FixedHeightRow>
<RowFixed> <RowFixed>
{!minimal && <TokenLogo size="20px" style={{ marginRight: '8px' }} address={token0?.address || ''} />} <Text fontSize={16} fontWeight={500}>
<Text color="#888D9B" fontSize={16} fontWeight={500}>
Pooled {token0?.symbol}: Pooled {token0?.symbol}:
</Text> </Text>
</RowFixed> </RowFixed>
{token0Deposited ? ( {token0Deposited ? (
<RowFixed> <RowFixed>
<Text color="#888D9B" fontSize={16} fontWeight={500} marginLeft={'6px'}> <Text fontSize={16} fontWeight={500} marginLeft={'6px'}>
{token0Deposited?.toFixed(8)} {token0Deposited?.toFixed(8)}
</Text> </Text>
{!minimal && (
<TokenLogo size="20px" style={{ marginLeft: '8px' }} address={token0?.address || ''} />
)}
</RowFixed> </RowFixed>
) : ( ) : (
'-' '-'
...@@ -167,35 +169,39 @@ function PositionCard({ pairAddress, token0, token1, history, minimal = false, . ...@@ -167,35 +169,39 @@ function PositionCard({ pairAddress, token0, token1, history, minimal = false, .
<FixedHeightRow> <FixedHeightRow>
<RowFixed> <RowFixed>
{!minimal && <TokenLogo size="20px" style={{ marginRight: '8px' }} address={token1?.address || ''} />} <Text fontSize={16} fontWeight={500}>
<Text color="#888D9B" fontSize={16} fontWeight={500}>
Pooled {token1?.symbol}: Pooled {token1?.symbol}:
</Text> </Text>
</RowFixed> </RowFixed>
{token1Deposited ? ( {token1Deposited ? (
<Text color="#888D9B" fontSize={16} fontWeight={500} marginLeft={'6px'}> <RowFixed>
<Text fontSize={16} fontWeight={500} marginLeft={'6px'}>
{token1Deposited?.toFixed(8)} {token1Deposited?.toFixed(8)}
</Text> </Text>
{!minimal && (
<TokenLogo size="20px" style={{ marginLeft: '8px' }} address={token1?.address || ''} />
)}
</RowFixed>
) : ( ) : (
'-' '-'
)} )}
</FixedHeightRow> </FixedHeightRow>
{!minimal && ( {!minimal && (
<FixedHeightRow> <FixedHeightRow>
<Text color="#888D9B" fontSize={16} fontWeight={500}> <Text fontSize={16} fontWeight={500}>
Your pool tokens: Your pool tokens:
</Text> </Text>
<Text color="#888D9B" fontSize={16} fontWeight={500}> <Text fontSize={16} fontWeight={500}>
{userPoolBalance ? userPoolBalance.toFixed(6) : '-'} {userPoolBalance ? userPoolBalance.toFixed(6) : '-'}
</Text> </Text>
</FixedHeightRow> </FixedHeightRow>
)} )}
{!minimal && ( {!minimal && (
<FixedHeightRow> <FixedHeightRow>
<Text color="#888D9B" fontSize={16} fontWeight={500}> <Text fontSize={16} fontWeight={500}>
Your pool share Your pool share
</Text> </Text>
<Text color="#888D9B" fontSize={16} fontWeight={500}> <Text fontSize={16} fontWeight={500}>
{poolTokenPercentage ? poolTokenPercentage.toFixed(2) + '%' : '-'} {poolTokenPercentage ? poolTokenPercentage.toFixed(2) + '%' : '-'}
</Text> </Text>
</FixedHeightRow> </FixedHeightRow>
......
...@@ -115,7 +115,7 @@ const MenuItem = styled(PaddedItem)` ...@@ -115,7 +115,7 @@ const MenuItem = styled(PaddedItem)`
:hover { :hover {
background-color: ${({ theme, disabled }) => !disabled && theme.bg2}; background-color: ${({ theme, disabled }) => !disabled && theme.bg2};
} }
opacity: ${({ disabled }) => (disabled ? 0.5 : 1)}; opacity: ${({ disabled, selected }) => (disabled || selected ? 0.5 : 1)};
` `
const BaseWrapper = styled(AutoRow)` const BaseWrapper = styled(AutoRow)`
...@@ -349,7 +349,7 @@ function SearchModal({ ...@@ -349,7 +349,7 @@ function SearchModal({
filteredPairList.map((pairAddress, i) => { filteredPairList.map((pairAddress, i) => {
const token0 = allTokens[allPairs[pairAddress].token0] const token0 = allTokens[allPairs[pairAddress].token0]
const token1 = allTokens[allPairs[pairAddress].token1] const token1 = allTokens[allPairs[pairAddress].token1]
// const balance = allBalances?.[account]?.[pairAddress]?.toSignificant(6) const balance = allBalances?.[account]?.[pairAddress]?.toSignificant(6)
return ( return (
<MenuItem <MenuItem
key={i} key={i}
...@@ -367,14 +367,14 @@ function SearchModal({ ...@@ -367,14 +367,14 @@ function SearchModal({
</Text> */} </Text> */}
<ButtonPrimary <ButtonPrimary
padding={'6px 8px'} padding={'6px 8px'}
width={'56px'} width={'fit-content'}
borderRadius={'12px'} borderRadius={'12px'}
onClick={() => { onClick={() => {
history.push('/add/' + token0.address + '-' + token1.address) history.push('/add/' + token0.address + '-' + token1.address)
onDismiss() onDismiss()
}} }}
> >
Join {balance ? 'Manage' : 'Join'}
</ButtonPrimary> </ButtonPrimary>
</MenuItem> </MenuItem>
) )
...@@ -451,6 +451,7 @@ function SearchModal({ ...@@ -451,6 +451,7 @@ function SearchModal({
key={address} key={address}
onClick={() => (hiddenToken && hiddenToken === address ? () => {} : _onTokenSelect(address))} onClick={() => (hiddenToken && hiddenToken === address ? () => {} : _onTokenSelect(address))}
disabled={hiddenToken && hiddenToken === address} disabled={hiddenToken && hiddenToken === address}
selected={otherSelectedTokenAddress === address}
> >
<RowFixed> <RowFixed>
<TokenLogo address={address} size={'24px'} style={{ marginRight: '14px' }} /> <TokenLogo address={address} size={'24px'} style={{ marginRight: '14px' }} />
......
...@@ -365,11 +365,14 @@ export default function TransactionDetails({ setRawSlippage, rawSlippage, deadli ...@@ -365,11 +365,14 @@ export default function TransactionDetails({ setRawSlippage, rawSlippage, deadli
<TYPE.body fontSize={14}>Deadline</TYPE.body> <TYPE.body fontSize={14}>Deadline</TYPE.body>
<QuestionHelper text="Deadline in minutes. If your transaction takes longer than this it will revert." /> <QuestionHelper text="Deadline in minutes. If your transaction takes longer than this it will revert." />
</RowFixed> </RowFixed>
<RowBetween padding={'0 20px'}> <RowFixed padding={'0 20px'}>
<OptionCustom style={{ width: '80px' }}> <OptionCustom style={{ width: '80px' }}>
<Input tabIndex={-1} placeholder={deadlineInput} value={deadlineInput} onChange={parseCustomDeadline} /> <Input tabIndex={-1} placeholder={deadlineInput} value={deadlineInput} onChange={parseCustomDeadline} />
</OptionCustom> </OptionCustom>
</RowBetween> <TYPE.body style={{ paddingLeft: '8px' }} fontSize={14}>
minutes
</TYPE.body>
</RowFixed>
</AutoColumn> </AutoColumn>
</> </>
) )
......
...@@ -50,6 +50,10 @@ const BodyWrapper = styled.div` ...@@ -50,6 +50,10 @@ const BodyWrapper = styled.div`
width: 90%; width: 90%;
} }
${({ theme }) => theme.mediaWidth.upToExtraSmall`
padding-top: 16px;
`};
z-index: 1; z-index: 1;
` `
...@@ -64,6 +68,7 @@ const Body = styled.div` ...@@ -64,6 +68,7 @@ const Body = styled.div`
box-sizing: border-box; box-sizing: border-box;
padding: 1rem; padding: 1rem;
position: relative; position: relative;
margin-bottom: 10rem;
` `
const StyledRed = styled.div` const StyledRed = styled.div`
......
...@@ -48,6 +48,28 @@ const FixedBottom = styled.div` ...@@ -48,6 +48,28 @@ const FixedBottom = styled.div`
width: 100%; width: 100%;
` `
// styles
const Dots = styled.span`
&::after {
display: inline-block;
animation: ellipsis 1.25s infinite;
content: '.';
width: 1em;
text-align: left;
}
@keyframes ellipsis {
0% {
content: '.';
}
33% {
content: '..';
}
66% {
content: '...';
}
}
`
enum Field { enum Field {
INPUT, INPUT,
OUTPUT OUTPUT
...@@ -589,7 +611,7 @@ function AddLiquidity({ token0, token1, step = false }) { ...@@ -589,7 +611,7 @@ function AddLiquidity({ token0, token1, step = false }) {
{pair ? `${route.midPrice.toSignificant(6)} ` : '-'} {pair ? `${route.midPrice.toSignificant(6)} ` : '-'}
</Text> </Text>
<Text fontWeight={500} fontSize={14} color="#888D9B" pt={1}> <Text fontWeight={500} fontSize={14} color="#888D9B" pt={1}>
{tokens[Field.OUTPUT]?.symbol} / {tokens[Field.INPUT]?.symbol} {tokens[Field.OUTPUT]?.symbol} per {tokens[Field.INPUT]?.symbol}
</Text> </Text>
</AutoColumn> </AutoColumn>
<AutoColumn justify="center"> <AutoColumn justify="center">
...@@ -597,7 +619,7 @@ function AddLiquidity({ token0, token1, step = false }) { ...@@ -597,7 +619,7 @@ function AddLiquidity({ token0, token1, step = false }) {
{pair ? `${route.midPrice.invert().toSignificant(6)} ` : '-'} {pair ? `${route.midPrice.invert().toSignificant(6)} ` : '-'}
</Text> </Text>
<Text fontWeight={500} fontSize={14} color="#888D9B" pt={1}> <Text fontWeight={500} fontSize={14} color="#888D9B" pt={1}>
{tokens[Field.INPUT]?.symbol} / {tokens[Field.OUTPUT]?.symbol} {tokens[Field.INPUT]?.symbol} per {tokens[Field.OUTPUT]?.symbol}
</Text> </Text>
</AutoColumn> </AutoColumn>
<AutoColumn justify="center"> <AutoColumn justify="center">
...@@ -645,11 +667,8 @@ function AddLiquidity({ token0, token1, step = false }) { ...@@ -645,11 +667,8 @@ function AddLiquidity({ token0, token1, step = false }) {
<ColumnCenter> <ColumnCenter>
<BlueCard> <BlueCard>
<AutoColumn gap="10px"> <AutoColumn gap="10px">
{/* {step && <TYPE.blue fontWeight={400}>Step 2.</TYPE.blue>} */} <TYPE.blue fontWeight={600}>You are the first liquidity provider.</TYPE.blue>
<TYPE.blue fontWeight={400}> <TYPE.blue fontWeight={400}>The ratio of tokens you add will set the price of this pool.</TYPE.blue>
<b>You are the first liquidity provider.</b> The ratio of tokens you add will set the price of this
pool.
</TYPE.blue>
<TYPE.blue fontWeight={400}>Once you are happy with the rate click supply to review.</TYPE.blue> <TYPE.blue fontWeight={400}>Once you are happy with the rate click supply to review.</TYPE.blue>
</AutoColumn> </AutoColumn>
</BlueCard> </BlueCard>
...@@ -696,7 +715,11 @@ function AddLiquidity({ token0, token1, step = false }) { ...@@ -696,7 +715,11 @@ function AddLiquidity({ token0, token1, step = false }) {
approveAmount(Field.OUTPUT) approveAmount(Field.OUTPUT)
}} }}
> >
{pendingApprovalOutput ? 'Waiting for approve' : 'Approve ' + tokens[Field.OUTPUT]?.symbol} {pendingApprovalOutput ? (
<Dots>Approving {tokens[Field.OUTPUT]?.symbol}</Dots>
) : (
'Approve ' + tokens[Field.OUTPUT]?.symbol
)}
</ButtonLight> </ButtonLight>
) : showInputApprove ? ( ) : showInputApprove ? (
<ButtonLight <ButtonLight
...@@ -704,7 +727,11 @@ function AddLiquidity({ token0, token1, step = false }) { ...@@ -704,7 +727,11 @@ function AddLiquidity({ token0, token1, step = false }) {
approveAmount(Field.INPUT) approveAmount(Field.INPUT)
}} }}
> >
{pendingApprovalInput ? 'Waiting for approve' : 'Approve ' + tokens[Field.INPUT]?.symbol} {pendingApprovalInput ? (
<Dots>Approving {tokens[Field.INPUT]?.symbol}</Dots>
) : (
'Approve ' + tokens[Field.INPUT]?.symbol
)}
</ButtonLight> </ButtonLight>
) : ( ) : (
<ButtonPrimary <ButtonPrimary
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment