Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
16953e3
feat: findtruman add property critical to votes
Dec 13, 2021
06fcf17
Merge branch 'develop' into develop
z384647062 Dec 14, 2021
c5d66c9
Merge branch 'develop' of github.com:DimensionDev/Maskbook into develop
Dec 15, 2021
1c55dfb
fix: findtruman i18n and check chain id (#5167)
Dec 15, 2021
383d623
fix: findtruman insufficient nft tip
Dec 15, 2021
acbabe8
refactor: findtruman refactor
Dec 15, 2021
885b647
refactor: findtruman refactor
Dec 20, 2021
8dd4737
chore: findtruman new encryption card
Dec 21, 2021
23ab955
refactor: findtruman refactor
Dec 21, 2021
0e940e2
refactor: findtruman refactor
Dec 21, 2021
fde5fae
Merge branch 'develop' of github.com:DimensionDev/Maskbook into develop
Dec 21, 2021
60763b2
fix: findtruman regex clue id
Dec 21, 2021
63fcf7a
fix: lint errors
Dec 21, 2021
453a9da
refactor: findtruman refactor
Dec 22, 2021
88d4898
refactor: findtruman refactor
Dec 22, 2021
8bb57dd
refactor: find-truman refactor (#5253)
Dec 22, 2021
3b01fbe
refactor: find-truman refactor
Dec 22, 2021
d5b7825
refactor: find-truman refactor
Dec 22, 2021
2f5e7a8
chore: update find-truman encryption-card
Dec 27, 2021
d90f9dc
Merge branch 'develop' into develop
z384647062 Dec 27, 2021
3c30a83
refactor: findtruman refactor
Dec 27, 2021
42c9d7e
Merge branch 'develop' of github.com:DimensionDev/Maskbook into develop
Jan 4, 2022
6006da5
Merge branch 'DimensionDev-develop' into develop
Jan 4, 2022
8856c9b
feat: find-truman application
Jan 17, 2022
f3eb7b6
Merge branch 'develop' of github.com:DimensionDev/Maskbook into develop
Jan 17, 2022
28d88bd
fix: lint error
Jan 17, 2022
6384709
fix: find-truman submit poll
Jan 17, 2022
a33ae2f
refactor: find-truman lint
Jan 17, 2022
e5b75ba
refactor: find-truman const hook
Jan 19, 2022
92048c3
refactor: find-truman refactor
Jan 19, 2022
3e5bae1
chore: find-truman update fusion ftg
Jan 20, 2022
89978fb
chore: find-truman parts panel style
Jan 20, 2022
34edd25
Merge branch 'develop' of github.com:DimensionDev/Maskbook into develop
Jan 20, 2022
3caf5df
fix: find-truman lint
Jan 20, 2022
a8d0d4e
refactor: find-truman refactor
Jan 21, 2022
555c285
Merge branch 'develop' into develop
z384647062 Jan 21, 2022
566b0cd
chore: find-truman option hover style and participation dialog
Jan 21, 2022
7d650f0
chore: find-truman result style
Jan 24, 2022
20334a5
chore: find-truman update application logo
Jan 24, 2022
6434791
refactor: find-truman refactor
Jan 24, 2022
19c5901
Merge branch 'develop' into develop
z384647062 Jan 26, 2022
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
5 changes: 5 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@
"CELO",
"CEUR",
"chainid",
"clueid",
"consts",
"COTM",
"crwdnd",
Expand All @@ -299,6 +300,8 @@
"fbclid",
"findtruman",
"flac",
"ftgs",
"ftpoap",
"FUSD",
"gamification",
"getdodoroute",
Expand Down Expand Up @@ -350,9 +353,11 @@
"pkts",
"pnpm",
"poap",
"poaps",
"powah",
"powahs",
"QLURL",
"rawdata",
"redpackets",
"rpcs",
"setx",
Expand Down
7 changes: 0 additions & 7 deletions packages/mask/shared-ui/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -749,27 +749,20 @@
"plugin_find_truman_puzzles_to_be_revealed": "puzzles are left to be revealed",
"plugin_find_truman_poll_to_be_revealed": "vote continues to be tallied.",
"plugin_find_truman_polls_to_be_revealed": "votes continue to be tallied",
"plugin_find_truman_vote_finish": "Closed",
"plugin_find_truman_puzzle_underway": "The puzzle hasn't been revealed yet.",
"plugin_find_truman_puzzle_rate": "Accuracy: ",
"plugin_find_truman_voting_underway": "The voting continues to be tallied.",
"plugin_find_truman_voting_rate": "Hit rate: ",
"plugin_find_truman_submit": "SUBMIT",
"plugin_find_truman_submit_failed": "Failed to submit.",
"plugin_find_truman_vote": "vote",
"plugin_find_truman_votes": "votes",
"plugin_find_truman_have_voted": "Voted",
"plugin_find_truman_have_not_voted": "Not Voted",
"plugin_find_truman_selected": "Selected",
"plugin_find_truman_unselect": "Select",
"plugin_find_truman_answer": "Answer",
"plugin_find_truman_result": "Result",
"plugin_find_truman_buy": "BUY",
"plugin_find_truman_unsupported_chain": "The chain is expected to be {{chain}} so that we are able to verify your NFT assets on it.",
"plugin_find_truman_decrypted_by": "Decrypted by FindTruman:",
"plugin_find_truman_decrypted_failed": "Unable to decrypt the message.",
"plugin_find_truman_decrypt_102": "The following specific NFTs are needed for decryption.",
"plugin_find_truman_insufficient_erc20": "Your wallet required to hold as least {{minAmount}} ERC-20 tokens for decryption.",
"plugin_find_truman_insufficient_nft": "The following specific NFTs are needed for this vote.",
"plugin_find_truman_buy_nft_tip": "At least {{count}} copy of this NFT is required.",
"plugin_find_truman_buy_nfts_tip": "At least {{count}} copies of this NFT are required.",
Expand Down
7 changes: 0 additions & 7 deletions packages/mask/shared-ui/locales/qya-AA.json
Original file line number Diff line number Diff line change
Expand Up @@ -731,27 +731,20 @@
"plugin_find_truman_puzzles_to_be_revealed": "crwdns10357:0crwdne10357:0",
"plugin_find_truman_poll_to_be_revealed": "crwdns10359:0crwdne10359:0",
"plugin_find_truman_polls_to_be_revealed": "crwdns10361:0crwdne10361:0",
"plugin_find_truman_vote_finish": "crwdns10363:0crwdne10363:0",
"plugin_find_truman_puzzle_underway": "crwdns10365:0crwdne10365:0",
"plugin_find_truman_puzzle_rate": "crwdns10367:0crwdne10367:0",
"plugin_find_truman_voting_underway": "crwdns10369:0crwdne10369:0",
"plugin_find_truman_voting_rate": "crwdns10371:0crwdne10371:0",
"plugin_find_truman_submit": "crwdns10373:0crwdne10373:0",
"plugin_find_truman_submit_failed": "crwdns10375:0crwdne10375:0",
"plugin_find_truman_vote": "crwdns10377:0crwdne10377:0",
"plugin_find_truman_votes": "crwdns10379:0crwdne10379:0",
"plugin_find_truman_have_voted": "crwdns10381:0crwdne10381:0",
"plugin_find_truman_have_not_voted": "crwdns10383:0crwdne10383:0",
"plugin_find_truman_selected": "crwdns10385:0crwdne10385:0",
"plugin_find_truman_unselect": "crwdns10387:0crwdne10387:0",
"plugin_find_truman_answer": "crwdns10389:0crwdne10389:0",
"plugin_find_truman_result": "crwdns10391:0crwdne10391:0",
"plugin_find_truman_buy": "crwdns10393:0crwdne10393:0",
"plugin_find_truman_unsupported_chain": "crwdns10395:0{{chain}}crwdne10395:0",
"plugin_find_truman_decrypted_by": "crwdns10397:0crwdne10397:0",
"plugin_find_truman_decrypted_failed": "crwdns10399:0crwdne10399:0",
"plugin_find_truman_decrypt_102": "crwdns10401:0crwdne10401:0",
"plugin_find_truman_insufficient_erc20": "crwdns10403:0{{minAmount}}crwdne10403:0",
"plugin_find_truman_insufficient_nft": "crwdns10405:0crwdne10405:0",
"plugin_find_truman_buy_nft_tip": "crwdns10407:0{{count}}crwdne10407:0",
"plugin_find_truman_buy_nfts_tip": "crwdns10409:0{{count}}crwdne10409:0",
Expand Down
2 changes: 0 additions & 2 deletions packages/mask/shared-ui/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -701,12 +701,10 @@
"plugin_find_truman_puzzles_to_be_revealed": "谜题等待揭晓。",
"plugin_find_truman_poll_to_be_revealed": "投票仍在进行。",
"plugin_find_truman_polls_to_be_revealed": "投票仍在进行",
"plugin_find_truman_vote_finish": "已关闭",
"plugin_find_truman_puzzle_underway": "这个谜题尚未被揭晓。",
"plugin_find_truman_puzzle_rate": "准确度: ",
"plugin_find_truman_voting_underway": "此投票仍在进行。",
"plugin_find_truman_voting_rate": "点击率: ",
"plugin_find_truman_submit": "提交",
"plugin_find_truman_submit_failed": "提交失败。",
"plugin_find_truman_vote": "投票",
"plugin_find_truman_votes": "投票",
Expand Down
20 changes: 20 additions & 0 deletions packages/mask/src/components/shared/ApplicationBoard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { EntrySecondLevelDialog } from './EntrySecondLevelDialog'
import { NetworkTab } from './NetworkTab'
import { TraderDialog } from '../../plugins/Trader/SNSAdaptor/trader/TraderDialog'
import { NetworkPluginID, PluginId, usePluginIDContext } from '@masknet/plugin-infra'
import { FindTrumanDialog } from '../../plugins/FindTruman/SNSAdaptor/FindTrumanDialog'

const useStyles = makeStyles()((theme) => ({
abstractTabWrapper: {
Expand Down Expand Up @@ -174,6 +175,14 @@ export function ApplicationBoard({ secondEntries, secondEntryChainTabs }: MaskAp
)
// #endregion

// #region FindTruman
const {
open: isFindTrumanDialogOpen,
onOpen: onFindTrumanDialogOpen,
onClose: onFindTrumanDialogClose,
} = useControlledDialog()
// #endregion

function createEntry(
title: string,
img: string,
Expand Down Expand Up @@ -317,6 +326,14 @@ export function ApplicationBoard({ secondEntries, secondEntryChainTabs }: MaskAp
undefined,
true,
),
createEntry(
'FindTruman',
new URL('./assets/findtruman.png', import.meta.url).toString(),
onFindTrumanDialogOpen,
[ChainId.Mainnet],
false,
true,
),
]

return (
Expand Down Expand Up @@ -363,6 +380,9 @@ export function ApplicationBoard({ secondEntries, secondEntryChainTabs }: MaskAp
closeDialog={onSecondLevelEntryDialogClose}
/>
) : null}
{isFindTrumanDialogOpen ? (
<FindTrumanDialog open={isFindTrumanDialogOpen} onClose={onFindTrumanDialogClose} />
) : null}
</>
)
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 72 additions & 0 deletions packages/mask/src/plugins/FindTruman/SNSAdaptor/AssetsPanel.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import { makeStyles } from '@masknet/theme'
import { Box, Button, Typography } from '@mui/material'
import type React from 'react'
import PoapPanel from './PoapPanel'
import PartsPanel from './PartsPanel'
import FtgPanel from './FtgPanel'
import { useContext } from 'react'
import { FindTrumanContext } from '../context'

const useStyles = makeStyles()((theme) => ({
box: {
display: 'flex',
flexDirection: 'column',
},
row: {
display: 'flex',
justifyContent: 'flex-start',
alignItems: 'baseline',
},
}))

interface AssetsPanelProps {}

export default function AssetsPanel(props: AssetsPanelProps) {
const { classes } = useStyles()
const { t } = useContext(FindTrumanContext)

return (
<Box className={classes.box}>
<Box className={classes.row}>
<Typography textAlign="left" variant="h5" color="text.primary" gutterBottom>
{t('plugin_find_truman_dialog_assets_ftg')}
</Typography>
<Typography textAlign="left" variant="body2" color="text.secondary" ml={1} gutterBottom>
{t('plugin_find_truman_dialog_ethereum_mainnet')}
</Typography>
</Box>
<FtgPanel />

<Box className={classes.row} mt={2}>
<Typography textAlign="left" variant="h5" color="text.primary" gutterBottom>
{t('plugin_find_truman_dialog_assets_POAP')}
</Typography>
<Typography textAlign="left" variant="body2" color="text.secondary" ml={1} gutterBottom>
{t('plugin_find_truman_dialog_ethereum_polygon')}
</Typography>
</Box>
<PoapPanel />

<Box display="flex" alignItems="center" justifyContent="space-between" mt={2} mb={2}>
<Box className={classes.row}>
<Typography textAlign="left" variant="h5" color="text.primary">
{t('plugin_find_truman_dialog_assets_parts')}
</Typography>
<Typography textAlign="left" variant="body2" color="text.secondary" ml={1} gutterBottom>
{t('plugin_find_truman_dialog_ethereum_polygon')}
</Typography>
</Box>
<Button
variant="outlined"
color="primary"
size="small"
component="a"
href="https://findtruman.io/#/assets"
target="_blank">
{t('plugin_find_truman_dialog_fusion_fusion')}
</Button>
</Box>
<PartsPanel />
</Box>
)
}
Loading