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
e5cad5ba
Commit
e5cad5ba
authored
Jan 19, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
link token
parent
8a66db72
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
30 additions
and
37 deletions
+30
-37
Button.ts
theme/components/Button/Button.ts
+8
-8
Link.ts
theme/components/Link.ts
+2
-2
Modal.ts
theme/components/Modal.ts
+1
-1
Tabs.ts
theme/components/Tabs.ts
+1
-1
Text.ts
theme/components/Text.ts
+0
-5
semanticTokens.ts
theme/foundations/semanticTokens.ts
+7
-0
LatestBlocksItem.tsx
ui/home/LatestBlocksItem.tsx
+1
-2
LatestTxsItem.tsx
ui/home/LatestTxsItem.tsx
+1
-4
AdditionalInfoButton.tsx
ui/shared/AdditionalInfoButton.tsx
+2
-3
TokenTransferListItem.tsx
ui/shared/TokenTransfer/TokenTransferListItem.tsx
+2
-4
NavigationDesktop.tsx
ui/snippets/navigation/NavigationDesktop.tsx
+1
-1
useColors.ts
ui/snippets/navigation/useColors.ts
+1
-1
NetworkMenuButton.tsx
ui/snippets/networkMenu/NetworkMenuButton.tsx
+1
-1
useColors.ts
ui/snippets/networkMenu/useColors.ts
+1
-1
TxsListItem.tsx
ui/txs/TxsListItem.tsx
+1
-3
No files found.
theme/components/Button/Button.ts
View file @
e5cad5ba
...
@@ -70,15 +70,15 @@ const variantOutline = defineStyle((props) => {
...
@@ -70,15 +70,15 @@ const variantOutline = defineStyle((props) => {
borderColor
,
borderColor
,
bg
:
'
transparent
'
,
bg
:
'
transparent
'
,
_hover
:
{
_hover
:
{
color
:
'
blue.400
'
,
color
:
'
link_hovered
'
,
borderColor
:
'
blue.400
'
,
borderColor
:
'
link_hovered
'
,
bg
:
'
transparent
'
,
bg
:
'
transparent
'
,
_active
:
{
_active
:
{
bg
:
props
.
isActive
?
activeBg
:
'
transparent
'
,
bg
:
props
.
isActive
?
activeBg
:
'
transparent
'
,
borderColor
:
props
.
isActive
?
activeBg
:
'
blue.400
'
,
borderColor
:
props
.
isActive
?
activeBg
:
'
link_hovered
'
,
color
:
props
.
isActive
?
activeColor
:
'
blue.400
'
,
color
:
props
.
isActive
?
activeColor
:
'
link_hovered
'
,
p
:
{
p
:
{
color
:
'
blue.400
'
,
color
:
'
link_hovered
'
,
},
},
},
},
_disabled
:
{
_disabled
:
{
...
@@ -86,7 +86,7 @@ const variantOutline = defineStyle((props) => {
...
@@ -86,7 +86,7 @@ const variantOutline = defineStyle((props) => {
borderColor
,
borderColor
,
},
},
p
:
{
p
:
{
color
:
'
blue.400
'
,
color
:
'
link_hovered
'
,
},
},
},
},
_disabled
:
{
_disabled
:
{
...
@@ -147,7 +147,7 @@ const variantSubtle = defineStyle((props) => {
...
@@ -147,7 +147,7 @@ const variantSubtle = defineStyle((props) => {
bg
:
mode
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
)(
props
),
bg
:
mode
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
)(
props
),
color
:
mode
(
'
blackAlpha.800
'
,
'
whiteAlpha.800
'
)(
props
),
color
:
mode
(
'
blackAlpha.800
'
,
'
whiteAlpha.800
'
)(
props
),
_hover
:
{
_hover
:
{
color
:
'
blue.400
'
,
color
:
'
link_hovered
'
,
_disabled
:
{
_disabled
:
{
color
:
mode
(
'
blackAlpha.800
'
,
'
whiteAlpha.800
'
)(
props
),
color
:
mode
(
'
blackAlpha.800
'
,
'
whiteAlpha.800
'
)(
props
),
bg
:
mode
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
)(
props
),
bg
:
mode
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
)(
props
),
...
@@ -160,7 +160,7 @@ const variantSubtle = defineStyle((props) => {
...
@@ -160,7 +160,7 @@ const variantSubtle = defineStyle((props) => {
bg
:
`
${
c
}
.100`
,
bg
:
`
${
c
}
.100`
,
color
:
`
${
c
}
.600`
,
color
:
`
${
c
}
.600`
,
_hover
:
{
_hover
:
{
color
:
'
blue.400
'
,
color
:
'
link_hovered
'
,
},
},
};
};
});
});
...
...
theme/components/Link.ts
View file @
e5cad5ba
...
@@ -8,9 +8,9 @@ const baseStyle = defineStyle(getDefaultTransitionProps());
...
@@ -8,9 +8,9 @@ const baseStyle = defineStyle(getDefaultTransitionProps());
const
variantPrimary
=
defineStyle
((
props
)
=>
{
const
variantPrimary
=
defineStyle
((
props
)
=>
{
return
{
return
{
color
:
mode
(
'
blue.600
'
,
'
blue.300
'
)(
props
)
,
color
:
'
link
'
,
_hover
:
{
_hover
:
{
color
:
mode
(
'
blue.400
'
,
'
blue.200
'
)(
props
)
,
color
:
'
link_hovered
'
,
textDecorationStyle
:
props
.
textDecorationStyle
||
'
solid
'
,
textDecorationStyle
:
props
.
textDecorationStyle
||
'
solid
'
,
},
},
};
};
...
...
theme/components/Modal.ts
View file @
e5cad5ba
...
@@ -51,7 +51,7 @@ const baseStyleCloseButton = defineStyle((props) => {
...
@@ -51,7 +51,7 @@ const baseStyleCloseButton = defineStyle((props) => {
height
:
10
,
height
:
10
,
width
:
10
,
width
:
10
,
color
:
mode
(
'
gray.700
'
,
'
gray.500
'
)(
props
),
color
:
mode
(
'
gray.700
'
,
'
gray.500
'
)(
props
),
_hover
:
{
color
:
'
blue.400
'
},
_hover
:
{
color
:
'
link_hovered
'
},
_active
:
{
bg
:
'
none
'
},
_active
:
{
bg
:
'
none
'
},
};
};
});
});
...
...
theme/components/Tabs.ts
View file @
e5cad5ba
...
@@ -22,7 +22,7 @@ const variantSoftRounded = definePartsStyle((props) => {
...
@@ -22,7 +22,7 @@ const variantSoftRounded = definePartsStyle((props) => {
},
},
},
},
_hover
:
{
_hover
:
{
color
:
'
blue.400
'
,
color
:
'
link_hovered
'
,
},
},
},
},
};
};
...
...
theme/components/Text.ts
View file @
e5cad5ba
...
@@ -10,10 +10,6 @@ const variantSecondary = defineStyle((props) => ({
...
@@ -10,10 +10,6 @@ const variantSecondary = defineStyle((props) => ({
color
:
mode
(
'
gray.500
'
,
'
gray.400
'
)(
props
),
color
:
mode
(
'
gray.500
'
,
'
gray.400
'
)(
props
),
}));
}));
const
variantAlternate
=
defineStyle
((
props
)
=>
({
color
:
mode
(
'
blue.600
'
,
'
blue.300
'
)(
props
),
}));
const
variantInherit
=
{
const
variantInherit
=
{
color
:
'
inherit
'
,
color
:
'
inherit
'
,
};
};
...
@@ -21,7 +17,6 @@ const variantInherit = {
...
@@ -21,7 +17,6 @@ const variantInherit = {
const
variants
:
Record
<
string
,
SystemStyleInterpolation
>
=
{
const
variants
:
Record
<
string
,
SystemStyleInterpolation
>
=
{
primary
:
variantPrimary
,
primary
:
variantPrimary
,
secondary
:
variantSecondary
,
secondary
:
variantSecondary
,
alternate
:
variantAlternate
,
inherit
:
variantInherit
,
inherit
:
variantInherit
,
};
};
...
...
theme/foundations/semanticTokens.ts
View file @
e5cad5ba
...
@@ -4,6 +4,13 @@ const semanticTokens = {
...
@@ -4,6 +4,13 @@ const semanticTokens = {
'
default
'
:
'
blackAlpha.200
'
,
'
default
'
:
'
blackAlpha.200
'
,
_dark
:
'
whiteAlpha.200
'
,
_dark
:
'
whiteAlpha.200
'
,
},
},
link
:
{
'
default
'
:
'
blue.600
'
,
_dark
:
'
blue.300
'
,
},
link_hovered
:
{
'
default
'
:
'
blue.400
'
,
},
},
},
};
};
...
...
ui/home/LatestBlocksItem.tsx
View file @
e5cad5ba
...
@@ -7,7 +7,6 @@ import {
...
@@ -7,7 +7,6 @@ import {
Icon
,
Icon
,
Link
,
Link
,
Text
,
Text
,
useColorModeValue
,
}
from
'
@chakra-ui/react
'
;
}
from
'
@chakra-ui/react
'
;
import
{
motion
}
from
'
framer-motion
'
;
import
{
motion
}
from
'
framer-motion
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
...
@@ -43,7 +42,7 @@ const LatestBlocksItem = ({ block, h }: Props) => {
...
@@ -43,7 +42,7 @@ const LatestBlocksItem = ({ block, h }: Props) => {
>
>
<
Flex
justifyContent=
"space-between"
alignItems=
"center"
mb=
{
3
}
>
<
Flex
justifyContent=
"space-between"
alignItems=
"center"
mb=
{
3
}
>
<
HStack
spacing=
{
2
}
>
<
HStack
spacing=
{
2
}
>
<
Icon
as=
{
blockIcon
}
boxSize=
"30px"
color=
{
useColorModeValue
(
'
blue.600
'
,
'
blue.300
'
)
}
/>
<
Icon
as=
{
blockIcon
}
boxSize=
"30px"
color=
"link"
/>
<
Link
<
Link
href=
{
link
(
'
block
'
,
{
id
:
String
(
block
.
height
)
})
}
href=
{
link
(
'
block
'
,
{
id
:
String
(
block
.
height
)
})
}
fontSize=
"xl"
fontSize=
"xl"
...
...
ui/home/LatestTxsItem.tsx
View file @
e5cad5ba
...
@@ -11,7 +11,6 @@ import {
...
@@ -11,7 +11,6 @@ import {
PopoverTrigger
,
PopoverTrigger
,
PopoverContent
,
PopoverContent
,
PopoverBody
,
PopoverBody
,
useColorModeValue
,
useDisclosure
,
useDisclosure
,
}
from
'
@chakra-ui/react
'
;
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
...
@@ -37,8 +36,6 @@ type Props = {
...
@@ -37,8 +36,6 @@ type Props = {
}
}
const
LatestBlocksItem
=
({
tx
}:
Props
)
=>
{
const
LatestBlocksItem
=
({
tx
}:
Props
)
=>
{
const
iconColor
=
useColorModeValue
(
'
blue.600
'
,
'
blue.300
'
);
const
dataTo
=
tx
.
to
?
tx
.
to
:
tx
.
created_contract
;
const
dataTo
=
tx
.
to
?
tx
.
to
:
tx
.
created_contract
;
const
timeAgo
=
useTimeAgoIncrement
(
tx
.
timestamp
||
'
0
'
,
true
);
const
timeAgo
=
useTimeAgoIncrement
(
tx
.
timestamp
||
'
0
'
,
true
);
...
@@ -91,7 +88,7 @@ const LatestBlocksItem = ({ tx }: Props) => {
...
@@ -91,7 +88,7 @@ const LatestBlocksItem = ({ tx }: Props) => {
as=
{
transactionIcon
}
as=
{
transactionIcon
}
boxSize=
"30px"
boxSize=
"30px"
mr=
{
2
}
mr=
{
2
}
color=
{
iconColor
}
color=
"link"
/>
/>
<
Address
width=
"100%"
>
<
Address
width=
"100%"
>
<
AddressLink
<
AddressLink
...
...
ui/shared/AdditionalInfoButton.tsx
View file @
e5cad5ba
...
@@ -17,7 +17,6 @@ interface Props {
...
@@ -17,7 +17,6 @@ interface Props {
const
AdditionalInfoButton
=
({
isOpen
,
onClick
,
className
}:
Props
,
ref
:
React
.
ForwardedRef
<
HTMLButtonElement
>
)
=>
{
const
AdditionalInfoButton
=
({
isOpen
,
onClick
,
className
}:
Props
,
ref
:
React
.
ForwardedRef
<
HTMLButtonElement
>
)
=>
{
const
infoBgColor
=
useColorModeValue
(
'
blue.50
'
,
'
gray.600
'
);
const
infoBgColor
=
useColorModeValue
(
'
blue.50
'
,
'
gray.600
'
);
const
infoColor
=
useColorModeValue
(
'
blue.600
'
,
'
blue.300
'
);
return
(
return
(
<
Button
<
Button
...
@@ -36,8 +35,8 @@ const AdditionalInfoButton = ({ isOpen, onClick, className }: Props, ref: React.
...
@@ -36,8 +35,8 @@ const AdditionalInfoButton = ({ isOpen, onClick, className }: Props, ref: React.
<
Icon
<
Icon
as=
{
infoIcon
}
as=
{
infoIcon
}
boxSize=
{
5
}
boxSize=
{
5
}
color=
{
infoColor
}
color=
"link"
_hover=
{
{
color
:
'
blue.400
'
}
}
_hover=
{
{
color
:
'
link_hovered
'
}
}
/>
/>
</
Button
>
</
Button
>
);
);
...
...
ui/shared/TokenTransfer/TokenTransferListItem.tsx
View file @
e5cad5ba
import
{
Text
,
Flex
,
Tag
,
Icon
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
{
Text
,
Flex
,
Tag
,
Icon
}
from
'
@chakra-ui/react
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
BigNumber
from
'
bignumber.js
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
...
@@ -43,8 +43,6 @@ const TokenTransferListItem = ({
...
@@ -43,8 +43,6 @@ const TokenTransferListItem = ({
return
BigNumber
(
total
.
value
).
div
(
BigNumber
(
10
**
Number
(
total
.
decimals
))).
dp
(
8
).
toFormat
();
return
BigNumber
(
total
.
value
).
div
(
BigNumber
(
10
**
Number
(
total
.
decimals
))).
dp
(
8
).
toFormat
();
})();
})();
const
iconColor
=
useColorModeValue
(
'
blue.600
'
,
'
blue.300
'
);
const
timeAgo
=
useTimeAgoIncrement
(
timestamp
,
enableTimeIncrement
);
const
timeAgo
=
useTimeAgoIncrement
(
timestamp
,
enableTimeIncrement
);
const
addressWidth
=
`calc((100% -
${
baseAddress
?
'
50px
'
:
'
0px
'
}
) / 2)`
;
const
addressWidth
=
`calc((100% -
${
baseAddress
?
'
50px
'
:
'
0px
'
}
) / 2)`
;
...
@@ -64,7 +62,7 @@ const TokenTransferListItem = ({
...
@@ -64,7 +62,7 @@ const TokenTransferListItem = ({
as=
{
transactionIcon
}
as=
{
transactionIcon
}
boxSize=
"30px"
boxSize=
"30px"
mr=
{
2
}
mr=
{
2
}
color=
{
iconColor
}
color=
"link"
/>
/>
<
Address
width=
"100%"
>
<
Address
width=
"100%"
>
<
AddressLink
<
AddressLink
...
...
ui/snippets/navigation/NavigationDesktop.tsx
View file @
e5cad5ba
...
@@ -93,7 +93,7 @@ const NavigationDesktop = () => {
...
@@ -93,7 +93,7 @@ const NavigationDesktop = () => {
width=
{
6
}
width=
{
6
}
height=
{
6
}
height=
{
6
}
border=
"1px"
border=
"1px"
_hover=
{
{
color
:
'
blue.400
'
}
}
_hover=
{
{
color
:
'
link_hovered
'
}
}
borderRadius=
"base"
borderRadius=
"base"
{
...
chevronIconStyles
}
{
...
chevronIconStyles
}
transform=
{
{
lg
:
isExpanded
?
'
rotate(0)
'
:
'
rotate(180deg)
'
,
xl
:
isCollapsed
?
'
rotate(180deg)
'
:
'
rotate(0)
'
}
}
transform=
{
{
lg
:
isExpanded
?
'
rotate(0)
'
:
'
rotate(180deg)
'
,
xl
:
isCollapsed
?
'
rotate(180deg)
'
:
'
rotate(0)
'
}
}
...
...
ui/snippets/navigation/useColors.ts
View file @
e5cad5ba
...
@@ -5,7 +5,7 @@ export default function useColors() {
...
@@ -5,7 +5,7 @@ export default function useColors() {
text
:
{
text
:
{
'
default
'
:
useColorModeValue
(
'
gray.600
'
,
'
gray.400
'
),
'
default
'
:
useColorModeValue
(
'
gray.600
'
,
'
gray.400
'
),
active
:
useColorModeValue
(
'
blue.700
'
,
'
gray.50
'
),
active
:
useColorModeValue
(
'
blue.700
'
,
'
gray.50
'
),
hover
:
'
blue.400
'
,
hover
:
'
link_hovered
'
,
},
},
bg
:
{
bg
:
{
'
default
'
:
'
transparent
'
,
'
default
'
:
'
transparent
'
,
...
...
ui/snippets/networkMenu/NetworkMenuButton.tsx
View file @
e5cad5ba
...
@@ -37,7 +37,7 @@ const NetworkMenuButton = ({ isMobile, isActive, onClick, className }: Props, re
...
@@ -37,7 +37,7 @@ const NetworkMenuButton = ({ isMobile, isActive, onClick, className }: Props, re
height=
"36px"
height=
"36px"
padding=
"10px"
padding=
"10px"
color=
{
isActive
?
iconColorMobile
:
defaultIconColor
}
color=
{
isActive
?
iconColorMobile
:
defaultIconColor
}
_hover=
{
{
color
:
isMobile
?
undefined
:
'
blue.400
'
}
}
_hover=
{
{
color
:
isMobile
?
undefined
:
'
link_hovered
'
}
}
cursor=
"pointer"
cursor=
"pointer"
{
...
getDefaultTransitionProps
({
transitionProperty
:
'
margin
'
})
}
{
...
getDefaultTransitionProps
({
transitionProperty
:
'
margin
'
})
}
/>
/>
...
...
ui/snippets/networkMenu/useColors.ts
View file @
e5cad5ba
...
@@ -8,7 +8,7 @@ export default function useColors({ hasIcon }: {hasIcon: boolean}) {
...
@@ -8,7 +8,7 @@ export default function useColors({ hasIcon }: {hasIcon: boolean}) {
text
:
{
text
:
{
'
default
'
:
useColorModeValue
(
'
gray.600
'
,
'
gray.400
'
),
'
default
'
:
useColorModeValue
(
'
gray.600
'
,
'
gray.400
'
),
active
:
useColorModeValue
(
'
blackAlpha.900
'
,
'
whiteAlpha.900
'
),
active
:
useColorModeValue
(
'
blackAlpha.900
'
,
'
whiteAlpha.900
'
),
hover
:
useColorModeValue
(
'
blue.600
'
,
'
blue.400
'
),
hover
:
useColorModeValue
(
'
blue.600
'
,
'
link_hovered
'
),
},
},
icon
:
{
icon
:
{
'
default
'
:
hasIcon
?
iconDefaultColor
:
iconPlaceholderDefaultColor
,
'
default
'
:
hasIcon
?
iconDefaultColor
:
iconPlaceholderDefaultColor
,
...
...
ui/txs/TxsListItem.tsx
View file @
e5cad5ba
...
@@ -8,7 +8,6 @@ import {
...
@@ -8,7 +8,6 @@ import {
ModalContent
,
ModalContent
,
ModalCloseButton
,
ModalCloseButton
,
Text
,
Text
,
useColorModeValue
,
useDisclosure
}
from
'
@chakra-ui/react
'
;
useDisclosure
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
...
@@ -43,7 +42,6 @@ const ARROW_WIDTH = 24;
...
@@ -43,7 +42,6 @@ const ARROW_WIDTH = 24;
const
TxsListItem
=
({
tx
,
showBlockInfo
,
currentAddress
,
enableTimeIncrement
}:
Props
)
=>
{
const
TxsListItem
=
({
tx
,
showBlockInfo
,
currentAddress
,
enableTimeIncrement
}:
Props
)
=>
{
const
{
isOpen
,
onOpen
,
onClose
}
=
useDisclosure
();
const
{
isOpen
,
onOpen
,
onClose
}
=
useDisclosure
();
const
iconColor
=
useColorModeValue
(
'
blue.600
'
,
'
blue.300
'
);
const
dataTo
=
tx
.
to
?
tx
.
to
:
tx
.
created_contract
;
const
dataTo
=
tx
.
to
?
tx
.
to
:
tx
.
created_contract
;
const
isOut
=
Boolean
(
currentAddress
&&
currentAddress
===
tx
.
from
.
hash
);
const
isOut
=
Boolean
(
currentAddress
&&
currentAddress
===
tx
.
from
.
hash
);
...
@@ -67,7 +65,7 @@ const TxsListItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement }:
...
@@ -67,7 +65,7 @@ const TxsListItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement }:
as=
{
transactionIcon
}
as=
{
transactionIcon
}
boxSize=
"30px"
boxSize=
"30px"
mr=
{
2
}
mr=
{
2
}
color=
{
iconColor
}
color=
"link"
/>
/>
<
Address
width=
"100%"
>
<
Address
width=
"100%"
>
<
AddressLink
<
AddressLink
...
...
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