Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
7ee41abd
Unverified
Commit
7ee41abd
authored
Mar 22, 2023
by
Jordan Frankfurt
Committed by
GitHub
Mar 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: design refresh on pool list items (#6230)
* update LP tags * design feedback
parent
581c0982
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
53 deletions
+47
-53
RangeBadge.tsx
src/components/Badge/RangeBadge.tsx
+24
-17
index.tsx
src/components/PositionListItem/index.tsx
+20
-33
darkTheme.ts
src/nft/themes/darkTheme.ts
+1
-1
colors.ts
src/theme/colors.ts
+2
-2
No files found.
src/components/Badge/RangeBadge.tsx
View file @
7ee41abd
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Trans
}
from
'
@lingui/macro
'
import
Badge
,
{
BadgeVariant
}
from
'
components/Badge
'
import
{
AlertTriangle
,
Slash
}
from
'
react-feather
'
import
{
AlertCircle
}
from
'
react-feather
'
import
styled
,
{
useTheme
}
from
'
styled-components/macro
'
import
styled
from
'
styled-components/macro
'
import
{
MouseoverTooltip
}
from
'
../../components/Tooltip
'
import
{
MouseoverTooltip
}
from
'
../../components/Tooltip
'
...
@@ -13,7 +12,9 @@ const BadgeWrapper = styled.div`
...
@@ -13,7 +12,9 @@ const BadgeWrapper = styled.div`
const
BadgeText
=
styled
.
div
`
const
BadgeText
=
styled
.
div
`
font-weight: 500;
font-weight: 500;
font-size: 14px;
font-size: 12px;
line-height: 14px;
margin-right: 8px;
`
`
const
ActiveDot
=
styled
.
span
`
const
ActiveDot
=
styled
.
span
`
...
@@ -21,7 +22,14 @@ const ActiveDot = styled.span`
...
@@ -21,7 +22,14 @@ const ActiveDot = styled.span`
border-radius: 50%;
border-radius: 50%;
height: 8px;
height: 8px;
width: 8px;
width: 8px;
margin-right: 4px;
`
const
LabelText
=
styled
.
div
<
{
color
:
string
}
>
`
align-items: center;
color:
${({
color
})
=>
color
}
;
display: flex;
flex-direction: row;
justify-content: flex-end;
`
`
export
default
function
RangeBadge
({
export
default
function
RangeBadge
({
...
@@ -31,17 +39,17 @@ export default function RangeBadge({
...
@@ -31,17 +39,17 @@ export default function RangeBadge({
removed
:
boolean
|
undefined
removed
:
boolean
|
undefined
inRange
:
boolean
|
undefined
inRange
:
boolean
|
undefined
})
{
})
{
const
theme
=
useTheme
()
return
(
return
(
<
BadgeWrapper
>
<
BadgeWrapper
>
{
removed
?
(
{
removed
?
(
<
MouseoverTooltip
text=
{
<
Trans
>
Your position has 0 liquidity, and is not earning fees.
</
Trans
>
}
>
<
MouseoverTooltip
text=
{
<
Trans
>
Your position has 0 liquidity, and is not earning fees.
</
Trans
>
}
>
<
Badge
variant=
{
BadgeVariant
.
DEFAULT
}
>
<
LabelText
color=
{
theme
.
textSecondary
}
>
<
AlertCircle
width=
{
14
}
height=
{
14
}
/>
<
BadgeText
>
<
BadgeText
>
<
Trans
>
Closed
</
Trans
>
<
Trans
>
Closed
</
Trans
>
</
BadgeText
>
</
BadgeText
>
</
Badge
>
<
Slash
width=
{
12
}
height=
{
12
}
/>
</
LabelText
>
</
MouseoverTooltip
>
</
MouseoverTooltip
>
)
:
inRange
?
(
)
:
inRange
?
(
<
MouseoverTooltip
<
MouseoverTooltip
...
@@ -51,12 +59,12 @@ export default function RangeBadge({
...
@@ -51,12 +59,12 @@ export default function RangeBadge({
</
Trans
>
</
Trans
>
}
}
>
>
<
Badge
variant=
{
BadgeVariant
.
DEFAULT
}
>
<
LabelText
color=
{
theme
.
accentSuccess
}
>
<
ActiveDot
/>
<
BadgeText
>
<
BadgeText
>
<
Trans
>
In
r
ange
</
Trans
>
<
Trans
>
In
R
ange
</
Trans
>
</
BadgeText
>
</
BadgeText
>
</
Badge
>
<
ActiveDot
/>
</
LabelText
>
</
MouseoverTooltip
>
</
MouseoverTooltip
>
)
:
(
)
:
(
<
MouseoverTooltip
<
MouseoverTooltip
...
@@ -66,13 +74,12 @@ export default function RangeBadge({
...
@@ -66,13 +74,12 @@ export default function RangeBadge({
</
Trans
>
</
Trans
>
}
}
>
>
<
Badge
variant=
{
BadgeVariant
.
WARNING
}
>
<
LabelText
color=
{
theme
.
accentWarning
}
>
<
AlertCircle
width=
{
14
}
height=
{
14
}
/>
<
BadgeText
>
<
BadgeText
>
<
Trans
>
Out of range
</
Trans
>
<
Trans
>
Out of range
</
Trans
>
</
BadgeText
>
</
BadgeText
>
</
Badge
>
<
AlertTriangle
width=
{
12
}
height=
{
12
}
/>
</
LabelText
>
</
MouseoverTooltip
>
</
MouseoverTooltip
>
)
}
)
}
</
BadgeWrapper
>
</
BadgeWrapper
>
...
...
src/components/PositionListItem/index.tsx
View file @
7ee41abd
...
@@ -2,7 +2,6 @@ import { BigNumber } from '@ethersproject/bignumber'
...
@@ -2,7 +2,6 @@ import { BigNumber } from '@ethersproject/bignumber'
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Trans
}
from
'
@lingui/macro
'
import
{
Percent
,
Price
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
Percent
,
Price
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
Position
}
from
'
@uniswap/v3-sdk
'
import
{
Position
}
from
'
@uniswap/v3-sdk
'
import
Badge
from
'
components/Badge
'
import
RangeBadge
from
'
components/Badge/RangeBadge
'
import
RangeBadge
from
'
components/Badge/RangeBadge
'
import
DoubleCurrencyLogo
from
'
components/DoubleLogo
'
import
DoubleCurrencyLogo
from
'
components/DoubleLogo
'
import
HoverInlineText
from
'
components/HoverInlineText
'
import
HoverInlineText
from
'
components/HoverInlineText
'
...
@@ -15,7 +14,7 @@ import { useMemo } from 'react'
...
@@ -15,7 +14,7 @@ import { useMemo } from 'react'
import
{
Link
}
from
'
react-router-dom
'
import
{
Link
}
from
'
react-router-dom
'
import
{
Bound
}
from
'
state/mint/v3/actions
'
import
{
Bound
}
from
'
state/mint/v3/actions
'
import
styled
from
'
styled-components/macro
'
import
styled
from
'
styled-components/macro
'
import
{
HideSmall
,
MEDIA_WIDTHS
,
SmallOnly
}
from
'
theme
'
import
{
HideSmall
,
MEDIA_WIDTHS
,
SmallOnly
,
ThemedText
}
from
'
theme
'
import
{
formatTickPrice
}
from
'
utils/formatTickPrice
'
import
{
formatTickPrice
}
from
'
utils/formatTickPrice
'
import
{
unwrappedToken
}
from
'
utils/unwrappedToken
'
import
{
unwrappedToken
}
from
'
utils/unwrappedToken
'
import
{
hasURL
}
from
'
utils/urlChecks
'
import
{
hasURL
}
from
'
utils/urlChecks
'
...
@@ -52,14 +51,6 @@ const LinkRow = styled(Link)`
...
@@ -52,14 +51,6 @@ const LinkRow = styled(Link)`
`
}
;
`
}
;
`
`
const
BadgeText
=
styled
.
div
`
font-weight: 500;
font-size: 14px;
${({
theme
})
=>
theme
.
deprecated_mediaWidth
.
deprecated_upToSmall
`
font-size: 12px;
`
}
;
`
const
DataLineItem
=
styled
.
div
`
const
DataLineItem
=
styled
.
div
`
font-size: 14px;
font-size: 14px;
`
`
...
@@ -73,20 +64,27 @@ const RangeLineItem = styled(DataLineItem)`
...
@@ -73,20 +64,27 @@ const RangeLineItem = styled(DataLineItem)`
`
`
const
DoubleArrow
=
styled
.
span
`
const
DoubleArrow
=
styled
.
span
`
font-size: 12px;
margin: 0 2px;
margin: 0 2px;
color:
${({
theme
})
=>
theme
.
textTertiary
}
;
color:
${({
theme
})
=>
theme
.
textTertiary
}
;
`
`
const
RangeText
=
styled
.
div
`
const
RangeText
=
styled
(
ThemedText
.
Caption
)
`
font-size: 12px !important;
word-break: break-word;
word-break: break-word;
padding: 0.25rem 0.25rem;
padding: 0.25rem 0.25rem;
border-radius: 8px;
border-radius: 8px;
`
`
const
ExtentsText
=
styled
.
span
`
const
FeeTierText
=
styled
(
ThemedText
.
UtilityBadge
)
`
font-size: 10px !important;
margin-left: 14px !important;
`
const
ExtentsText
=
styled
(
ThemedText
.
Caption
)
`
color:
${({
theme
})
=>
theme
.
textTertiary
}
;
color:
${({
theme
})
=>
theme
.
textTertiary
}
;
font-size: 14px;
display: inline-block;
margin-right: 4px;
line-height: 16px;
margin-right: 4px !important;
${({
theme
})
=>
theme
.
deprecated_mediaWidth
.
deprecated_upToSmall
`
${({
theme
})
=>
theme
.
deprecated_mediaWidth
.
deprecated_upToSmall
`
display: none;
display: none;
`
}
;
`
}
;
...
@@ -101,15 +99,6 @@ const PrimaryPositionIdData = styled.div`
...
@@ -101,15 +99,6 @@ const PrimaryPositionIdData = styled.div`
}
}
`
`
const
DataText
=
styled
.
div
`
font-weight: 600;
font-size: 18px;
${({
theme
})
=>
theme
.
deprecated_mediaWidth
.
deprecated_upToSmall
`
font-size: 18px;
`
}
;
`
interface
PositionListItemProps
{
interface
PositionListItemProps
{
token0
:
string
token0
:
string
token1
:
string
token1
:
string
...
@@ -228,15 +217,13 @@ export default function PositionListItem({
...
@@ -228,15 +217,13 @@ export default function PositionListItem({
<
RowBetween
>
<
RowBetween
>
<
PrimaryPositionIdData
>
<
PrimaryPositionIdData
>
<
DoubleCurrencyLogo
currency0=
{
currencyBase
}
currency1=
{
currencyQuote
}
size=
{
18
}
margin
/>
<
DoubleCurrencyLogo
currency0=
{
currencyBase
}
currency1=
{
currencyQuote
}
size=
{
18
}
margin
/>
<
DataText
>
<
ThemedText
.
SubHeader
>
{
currencyQuote
?.
symbol
}
/
{
currencyBase
?.
symbol
}
{
currencyQuote
?.
symbol
}
/
{
currencyBase
?.
symbol
}
</
DataText
>
</
ThemedText
.
SubHeader
>
<
Badge
>
<
FeeTierText
>
<
BadgeText
>
<
Trans
>
{
new
Percent
(
feeAmount
,
1
_000_000
).
toSignificant
()
}
%
</
Trans
>
<
Trans
>
{
new
Percent
(
feeAmount
,
1
_000_000
).
toSignificant
()
}
%
</
Trans
>
</
BadgeText
>
</
FeeTierText
>
</
Badge
>
</
PrimaryPositionIdData
>
</
PrimaryPositionIdData
>
<
RangeBadge
removed=
{
removed
}
inRange=
{
!
outOfRange
}
/>
<
RangeBadge
removed=
{
removed
}
inRange=
{
!
outOfRange
}
/>
</
RowBetween
>
</
RowBetween
>
...
@@ -259,10 +246,10 @@ export default function PositionListItem({
...
@@ -259,10 +246,10 @@ export default function PositionListItem({
</
Trans
>
</
Trans
>
</
RangeText
>
{
'
'
}
</
RangeText
>
{
'
'
}
<
HideSmall
>
<
HideSmall
>
<
DoubleArrow
>
⟷
</
DoubleArrow
>
{
'
'
}
<
DoubleArrow
>
↔
</
DoubleArrow
>
{
'
'
}
</
HideSmall
>
</
HideSmall
>
<
SmallOnly
>
<
SmallOnly
>
<
DoubleArrow
>
⟷
</
DoubleArrow
>
{
'
'
}
<
DoubleArrow
>
↔
</
DoubleArrow
>
{
'
'
}
</
SmallOnly
>
</
SmallOnly
>
<
RangeText
>
<
RangeText
>
<
ExtentsText
>
<
ExtentsText
>
...
...
src/nft/themes/darkTheme.ts
View file @
7ee41abd
...
@@ -10,7 +10,7 @@ export const darkTheme: Theme = {
...
@@ -10,7 +10,7 @@ export const darkTheme: Theme = {
explicitWhite
:
'
#FFFFFF
'
,
explicitWhite
:
'
#FFFFFF
'
,
green
:
vars
.
color
.
green200
,
green
:
vars
.
color
.
green200
,
gold
:
vars
.
color
.
gold
4
00
,
gold
:
vars
.
color
.
gold
2
00
,
violet
:
vars
.
color
.
violet200
,
violet
:
vars
.
color
.
violet200
,
backgroundFloating
:
'
0000000C
'
,
backgroundFloating
:
'
0000000C
'
,
...
...
src/theme/colors.ts
View file @
7ee41abd
...
@@ -149,14 +149,14 @@ export const darkTheme = {
...
@@ -149,14 +149,14 @@ export const darkTheme = {
accentAction
:
colors
.
blue400
,
accentAction
:
colors
.
blue400
,
accentActive
:
colors
.
blue400
,
accentActive
:
colors
.
blue400
,
accentSuccess
:
colors
.
green200
,
accentSuccess
:
colors
.
green200
,
accentWarning
:
colors
.
gold
4
00
,
accentWarning
:
colors
.
gold
2
00
,
accentFailure
:
colors
.
red300
,
accentFailure
:
colors
.
red300
,
accentCritical
:
colors
.
red300
,
accentCritical
:
colors
.
red300
,
accentActionSoft
:
opacify
(
24
,
colors
.
blue400
),
accentActionSoft
:
opacify
(
24
,
colors
.
blue400
),
accentActiveSoft
:
opacify
(
24
,
colors
.
blue400
),
accentActiveSoft
:
opacify
(
24
,
colors
.
blue400
),
accentSuccessSoft
:
opacify
(
24
,
colors
.
green400
),
accentSuccessSoft
:
opacify
(
24
,
colors
.
green400
),
accentWarningSoft
:
opacify
(
24
,
colors
.
gold
4
00
),
accentWarningSoft
:
opacify
(
24
,
colors
.
gold
2
00
),
accentFailureSoft
:
opacify
(
12
,
colors
.
red300
),
accentFailureSoft
:
opacify
(
12
,
colors
.
red300
),
accentTextDarkPrimary
:
opacify
(
80
,
colors
.
gray900
),
accentTextDarkPrimary
:
opacify
(
80
,
colors
.
gray900
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment