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
c383aa7f
Commit
c383aa7f
authored
Nov 16, 2022
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes
parent
c96fd3da
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
11 deletions
+27
-11
LatestBlocksItem.tsx
ui/home/LatestBlocksItem.tsx
+1
-1
LatestBlocksItemSkeleton.tsx
ui/home/LatestBlocksItemSkeleton.tsx
+1
-1
LatestTxsItem.tsx
ui/home/LatestTxsItem.tsx
+6
-3
StatsItem.tsx
ui/home/StatsItem.tsx
+18
-5
Header.tsx
ui/snippets/header/Header.tsx
+1
-1
No files found.
ui/home/LatestBlocksItem.tsx
View file @
c383aa7f
...
@@ -34,12 +34,12 @@ const LatestBlocksItem = ({ block, h }: Props) => {
...
@@ -34,12 +34,12 @@ const LatestBlocksItem = ({ block, h }: Props) => {
animate=
{
{
opacity
:
1
}
}
animate=
{
{
opacity
:
1
}
}
transitionDuration=
"normal"
transitionDuration=
"normal"
transitionTimingFunction=
"linear"
transitionTimingFunction=
"linear"
width=
"100%"
borderRadius=
"12px"
borderRadius=
"12px"
border=
"1px solid"
border=
"1px solid"
borderColor=
{
useColorModeValue
(
'
gray.200
'
,
'
whiteAlpha.200
'
)
}
borderColor=
{
useColorModeValue
(
'
gray.200
'
,
'
whiteAlpha.200
'
)
}
p=
{
6
}
p=
{
6
}
h=
{
`${ h }px`
}
h=
{
`${ h }px`
}
minWidth=
{
{
base
:
'
100%
'
,
lg
:
'
280px
'
}
}
>
>
<
Flex
justifyContent=
"space-between"
alignItems=
"center"
mb=
{
3
}
>
<
Flex
justifyContent=
"space-between"
alignItems=
"center"
mb=
{
3
}
>
<
HStack
spacing=
{
2
}
>
<
HStack
spacing=
{
2
}
>
...
...
ui/home/LatestBlocksItemSkeleton.tsx
View file @
c383aa7f
...
@@ -12,7 +12,7 @@ import React from 'react';
...
@@ -12,7 +12,7 @@ import React from 'react';
const
LatestBlocksItemSkeleton
=
()
=>
{
const
LatestBlocksItemSkeleton
=
()
=>
{
return
(
return
(
<
Box
<
Box
width=
"100%"
minWidth=
{
{
base
:
'
100%
'
,
lg
:
'
280px
'
}
}
borderRadius=
"12px"
borderRadius=
"12px"
border=
"1px solid"
border=
"1px solid"
borderColor=
{
useColorModeValue
(
'
gray.200
'
,
'
whiteAlpha.200
'
)
}
borderColor=
{
useColorModeValue
(
'
gray.200
'
,
'
whiteAlpha.200
'
)
}
...
...
ui/home/LatestTxsItem.tsx
View file @
c383aa7f
...
@@ -13,8 +13,8 @@ import type { Transaction } from 'types/api/transaction';
...
@@ -13,8 +13,8 @@ import type { Transaction } from 'types/api/transaction';
import
appConfig
from
'
configs/app/config
'
;
import
appConfig
from
'
configs/app/config
'
;
import
rightArrowIcon
from
'
icons/arrows/east.svg
'
;
import
rightArrowIcon
from
'
icons/arrows/east.svg
'
;
import
transactionIcon
from
'
icons/transactions.svg
'
;
import
transactionIcon
from
'
icons/transactions.svg
'
;
import
dayjs
from
'
lib/date/dayjs
'
;
import
getValueWithUnit
from
'
lib/getValueWithUnit
'
;
import
getValueWithUnit
from
'
lib/getValueWithUnit
'
;
import
useTimeAgoIncrement
from
'
lib/hooks/useTimeAgoIncrement
'
;
import
Address
from
'
ui/shared/address/Address
'
;
import
Address
from
'
ui/shared/address/Address
'
;
import
AddressIcon
from
'
ui/shared/address/AddressIcon
'
;
import
AddressIcon
from
'
ui/shared/address/AddressIcon
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
...
@@ -30,6 +30,7 @@ const LatestBlocksItem = ({ tx }: Props) => {
...
@@ -30,6 +30,7 @@ const LatestBlocksItem = ({ tx }: Props) => {
const
iconColor
=
useColorModeValue
(
'
blue.600
'
,
'
blue.300
'
);
const
iconColor
=
useColorModeValue
(
'
blue.600
'
,
'
blue.300
'
);
const
dataTo
=
tx
.
to
&&
tx
.
to
.
hash
?
tx
.
to
:
tx
.
created_contract
;
const
dataTo
=
tx
.
to
&&
tx
.
to
.
hash
?
tx
.
to
:
tx
.
created_contract
;
const
timeAgo
=
useTimeAgoIncrement
(
tx
.
timestamp
||
'
0
'
,
true
);
return
(
return
(
<
Box
<
Box
...
@@ -43,7 +44,9 @@ const LatestBlocksItem = ({ tx }: Props) => {
...
@@ -43,7 +44,9 @@ const LatestBlocksItem = ({ tx }: Props) => {
<
Flex
justifyContent=
"space-between"
width=
"100%"
alignItems=
"start"
flexDirection=
{
{
base
:
'
column
'
,
lg
:
'
row
'
}
}
>
<
Flex
justifyContent=
"space-between"
width=
"100%"
alignItems=
"start"
flexDirection=
{
{
base
:
'
column
'
,
lg
:
'
row
'
}
}
>
<
Box
width=
"100%"
>
<
Box
width=
"100%"
>
<
HStack
>
<
HStack
>
{
tx
.
tx_types
.
map
(
item
=>
<
TxType
key=
{
item
}
type=
{
item
}
/>)
}
{
/* FIXME: mb only one type must be here */
}
<
TxType
type=
{
tx
.
tx_types
[
0
]
}
/>
{
/* { tx.tx_types.map(item => <TxType key={ item } type={ item }/>) } */
}
<
TxStatus
status=
{
tx
.
status
}
errorText=
{
tx
.
status
===
'
error
'
?
tx
.
result
:
undefined
}
/>
<
TxStatus
status=
{
tx
.
status
}
errorText=
{
tx
.
status
===
'
error
'
?
tx
.
result
:
undefined
}
/>
</
HStack
>
</
HStack
>
<
Flex
<
Flex
...
@@ -70,7 +73,7 @@ const LatestBlocksItem = ({ tx }: Props) => {
...
@@ -70,7 +73,7 @@ const LatestBlocksItem = ({ tx }: Props) => {
/>
/>
</
Address
>
</
Address
>
</
Flex
>
</
Flex
>
<
Text
variant=
"secondary"
fontWeight=
"400"
fontSize=
"sm"
>
{
dayjs
(
tx
.
timestamp
).
fromNow
()
}
</
Text
>
{
tx
.
timestamp
&&
<
Text
variant=
"secondary"
fontWeight=
"400"
fontSize=
"sm"
>
{
timeAgo
}
</
Text
>
}
</
Flex
>
</
Flex
>
</
Box
>
</
Box
>
<
Box
>
<
Box
>
...
...
ui/home/StatsItem.tsx
View file @
c383aa7f
import
{
Box
,
Flex
,
Icon
,
Center
,
Text
,
LightMode
}
from
'
@chakra-ui/react
'
;
import
{
Flex
,
Icon
,
Center
,
Text
,
LightMode
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
type
Props
=
{
type
Props
=
{
...
@@ -10,14 +10,27 @@ type Props = {
...
@@ -10,14 +10,27 @@ type Props = {
const
StatsItem
=
({
icon
,
title
,
value
}:
Props
)
=>
{
const
StatsItem
=
({
icon
,
title
,
value
}:
Props
)
=>
{
return
(
return
(
<
LightMode
>
<
LightMode
>
<
Flex
background=
"blue.50"
padding=
{
5
}
borderRadius=
"16px"
>
<
Flex
<
Center
backgroundColor=
"green.100"
borderRadius=
"12px"
w=
{
10
}
h=
{
10
}
marginRight=
{
4
}
>
backgroundColor=
"blue.50"
padding=
{
5
}
borderRadius=
"16px"
flexDirection=
{
{
base
:
'
row
'
,
lg
:
'
column
'
,
xl
:
'
row
'
}
}
alignItems=
"center"
>
<
Center
backgroundColor=
"green.100"
borderRadius=
"12px"
w=
{
10
}
h=
{
10
}
mr=
{
{
base
:
4
,
lg
:
0
,
xl
:
4
}
}
mb=
{
{
base
:
0
,
lg
:
2
,
xl
:
0
}
}
>
<
Icon
as=
{
icon
}
boxSize=
{
7
}
color=
"black"
/>
<
Icon
as=
{
icon
}
boxSize=
{
7
}
color=
"black"
/>
</
Center
>
</
Center
>
<
Box
>
<
Flex
flexDirection=
"column"
alignItems=
{
{
base
:
'
start
'
,
lg
:
'
center
'
,
xl
:
'
start
'
}
}
>
<
Text
variant=
"secondary"
fontSize=
"xs"
lineHeight=
"16px"
>
{
title
}
</
Text
>
<
Text
variant=
"secondary"
fontSize=
"xs"
lineHeight=
"16px"
>
{
title
}
</
Text
>
<
Text
fontWeight=
{
500
}
fontSize=
"md"
>
{
value
}
</
Text
>
<
Text
fontWeight=
{
500
}
fontSize=
"md"
>
{
value
}
</
Text
>
</
Bo
x
>
</
Fle
x
>
</
Flex
>
</
Flex
>
</
LightMode
>
</
LightMode
>
);
);
...
...
ui/snippets/header/Header.tsx
View file @
c383aa7f
...
@@ -55,7 +55,7 @@ const Header = ({ hideOnScrollDown, hasSearch }: Props) => {
...
@@ -55,7 +55,7 @@ const Header = ({ hideOnScrollDown, hasSearch }: Props) => {
paddingTop=
{
9
}
paddingTop=
{
9
}
paddingBottom=
"52px"
paddingBottom=
"52px"
>
>
<
Box
width=
"100%"
opacity=
{
hasSearch
?
1
:
0
}
><
SearchBar
/>
</
Box
>
<
Box
width=
"100%"
>
{
hasSearch
&&
<
SearchBar
/>
}
</
Box
>
<
ColorModeToggler
/>
<
ColorModeToggler
/>
<
ProfileMenuDesktop
/>
<
ProfileMenuDesktop
/>
</
HStack
>
</
HStack
>
...
...
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