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
74e2720b
Commit
74e2720b
authored
Nov 08, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
placeholder for NFT and token logo
parent
2790cac8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
17 deletions
+30
-17
nft_placeholder.svg
icons/nft_placeholder.svg
+0
-9
TokenLogo.tsx
ui/shared/TokenLogo.tsx
+25
-3
TokenSnippet.tsx
ui/shared/TokenSnippet.tsx
+1
-1
TokenTransferListItem.tsx
ui/shared/TokenTransfer/TokenTransferListItem.tsx
+2
-2
TokenTransferTableItem.tsx
ui/shared/TokenTransfer/TokenTransferTableItem.tsx
+2
-2
No files found.
icons/nft_placeholder.svg
deleted
100644 → 0
View file @
2790cac8
This source diff could not be displayed because it is too large. You can
view the blob
instead.
ui/shared/TokenLogo.tsx
View file @
74e2720b
import
{
Image
,
chakra
}
from
'
@chakra-ui/react
'
;
import
{
Image
,
Center
,
chakra
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
appConfig
from
'
configs/app/config
'
;
import
appConfig
from
'
configs/app/config
'
;
const
EmptyElement
=
()
=>
null
;
const
EmptyElement
=
({
className
,
letter
}:
{
className
?:
string
;
letter
:
string
})
=>
{
const
bgColor
=
useColorModeValue
(
'
gray.200
'
,
'
gray.600
'
);
const
color
=
useColorModeValue
(
'
gray.400
'
,
'
gray.200
'
);
return
(
<
Center
className=
{
className
}
fontWeight=
{
600
}
bgColor=
{
bgColor
}
color=
{
color
}
borderRadius=
"base"
>
{
letter
.
toUpperCase
()
}
</
Center
>
);
};
interface
Props
{
interface
Props
{
hash
:
string
;
hash
:
string
;
...
@@ -20,7 +35,14 @@ const TokenLogo = ({ hash, name, className }: Props) => {
...
@@ -20,7 +35,14 @@ const TokenLogo = ({ hash, name, className }: Props) => {
'
/logo.png
'
,
'
/logo.png
'
,
].
join
(
''
)
:
undefined
;
].
join
(
''
)
:
undefined
;
return
<
Image
className=
{
className
}
src=
{
logoSrc
}
alt=
{
`${ name || 'token' } logo`
}
fallback=
{
<
EmptyElement
/>
}
/>;
return
(
<
Image
className=
{
className
}
src=
{
logoSrc
}
alt=
{
`${ name || 'token' } logo`
}
fallback=
{
<
EmptyElement
className=
{
className
}
letter=
{
name
?.
slice
(
0
,
1
)
||
'
U
'
}
/>
}
/>
);
};
};
export
default
React
.
memo
(
chakra
(
TokenLogo
));
export
default
React
.
memo
(
chakra
(
TokenLogo
));
ui/shared/TokenSnippet.tsx
View file @
74e2720b
...
@@ -14,7 +14,7 @@ interface Props {
...
@@ -14,7 +14,7 @@ interface Props {
const
TokenSnippet
=
({
symbol
,
hash
,
name
,
className
}:
Props
)
=>
{
const
TokenSnippet
=
({
symbol
,
hash
,
name
,
className
}:
Props
)
=>
{
return
(
return
(
<
Flex
className=
{
className
}
alignItems=
"center"
columnGap=
{
1
}
w=
"100%"
>
<
Flex
className=
{
className
}
alignItems=
"center"
columnGap=
{
1
}
w=
"100%"
>
<
TokenLogo
boxSize=
{
5
}
borderRadius=
{
2
}
hash=
{
hash
}
name=
{
name
}
/>
<
TokenLogo
boxSize=
{
5
}
hash=
{
hash
}
name=
{
name
}
/>
<
AddressLink
hash=
{
hash
}
alias=
{
name
}
type=
"token"
/>
<
AddressLink
hash=
{
hash
}
alias=
{
name
}
type=
"token"
/>
{
symbol
&&
<
Text
variant=
"secondary"
>
(
{
symbol
}
)
</
Text
>
}
{
symbol
&&
<
Text
variant=
"secondary"
>
(
{
symbol
}
)
</
Text
>
}
</
Flex
>
</
Flex
>
...
...
ui/shared/TokenTransfer/TokenTransferListItem.tsx
View file @
74e2720b
...
@@ -5,7 +5,7 @@ import React from 'react';
...
@@ -5,7 +5,7 @@ import React from 'react';
import
type
{
TokenTransfer
}
from
'
types/api/tokenTransfer
'
;
import
type
{
TokenTransfer
}
from
'
types/api/tokenTransfer
'
;
import
eastArrowIcon
from
'
icons/arrows/east.svg
'
;
import
eastArrowIcon
from
'
icons/arrows/east.svg
'
;
import
nftPlaceholder
from
'
icons/nft_
placeholder
.svg
'
;
import
nftPlaceholder
from
'
icons/nft_
shield
.svg
'
;
import
AccountListItemMobile
from
'
ui/shared/AccountListItemMobile
'
;
import
AccountListItemMobile
from
'
ui/shared/AccountListItemMobile
'
;
import
AdditionalInfoButton
from
'
ui/shared/AdditionalInfoButton
'
;
import
AdditionalInfoButton
from
'
ui/shared/AdditionalInfoButton
'
;
import
Address
from
'
ui/shared/address/Address
'
;
import
Address
from
'
ui/shared/address/Address
'
;
...
@@ -39,7 +39,7 @@ const TokenTransferListItem = ({ token, total, tx_hash: txHash, from, to, baseAd
...
@@ -39,7 +39,7 @@ const TokenTransferListItem = ({ token, total, tx_hash: txHash, from, to, baseAd
{
'
token_id
'
in
total
&&
(
{
'
token_id
'
in
total
&&
(
<
Flex
alignItems=
"center"
>
<
Flex
alignItems=
"center"
>
<
Text
fontWeight=
{
500
}
>
Token ID
</
Text
>
<
Text
fontWeight=
{
500
}
>
Token ID
</
Text
>
<
Icon
mx=
{
2
}
as=
{
nftPlaceholder
}
boxSize=
"30px"
/>
<
Icon
mx=
{
1
}
as=
{
nftPlaceholder
}
boxSize=
"30px"
/>
<
AddressLink
hash=
{
token
.
address
}
id=
{
total
.
token_id
}
type=
"token_instance_item"
/>
<
AddressLink
hash=
{
token
.
address
}
id=
{
total
.
token_id
}
type=
"token_instance_item"
/>
</
Flex
>
</
Flex
>
)
}
)
}
...
...
ui/shared/TokenTransfer/TokenTransferTableItem.tsx
View file @
74e2720b
...
@@ -4,7 +4,7 @@ import React from 'react';
...
@@ -4,7 +4,7 @@ import React from 'react';
import
type
{
TokenTransfer
}
from
'
types/api/tokenTransfer
'
;
import
type
{
TokenTransfer
}
from
'
types/api/tokenTransfer
'
;
import
nftPlaceholder
from
'
icons/nft_
placeholder
.svg
'
;
import
nftPlaceholder
from
'
icons/nft_
shield
.svg
'
;
import
AdditionalInfoButton
from
'
ui/shared/AdditionalInfoButton
'
;
import
AdditionalInfoButton
from
'
ui/shared/AdditionalInfoButton
'
;
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
'
;
...
@@ -42,7 +42,7 @@ const TxInternalTableItem = ({ token, total, tx_hash: txHash, from, to, baseAddr
...
@@ -42,7 +42,7 @@ const TxInternalTableItem = ({ token, total, tx_hash: txHash, from, to, baseAddr
<
Td
lineHeight=
"30px"
>
<
Td
lineHeight=
"30px"
>
{
'
token_id
'
in
total
?
(
{
'
token_id
'
in
total
?
(
<
Flex
align=
"center"
>
<
Flex
align=
"center"
>
<
Icon
as=
{
nftPlaceholder
}
boxSize=
"30px"
mr=
{
2
}
/>
<
Icon
as=
{
nftPlaceholder
}
boxSize=
"30px"
mr=
{
1
}
/>
<
AddressLink
hash=
{
token
.
address
}
id=
{
total
.
token_id
}
type=
"token_instance_item"
/>
<
AddressLink
hash=
{
token
.
address
}
id=
{
total
.
token_id
}
type=
"token_instance_item"
/>
</
Flex
>
</
Flex
>
)
:
'
-
'
}
)
:
'
-
'
}
...
...
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