Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
639e9a3
fix: enhance tab list on the profile page
lelenei Jul 30, 2021
fab30d4
fix: recover file
lelenei Jul 30, 2021
799d433
fix: tab list style
lelenei Jul 30, 2021
7d361a4
feat: add collective list
UncleBill Jul 30, 2021
c3639e7
fix: tab style
lelenei Jul 30, 2021
512c2cb
fix: conflict files
lelenei Jul 30, 2021
3b4782e
fix: tab style
lelenei Jul 30, 2021
9937bfc
feat: get user address from profile page
UncleBill Aug 1, 2021
8af0957
feat(web3-shared): add useResolveEns for resolving ens
UncleBill Jul 29, 2021
9ee2e0c
fixup! feat(web3-shared): add useResolveEns for resolving ens
UncleBill Jul 30, 2021
4b26ae9
feat: resolve ens
UncleBill Aug 1, 2021
e376917
fix: improve layout of CollectiableList
UncleBill Aug 2, 2021
89c03d2
fix: replace auto-fit with auto-fill
UncleBill Aug 2, 2021
00a6f7b
Update packages/maskbook/src/social-network/types.ts
UncleBill Aug 2, 2021
c75d418
fix: eslint warning
UncleBill Aug 2, 2021
edb80b4
fix: eslint warning
UncleBill Aug 2, 2021
e5499bb
fix: move useEthereumName to individual file
UncleBill Aug 2, 2021
34013d4
fix: missing useState
UncleBill Aug 3, 2021
baf1d23
fix: eslint warning
UncleBill Aug 3, 2021
9f3224b
fix: show nfts list page
lelenei Aug 3, 2021
3f47c11
fix: use MaskMessage
lelenei Aug 4, 2021
f539985
Update packages/web3-shared/src/hooks/useResolveEns.ts
UncleBill Aug 4, 2021
33ed78a
fix: useEthereumName check twitterId
UncleBill Aug 4, 2021
d4db2d7
fix: style in My Wallets
lelenei Aug 4, 2021
a09366c
fix: ens address error
lelenei Aug 5, 2021
7be268c
fix: apply review
lelenei Aug 5, 2021
06aee93
fix: apply review
lelenei Aug 5, 2021
8b7015c
fix: apply review
lelenei Aug 6, 2021
546d8d2
fix: apply review
lelenei Aug 6, 2021
93a45f7
fix: apply review
lelenei Aug 7, 2021
b37f0be
fix: no fallback
lelenei Aug 8, 2021
d087523
refactor: remove unused code
lelenei Aug 9, 2021
1edcf2f
fix: inject nfts in search
lelenei Aug 9, 2021
3024229
fix: remove dependency wallet
lelenei Aug 9, 2021
187e20b
refactor: css style
lelenei Aug 9, 2021
5e1c1bd
fix: improve code
lelenei Aug 9, 2021
d71b65c
fix: apply review
lelenei Aug 10, 2021
7c8394d
refactor: useLocationChange
guanbinrui Aug 10, 2021
81306e3
fix: prettier
guanbinrui Aug 10, 2021
0379c47
fix: add profileNFTTabUpdated event
lelenei Aug 10, 2021
1713573
fix: eslint error
lelenei Aug 10, 2021
1b11e85
refactor: code style
lelenei Aug 11, 2021
6eeafc0
fix: broken lockfile
Jack-Works Aug 11, 2021
c43fd01
Merge branch 'fix-lockfile' into lelenei/fix-3751
Jack-Works Aug 11, 2021
6cec77a
chore: migrate enhanced profile tab to new makeStyles
Jack-Works Aug 11, 2021
285f694
fix: refresh nft list
lelenei Aug 12, 2021
95782d9
refactor: improve code
lelenei Aug 12, 2021
3135f37
fix: change the chainnet, not update the nft list
lelenei Aug 12, 2021
1e00ffd
fix: recovery code
lelenei Aug 12, 2021
a37b623
fix: ens resolve
lelenei Aug 12, 2021
342dd42
fix: css breaks
Jack-Works Aug 12, 2021
c54300c
fix: hide retry button
lelenei Aug 12, 2021
221ab5c
Merge remote-tracking branch 'origin/fix-css' into lelenei/fix-3751
lelenei Aug 12, 2021
0ca51c6
refactor: use makeStyles
lelenei Aug 12, 2021
a919964
fix: review
lelenei Aug 12, 2021
8e03a7c
fix: pnpm-lock.yaml conflict
lelenei Aug 13, 2021
877a7aa
Merge remote-tracking branch 'origin/develop' into lelenei/fix-3751
lelenei Aug 13, 2021
3812044
refactor: reply review
lelenei Aug 13, 2021
e3e52a6
fix: update pnpm-lock.yaml
lelenei Aug 13, 2021
52536af
fix: hover selector
lelenei Aug 13, 2021
b8f2892
fix: hint font
lelenei Aug 13, 2021
6319b6d
fix: style problem
Jack-Works Aug 13, 2021
f2dfdc6
Merge branch 'lelenei/fix-3751' of https://github.com/DimensionDev/Ma…
lelenei Aug 13, 2021
3a4c978
fix: css error
lelenei Aug 13, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const CollectibleList = memo(() => {
value = { collectibles: [], hasNextPage: false },
loading: collectiblesLoading,
error: collectiblesError,
} = useCollectibles(account, provider, page, 20)
} = useCollectibles(account, chainId, provider, page, 20)

const { collectibles = [], hasNextPage } = value

Expand Down
1 change: 1 addition & 0 deletions packages/maskbook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"buffer": "^6.0.3",
"classnames": "^2.3.1",
"clipboard-polyfill": "^3.0.3",
"color": "^4.0.0",
"crypto-browserify": "^3.12.0",
"d3": "^5.16.0",
"date-fns": "^2.23.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import { useStylesExtends } from '@masknet/shared'
import { getMaskColor, makeStyles } from '@masknet/theme'
import { useState, useEffect } from 'react'
import { CollectibleListAddress } from '../../extension/options-page/DashboardComponents/CollectibleList'
import { useEthereumAddress } from '../../social-network-adaptor/twitter.com/injection/useEthereumName'
import { MaskMessage } from '../../utils'
import { useLocationChange } from '../../utils/hooks/useLocationChange'

const useStyles = makeStyles()((theme) => ({
text: {
paddingTop: 36,
paddingBottom: 36,
'& > p': {
color: getMaskColor(theme).textPrimary,
},
},
button: {},
}))

interface EnhancedProfileaPageProps extends withClasses<'text' | 'button'> {
bioDescription: string
nickname: string
twitterId: string
onUpdated: () => void
}

export function EnhancedProfileaPage(props: EnhancedProfileaPageProps) {
const [show, setShow] = useState(false)
const classes = useStylesExtends(useStyles(), props)
const { bioDescription, nickname, twitterId, onUpdated } = props

useLocationChange(() => {
MaskMessage.events.profileNFTsTabUpdated.sendToLocal('reset')
Comment thread
lelenei marked this conversation as resolved.
})

useEffect(() => {
return MaskMessage.events.profileNFTsTabUpdated.on((data) => {
onUpdated()
})
}, [])

useEffect(() => {
return MaskMessage.events.profileNFTsPageUpdated.on((data) => {
setShow(data.show)
})
}, [])

const resolvedAddress = useEthereumAddress(nickname, twitterId, bioDescription)
return <>{show ? <CollectibleListAddress classes={classes} address={resolvedAddress ?? ''} /> : null}</>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import classnames from 'classnames'
import { ReactElement, useCallback, useEffect, useState } from 'react'

import { MaskMessage } from '../../utils'

export interface EnhancedProfileTabProps extends withClasses<'tab' | 'button' | 'selected'> {
clear(): void
reset(): void
children?: ReactElement
// Required! This component don't have it own style.
classes: Record<'tab' | 'button' | 'selected', string>
}

export function EnhancedProfileTab(props: EnhancedProfileTabProps) {
const { reset, clear, children, classes } = props
const [active, setActive] = useState(false)

const onClose = () => {
setActive(false)
MaskMessage.events.profileNFTsPageUpdated.sendToLocal({ show: false })
reset()
}
const onOpen = () => {
MaskMessage.events.profileNFTsPageUpdated.sendToLocal({ show: true })
setActive(true)
}

useEffect(() => {
return MaskMessage.events.profileNFTsTabUpdated.on(onClose)
}, [])

const onClick = useCallback(() => {
onOpen()
clear()
}, [clear, onOpen])

return (
<div key="nfts" className={classes.tab}>
<div className={classnames(classes.button, active ? classes.selected : '')} onClick={onClick}>
NFTs
{active && children ? children : null}
</div>
</div>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,22 @@ const useStyles = makeStyles((theme) => ({

export interface CollectibleCardProps {
provider: CollectibleProvider
wallet: Wallet
wallet?: Wallet
token: ERC721TokenAssetDetailed | ERC1155TokenAssetDetailed
readonly?: boolean
}

export function CollectibleCard(props: CollectibleCardProps) {
const { wallet, token, provider } = props
const { wallet, token, provider, readonly } = props
const classes = useStyles(props)
const chainId = useChainId()

return (
<Link target="_blank" rel="noopener noreferrer" href={resolveCollectibleLink(chainId, provider, token)}>
<Card className={classes.root} style={{ width: 160, height: 220 }}>
<ActionsBarNFT classes={{ more: classes.icon }} wallet={wallet} token={token} />
{readonly || !wallet ? null : (
<ActionsBarNFT classes={{ more: classes.icon }} wallet={wallet} token={token} />
)}
{token.asset?.image ? (
<Image
component="img"
Expand Down
Loading