-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from okfe/develop
feat: Add OKX explorer
- Loading branch information
Showing
57 changed files
with
1,431 additions
and
11 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/content/oklink/components/AddressLabels/index.module.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@import '@common/styles/common.less'; | ||
|
||
.address { | ||
white-space: nowrap; | ||
} | ||
|
||
.title { | ||
font-size: 12px; | ||
font-weight: 400; | ||
line-height: 16px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { type FC, useMemo } from 'react' | ||
|
||
import { Tooltip } from 'antd' | ||
import { TokenSymbol } from '@common/components' | ||
import styles from './index.module.less' | ||
|
||
interface Props { | ||
label: string | ||
address: string | ||
} | ||
|
||
const AddressLabels: FC<Props> = ({ label, address }) => { | ||
const title = useMemo(() => { | ||
return ( | ||
<div className={styles.title}> | ||
<div>{label}</div> | ||
<div>{address}</div> | ||
</div> | ||
) | ||
}, []) | ||
return ( | ||
<Tooltip className={styles.address} title={title}> | ||
<TokenSymbol | ||
size={14.4} | ||
style={{ marginRight: 4, verticalAlign: 'middle' }} | ||
/> | ||
<span style={{ verticalAlign: 'middle' }}>{label}</span> | ||
</Tooltip> | ||
) | ||
} | ||
|
||
export default AddressLabels |
35 changes: 35 additions & 0 deletions
35
src/content/oklink/components/ComplianceScoreLabel/index.module.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@import '@common/styles/common.less'; | ||
|
||
.complianceScoreLabel { | ||
display: flex; | ||
align-items: center; | ||
column-gap: 4px; | ||
width: fit-content; | ||
padding: 4px 8px; | ||
border-radius: 6px; | ||
font-size: 14px; | ||
font-weight: 500; | ||
line-height: 16px; | ||
cursor: pointer; | ||
.iconRisk { | ||
width: 16px; | ||
height: 16px; | ||
} | ||
|
||
color: #2ead65; | ||
background: #d2f9e3; | ||
&.medium-risk { | ||
color: #d29801; | ||
background: #fff2d1; | ||
} | ||
|
||
&.high-risk { | ||
color: #f16514; | ||
background: #fce3d4; | ||
} | ||
|
||
&.critical-risk { | ||
color: #eb4747; | ||
background: #ffdfdf; | ||
} | ||
} |
53 changes: 53 additions & 0 deletions
53
src/content/oklink/components/ComplianceScoreLabel/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import { type FC } from 'react' | ||
import classNames from 'classnames' | ||
import { Tooltip } from 'antd' | ||
|
||
import { type AddressRiskLevel } from '@common/constants' | ||
|
||
import styles from './index.module.less' | ||
import { getOKLinkImage } from '../../utils' | ||
import { AddressRisk } from '../../constant/addressRisk' | ||
|
||
interface Props { | ||
risk: AddressRiskLevel | ||
} | ||
|
||
const MAILTO_URL = 'mailto:metadockteam@blocksec.com' | ||
|
||
const ComplianceScoreLabel: FC<Props> = ({ risk }) => { | ||
const riskOpt = Object.values(AddressRisk).find(item => item.value === risk) | ||
|
||
if (!riskOpt) { | ||
return null | ||
} | ||
|
||
return ( | ||
<Tooltip | ||
overlayInnerStyle={{ width: 288 }} | ||
title={ | ||
<div> | ||
<a href={MAILTO_URL} target="_blank"> | ||
Contact us{' '} | ||
</a> | ||
for any questions regarding compliance risk assessment by algorithm. | ||
</div> | ||
} | ||
> | ||
<div | ||
className={classNames( | ||
styles.complianceScoreLabel, | ||
styles[riskOpt.icon] | ||
)} | ||
> | ||
<img | ||
className={styles.iconRisk} | ||
src={getOKLinkImage(riskOpt.icon)} | ||
alt="" | ||
/> | ||
{riskOpt.label} | ||
</div> | ||
</Tooltip> | ||
) | ||
} | ||
|
||
export default ComplianceScoreLabel |
20 changes: 20 additions & 0 deletions
20
src/content/oklink/components/ExportTableDataBtn/index.module.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.dropdownBox { | ||
position: relative; | ||
display: inline-flex; | ||
align-items: center; | ||
gap: 6px; | ||
cursor: pointer; | ||
height: 32px; | ||
padding: 0 8px; | ||
color: #000; | ||
font-size: 14px; | ||
font-weight: 500; | ||
line-height: 16px; | ||
border-radius: 4px; | ||
background: #f9f9f9; | ||
} | ||
|
||
.img { | ||
width: 16px; | ||
height: 16px; | ||
} |
Oops, something went wrong.