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
b4c80404
Commit
b4c80404
authored
Dec 06, 2022
by
POA
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve 'Scroll to see more' text note for tx actions
parent
0235f01e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
24 deletions
+50
-24
jquery.mCustomScrollbar.min.css
public/static/css/jquery.mCustomScrollbar.min.css
+12
-0
DetailsInfoItem.tsx
ui/shared/DetailsInfoItem.tsx
+6
-3
TxDetails.tsx
ui/tx/TxDetails.tsx
+4
-3
TxDetailsActions.tsx
ui/tx/details/TxDetailsActions.tsx
+28
-18
No files found.
public/static/css/jquery.mCustomScrollbar.min.css
View file @
b4c80404
...
@@ -17,3 +17,15 @@
...
@@ -17,3 +17,15 @@
.mCustomScrollbar.mCS_no_scrollbar
.lastItem
{
.mCustomScrollbar.mCS_no_scrollbar
.lastItem
{
margin-bottom
:
0
!important
;
margin-bottom
:
0
!important
;
}
}
.mCSB_scrollTools
.mCSB_draggerRail
{
display
:
none
;
}
.mCSB_scrollTools
.mCSB_draggerContainer
{
bottom
:
1.3rem
;
}
.mCSB_scrollTools
.mCSB_dragger
.mCSB_dragger_bar
{
background-color
:
#cbd5e0
!important
;
}
ui/shared/DetailsInfoItem.tsx
View file @
b4c80404
...
@@ -10,11 +10,11 @@ interface Props extends Omit<HTMLChakraProps<'div'>, 'title'> {
...
@@ -10,11 +10,11 @@ interface Props extends Omit<HTMLChakraProps<'div'>, 'title'> {
children
:
React
.
ReactNode
;
children
:
React
.
ReactNode
;
}
}
const
DetailsInfoItem
=
({
title
,
hint
,
children
,
...
styles
}:
Props
)
=>
{
const
DetailsInfoItem
=
({
title
,
hint
,
note
,
noteDisplay
,
children
,
...
styles
}:
Props
)
=>
{
return
(
return
(
<>
<>
<
GridItem
py=
{
{
base
:
1
,
lg
:
2
}
}
lineHeight=
{
5
}
{
...
styles
}
whiteSpace=
"nowrap"
_notFirst=
{
{
mt
:
{
base
:
3
,
lg
:
0
}
}
}
>
<
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=
"
flex-start
"
>
<
Tooltip
<
Tooltip
label=
{
hint
}
label=
{
hint
}
placement=
"top"
placement=
"top"
...
@@ -24,7 +24,10 @@ const DetailsInfoItem = ({ title, hint, children, ...styles }: Props) => {
...
@@ -24,7 +24,10 @@ const DetailsInfoItem = ({ title, hint, children, ...styles }: Props) => {
<
Icon
as=
{
infoIcon
}
boxSize=
{
5
}
/>
<
Icon
as=
{
infoIcon
}
boxSize=
{
5
}
/>
</
Box
>
</
Box
>
</
Tooltip
>
</
Tooltip
>
<
Text
fontWeight=
{
{
base
:
700
,
lg
:
500
}
}
>
{
title
}
</
Text
>
<
Text
fontWeight=
{
{
base
:
700
,
lg
:
500
}
}
>
{
title
}
{
note
&&
<
Text
fontWeight=
{
500
}
color=
"gray.500"
fontSize=
"xs"
className=
"note"
display=
{
noteDisplay
}
align=
"right"
>
{
note
}
</
Text
>
}
</
Text
>
</
Flex
>
</
Flex
>
</
GridItem
>
</
GridItem
>
<
GridItem
<
GridItem
...
...
ui/tx/TxDetails.tsx
View file @
b4c80404
import
{
Grid
,
GridItem
,
Text
,
Box
,
Icon
,
Link
,
Spinner
,
Tag
,
Flex
,
Tooltip
,
chakra
}
from
'
@chakra-ui/react
'
;
import
{
Grid
,
GridItem
,
Text
,
Box
,
Icon
,
Link
,
Spinner
,
Tag
,
Flex
,
Tooltip
,
Divider
,
chakra
}
from
'
@chakra-ui/react
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
{
scroller
,
Element
}
from
'
react-scroll
'
;
import
{
scroller
,
Element
}
from
'
react-scroll
'
;
...
@@ -126,9 +126,10 @@ const TxDetails = () => {
...
@@ -126,9 +126,10 @@ const TxDetails = () => {
<
Text
variant=
"secondary"
>
{
getConfirmationDuration
(
data
.
confirmation_duration
)
}
</
Text
>
<
Text
variant=
"secondary"
>
{
getConfirmationDuration
(
data
.
confirmation_duration
)
}
</
Text
>
</
DetailsInfoItem
>
</
DetailsInfoItem
>
)
}
)
}
{
data
.
actions
&&
<
GridItem
colSpan=
{
{
base
:
undefined
,
lg
:
2
}
}
mt=
{
{
base
:
3
,
lg
:
8
}
}
/
>
}
{
data
.
actions
&&
<
GridItem
colSpan=
{
{
base
:
undefined
,
lg
:
2
}
}
mt=
{
{
base
:
3
,
lg
:
3
}
}
><
Divider
/></
GridItem
>
}
{
data
.
actions
&&
<
TxDetailsActions
actions=
{
data
.
actions
}
/>
}
{
data
.
actions
&&
<
TxDetailsActions
actions=
{
data
.
actions
}
/>
}
<
GridItem
colSpan=
{
{
base
:
undefined
,
lg
:
2
}
}
mt=
{
{
base
:
3
,
lg
:
8
}
}
/>
{
data
.
actions
&&
<
GridItem
colSpan=
{
{
base
:
undefined
,
lg
:
2
}
}
mb=
{
{
base
:
0
,
lg
:
3
}
}
><
Divider
/></
GridItem
>
}
{
!
data
.
actions
&&
<
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."
...
...
ui/tx/details/TxDetailsActions.tsx
View file @
b4c80404
import
{
Box
,
Flex
,
Text
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Flex
,
Text
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
{
space
}
from
'
lib/html-entities
'
;
import
Script
from
'
next/script
'
import
DetailsInfoItem
from
'
ui/shared/DetailsInfoItem
'
;
import
DetailsInfoItem
from
'
ui/shared/DetailsInfoItem
'
;
...
@@ -11,26 +11,36 @@ const TxDetailsActions = ({ actions }) => {
...
@@ -11,26 +11,36 @@ const TxDetailsActions = ({ actions }) => {
<
DetailsInfoItem
<
DetailsInfoItem
title=
"Transaction Action"
title=
"Transaction Action"
hint=
"Highlighted events of the transaction"
hint=
"Highlighted events of the transaction"
note=
"Scroll to see more"
noteDisplay=
"none"
position=
"relative"
position=
"relative"
id=
"txActionsTitle"
>
>
<
Box
w=
"100%"
>
<
Box
className=
"mCustomScrollbar"
maxH=
{
36
}
w=
"90%"
>
<
Box
className=
"mCustomScrollbar"
data
-
mcs
-
theme=
"minimal-dark"
maxH=
{
36
}
>
<
Flex
<
Flex
flexDirection=
"column"
flexDirection=
"column"
alignItems=
"flex-start"
alignItems=
"flex-start"
rowGap=
{
5
}
rowGap=
{
5
}
w=
"100%"
w=
"100%"
fontWeight=
{
500
}
fontWeight=
{
500
}
>
>
{
actions
.
map
((
action
,
index
)
=>
<
TxDetailsAction
key=
{
index
}
{
...
action
}
isLast=
{
index
===
actions
.
length
-
1
}
/>)
}
{
actions
.
map
((
action
,
index
)
=>
<
TxDetailsAction
key=
{
index
}
{
...
action
}
isLast=
{
index
===
actions
.
length
-
1
}
/>)
}
</
Flex
>
</
Flex
>
</
Box
>
<
Text
fontWeight=
{
500
}
color=
"gray.500"
fontSize=
"sm"
id=
"txActionsScrollForMore"
display=
"none"
marginTop=
{
5
}
>
Scroll for more
{
space
}
<
Text
color=
"gray.500"
transform=
"rotate(90deg)"
display=
"inline-block"
as=
"span"
>
»
</
Text
>
</
Text
>
</
Box
>
</
Box
>
<
Script
src=
"/static/js/jquery.mCustomScrollbar.concat.min.js"
strategy=
"afterInteractive"
onLoad=
{
()
=>
{
$
(
"
.mCustomScrollbar
"
).
mCustomScrollbar
({
callbacks
:{
onOverflowY
:
()
=>
{
$
(
"
#txActionsTitle .note
"
).
css
(
"
display
"
,
"
block
"
);
},
onOverflowYNone
:
()
=>
{
$
(
"
#txActionsTitle .note
"
).
css
(
"
display
"
,
"
none
"
);
}
},
theme
:
"
dark
"
,
autoHideScrollbar
:
true
,
scrollButtons
:
{
enable
:
false
},
scrollbarPosition
:
"
outside
"
});
}
}
/>
</
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