Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
explorer-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
Odysseus
explorer-frontend
Commits
a6781901
Commit
a6781901
authored
May 13, 2024
by
贾浩@五瓣科技
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit footer
parent
0fb327b3
Pipeline
#761
failed with stages
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
35 deletions
+39
-35
Footer.tsx
ui/snippets/footer/Footer.tsx
+39
-35
No files found.
ui/snippets/footer/Footer.tsx
View file @
a6781901
...
...
@@ -18,8 +18,8 @@ import getApiVersionUrl from './utils/getApiVersionUrl';
const
MAX_LINKS_COLUMNS
=
4
;
const
FRONT_VERSION_URL
=
`https://github.com/blockscout/frontend/tree/
${
config
.
UI
.
footer
.
frontendVersion
}
`
;
const
FRONT_COMMIT_URL
=
`https://github.com/blockscout/frontend/commit/
${
config
.
UI
.
footer
.
frontendCommit
}
`
;
const
FRONT_VERSION_URL
=
`https://github.com/blockscout/frontend/tree/
${
config
.
UI
.
footer
.
frontendVersion
}
`
;
const
FRONT_COMMIT_URL
=
`https://github.com/blockscout/frontend/commit/
${
config
.
UI
.
footer
.
frontendCommit
}
`
;
const
Footer
=
()
=>
{
...
...
@@ -50,9 +50,9 @@ const Footer = () => {
url
:
'
https://github.com/blockscout/blockscout
'
,
},
{
icon
:
'
social/tw
eet
'
as
const
,
icon
:
'
social/tw
itter
'
as
const
,
iconSize
:
'
18px
'
,
text
:
'
Twitter
'
,
text
:
'
X (ex-Twitter)
'
,
url
:
'
https://www.twitter.com/blockscoutcom
'
,
},
{
...
...
@@ -77,11 +77,11 @@ const Footer = () => {
const
frontendLink
=
(()
=>
{
if
(
config
.
UI
.
footer
.
frontendVersion
)
{
return
<
Link
href=
{
FRONT_VERSION_URL
}
target=
"_blank"
>
{
config
.
UI
.
footer
.
frontendVersion
}
</
Link
>;
return
<
Link
href=
{
FRONT_VERSION_URL
}
target=
"_blank"
>
{
config
.
UI
.
footer
.
frontendVersion
}
</
Link
>;
}
if
(
config
.
UI
.
footer
.
frontendCommit
)
{
return
<
Link
href=
{
FRONT_COMMIT_URL
}
target=
"_blank"
>
{
config
.
UI
.
footer
.
frontendCommit
}
</
Link
>;
return
<
Link
href=
{
FRONT_COMMIT_URL
}
target=
"_blank"
>
{
config
.
UI
.
footer
.
frontendCommit
}
</
Link
>;
}
return
null
;
...
...
@@ -90,8 +90,8 @@ const Footer = () => {
const
fetch
=
useFetch
();
const
{
isPlaceholderData
,
data
:
linksData
}
=
useQuery
<
unknown
,
ResourceError
<
unknown
>
,
Array
<
CustomLinksGroup
>>
({
queryKey
:
[
'
footer-links
'
],
queryFn
:
async
()
=>
fetch
(
config
.
UI
.
footer
.
links
||
''
,
undefined
,
{
resource
:
'
footer-links
'
}),
queryKey
:
[
'
footer-links
'
],
queryFn
:
async
()
=>
fetch
(
config
.
UI
.
footer
.
links
||
''
,
undefined
,
{
resource
:
'
footer-links
'
}),
enabled
:
Boolean
(
config
.
UI
.
footer
.
links
),
staleTime
:
Infinity
,
placeholderData
:
[],
...
...
@@ -102,41 +102,41 @@ const Footer = () => {
const
renderNetworkInfo
=
React
.
useCallback
((
gridArea
?:
GridProps
[
'
gridArea
'
])
=>
{
return
(
<
Flex
gridArea=
{
gridArea
}
gridArea=
{
gridArea
}
flexWrap=
"wrap"
columnGap=
{
8
}
rowGap=
{
6
}
columnGap=
{
8
}
rowGap=
{
6
}
mb=
{
{
base
:
5
,
lg
:
10
}
}
_empty=
{
{
display
:
'
none
'
}
}
>
{
!
config
.
UI
.
indexingAlert
.
intTxs
.
isHidden
&&
<
IntTxsIndexingStatus
/>
}
<
NetworkAddToWallet
/>
{
!
config
.
UI
.
indexingAlert
.
intTxs
.
isHidden
&&
<
IntTxsIndexingStatus
/>
}
<
NetworkAddToWallet
/>
</
Flex
>
);
},
[]);
const
renderProjectInfo
=
React
.
useCallback
((
gridArea
?:
GridProps
[
'
gridArea
'
])
=>
{
return
(
<
Box
gridArea=
{
gridArea
}
>
<
Box
gridArea=
{
gridArea
}
>
<
Link
fontSize=
"xs"
href=
"https://www.blockscout.com"
>
blockscout.com
</
Link
>
<
Text
mt=
{
3
}
fontSize=
"xs"
>
<
Text
mt=
{
3
}
fontSize=
"xs"
>
Blockscout is a tool for inspecting and analyzing EVM based blockchains. Blockchain explorer for Ethereum Networks.
</
Text
>
<
VStack
spacing=
{
1
}
mt=
{
6
}
alignItems=
"start"
>
{
apiVersionUrl
&&
(
<
VStack
spacing=
{
1
}
mt=
{
6
}
alignItems=
"start"
>
{
apiVersionUrl
&&
(
<
Text
fontSize=
"xs"
>
Backend:
<
Link
href=
{
apiVersionUrl
}
target=
"_blank"
>
{
backendVersionData
?.
backend_version
}
</
Link
>
Backend:
<
Link
href=
{
apiVersionUrl
}
target=
"_blank"
>
{
backendVersionData
?.
backend_version
}
</
Link
>
</
Text
>
)
}
{
frontendLink
&&
(
)
}
{
frontendLink
&&
(
<
Text
fontSize=
"xs"
>
Frontend:
{
frontendLink
}
Frontend:
{
frontendLink
}
</
Text
>
)
}
)
}
</
VStack
>
</
Box
>
);
},
[
apiVersionUrl
,
backendVersionData
?.
backend_version
,
frontendLink
]);
},
[
apiVersionUrl
,
backendVersionData
?.
backend_version
,
frontendLink
]);
const
containerProps
:
GridProps
=
{
as
:
'
footer
'
,
...
...
@@ -150,18 +150,18 @@ const Footer = () => {
if
(
config
.
UI
.
footer
.
links
)
{
return
(
<
Grid
{
...
containerProps
}
>
<
Grid
{
...
containerProps
}
>
<
div
>
{
renderNetworkInfo
()
}
{
renderProjectInfo
()
}
{
renderNetworkInfo
()
}
{
renderProjectInfo
()
}
</
div
>
<
Grid
gap=
{
{
base
:
6
,
lg
:
colNum
===
MAX_LINKS_COLUMNS
+
1
?
2
:
8
,
xl
:
12
}
}
gridTemplateColumns=
{
{
base
:
'
repeat(auto-fill, 160px)
'
,
lg
:
`repeat(${
colNum
}, 135px)`
,
xl
:
`repeat(${
colNum
}, 160px)`
,
lg
:
`repeat(${
colNum
}, 135px)`
,
xl
:
`repeat(${
colNum
}, 160px)`
,
}
}
justifyContent=
{
{
lg
:
'
flex-end
'
}
}
mt=
{
{
base
:
8
,
lg
:
0
}
}
...
...
@@ -173,10 +173,10 @@ const Footer = () => {
])
.
slice
(
0
,
colNum
)
.
map
(
linkGroup
=>
(
<
Box
key=
{
linkGroup
.
title
}
>
<
Skeleton
fontWeight=
{
500
}
mb=
{
3
}
display=
"inline-block"
isLoaded=
{
!
isPlaceholderData
}
>
{
linkGroup
.
title
}
</
Skeleton
>
<
VStack
spacing=
{
1
}
alignItems=
"start"
>
{
linkGroup
.
links
.
map
(
link
=>
<
FooterLinkItem
{
...
link
}
key=
{
link
.
text
}
isLoading=
{
isPlaceholderData
}
/>)
}
<
Box
key=
{
linkGroup
.
title
}
>
<
Skeleton
fontWeight=
{
500
}
mb=
{
3
}
display=
"inline-block"
isLoaded=
{
!
isPlaceholderData
}
>
{
linkGroup
.
title
}
</
Skeleton
>
<
VStack
spacing=
{
1
}
alignItems=
"start"
>
{
linkGroup
.
links
.
map
(
link
=>
<
FooterLinkItem
{
...
link
}
key=
{
link
.
text
}
isLoading=
{
isPlaceholderData
}
/>)
}
</
VStack
>
</
Box
>
))
...
...
@@ -188,7 +188,7 @@ const Footer = () => {
return
(
<
Grid
{
...
containerProps
}
{
...
containerProps
}
gridTemplateAreas=
{
{
lg
:
`
"network links-top"
...
...
@@ -196,8 +196,12 @@ const Footer = () => {
`
,
}
}
>
<
Text
fontSize=
"xs"
>
© AGICoin Foundation
</
Text
>
{
renderNetworkInfo
({
lg
:
'
network
'
})
}
{
/* { renderNetworkInfo({ lg: 'network' }) }
{ renderProjectInfo({ lg: 'info' }) }
<Grid
...
...
@@ -219,7 +223,7 @@ const Footer = () => {
mt={{ base: 8, lg: 0 }}
>
{ BLOCKSCOUT_LINKS.map(link => <FooterLinkItem { ...link } key={ link.text }/>) }
</
Grid
>
</Grid>
*/
}
</
Grid
>
);
};
...
...
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