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
3765c995
Commit
3765c995
authored
Sep 23, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
design review fixes pt.1
parent
e2d7cf71
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
38 additions
and
21 deletions
+38
-21
search.svg
icons/search.svg
+3
-0
Button.ts
theme/components/Button.ts
+1
-1
NavigationDesktop.tsx
ui/blocks/navigation/NavigationDesktop.tsx
+1
-1
RoutedTabs.tsx
ui/shared/RoutedTabs/RoutedTabs.tsx
+1
-1
Token.tsx
ui/shared/Token.tsx
+1
-1
Utilization.tsx
ui/shared/Utilization.tsx
+2
-2
TxDetails.tsx
ui/tx/TxDetails.tsx
+12
-2
TxInternalsTable.tsx
ui/tx/internals/TxInternalsTable.tsx
+3
-3
TxInternalsTableItem.tsx
ui/tx/internals/TxInternalsTableItem.tsx
+6
-2
TxLogItem.tsx
ui/tx/logs/TxLogItem.tsx
+5
-5
TxLogTopic.tsx
ui/tx/logs/TxLogTopic.tsx
+1
-1
TxStateStorageItem.tsx
ui/tx/state/TxStateStorageItem.tsx
+2
-2
No files found.
icons/search.svg
0 → 100644
View file @
3765c995
<svg
viewBox=
"0 0 20 20"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
d=
"m15.026 13.848 2.98 2.978a.834.834 0 1 1-1.18 1.18l-2.978-2.98a7.467 7.467 0 0 1-4.681 1.64c-4.14 0-7.5-3.36-7.5-7.5 0-4.14 3.36-7.5 7.5-7.5 4.14 0 7.5 3.36 7.5 7.5a7.466 7.466 0 0 1-1.641 4.681Zm-1.672-.619A5.814 5.814 0 0 0 15 9.167a5.832 5.832 0 0 0-5.833-5.834 5.831 5.831 0 0 0-5.834 5.834A5.832 5.832 0 0 0 9.167 15a5.814 5.814 0 0 0 4.062-1.646l.125-.125Z"
fill=
"currentColor"
/>
</svg>
theme/components/Button.ts
View file @
3765c995
...
...
@@ -47,7 +47,7 @@ const variantOutline = defineStyle((props) => {
const
isGrayTheme
=
c
===
'
gray
'
||
c
===
'
gray-dark
'
;
const
color
=
isGrayTheme
?
mode
(
'
blackAlpha.800
'
,
'
whiteAlpha.800
'
)(
props
)
:
mode
(
`
${
c
}
.600`
,
`
${
c
}
.300`
)(
props
);
const
borderColor
=
isGrayTheme
?
mode
(
'
gray.
2
00
'
,
'
gray.600
'
)(
props
)
:
mode
(
`
${
c
}
.600`
,
`
${
c
}
.300`
)(
props
);
const
borderColor
=
isGrayTheme
?
mode
(
'
gray.
3
00
'
,
'
gray.600
'
)(
props
)
:
mode
(
`
${
c
}
.600`
,
`
${
c
}
.300`
)(
props
);
const
activeBg
=
isGrayTheme
?
mode
(
'
blue.50
'
,
'
gray.600
'
)(
props
)
:
mode
(
`
${
c
}
.50`
,
'
gray.600
'
)(
props
);
const
activeColor
=
(()
=>
{
if
(
c
===
'
gray
'
)
{
...
...
ui/blocks/navigation/NavigationDesktop.tsx
View file @
3765c995
...
...
@@ -88,7 +88,7 @@ const NavigationDesktop = () => {
transform=
{
isCollapsed
?
'
rotate(180deg)
'
:
'
rotate(0)
'
}
{
...
getDefaultTransitionProps
({
transitionProperty
:
'
transform
,
left
'
})
}
transformOrigin=
"center"
position=
"
fixed
"
position=
"
absolute
"
top=
"104px"
left=
{
isCollapsed
?
'
80px
'
:
'
216px
'
}
cursor=
"pointer"
...
...
ui/shared/RoutedTabs/RoutedTabs.tsx
View file @
3765c995
...
...
@@ -52,7 +52,7 @@ const RoutedTabs = ({ tabs, defaultActiveTab }: Props) => {
return
(
<
Tabs
variant=
"soft-rounded"
colorScheme=
"blue"
isLazy
onChange=
{
handleTabChange
}
index=
{
activeTab
}
>
<
TabList
marginBottom=
{
{
base
:
6
,
lg
:
8
}
}
marginBottom=
{
{
base
:
6
,
lg
:
12
}
}
flexWrap=
"nowrap"
whiteSpace=
"nowrap"
ref=
{
listRef
}
...
...
ui/shared/Token.tsx
View file @
3765c995
...
...
@@ -43,7 +43,7 @@ const Token = ({ symbol, className }: Props) => {
<
Link
href=
{
url
}
target=
"_blank"
ml=
{
1
}
>
{
token
.
fullName
}
</
Link
>
<
Text
ml=
{
1
}
>
(
{
token
.
symbol
}
)
</
Text
>
<
Text
ml=
{
1
}
variant=
"secondary"
>
(
{
token
.
symbol
}
)
</
Text
>
</
Center
>
);
};
...
...
ui/shared/Utilization.tsx
View file @
3765c995
import
{
Box
,
Flex
,
Text
,
chakra
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Flex
,
Text
,
chakra
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
interface
Props
{
...
...
@@ -12,7 +12,7 @@ const Utilization = ({ className, value }: Props) => {
const
valueString
=
(
value
*
100
).
toFixed
(
2
)
+
'
%
'
;
return
(
<
Flex
className=
{
className
}
alignItems=
"center"
>
<
Box
bg=
"gray.100"
w=
{
`${ WIDTH }px`
}
h=
"4px"
borderRadius=
"full"
overflow=
"hidden"
>
<
Box
bg=
{
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
)
}
w=
{
`${ WIDTH }px`
}
h=
"4px"
borderRadius=
"full"
overflow=
"hidden"
>
<
Box
bg=
"green.500"
w=
{
valueString
}
h=
"100%"
/>
</
Box
>
<
Text
color=
"green.500"
ml=
"10px"
fontWeight=
"bold"
>
{
valueString
}
</
Text
>
...
...
ui/tx/TxDetails.tsx
View file @
3765c995
import
{
Grid
,
GridItem
,
Text
,
Box
,
Icon
,
Link
,
Tag
,
Flex
}
from
'
@chakra-ui/react
'
;
import
{
Grid
,
GridItem
,
Text
,
Box
,
Icon
,
Link
,
Tag
,
Flex
,
Tooltip
,
chakra
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
{
scroller
,
Element
}
from
'
react-scroll
'
;
import
{
tx
}
from
'
data/tx
'
;
import
clockIcon
from
'
icons/clock.svg
'
;
import
flameIcon
from
'
icons/flame.svg
'
;
import
errorIcon
from
'
icons/status/error.svg
'
;
import
successIcon
from
'
icons/status/success.svg
'
;
import
dayjs
from
'
lib/date/dayjs
'
;
import
Address
from
'
ui/shared/address/Address
'
;
...
...
@@ -97,7 +98,16 @@ const TxDetails = () => {
<
CopyToClipboard
text=
{
tx
.
address_to
}
/>
</
Address
>
<
Tag
colorScheme=
"orange"
variant=
"solid"
flexShrink=
{
0
}
>
SANA
</
Tag
>
<
Icon
as=
{
successIcon
}
boxSize=
{
4
}
ml=
{
2
}
color=
"green.500"
/>
<
Tooltip
label=
"Contract execution completed"
>
<
chakra
.
span
display=
"inline-flex"
>
<
Icon
as=
{
successIcon
}
boxSize=
{
4
}
ml=
{
2
}
color=
"green.500"
cursor=
"pointer"
/>
</
chakra
.
span
>
</
Tooltip
>
<
Tooltip
label=
"Error occured during contract execution"
>
<
chakra
.
span
display=
"inline-flex"
>
<
Icon
as=
{
errorIcon
}
boxSize=
{
4
}
ml=
{
2
}
color=
"red.500"
cursor=
"pointer"
/>
</
chakra
.
span
>
</
Tooltip
>
<
Token
symbol=
"USDT"
ml=
{
3
}
/>
</
DetailsInfoItem
>
<
DetailsInfoItem
...
...
ui/tx/internals/TxInternalsTable.tsx
View file @
3765c995
...
...
@@ -10,12 +10,12 @@ const TxInternalsTable = ({ data }: { data: typeof txData}) => {
<
Table
variant=
"simple"
size=
"sm"
>
<
Thead
>
<
Tr
>
<
Th
width=
"2
6
%"
>
Type
</
Th
>
<
Th
width=
"2
8
%"
>
Type
</
Th
>
<
Th
width=
"20%"
>
From
</
Th
>
<
Th
width=
"24px"
px=
{
0
}
/>
<
Th
width=
"20%"
>
To
</
Th
>
<
Th
width=
"1
7
%"
isNumeric
>
Value
</
Th
>
<
Th
width=
"1
7
%"
isNumeric
>
Gas limit
</
Th
>
<
Th
width=
"1
6
%"
isNumeric
>
Value
</
Th
>
<
Th
width=
"1
6
%"
isNumeric
>
Gas limit
</
Th
>
</
Tr
>
</
Thead
>
<
Tbody
>
...
...
ui/tx/internals/TxInternalsTableItem.tsx
View file @
3765c995
import
{
Tr
,
Td
,
Tag
,
Icon
}
from
'
@chakra-ui/react
'
;
import
{
Tr
,
Td
,
Tag
,
Icon
,
Box
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
rightArrowIcon
from
'
icons/arrows/right.svg
'
;
...
...
@@ -23,7 +23,11 @@ const TxInternalTableItem = ({ type, status, from, to, value, gasLimit }: Props)
return
(
<
Tr
alignItems=
"top"
>
<
Td
>
{
typeTitle
&&
<
Tag
colorScheme=
"cyan"
mr=
{
2
}
>
{
typeTitle
}
</
Tag
>
}
{
typeTitle
&&
(
<
Box
w=
"126px"
display=
"inline-block"
>
<
Tag
colorScheme=
"cyan"
mr=
{
5
}
>
{
typeTitle
}
</
Tag
>
</
Box
>
)
}
<
TxStatus
status=
{
status
}
/>
</
Td
>
<
Td
>
...
...
ui/tx/logs/TxLogItem.tsx
View file @
3765c995
import
{
SearchIcon
}
from
'
@chakra-ui/icons
'
;
import
{
Text
,
Grid
,
GridItem
,
Link
,
Tooltip
,
Button
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
{
Text
,
Grid
,
GridItem
,
Link
,
Tooltip
,
Button
,
Icon
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
searchIcon
from
'
icons/search.svg
'
;
import
Address
from
'
ui/shared/address/Address
'
;
import
AddressIcon
from
'
ui/shared/address/AddressIcon
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
...
...
@@ -45,12 +45,12 @@ const TxLogItem = ({ address, index, topics, data }: Props) => {
<
AddressLink
hash=
{
address
}
ml=
{
2
}
/>
</
Address
>
<
Tooltip
label=
"Find matches topic"
>
<
Link
ml=
{
2
}
>
<
SearchIcon
w=
{
5
}
h
=
{
5
}
/>
<
Link
ml=
{
2
}
display=
"inline-flex"
>
<
Icon
as=
{
searchIcon
}
boxSize
=
{
5
}
/>
</
Link
>
</
Tooltip
>
<
Tooltip
label=
"Log index"
>
<
Button
variant=
"outline"
isActive
ml=
{
{
base
:
9
,
lg
:
'
auto
'
}
}
size=
"sm"
fontWeight=
{
400
}
>
<
Button
variant=
"outline"
colorScheme=
"gray"
isActive
ml=
{
{
base
:
9
,
lg
:
'
auto
'
}
}
size=
"sm"
fontWeight=
{
400
}
>
{
index
}
</
Button
>
</
Tooltip
>
...
...
ui/tx/logs/TxLogTopic.tsx
View file @
3765c995
...
...
@@ -20,7 +20,7 @@ const TxLogTopic = ({ hex, index }: Props) => {
return
(
<
Flex
alignItems=
"center"
px=
{
{
base
:
0
,
lg
:
3
}
}
_notFirst=
{
{
mt
:
3
}
}
overflow=
"hidden"
maxW=
"100%"
>
<
Button
variant=
"outline"
isActive
size=
"xs"
fontWeight=
{
400
}
mr=
{
3
}
w=
{
6
}
>
<
Button
variant=
"outline"
colorScheme=
"gray"
isActive
size=
"xs"
fontWeight=
{
400
}
mr=
{
3
}
w=
{
6
}
>
{
index
}
</
Button
>
{
/* temporary condition juse to show different states of the component */
}
...
...
ui/tx/state/TxStateStorageItem.tsx
View file @
3765c995
...
...
@@ -29,12 +29,12 @@ const TxStateStorageItem = ({ storageItem }: {storageItem: TTxStateItemStorage})
background=
"blackAlpha.50"
borderRadius=
"12px"
mb=
{
4
}
fontSize=
{
{
base
:
'
sm
'
,
lg
:
'
md
'
}
}
fontSize=
"sm"
>
{
gridData
.
map
((
item
)
=>
(
<
React
.
Fragment
key=
{
item
.
name
}
>
<
GridItem
alignSelf=
{
{
base
:
'
start
'
,
lg
:
'
center
'
}
}
fontWeight=
{
{
base
:
500
,
lg
:
600
}
}
textAlign=
"end"
>
{
item
.
name
}
</
GridItem
>
<
GridItem
display=
"flex"
flexDir=
"column"
rowGap=
{
2
}
alignItems=
"flex-start"
>
<
GridItem
display=
"flex"
flexDir=
{
{
base
:
'
column
'
,
lg
:
'
row
'
}
}
rowGap=
{
2
}
alignItems=
{
{
base
:
'
flex-start
'
,
lg
:
'
center
'
}
}
>
{
item
.
select
&&
(
<
Select
size=
"sm"
...
...
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