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
663b9aae
Commit
663b9aae
authored
Apr 13, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tags on token page and action menu on address page
parent
ec4fe4e0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
8 deletions
+16
-8
Token.tsx
ui/pages/Token.tsx
+11
-1
Menu.tsx
ui/shared/AddressActions/Menu.tsx
+2
-1
AddressHeadingInfo.tsx
ui/shared/AddressHeadingInfo.tsx
+3
-3
TokenContractInfo.tsx
ui/token/TokenContractInfo.tsx
+0
-3
No files found.
ui/pages/Token.tsx
View file @
663b9aae
...
@@ -170,6 +170,16 @@ const TokenPageContent = () => {
...
@@ -170,6 +170,16 @@ const TokenPageContent = () => {
};
};
},
[
appProps
.
referrer
]);
},
[
appProps
.
referrer
]);
const
tags
=
[
{
label
:
tokenQuery
.
data
?.
type
,
display_name
:
tokenQuery
.
data
?.
type
},
...(
contractQuery
.
data
?.
private_tags
||
[]),
...(
contractQuery
.
data
?.
public_tags
||
[]),
...(
contractQuery
.
data
?.
watchlist_names
||
[]),
]
.
filter
(
Boolean
)
.
map
((
tag
)
=>
<
Tag
key=
{
tag
.
label
}
>
{
tag
.
display_name
}
</
Tag
>);
const
tagsNode
=
tags
.
length
>
0
?
<
Flex
columnGap=
{
2
}
>
{
tags
}
</
Flex
>
:
null
;
return
(
return
(
<
Page
>
<
Page
>
{
tokenQuery
.
isLoading
?
(
{
tokenQuery
.
isLoading
?
(
...
@@ -189,7 +199,7 @@ const TokenPageContent = () => {
...
@@ -189,7 +199,7 @@ const TokenPageContent = () => {
additionalsLeft=
{
(
additionalsLeft=
{
(
<
TokenLogo
hash=
{
tokenQuery
.
data
?.
address
}
name=
{
tokenQuery
.
data
?.
name
}
boxSize=
{
6
}
/>
<
TokenLogo
hash=
{
tokenQuery
.
data
?.
address
}
name=
{
tokenQuery
.
data
?.
name
}
boxSize=
{
6
}
/>
)
}
)
}
additionalsRight=
{
<
Tag
>
{
tokenQuery
.
data
?.
type
}
</
Tag
>
}
additionalsRight=
{
tagsNode
}
/>
/>
</>
</>
)
}
)
}
...
...
ui/shared/AddressActions/Menu.tsx
View file @
663b9aae
...
@@ -14,6 +14,7 @@ const AddressActions = () => {
...
@@ -14,6 +14,7 @@ const AddressActions = () => {
const
router
=
useRouter
();
const
router
=
useRouter
();
const
hash
=
getQueryParamString
(
router
.
query
.
hash
);
const
hash
=
getQueryParamString
(
router
.
query
.
hash
);
const
isTokenPage
=
router
.
pathname
===
'
/token/[hash]
'
;
return
(
return
(
<
Menu
>
<
Menu
>
...
@@ -29,7 +30,7 @@ const AddressActions = () => {
...
@@ -29,7 +30,7 @@ const AddressActions = () => {
</
Flex
>
</
Flex
>
</
MenuButton
>
</
MenuButton
>
<
MenuList
minWidth=
"180px"
zIndex=
"popover"
>
<
MenuList
minWidth=
"180px"
zIndex=
"popover"
>
{
appConfig
.
contractInfoApi
.
endpoint
&&
appConfig
.
adminServiceApi
.
endpoint
&&
<
TokenInfoMenuItem
py=
{
2
}
px=
{
4
}
hash=
{
hash
}
/>
}
{
isTokenPage
&&
appConfig
.
contractInfoApi
.
endpoint
&&
appConfig
.
adminServiceApi
.
endpoint
&&
<
TokenInfoMenuItem
py=
{
2
}
px=
{
4
}
hash=
{
hash
}
/>
}
<
PublicTagMenuItem
py=
{
2
}
px=
{
4
}
hash=
{
hash
}
/>
<
PublicTagMenuItem
py=
{
2
}
px=
{
4
}
hash=
{
hash
}
/>
<
PrivateTagMenuItem
py=
{
2
}
px=
{
4
}
hash=
{
hash
}
/>
<
PrivateTagMenuItem
py=
{
2
}
px=
{
4
}
hash=
{
hash
}
/>
</
MenuList
>
</
MenuList
>
...
...
ui/shared/AddressHeadingInfo.tsx
View file @
663b9aae
...
@@ -11,16 +11,16 @@ import AddressFavoriteButton from 'ui/address/details/AddressFavoriteButton';
...
@@ -11,16 +11,16 @@ import AddressFavoriteButton from 'ui/address/details/AddressFavoriteButton';
import
AddressQrCode
from
'
ui/address/details/AddressQrCode
'
;
import
AddressQrCode
from
'
ui/address/details/AddressQrCode
'
;
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
'
;
import
AddressActionsMenu
from
'
ui/shared/AddressActions/Menu
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
interface
Props
{
interface
Props
{
address
:
Pick
<
AddressParam
,
'
hash
'
|
'
is_contract
'
|
'
implementation_name
'
|
'
watchlist_names
'
>
;
address
:
Pick
<
AddressParam
,
'
hash
'
|
'
is_contract
'
|
'
implementation_name
'
|
'
watchlist_names
'
>
;
token
?:
TokenInfo
|
null
;
token
?:
TokenInfo
|
null
;
isLinkDisabled
?:
boolean
;
isLinkDisabled
?:
boolean
;
after
?:
React
.
ReactNode
;
}
}
const
AddressHeadingInfo
=
({
address
,
token
,
isLinkDisabled
,
after
}:
Props
)
=>
{
const
AddressHeadingInfo
=
({
address
,
token
,
isLinkDisabled
}:
Props
)
=>
{
const
isMobile
=
useIsMobile
();
const
isMobile
=
useIsMobile
();
return
(
return
(
...
@@ -41,7 +41,7 @@ const AddressHeadingInfo = ({ address, token, isLinkDisabled, after }: Props) =>
...
@@ -41,7 +41,7 @@ const AddressHeadingInfo = ({ address, token, isLinkDisabled, after }: Props) =>
<
AddressFavoriteButton
hash=
{
address
.
hash
}
isAdded=
{
Boolean
(
address
.
watchlist_names
?.
length
)
}
ml=
{
3
}
/>
<
AddressFavoriteButton
hash=
{
address
.
hash
}
isAdded=
{
Boolean
(
address
.
watchlist_names
?.
length
)
}
ml=
{
3
}
/>
)
}
)
}
<
AddressQrCode
hash=
{
address
.
hash
}
ml=
{
2
}
/>
<
AddressQrCode
hash=
{
address
.
hash
}
ml=
{
2
}
/>
{
a
fter
}
{
a
ppConfig
.
isAccountSupported
&&
<
AddressActionsMenu
/>
}
</
Flex
>
</
Flex
>
);
);
};
};
...
...
ui/token/TokenContractInfo.tsx
View file @
663b9aae
...
@@ -5,9 +5,7 @@ import React from 'react';
...
@@ -5,9 +5,7 @@ import React from 'react';
import
type
{
TokenInfo
}
from
'
types/api/token
'
;
import
type
{
TokenInfo
}
from
'
types/api/token
'
;
import
appConfig
from
'
configs/app/config
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
AddressActionsMenu
from
'
ui/shared/AddressActions/Menu
'
;
import
AddressHeadingInfo
from
'
ui/shared/AddressHeadingInfo
'
;
import
AddressHeadingInfo
from
'
ui/shared/AddressHeadingInfo
'
;
interface
Props
{
interface
Props
{
...
@@ -50,7 +48,6 @@ const TokenContractInfo = ({ tokenQuery }: Props) => {
...
@@ -50,7 +48,6 @@ const TokenContractInfo = ({ tokenQuery }: Props) => {
<
AddressHeadingInfo
<
AddressHeadingInfo
address=
{
address
}
address=
{
address
}
token=
{
contractQuery
.
data
?.
token
}
token=
{
contractQuery
.
data
?.
token
}
after=
{
appConfig
.
isAccountSupported
?
<
AddressActionsMenu
/>
:
null
}
/>
/>
);
);
};
};
...
...
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