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
c453276f
Commit
c453276f
authored
Jan 20, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
page and title
parent
ea5897b7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
72 additions
and
6 deletions
+72
-6
paths.json
lib/link/paths.json
+1
-1
contract_verification.tsx
pages/address/[id]/contract_verification.tsx
+26
-0
index.tsx
pages/address/[id]/index.tsx
+0
-0
ContractVerification.tsx
ui/pages/ContractVerification.tsx
+43
-0
PageTitle.tsx
ui/shared/Page/PageTitle.tsx
+2
-5
PageTitle.pw.tsx_mobile_long-title-with-text-ad-back-link-and-addons-mobile-1.png
...long-title-with-text-ad-back-link-and-addons-mobile-1.png
+0
-0
No files found.
lib/link/paths.json
View file @
c453276f
...
...
@@ -14,7 +14,7 @@
"token_index"
:
"/token/:hash"
,
"token_instance_item"
:
"/token/:hash/instance/:id"
,
"address_index"
:
"/address/:id"
,
"address_contract_verification"
:
"/address/:id/contract_verification
s/new
"
,
"address_contract_verification"
:
"/address/:id/contract_verification"
,
"apps"
:
"/apps"
,
"app_index"
:
"/apps/:id"
,
"search_results"
:
"/search-results"
,
...
...
pages/address/[id]/contract_verification.tsx
0 → 100644
View file @
c453276f
import
type
{
NextPage
}
from
'
next
'
;
import
Head
from
'
next/head
'
;
import
React
from
'
react
'
;
import
type
{
PageParams
}
from
'
lib/next/address/types
'
;
import
getSeo
from
'
lib/next/address/getSeo
'
;
import
ContractVerification
from
'
ui/pages/ContractVerification
'
;
const
ContractVerificationPage
:
NextPage
<
PageParams
>
=
({
id
}:
PageParams
)
=>
{
const
{
title
,
description
}
=
getSeo
({
id
});
return
(
<>
<
Head
>
<
title
>
{
title
}
</
title
>
<
meta
name=
"description"
content=
{
description
}
/>
</
Head
>
<
ContractVerification
/>
</>
);
};
export
default
ContractVerificationPage
;
export
{
getServerSideProps
}
from
'
lib/next/getServerSideProps
'
;
pages/address/[id].tsx
→
pages/address/[id]
/index
.tsx
View file @
c453276f
File moved
ui/pages/ContractVerification.tsx
0 → 100644
View file @
c453276f
import
{
Text
}
from
'
@chakra-ui/react
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
React
from
'
react
'
;
import
{
useAppContext
}
from
'
lib/appContext
'
;
import
isBrowser
from
'
lib/isBrowser
'
;
import
Address
from
'
ui/shared/address/Address
'
;
import
AddressIcon
from
'
ui/shared/address/AddressIcon
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
HashStringShortenDynamic
from
'
ui/shared/HashStringShortenDynamic
'
;
import
Page
from
'
ui/shared/Page/Page
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
const
ContractVerification
=
()
=>
{
const
appProps
=
useAppContext
();
const
isInBrowser
=
isBrowser
();
const
referrer
=
isInBrowser
?
window
.
document
.
referrer
:
appProps
.
referrer
;
const
hasGoBackLink
=
referrer
&&
referrer
.
includes
(
'
/address
'
);
const
router
=
useRouter
();
const
hash
=
router
.
query
.
id
?.
toString
();
return
(
<
Page
>
<
PageTitle
text=
"New smart contract verification"
backLinkUrl=
{
hasGoBackLink
?
referrer
:
undefined
}
backLinkLabel=
"Back to address"
/>
{
hash
&&
(
<
Address
>
<
AddressIcon
address=
{
{
hash
,
is_contract
:
true
,
implementation_name
:
null
}
}
flexShrink=
{
0
}
/>
<
Text
fontFamily=
"heading"
ml=
{
2
}
fontWeight=
{
500
}
fontSize=
"lg"
w=
{
{
base
:
'
100%
'
,
lg
:
'
auto
'
}
}
whiteSpace=
"nowrap"
overflow=
"hidden"
>
<
HashStringShortenDynamic
hash=
{
hash
}
/>
</
Text
>
<
CopyToClipboard
text=
{
hash
}
/>
</
Address
>
)
}
</
Page
>
);
};
export
default
ContractVerification
;
ui/shared/Page/PageTitle.tsx
View file @
c453276f
...
...
@@ -19,9 +19,6 @@ const PageTitle = ({ text, additionals, withTextAd, backLinkUrl, backLinkLabel,
as=
"h1"
size=
"lg"
flex=
"none"
overflow=
"hidden"
textOverflow=
"ellipsis"
whiteSpace=
"nowrap"
width=
{
backLinkUrl
?
'
calc(100% - 36px)
'
:
'
100%
'
}
>
{
text
}
...
...
@@ -41,13 +38,13 @@ const PageTitle = ({ text, additionals, withTextAd, backLinkUrl, backLinkLabel,
<
Flex
flexWrap=
"wrap"
columnGap=
{
3
}
alignItems=
"center"
width=
{
withTextAd
?
'
unset
'
:
'
100%
'
}
>
<
Flex
flexWrap=
"nowrap"
alignItems=
"
center
"
alignItems=
"
start
"
columnGap=
{
3
}
overflow=
"hidden"
>
{
backLinkUrl
&&
(
<
Tooltip
label=
{
backLinkLabel
}
>
<
Link
display=
"inline-flex"
href=
{
backLinkUrl
}
>
<
Link
display=
"inline-flex"
href=
{
backLinkUrl
}
py=
{
2
}
>
<
Icon
as=
{
eastArrowIcon
}
boxSize=
{
6
}
transform=
"rotate(180deg)"
/>
</
Link
>
</
Tooltip
>
...
...
ui/shared/Page/__screenshots__/PageTitle.pw.tsx_mobile_long-title-with-text-ad-back-link-and-addons-mobile-1.png
View replaced file @
ea5897b7
View file @
c453276f
11.5 KB
|
W:
|
H:
13.2 KB
|
W:
|
H:
2-up
Swipe
Onion skin
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