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
a90b72a9
Commit
a90b72a9
authored
Jan 04, 2024
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small fixes
parent
c2bc780d
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
14 deletions
+27
-14
AddressEnsDomains.tsx
ui/address/ensDomains/AddressEnsDomains.tsx
+19
-7
NameDomainDetails.tsx
ui/nameDomain/NameDomainDetails.tsx
+2
-2
NameDomainHistoryTableItem.tsx
ui/nameDomain/history/NameDomainHistoryTableItem.tsx
+4
-4
NameDomainsActionBar.tsx
ui/nameDomains/NameDomainsActionBar.tsx
+1
-0
Address.tsx
ui/pages/Address.tsx
+1
-1
No files found.
ui/address/ensDomains/AddressEnsDomains.tsx
View file @
a90b72a9
import
{
Button
,
chakra
,
Flex
,
Grid
,
Popover
,
PopoverBody
,
PopoverContent
,
PopoverTrigger
,
Skeleton
,
useDisclosure
}
from
'
@chakra-ui/react
'
;
import
{
Button
,
chakra
,
Flex
,
Grid
,
Popover
,
PopoverBody
,
PopoverContent
,
PopoverTrigger
,
Skeleton
,
useDisclosure
}
from
'
@chakra-ui/react
'
;
import
_clamp
from
'
lodash/clamp
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
EnsDomain
}
from
'
types/api/ens
'
;
import
{
route
}
from
'
nextjs-routes
'
;
import
{
route
}
from
'
nextjs-routes
'
;
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
...
@@ -15,6 +18,19 @@ interface Props {
...
@@ -15,6 +18,19 @@ interface Props {
mainDomainName
:
string
|
null
;
mainDomainName
:
string
|
null
;
}
}
const
DomainsGrid
=
({
data
}:
{
data
:
Array
<
EnsDomain
>
})
=>
{
return
(
<
Grid
templateColumns=
{
{
base
:
`repeat(${ _clamp(data.length, 1, 2) }, 1fr)`
,
lg
:
`repeat(${ _clamp(data.length, 1, 3) }, 1fr)`
}
}
columnGap=
{
8
}
rowGap=
{
4
}
mt=
{
2
}
>
{
data
.
slice
(
0
,
9
).
map
((
domain
)
=>
<
EnsEntity
key=
{
domain
.
id
}
name=
{
domain
.
name
}
noCopy
/>)
}
</
Grid
>
);
};
const
AddressEnsDomains
=
({
addressHash
,
mainDomainName
}:
Props
)
=>
{
const
AddressEnsDomains
=
({
addressHash
,
mainDomainName
}:
Props
)
=>
{
const
{
isOpen
,
onToggle
,
onClose
}
=
useDisclosure
();
const
{
isOpen
,
onToggle
,
onClose
}
=
useDisclosure
();
...
@@ -86,7 +102,7 @@ const AddressEnsDomains = ({ addressHash, mainDomainName }: Props) => {
...
@@ -86,7 +102,7 @@ const AddressEnsDomains = ({ addressHash, mainDomainName }: Props) => {
flexShrink=
{
0
}
flexShrink=
{
0
}
>
>
<
IconSvg
name=
"ENS_slim"
boxSize=
{
5
}
/>
<
IconSvg
name=
"ENS_slim"
boxSize=
{
5
}
/>
<
chakra
.
span
ml=
{
1
}
display=
{
{
base
:
'
none
'
,
lg
:
'
block
'
}
}
>
{
totalRecords
}
Domain
s
</
chakra
.
span
>
<
chakra
.
span
ml=
{
1
}
display=
{
{
base
:
'
none
'
,
lg
:
'
block
'
}
}
>
{
totalRecords
}
Domain
{
data
.
items
.
length
>
1
?
'
s
'
:
''
}
</
chakra
.
span
>
<
IconSvg
name=
"arrows/east-mini"
transform=
{
isOpen
?
'
rotate(90deg)
'
:
'
rotate(-90deg)
'
}
transitionDuration=
"faster"
boxSize=
{
5
}
/>
<
IconSvg
name=
"arrows/east-mini"
transform=
{
isOpen
?
'
rotate(90deg)
'
:
'
rotate(-90deg)
'
}
transitionDuration=
"faster"
boxSize=
{
5
}
/>
</
Button
>
</
Button
>
</
PopoverTrigger
>
</
PopoverTrigger
>
...
@@ -105,17 +121,13 @@ const AddressEnsDomains = ({ addressHash, mainDomainName }: Props) => {
...
@@ -105,17 +121,13 @@ const AddressEnsDomains = ({ addressHash, mainDomainName }: Props) => {
{
ownedDomains
.
length
>
0
&&
(
{
ownedDomains
.
length
>
0
&&
(
<
div
>
<
div
>
<
chakra
.
span
color=
"text_secondary"
fontSize=
"xs"
>
Other domain names owned by this address
</
chakra
.
span
>
<
chakra
.
span
color=
"text_secondary"
fontSize=
"xs"
>
Other domain names owned by this address
</
chakra
.
span
>
<
Grid
templateColumns=
{
{
base
:
'
repeat(2, 1fr)
'
,
lg
:
'
repeat(3, 1fr)
'
}
}
columnGap=
{
8
}
rowGap=
{
4
}
mt=
{
2
}
>
<
DomainsGrid
data=
{
ownedDomains
}
/>
{
ownedDomains
.
slice
(
0
,
9
).
map
((
domain
)
=>
<
EnsEntity
key=
{
domain
.
id
}
name=
{
domain
.
name
}
noCopy
/>)
}
</
Grid
>
</
div
>
</
div
>
)
}
)
}
{
resolvedDomains
.
length
>
0
&&
(
{
resolvedDomains
.
length
>
0
&&
(
<
div
>
<
div
>
<
chakra
.
span
color=
"text_secondary"
fontSize=
"xs"
>
Other domain names resolved to this address
</
chakra
.
span
>
<
chakra
.
span
color=
"text_secondary"
fontSize=
"xs"
>
Other domain names resolved to this address
</
chakra
.
span
>
<
Grid
templateColumns=
{
{
base
:
'
repeat(2, 1fr)
'
,
lg
:
'
repeat(3, 1fr)
'
}
}
columnGap=
{
8
}
rowGap=
{
4
}
mt=
{
2
}
>
<
DomainsGrid
data=
{
resolvedDomains
}
/>
{
resolvedDomains
.
slice
(
0
,
9
).
map
((
domain
)
=>
<
EnsEntity
key=
{
domain
.
id
}
name=
{
domain
.
name
}
noCopy
/>)
}
</
Grid
>
</
div
>
</
div
>
)
}
)
}
{
(
ownedDomains
.
length
>
9
||
resolvedDomains
.
length
>
9
)
&&
(
{
(
ownedDomains
.
length
>
9
||
resolvedDomains
.
length
>
9
)
&&
(
...
...
ui/nameDomain/NameDomainDetails.tsx
View file @
a90b72a9
...
@@ -91,7 +91,7 @@ const NameDomainDetails = ({ query }: Props) => {
...
@@ -91,7 +91,7 @@ const NameDomainDetails = ({ query }: Props) => {
)
}
)
}
{
query
.
data
?.
owner
&&
(
{
query
.
data
?.
owner
&&
(
<
DetailsInfoItem
<
DetailsInfoItem
title=
"
Controll
er"
title=
"
Own
er"
hint=
"The account that owns the rights to edit the records of this domain name"
hint=
"The account that owns the rights to edit the records of this domain name"
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
columnGap=
{
2
}
columnGap=
{
2
}
...
@@ -114,7 +114,7 @@ const NameDomainDetails = ({ query }: Props) => {
...
@@ -114,7 +114,7 @@ const NameDomainDetails = ({ query }: Props) => {
)
}
)
}
{
query
.
data
?.
wrapped_owner
&&
(
{
query
.
data
?.
wrapped_owner
&&
(
<
DetailsInfoItem
<
DetailsInfoItem
title=
"
Wrapped controll
er"
title=
"
Manag
er"
hint=
"Owner of this NFT domain in NameWrapper contract"
hint=
"Owner of this NFT domain in NameWrapper contract"
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
columnGap=
{
2
}
columnGap=
{
2
}
...
...
ui/nameDomain/history/NameDomainHistoryTableItem.tsx
View file @
a90b72a9
...
@@ -16,18 +16,18 @@ const NameDomainHistoryTableItem = ({ isLoading, transaction_hash: transactionHa
...
@@ -16,18 +16,18 @@ const NameDomainHistoryTableItem = ({ isLoading, transaction_hash: transactionHa
return
(
return
(
<
Tr
>
<
Tr
>
<
Td
>
<
Td
verticalAlign=
"middle"
>
<
TxEntity
hash=
{
transactionHash
}
isLoading=
{
isLoading
}
fontWeight=
{
700
}
/>
<
TxEntity
hash=
{
transactionHash
}
isLoading=
{
isLoading
}
fontWeight=
{
700
}
/>
</
Td
>
</
Td
>
<
Td
pl=
{
9
}
>
<
Td
pl=
{
9
}
verticalAlign=
"middle"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
color=
"text_secondary"
display=
"inline-block"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
color=
"text_secondary"
display=
"inline-block"
>
<
span
>
{
dayjs
(
timestamp
).
fromNow
()
}
</
span
>
<
span
>
{
dayjs
(
timestamp
).
fromNow
()
}
</
span
>
</
Skeleton
>
</
Skeleton
>
</
Td
>
</
Td
>
<
Td
>
<
Td
verticalAlign=
"middle"
>
{
fromAddress
&&
<
AddressEntity
address=
{
fromAddress
}
isLoading=
{
isLoading
}
/>
}
{
fromAddress
&&
<
AddressEntity
address=
{
fromAddress
}
isLoading=
{
isLoading
}
/>
}
</
Td
>
</
Td
>
<
Td
>
<
Td
verticalAlign=
"middle"
>
{
action
&&
<
Tag
colorScheme=
"gray"
isLoading=
{
isLoading
}
>
{
action
}
</
Tag
>
}
{
action
&&
<
Tag
colorScheme=
"gray"
isLoading=
{
isLoading
}
>
{
action
}
</
Tag
>
}
</
Td
>
</
Td
>
</
Tr
>
</
Tr
>
...
...
ui/nameDomains/NameDomainsActionBar.tsx
View file @
a90b72a9
...
@@ -42,6 +42,7 @@ const NameDomainsActionBar = ({
...
@@ -42,6 +42,7 @@ const NameDomainsActionBar = ({
const
searchInput
=
(
const
searchInput
=
(
<
FilterInput
<
FilterInput
w=
{
{
base
:
'
100%
'
,
lg
:
'
360px
'
}
}
w=
{
{
base
:
'
100%
'
,
lg
:
'
360px
'
}
}
minW=
{
{
base
:
'
auto
'
,
lg
:
'
250px
'
}
}
size=
"xs"
size=
"xs"
onChange=
{
onSearchChange
}
onChange=
{
onSearchChange
}
placeholder=
"Search by name"
placeholder=
"Search by name"
...
...
ui/pages/Address.tsx
View file @
a90b72a9
...
@@ -204,7 +204,7 @@ const AddressPageContent = () => {
...
@@ -204,7 +204,7 @@ const AddressPageContent = () => {
<
AccountActionsMenu
isLoading=
{
isLoading
}
/>
<
AccountActionsMenu
isLoading=
{
isLoading
}
/>
<
HStack
ml=
"auto"
gap=
{
2
}
/>
<
HStack
ml=
"auto"
gap=
{
2
}
/>
{
addressQuery
.
data
?.
is_contract
&&
addressQuery
.
data
?.
is_verified
&&
config
.
UI
.
views
.
address
.
solidityscanEnabled
&&
<
SolidityscanReport
hash=
{
hash
}
/>
}
{
addressQuery
.
data
?.
is_contract
&&
addressQuery
.
data
?.
is_verified
&&
config
.
UI
.
views
.
address
.
solidityscanEnabled
&&
<
SolidityscanReport
hash=
{
hash
}
/>
}
{
addressQuery
.
data
&&
config
.
features
.
nameService
.
isEnabled
&&
{
!
isLoading
&&
addressQuery
.
data
&&
config
.
features
.
nameService
.
isEnabled
&&
<
AddressEnsDomains
addressHash=
{
hash
}
mainDomainName=
{
addressQuery
.
data
.
ens_domain_name
}
/>
}
<
AddressEnsDomains
addressHash=
{
hash
}
mainDomainName=
{
addressQuery
.
data
.
ens_domain_name
}
/>
}
<
NetworkExplorers
type=
"address"
pathParam=
{
hash
}
/>
<
NetworkExplorers
type=
"address"
pathParam=
{
hash
}
/>
</
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