Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
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
vicotor
frontend
Commits
618c3cde
Commit
618c3cde
authored
Oct 22, 2024
by
Max Alekseenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adapt rewards dashboard for mobiles
parent
a7280d39
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
22 deletions
+36
-22
RewardsDashboard.tsx
ui/pages/RewardsDashboard.tsx
+20
-13
RewardsDashboardCard.tsx
ui/rewards/RewardsDashboardCard.tsx
+13
-7
RewardsDashboardCardValue.tsx
ui/rewards/RewardsDashboardCardValue.tsx
+3
-2
No files found.
ui/pages/RewardsDashboard.tsx
View file @
618c3cde
...
@@ -65,17 +65,14 @@ const RewardsDashboard = () => {
...
@@ -65,17 +65,14 @@ const RewardsDashboard = () => {
<
PageTitle
<
PageTitle
title=
"Dashboard"
title=
"Dashboard"
secondRow=
{
(
secondRow=
{
(
<>
<
span
>
The Blockscout Merits Program is just getting started! Learn more about the details,
The Blockscout Merits Program is just getting started! Learn more about the details,
features, and future plans in our
<
LinkExternal
ml=
{
1
}
href=
""
>
blog post
</
LinkExternal
>
.
features, and future plans in our
<
LinkExternal
href=
""
>
blog post
</
LinkExternal
>
.
</>
</
span
>
)
}
)
}
/>
/>
<
Flex
flexDirection=
"column"
alignItems=
"flex-start"
w=
"full"
gap=
{
6
}
>
<
Flex
flexDirection=
"column"
alignItems=
"flex-start"
w=
"full"
gap=
{
6
}
>
<
Button
variant=
"outline"
isDisabled
>
<
Flex
gap=
{
6
}
flexDirection=
{
{
base
:
'
column
'
,
md
:
'
row
'
}
}
>
Pre-staking dashboard
</
Button
>
<
Flex
gap=
{
6
}
>
<
RewardsDashboardCard
<
RewardsDashboardCard
description=
"Claim your daily merits and any merits received from referrals."
description=
"Claim your daily merits and any merits received from referrals."
direction=
"column-reverse"
direction=
"column-reverse"
...
@@ -136,7 +133,13 @@ const RewardsDashboard = () => {
...
@@ -136,7 +133,13 @@ const RewardsDashboard = () => {
)
}
)
}
direction=
"row"
direction=
"row"
>
>
<
Flex
flex=
{
1
}
gap=
{
6
}
px=
{
6
}
>
<
Flex
flex=
{
1
}
gap=
{
{
base
:
2
,
md
:
6
}
}
px=
{
{
base
:
4
,
md
:
6
}
}
py=
{
{
base
:
4
,
md
:
0
}
}
flexDirection=
{
{
base
:
'
column
'
,
md
:
'
row
'
}
}
>
<
CopyField
<
CopyField
label=
"Referral link"
label=
"Referral link"
value=
{
`https://eth.blockscout.com?ref=${ referralsQuery.data?.code }`
}
value=
{
`https://eth.blockscout.com?ref=${ referralsQuery.data?.code }`
}
...
@@ -149,7 +152,7 @@ const RewardsDashboard = () => {
...
@@ -149,7 +152,7 @@ const RewardsDashboard = () => {
/>
/>
</
Flex
>
</
Flex
>
</
RewardsDashboardCard
>
</
RewardsDashboardCard
>
<
Flex
gap=
{
6
}
>
<
Flex
gap=
{
6
}
flexDirection=
{
{
base
:
'
column
'
,
md
:
'
row
'
}
}
>
<
RewardsDashboardCard
<
RewardsDashboardCard
title=
"Activity"
title=
"Activity"
description=
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
description=
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
...
@@ -175,15 +178,19 @@ const RewardsDashboard = () => {
...
@@ -175,15 +178,19 @@ const RewardsDashboard = () => {
direction=
"row"
direction=
"row"
availableSoon
availableSoon
>
>
<
Flex
flex=
{
1
}
gap=
{
6
}
px=
{
6
}
justifyContent=
"space-between"
>
<
Flex
flex=
{
1
}
px=
{
{
base
:
4
,
md
:
6
}
}
py=
{
{
base
:
4
,
md
:
0
}
}
justifyContent=
"space-between"
>
{
Array
(
5
).
fill
(
null
).
map
((
_
,
index
)
=>
(
{
Array
(
5
).
fill
(
null
).
map
((
_
,
index
)
=>
(
<
Image
<
Image
key=
{
index
}
key=
{
index
}
src=
{
`/static/badges/badge_${ index + 1 }.svg`
}
src=
{
`/static/badges/badge_${ index + 1 }.svg`
}
alt=
{
`Badge ${ index + 1 }`
}
alt=
{
`Badge ${ index + 1 }`
}
w=
"100px"
boxSize=
{
{
base
:
'
50px
'
,
md
:
'
100px
'
}
}
h=
"100px"
fallback=
{
<
Skeleton
boxSize=
{
{
base
:
'
50px
'
,
md
:
'
100px
'
}
}
/>
}
fallback=
{
<
Skeleton
w=
"100px"
h=
"100px"
/>
}
/>
/>
))
}
))
}
</
Flex
>
</
Flex
>
...
...
ui/rewards/RewardsDashboardCard.tsx
View file @
618c3cde
...
@@ -20,19 +20,25 @@ const RewardsDashboardCard = ({
...
@@ -20,19 +20,25 @@ const RewardsDashboardCard = ({
}:
Props
)
=>
{
}:
Props
)
=>
{
return
(
return
(
<
Flex
<
Flex
flexDirection=
{
direction
}
flexDirection=
{
{
base
:
direction
===
'
row
'
?
'
column
'
:
direction
,
md
:
direction
}
}
justifyContent=
{
direction
===
'
column-reverse
'
?
'
flex-end
'
:
'
flex-start
'
}
justifyContent=
{
direction
===
'
column-reverse
'
?
'
flex-end
'
:
'
flex-start
'
}
p=
{
2
}
p=
{
{
base
:
1.5
,
md
:
2
}
}
border=
"1px solid"
border=
"1px solid"
borderColor=
{
useColorModeValue
(
'
gray.200
'
,
'
whiteAlpha.200
'
)
}
borderColor=
{
useColorModeValue
(
'
gray.200
'
,
'
whiteAlpha.200
'
)
}
borderRadius=
"lg"
borderRadius=
"lg"
gap=
{
direction
===
'
row
'
?
10
:
1
}
gap=
{
{
base
:
1
,
md
:
direction
===
'
row
'
?
10
:
1
}
}
w=
{
direction
===
'
row
'
?
'
full
'
:
'
auto
'
}
w=
{
direction
===
'
row
'
?
'
full
'
:
'
auto
'
}
flex=
{
direction
!==
'
row
'
?
1
:
'
0 1 auto
'
}
>
<
Flex
flexDirection=
"column"
gap=
{
2
}
p=
{
{
base
:
1.5
,
md
:
3
}
}
w=
{
{
base
:
'
full
'
,
md
:
direction
===
'
row
'
?
'
340px
'
:
'
full
'
}
}
>
>
<
Flex
flexDirection=
"column"
gap=
{
2
}
p=
{
3
}
w=
{
direction
===
'
row
'
?
'
340px
'
:
'
full
'
}
>
{
title
&&
(
{
title
&&
(
<
Flex
alignItems=
"center"
gap=
{
2
}
>
<
Flex
alignItems=
"center"
gap=
{
2
}
>
<
Text
fontSize=
"lg"
fontWeight=
"500"
>
{
title
}
</
Text
>
<
Text
fontSize=
{
{
base
:
'
md
'
,
md
:
'
lg
'
}
}
fontWeight=
"500"
>
{
title
}
</
Text
>
{
availableSoon
&&
<
AvailableSoonLabel
/>
}
{
availableSoon
&&
<
AvailableSoonLabel
/>
}
</
Flex
>
</
Flex
>
)
}
)
}
...
@@ -44,9 +50,9 @@ const RewardsDashboardCard = ({
...
@@ -44,9 +50,9 @@ const RewardsDashboardCard = ({
<
Flex
<
Flex
alignItems=
"center"
alignItems=
"center"
justifyContent=
"space-around"
justifyContent=
"space-around"
borderRadius=
"8px"
borderRadius=
{
{
base
:
'
lg
'
,
md
:
'
8px
'
}
}
backgroundColor=
{
useColorModeValue
(
'
gray.50
'
,
'
whiteAlpha.50
'
)
}
backgroundColor=
{
useColorModeValue
(
'
gray.50
'
,
'
whiteAlpha.50
'
)
}
h=
"128px"
h=
{
{
base
:
'
80px
'
,
md
:
'
128px
'
}
}
filter=
"auto"
filter=
"auto"
blur=
{
blurFilter
?
'
4px
'
:
'
0
'
}
blur=
{
blurFilter
?
'
4px
'
:
'
0
'
}
flex=
{
direction
===
'
row
'
?
1
:
'
0 1 auto
'
}
flex=
{
direction
===
'
row
'
?
1
:
'
0 1 auto
'
}
...
...
ui/rewards/RewardsDashboardCardValue.tsx
View file @
618c3cde
...
@@ -31,11 +31,12 @@ const RewardsDashboardCard = ({ label, value, withIcon, hint }: Props) => {
...
@@ -31,11 +31,12 @@ const RewardsDashboardCard = ({ label, value, withIcon, hint }: Props) => {
<
IconSvg
<
IconSvg
name=
"merits_colored"
name=
"merits_colored"
boxSize=
{
12
}
boxSize=
{
12
}
mb=
{
-
0.5
}
mt=
{
-
2
}
mb=
{
-
2.5
}
filter=
"drop-shadow(0px 4px 3px rgba(21, 57, 103, 0.1))"
filter=
"drop-shadow(0px 4px 3px rgba(21, 57, 103, 0.1))"
/>
/>
)
}
)
}
<
Text
fontSize=
"32px"
fontWeight=
"500"
>
<
Text
fontSize=
{
{
base
:
'
24px
'
,
md
:
'
32px
'
}
}
lineHeight=
{
{
base
:
'
24px
'
,
md
:
1.5
}
}
fontWeight=
"500"
>
{
value
}
{
value
}
</
Text
>
</
Text
>
</
Flex
>
</
Flex
>
...
...
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