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
3b2d575a
Commit
3b2d575a
authored
Mar 28, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
page layout
parent
2d8cd224
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
72 additions
and
2 deletions
+72
-2
useNavItems.tsx
lib/hooks/useNavItems.tsx
+7
-0
verified_addresses.tsx
pages/account/verified_addresses.tsx
+20
-0
nextjs-routes.d.ts
types/nextjs-routes.d.ts
+1
-0
VerifiedAddresses.tsx
ui/pages/VerifiedAddresses.tsx
+37
-0
AccountPageDescription.tsx
ui/shared/AccountPageDescription.tsx
+5
-2
useNavLinkStyleProps.tsx
ui/snippets/navigation/useNavLinkStyleProps.tsx
+2
-0
No files found.
lib/hooks/useNavItems.tsx
View file @
3b2d575a
...
...
@@ -223,6 +223,13 @@ export default function useNavItems(): ReturnType {
isActive
:
pathname
===
'
/account/custom_abi
'
,
isNewUi
:
true
,
},
{
text
:
'
Verified addresses
'
,
nextRoute
:
{
pathname
:
'
/account/verified_addresses
'
as
const
},
icon
:
verifiedIcon
,
isActive
:
pathname
===
'
/account/verified_addresses
'
,
isNewUi
:
true
,
},
];
const
profileItem
=
{
...
...
pages/account/verified_addresses.tsx
0 → 100644
View file @
3b2d575a
import
type
{
NextPage
}
from
'
next
'
;
import
Head
from
'
next/head
'
;
import
React
from
'
react
'
;
import
getNetworkTitle
from
'
lib/networks/getNetworkTitle
'
;
import
VerifiedAddresses
from
'
ui/pages/VerifiedAddresses
'
;
const
VerifiedAddressesPage
:
NextPage
=
()
=>
{
const
title
=
getNetworkTitle
();
return
(
<>
<
Head
><
title
>
{
title
}
</
title
></
Head
>
<
VerifiedAddresses
/>
</>
);
};
export
default
VerifiedAddressesPage
;
export
{
getServerSideProps
}
from
'
lib/next/getServerSideProps
'
;
types/nextjs-routes.d.ts
View file @
3b2d575a
...
...
@@ -10,6 +10,7 @@ declare module "nextjs-routes" {
|
StaticRoute
<
"
/account/custom_abi
"
>
|
StaticRoute
<
"
/account/public_tags_request
"
>
|
StaticRoute
<
"
/account/tag_address
"
>
|
StaticRoute
<
"
/account/verified_addresses
"
>
|
StaticRoute
<
"
/account/watchlist
"
>
|
StaticRoute
<
"
/accounts
"
>
|
DynamicRoute
<
"
/address/[hash]/contract_verification
"
,
{
"
hash
"
:
string
}
>
...
...
ui/pages/VerifiedAddresses.tsx
0 → 100644
View file @
3b2d575a
import
{
UnorderedList
,
ListItem
,
chakra
,
Button
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
AccountPageDescription
from
'
ui/shared/AccountPageDescription
'
;
import
Page
from
'
ui/shared/Page/Page
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
const
VerifiedAddresses
=
()
=>
{
return
(
<
Page
>
<
PageTitle
text=
"My verified addresses"
/>
<
AccountPageDescription
allowCut=
{
false
}
>
<
chakra
.
p
>
<
span
>
Before you claim the ownership of your contract address and update your token’s information, make sure that:
</
span
>
<
UnorderedList
>
<
ListItem
>
the source code has already been deployed onto the Ethereum blockchain
</
ListItem
>
<
ListItem
>
the source code has already been verified (if you have not yet verified the source code, please do so using this tool)
</
ListItem
>
</
UnorderedList
>
</
chakra
.
p
>
<
chakra
.
p
mt=
{
3
}
>
The verify address ownership process involves verifying the ownership of an “Network name” address used to create an “Network name” smart contract.
This verification will be linked to an “Network name” account. Once a user has claimed ownership of an address,
the user will be able to update token information and address name tags without needing to sign a new message each time.
Find out more about verify address ownership.
</
chakra
.
p
>
</
AccountPageDescription
>
<
Button
size=
"lg"
>
Add address
</
Button
>
</
Page
>
);
};
export
default
VerifiedAddresses
;
ui/shared/AccountPageDescription.tsx
View file @
3b2d575a
...
...
@@ -4,7 +4,7 @@ import React, { useRef, useEffect, useState, useCallback } from 'react';
const
CUT_HEIGHT
=
144
;
const
AccountPageDescription
=
({
children
}:
{
children
:
React
.
ReactNode
})
=>
{
const
AccountPageDescription
=
({
children
,
allowCut
=
true
}:
{
children
:
React
.
ReactNode
;
allowCut
?:
boolean
})
=>
{
const
ref
=
useRef
<
HTMLParagraphElement
>
(
null
);
const
[
needCut
,
setNeedCut
]
=
useState
(
false
);
...
...
@@ -20,6 +20,10 @@ const AccountPageDescription = ({ children }: {children: React.ReactNode}) => {
},
[
needCut
]);
useEffect
(()
=>
{
if
(
!
allowCut
)
{
return
;
}
calculateCut
();
const
resizeHandler
=
_debounce
(
calculateCut
,
300
);
window
.
addEventListener
(
'
resize
'
,
resizeHandler
);
...
...
@@ -44,7 +48,6 @@ const AccountPageDescription = ({ children }: {children: React.ReactNode}) => {
ref=
{
ref
}
maxHeight=
{
needCut
&&
!
expanded
?
`${ CUT_HEIGHT }px`
:
'
auto
'
}
overflow=
"hidden"
style=
{
needCut
&&
!
expanded
?
{
WebkitLineClamp
:
'
6
'
,
WebkitBoxOrient
:
'
vertical
'
,
display
:
'
-webkit-box
'
}
:
{}
}
>
{
children
}
...
...
ui/snippets/navigation/useNavLinkStyleProps.tsx
View file @
3b2d575a
...
...
@@ -30,6 +30,8 @@ export default function useNavLinkProps({ isExpanded, isCollapsed, isActive }: P
transitionProperty
:
'
opacity
'
,
transitionDuration
:
'
normal
'
,
transitionTimingFunction
:
'
ease
'
,
textOverflow
:
'
ellipsis
'
,
overflow
:
'
hidden
'
,
},
};
}
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