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
d22b8636
Commit
d22b8636
authored
Sep 20, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adapt details tab to mobile
parent
244ca79f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
14 deletions
+25
-14
Transaction.tsx
ui/pages/Transaction.tsx
+3
-2
DetailsInfoItem.tsx
ui/shared/DetailsInfoItem.tsx
+13
-3
TxDetails.tsx
ui/tx/TxDetails.tsx
+9
-9
No files found.
ui/pages/Transaction.tsx
View file @
d22b8636
...
@@ -37,9 +37,10 @@ const TransactionPageContent = ({ tab }: Props) => {
...
@@ -37,9 +37,10 @@ const TransactionPageContent = ({ tab }: Props) => {
Transactions
Transactions
</
Link
>
</
Link
>
<
PageHeader
text=
"Transaction details"
/>
<
PageHeader
text=
"Transaction details"
/>
<
Flex
marginLeft=
"auto"
alignItems=
"center"
columnGap=
{
6
}
mb=
{
6
}
>
<
Flex
marginLeft=
"auto"
alignItems=
"center"
flexWrap=
"wrap"
columnGap=
{
6
}
rowGap=
{
3
}
mb=
{
6
}
>
<
ExternalLink
title=
"Open in Tenderly"
href=
"#"
/>
<
ExternalLink
title=
"Open in Tenderly"
href=
"#"
/>
<
ExternalLink
title=
"Open in Tenderly"
href=
"#"
/>
<
ExternalLink
title=
"Open in Blockchair"
href=
"#"
/>
<
ExternalLink
title=
"Open in Etherscan"
href=
"#"
/>
</
Flex
>
</
Flex
>
<
RoutedTabs
<
RoutedTabs
tabs=
{
TABS
}
tabs=
{
TABS
}
...
...
ui/shared/DetailsInfoItem.tsx
View file @
d22b8636
...
@@ -13,7 +13,7 @@ interface Props extends HTMLChakraProps<'div'> {
...
@@ -13,7 +13,7 @@ interface Props extends HTMLChakraProps<'div'> {
const
DetailsInfoItem
=
({
title
,
hint
,
children
,
...
styles
}:
Props
)
=>
{
const
DetailsInfoItem
=
({
title
,
hint
,
children
,
...
styles
}:
Props
)
=>
{
return
(
return
(
<>
<>
<
GridItem
py=
{
2
}
lineHeight=
{
5
}
{
...
styles
}
whiteSpace=
"nowrap"
>
<
GridItem
py=
{
{
base
:
1
,
lg
:
2
}
}
lineHeight=
{
5
}
{
...
styles
}
whiteSpace=
"nowrap"
_notFirst=
{
{
mt
:
{
base
:
3
,
lg
:
0
}
}
}
>
<
Flex
columnGap=
{
2
}
alignItems=
"center"
>
<
Flex
columnGap=
{
2
}
alignItems=
"center"
>
<
Tooltip
<
Tooltip
label=
{
hint
}
label=
{
hint
}
...
@@ -24,10 +24,20 @@ const DetailsInfoItem = ({ title, hint, children, ...styles }: Props) => {
...
@@ -24,10 +24,20 @@ const DetailsInfoItem = ({ title, hint, children, ...styles }: Props) => {
<
Icon
as=
{
infoIcon
}
boxSize=
{
5
}
/>
<
Icon
as=
{
infoIcon
}
boxSize=
{
5
}
/>
</
Box
>
</
Box
>
</
Tooltip
>
</
Tooltip
>
<
Text
fontWeight=
{
500
}
>
{
title
}
</
Text
>
<
Text
fontWeight=
{
{
base
:
700
,
lg
:
500
}
}
>
{
title
}
</
Text
>
</
Flex
>
</
Flex
>
</
GridItem
>
</
GridItem
>
<
GridItem
display=
"flex"
alignItems=
"center"
flexWrap=
"wrap"
rowGap=
{
3
}
py=
{
2
}
lineHeight=
{
5
}
whiteSpace=
"nowrap"
{
...
styles
}
>
<
GridItem
display=
"flex"
alignItems=
"center"
flexWrap=
"wrap"
rowGap=
{
3
}
pl=
{
{
base
:
7
,
lg
:
0
}
}
py=
{
{
base
:
1
,
lg
:
2
}
}
lineHeight=
{
5
}
whiteSpace=
"nowrap"
{
...
styles
}
>
{
children
}
{
children
}
</
GridItem
>
</
GridItem
>
</>
</>
...
...
ui/tx/TxDetails.tsx
View file @
d22b8636
...
@@ -41,7 +41,7 @@ const TxDetails = () => {
...
@@ -41,7 +41,7 @@ const TxDetails = () => {
},
[]);
},
[]);
return
(
return
(
<
Grid
columnGap=
{
8
}
rowGap=
{
3
}
templateColumns=
"auto minmax(0, 1fr)"
>
<
Grid
columnGap=
{
8
}
rowGap=
{
{
base
:
3
,
lg
:
3
}
}
templateColumns=
{
{
base
:
'
minmax(0, 1fr)
'
,
lg
:
'
auto minmax(0, 1fr)
'
}
}
>
<
DetailsInfoItem
<
DetailsInfoItem
title=
"Transaction hash"
title=
"Transaction hash"
hint=
"Unique character string (TxID) assigned to every verified transaction."
hint=
"Unique character string (TxID) assigned to every verified transaction."
...
@@ -79,10 +79,10 @@ const TxDetails = () => {
...
@@ -79,10 +79,10 @@ const TxDetails = () => {
Confirmed within
{
tx
.
confirmation_duration
}
secs
Confirmed within
{
tx
.
confirmation_duration
}
secs
</
Text
>
</
Text
>
</
DetailsInfoItem
>
</
DetailsInfoItem
>
<
GridItem
colSpan=
{
{
base
:
undefined
,
lg
:
2
}
}
mt=
{
{
base
:
3
,
lg
:
8
}
}
/>
<
DetailsInfoItem
<
DetailsInfoItem
title=
"From"
title=
"From"
hint=
"Address (external or contract) sending the transaction."
hint=
"Address (external or contract) sending the transaction."
mt=
{
8
}
>
>
<
Address
>
<
Address
>
<
AddressIcon
hash=
{
tx
.
address_from
}
/>
<
AddressIcon
hash=
{
tx
.
address_from
}
/>
...
@@ -112,10 +112,10 @@ const TxDetails = () => {
...
@@ -112,10 +112,10 @@ const TxDetails = () => {
{
tx
.
transferred_tokens
.
map
((
item
)
=>
<
TokenTransfer
key=
{
item
.
token
}
{
...
item
}
/>)
}
{
tx
.
transferred_tokens
.
map
((
item
)
=>
<
TokenTransfer
key=
{
item
.
token
}
{
...
item
}
/>)
}
</
Flex
>
</
Flex
>
</
DetailsInfoItem
>
</
DetailsInfoItem
>
<
GridItem
colSpan=
{
{
base
:
undefined
,
lg
:
2
}
}
mt=
{
{
base
:
3
,
lg
:
8
}
}
/>
<
DetailsInfoItem
<
DetailsInfoItem
title=
"Value"
title=
"Value"
hint=
"Value sent in the native token (and USD) if applicable."
hint=
"Value sent in the native token (and USD) if applicable."
mt=
{
8
}
>
>
<
Text
>
{
tx
.
amount
.
value
}
Ether
</
Text
>
<
Text
>
{
tx
.
amount
.
value
}
Ether
</
Text
>
<
Text
variant=
"secondary"
ml=
{
1
}
>
($
{
tx
.
amount
.
value_usd
.
toFixed
(
2
)
}
)
</
Text
>
<
Text
variant=
"secondary"
ml=
{
1
}
>
($
{
tx
.
amount
.
value_usd
.
toFixed
(
2
)
}
)
</
Text
>
...
@@ -131,8 +131,8 @@ const TxDetails = () => {
...
@@ -131,8 +131,8 @@ const TxDetails = () => {
title=
"Gas price"
title=
"Gas price"
hint=
"Price per unit of gas specified by the sender. Higher gas prices can prioritize transaction inclusion during times of high usage."
hint=
"Price per unit of gas specified by the sender. Higher gas prices can prioritize transaction inclusion during times of high usage."
>
>
<
Text
>
{
tx
.
gas_price
.
toLocaleString
(
'
en
'
,
{
minimumFractionDigits
:
18
})
}
Ether
</
Text
>
<
Text
mr=
{
1
}
>
{
tx
.
gas_price
.
toLocaleString
(
'
en
'
,
{
minimumFractionDigits
:
18
})
}
Ether
</
Text
>
<
Text
variant=
"secondary"
ml=
{
1
}
>
(
{
(
tx
.
gas_price
*
Math
.
pow
(
10
,
18
)).
toFixed
(
0
)
}
Gwei)
</
Text
>
<
Text
variant=
"secondary"
>
(
{
(
tx
.
gas_price
*
Math
.
pow
(
10
,
18
)).
toFixed
(
0
)
}
Gwei)
</
Text
>
</
DetailsInfoItem
>
</
DetailsInfoItem
>
<
DetailsInfoItem
<
DetailsInfoItem
title=
"Gas limit & usage by txn"
title=
"Gas limit & usage by txn"
...
@@ -165,10 +165,10 @@ const TxDetails = () => {
...
@@ -165,10 +165,10 @@ const TxDetails = () => {
hint=
"Amount of ETH burned for this transaction. Equals Block Base Fee per Gas * Gas Used."
hint=
"Amount of ETH burned for this transaction. Equals Block Base Fee per Gas * Gas Used."
>
>
<
Icon
as=
{
flameIcon
}
boxSize=
{
5
}
color=
"gray.500"
/>
<
Icon
as=
{
flameIcon
}
boxSize=
{
5
}
color=
"gray.500"
/>
<
Text
ml=
{
1
}
>
{
tx
.
burnt_fees
.
value
.
toLocaleString
(
'
en
'
,
{
minimumFractionDigits
:
18
})
}
Ether
</
Text
>
<
Text
ml=
{
1
}
mr=
{
1
}
>
{
tx
.
burnt_fees
.
value
.
toLocaleString
(
'
en
'
,
{
minimumFractionDigits
:
18
})
}
Ether
</
Text
>
<
Text
variant=
"secondary"
ml=
{
1
}
>
($
{
tx
.
burnt_fees
.
value_usd
.
toFixed
(
2
)
}
)
</
Text
>
<
Text
variant=
"secondary"
>
($
{
tx
.
burnt_fees
.
value_usd
.
toFixed
(
2
)
}
)
</
Text
>
</
DetailsInfoItem
>
</
DetailsInfoItem
>
<
GridItem
colSpan=
{
2
}
>
<
GridItem
colSpan=
{
{
base
:
undefined
,
lg
:
2
}
}
>
<
Element
name=
"TxDetails__cutLink"
>
<
Element
name=
"TxDetails__cutLink"
>
<
Link
<
Link
mt=
{
6
}
mt=
{
6
}
...
@@ -211,7 +211,7 @@ const TxDetails = () => {
...
@@ -211,7 +211,7 @@ const TxDetails = () => {
</
DetailsInfoItem
>
</
DetailsInfoItem
>
<
DetailsInfoItem
<
DetailsInfoItem
title=
"Decoded input data"
title=
"Decoded input data"
hint=
"
hmmmmmmmmmmm
"
hint=
"
Decoded input data
"
>
>
<
TxDecodedInputData
/>
<
TxDecodedInputData
/>
</
DetailsInfoItem
>
</
DetailsInfoItem
>
...
...
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