Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@
"majeure",
"Swither",
"nftscan",
"apikey"
"apikey",
"fbclid"
],
"ignoreWords": [
"cryptopunks",
Expand Down
3 changes: 3 additions & 0 deletions packages/maskbook/src/UIRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { useClassicMaskTheme } from './utils/theme'
import { Web3Context } from './web3/context'
import { buildInfoMarkdown } from './extension/background-script/Jobs/PrintBuildFlags'
import { Suspense } from 'react'
import { FACEBOOK_ID } from './social-network-adaptor/facebook.com/base'
import { activatedSocialNetworkUI } from './social-network'

export function MaskUIRootWithinShadow(JSX: JSX.Element) {
return (
Expand All @@ -30,6 +32,7 @@ export function MaskUIRoot(JSX: JSX.Element) {
<ThemeProvider theme={useClassicMaskTheme()}>
<CssBaseline />
<CustomSnackbarProvider
isFacebook={activatedSocialNetworkUI.networkIdentifier === FACEBOOK_ID}
disableWindowBlurListener={false}
anchorOrigin={{ vertical: 'top', horizontal: 'right' }}>
{JSX}
Expand Down
11 changes: 8 additions & 3 deletions packages/maskbook/src/components/CompositionDialog/useSubmit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { SteganographyTextPayload } from '../InjectedComponents/SteganographyTex
import type { SubmitComposition } from './CompositionUI'
import { unreachable } from '@dimensiondev/kit'
import { useLastRecognizedIdentity } from '../DataSource/useActivatedUI'
import { isFacebook } from '../../social-network-adaptor/facebook.com/base'

export function useSubmit(onClose: () => void) {
const { t } = useI18N()
Expand All @@ -33,9 +34,13 @@ export function useSubmit(onClose: () => void) {
whoAmI?.identifier ?? currentProfile,
target === 'Everyone',
)
const redPacketPreText = isTwitter(activatedSocialNetworkUI)
? t('additional_post_box__encrypted_post_pre_red_packet_twitter', { encrypted })
: t('additional_post_box__encrypted_post_pre_red_packet', { encrypted })
const redPacketPreText =
isTwitter(activatedSocialNetworkUI) || isFacebook(activatedSocialNetworkUI)
? t('additional_post_box__encrypted_post_pre_red_packet_twitter_official_account', {
encrypted,
account: isTwitter(activatedSocialNetworkUI) ? t('twitter_account') : t('facebook_account'),
})
: t('additional_post_box__encrypted_post_pre_red_packet', { encrypted })

// TODO: move into the plugin system
const redPacketMetadata = RedPacketMetadataReader(content.meta)
Expand Down
14 changes: 10 additions & 4 deletions packages/maskbook/src/components/InjectedComponents/CommentBox.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
import { makeStyles } from '@masknet/theme'
import { InputBase } from '@material-ui/core'
import { useI18N } from '../../utils'
import { activatedSocialNetworkUI } from '../../social-network'
import { MINDS_ID } from '../../social-network-adaptor/minds.com/base'

const useStyles = makeStyles()({
interface StyleProps {
snsId: string
}

const useStyles = makeStyles<StyleProps>()((theme, { snsId }) => ({
root: {
fontSize: 13,
background: '#3a3b3c',
width: '100%',
width: snsId === MINDS_ID ? '96%' : '100%',
height: 34,
borderRadius: 20,
padding: '2px 1em',
Expand All @@ -23,14 +29,14 @@ const useStyles = makeStyles()({
color: '#d0d2d6',
},
},
})
}))

export interface CommentBoxProps {
onSubmit: (newVal: string) => void
inputProps?: Partial<PropsOf<typeof InputBase>>
}
export function CommentBox(props: CommentBoxProps) {
const { classes } = useStyles()
const { classes } = useStyles({ snsId: activatedSocialNetworkUI.networkIdentifier })
const { t } = useI18N()
return (
<InputBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { PluginTransakMessages } from '../../plugins/Transak/messages'
import { PluginTraderMessages } from '../../plugins/Trader/messages'
import { WalletMessages } from '../../plugins/Wallet/messages'
import { Flags } from '../../utils/flags'
import { activatedSocialNetworkUI } from '../../social-network'
import { ClaimAllDialog } from '../../plugins/ITO/SNSAdaptor/ClaimAllDialog'
import { hasNativeAPI, nativeAPI, useI18N, useMenu } from '../../utils'
import { safeUnreachable } from '@dimensiondev/kit'
Expand Down Expand Up @@ -118,7 +119,7 @@ export function ToolboxHintUnstyled(props: ToolboxHintProps) {

return (
<>
<GuideStep step={1} total={3} tip={t('user_guide_tip_1')}>
<GuideStep step={1} total={3} tip={t('user_guide_tip_1', { sns: activatedSocialNetworkUI.name })}>
<Container>
<ListItemButton onClick={openMenu}>
<ListItemIcon>
Expand Down
3 changes: 2 additions & 1 deletion packages/maskbook/src/components/shared/InjectedDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { DialogDismissIconUI } from '../InjectedComponents/DialogDismissIcon'
import { ErrorBoundary, useStylesExtends, mergeClasses } from '@masknet/shared'
import { activatedSocialNetworkUI } from '../../social-network'
import { MINDS_ID } from '../../social-network-adaptor/minds.com/base'
import { FACEBOOK_ID } from '../../social-network-adaptor/facebook.com/base'

interface StyleProps {
snsId: string
Expand All @@ -37,7 +38,7 @@ const useStyles = makeStyles<StyleProps>()((theme, { snsId }) => ({
color: theme.palette.text.primary,
},
paper: {
...(snsId === MINDS_ID ? { width: 'auto', backgroundImage: 'none' } : {}),
...(snsId === MINDS_ID || snsId === FACEBOOK_ID ? { width: 'auto', backgroundImage: 'none' } : {}),
},
}))

Expand Down
28 changes: 17 additions & 11 deletions packages/maskbook/src/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"add_nft_contract_search_hint": "Search NFT Contract Symbol Name or Address",
"add_asset": "Add Asset",
"additional_post_box__encrypted_post_pre": "Decrypt this post with #mask_io ! {{encrypted}}",
"additional_post_box__encrypted_post_pre_red_packet_twitter": "Claim this Lucky Drop with #mask_io @realMaskNetwork {{encrypted}}",
"additional_post_box__encrypted_post_pre_red_packet": "Claim this Lucky Drop with #mask_io {{encrypted}}",
"additional_post_box__encrypted_post_pre_red_packet_twitter_official_account": "Claim this Red Packet with #mask_io @{{account}} {{encrypted}}",
"additional_post_box__encrypted_post_pre_red_packet": "Claim this Red Packet with #mask_io {{encrypted}}",
"additional_post_box__steganography_post_pre": "This image is encrypted with #mask_io. 📪🔑 Install mask.io to decrypt it. {{random}}",
"auto_paste_failed_dialog_title": "Paste manually",
"auto_paste_failed_dialog_content": "Please copy the following text and image (if there is any) and publish it",
Expand All @@ -30,6 +30,8 @@
"backup_wallet": "Backup Wallet",
"backup_wallet_hint": "Keep the <strong>private key</strong> below <strong>carefully</strong> in a safe place. You will need them to restore this wallet.",
"cancel": "Cancel",
"twitter_account": "realMaskNetwork",
"facebook_account": "masknetwork",
"comment_box__placeholder": "Add an encrypted comment…",
"confirm": "Confirm",
"copy_text": "Copy text",
Expand Down Expand Up @@ -434,12 +436,13 @@
"plugin_red_packet_data_broken": "The Lucky Drop can’t be sent due to data damage. Please withdraw the assets after {{duration}}.",
"plugin_red_packet_refunding": "Refunding",
"plugin_red_packet_select_existing": "Past",
"plugin_red_packet_share_message": "I just claimed a Lucky Drop from @{{sender}} on {{network}} network. Follow @realMaskNetwork (mask.io) to claim Lucky Drops.\n#mask_io #RedPacket\n{{payload}}",
"plugin_red_packet_nft_share_foreshow_message": "@{{sender}} is sending an NFT Lucky Drop on {{network}} network. Follow @realMaskNetwork (mask.io) to claim NFT Lucky Drops.\n#mask_io #RedPacket\n{{payload}}",
"plugin_red_packet_nft_share_foreshow_message_not_twitter": "@{{sender}} is sending an NFT Lucky Drop on {{network}} network. \n{{payload}}",
"plugin_red_packet_nft_share_claimed_message": "I just claimed an NFT Lucky Drop from @{{sender}} on {{network}} network. Follow @realMaskNetwork (mask.io) to claim NFT Lucky Drops.\n#mask_io #RedPacket\n{{payload}}",
"plugin_red_packet_nft_share_claimed_message_not_twitter": "I just claimed an NFT Lucky Drop from @{{sender}} on {{network}} network. \n{{payload}}",
"plugin_red_packet_nft_tip": "This is an NFT Lucky Drop.",
"plugin_red_packet_share_message_official_account": "I just claimed a red packet from @{{sender}} on {{network}} network. Follow @{{account}} (mask.io) to claim red packets.\n#mask_io #RedPacket\n{{payload}}",
"plugin_red_packet_share_message_not_twitter": "I just claimed a red packet from @{{sender}} on {{network}} network. \n{{payload}}",
"plugin_red_packet_nft_share_foreshow_message": "@{{sender}} is sending an NFT red packet on {{network}} network. Follow @{{account}} (mask.io) to claim NFT red packets.\n#mask_io #RedPacket\n{{payload}}",
"plugin_red_packet_nft_share_foreshow_message_not_twitter": "@{{sender}} is sending an NFT red packet on {{network}} network. \n{{payload}}",
"plugin_red_packet_nft_share_claimed_message": "I just claimed an NFT red packet from @{{sender}} on {{network}} network. Follow @{{account}} (mask.io) to claim NFT red packets.\n#mask_io #RedPacket\n{{payload}}",
"plugin_red_packet_nft_share_claimed_message_not_twitter": "I just claimed an NFT red packet from @{{sender}} on {{network}} network. \n{{payload}}",
"plugin_red_packet_nft_tip": "This is an NFT red packet.",
"plugin_red_packet_attached_message": "Attached Message",
"plugin_red_packet_from": "From: @{{name}}",
"plugin_red_packet_description_claimed": "You got {{amount}} {{symbol}}",
Expand Down Expand Up @@ -648,8 +651,10 @@
"plugin_ito_swapped_status": "{{remain}} / {{total}} {{token}} Swapped",
"plugin_ito_congratulations": "Congratulations!",
"plugin_ito_out_of_stock_hit": "Better luck next time",
"plugin_ito_claim_success_share": "I just attended @{{user}}'s #ITO with @realMaskNetwork to swap ${{symbol}}. Install mask.io and start your own Initial Twitter Offering! \n {{link}}",
"plugin_ito_claim_foreshow_share": "{{symbol}}({{name}}) is launching a new #ITO. Come and join it! Follow @realMaskNetwork (mask.io) to find more events! \n {{link}}",
"plugin_ito_claim_success_share": "I just attended @{{user}}'s #ITO with @{{account}} to swap ${{symbol}}. Install mask.io and start your own Initial Twitter Offering! \n {{link}}",
"plugin_ito_claim_success_share_no_official_account": "I just attended @{{user}}'s #ITO to swap ${{symbol}}. Install mask.io and start your own Initial Twitter Offering! \n {{link}}",
"plugin_ito_claim_foreshow_share": "{{symbol}}({{name}}) is launching a new #ITO. Come and join it! Follow @{{account}} (mask.io) to find more events! \n {{link}}",
"plugin_ito_claim_foreshow_share_no_official_account": "{{symbol}}({{name}}) is launching a new #ITO. Come and join it! \n {{link}}",
"plugin_ito_password": "Password: {{password}}",
"plugin_ito_status_no_start": "Not started",
"plugin_ito_status_ongoing": "Ongoing",
Expand Down Expand Up @@ -793,7 +798,8 @@
"plugin_pooltogether_apr": "Earn {{apr}}% APR in {{token}}",
"plugin_pooltogether_view_pool": "View pool",
"plugin_pooltogether_prize": "{{period}} Prize",
"plugin_pooltogether_share": "I just deposit {{amount}} {{cashTag}}{{symbol}} into the {{pool}}, can I win the lottery this week?\nFollow @PoolTogether_ and @realMaskNetwork (mask.io) to deposit in PoolTogether's pools.\n#pooltogether #mask_io",
"plugin_pooltogether_share": "I just deposit {{amount}} {{cashTag}}{{symbol}} into the {{pool}}, can I win the lottery this week?\nFollow @PoolTogether_ and @{{account}} (mask.io) to deposit in PoolTogether's pools.\n#pooltogether #mask_io",
"plugin_pooltogether_share_no_official_account": "I just deposit {{amount}} {{cashTag}}{{symbol}} into the {{pool}}, can I win the lottery this week?",
"plugin_pooltogether_buy": "GET {{symbol}}",
"plugin_pooltogether_enter_an_amount": "Enter an amount",
"plugin_pooltogether_insufficient_balance": "Insufficient {{symbol}} balance",
Expand Down
4 changes: 2 additions & 2 deletions packages/maskbook/src/locales/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,8 @@
"plugin_ito_swapped_status": "{{remain}} / {{total}} {{token}} をスワップしました",
"plugin_ito_congratulations": "おめでとうございます!",
"plugin_ito_out_of_stock_hit": "次の幸運を祈っています",
"plugin_ito_claim_success_share": ".@realMaskNetwork を使って ${{symbol}} をスワップし、 @{{user}} の #ITO に参加しました。mask.io をインストールして Initial Twitter Offering を始めましょう! \n {{link}}",
"plugin_ito_claim_foreshow_share": "{{symbol}}({{name}}) は新しい #ITO をローンチしました。参加してみましょう! @realMaskNetwork (mask.io) をフォローしてさらにイベントを見つけましょう。\n {{link}}",
"plugin_ito_claim_success_share": ".@{{account}} を使って ${{symbol}} をスワップし、 @{{user}} の #ITO に参加しました。mask.io をインストールして Initial Twitter Offering を始めましょう! \n {{link}}",
"plugin_ito_claim_foreshow_share": "{{symbol}}({{name}}) は新しい #ITO をローンチしました。参加してみましょう! @{{account}} (mask.io) をフォローしてさらにイベントを見つけましょう。\n {{link}}",
"plugin_ito_password": "パスワード: {{password}}",
"plugin_ito_status_no_start": "まだ開催されていません",
"plugin_ito_status_ongoing": "開催中",
Expand Down
8 changes: 4 additions & 4 deletions packages/maskbook/src/locales/ko-KR.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"add_nft_contract_search_hint": "NFT 컨트렉트 이름이나 주소를 검색하기",
"add_asset": "자산 추가",
"additional_post_box__encrypted_post_pre": "#mask_io로 이 게시물을 해독하기. {{encrypted}}",
"additional_post_box__encrypted_post_pre_red_packet_twitter": "레드 패킷을 수령하고 #mask_io @realMaskNetwork {{encrypted}} 하세요.",
"additional_post_box__encrypted_post_pre_red_packet_twitter_official_account": "레드 패킷을 수령하고 #mask_io @{{account}} {{encrypted}} 하세요.",
"additional_post_box__encrypted_post_pre_red_packet": "#mask_io {{encrypted}} 덧붙이고 레드 패킷을 수령하세요.",
"additional_post_box__steganography_post_pre": "암호화된 이미지입니다. 📪🔑 mask.io 설치하고 해독하세요. {{random}}",
"auto_paste_failed_dialog_title": "수동으로 붙여넣기",
Expand Down Expand Up @@ -423,7 +423,7 @@
"plugin_red_packet_data_broken": "데이터 손상으로 인해 레드 패킷을 보낼 수 없습니다. {{duration}} 후 자산을 인출할 수 있습니다.",
"plugin_red_packet_refunding": "환급 중",
"plugin_red_packet_select_existing": "기존 빨간 백 선택",
"plugin_red_packet_share_message": "{{network}} 네트워크에서 @{{sender}}의 레트 패킷을 받았어요. @realMaskNetwork (mask.io) 팔로우하고 레드 패킷을 받으세요.\n#mask_io #RedPacket\n{{payload}}",
"plugin_red_packet_share_message_official_account": "{{network}} 네트워크에서 @{{sender}}의 레트 패킷을 받았어요. @{{account}} (mask.io) 팔로우하고 레드 패킷을 받으세요.\n#mask_io #RedPacket\n{{payload}}",
"plugin_red_packet_nft_share_foreshow_message": "@{{network}} 네트워크에서 @{{sender}} 레트 패킷을 보내고 있습니다. @realMaskNetwork (mask.io) 팔로우하고 NFT 레드 패킷을 받으세요.\n#mask_io #RedPacket\n{{payload}}",
"plugin_red_packet_nft_share_foreshow_message_not_twitter": "@{{network}} 네트워크에서 @{{sender}} NFT 레트 패킷을 보내고 있습니다. \n{{payload}}",
"plugin_red_packet_nft_share_claimed_message": "{{network}} 네트워크에서 @{{sender}}의 NFT 레트 패킷을 받았어요. @realMaskNetwork (mask.io) 팔로우하고 NFT 레드 패킷을 받으세요.\n#mask_io #RedPacket\n{{payload}}",
Expand Down Expand Up @@ -633,8 +633,8 @@
"plugin_ito_swapped_status": "{{remain}} / {{total}} {{token}} 스왑됨",
"plugin_ito_congratulations": "축하합니다!",
"plugin_ito_out_of_stock_hit": "다음에 운이 더 좋으시길 바랍니다",
"plugin_ito_claim_success_share": "제가 @realMaskNetwork 로 @{{user}}'s #ITO에 참여하여 ${{symbol}} 스왑을 했습니다. Mask.io를 설치하고 자기만의 ITO를 시작하세요! \n {{link}}",
"plugin_ito_claim_foreshow_share": "{{symbol}}({{name}}) 새로운 #ITO를 진행하고 있습니다. 어서 참가하세요! @realMaskNetwork (mask.io) 팔로우하여 더 많은 이벤트를 참여하세요! \n {{link}}",
"plugin_ito_claim_success_share": "제가 @{{account}} 로 @{{user}}'s #ITO에 참여하여 ${{symbol}} 스왑을 했습니다. Mask.io를 설치하고 자기만의 ITO를 시작하세요! \n {{link}}",
"plugin_ito_claim_foreshow_share": "{{symbol}}({{name}}) 새로운 #ITO를 진행하고 있습니다. 어서 참가하세요! @{{account}} (mask.io) 팔로우하여 더 많은 이벤트를 참여하세요! \n {{link}}",
"plugin_ito_password": "비밀번호: {{password}}",
"plugin_ito_status_no_start": "아직 시작하지 않음",
"plugin_ito_status_ongoing": "진행 중",
Expand Down
4 changes: 2 additions & 2 deletions packages/maskbook/src/locales/qya-AA.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"add_nft_contract_search_hint": "crwdns8123:0crwdne8123:0",
"add_asset": "crwdns3989:0crwdne3989:0",
"additional_post_box__encrypted_post_pre": "crwdns3991:0{{encrypted}}crwdne3991:0",
"additional_post_box__encrypted_post_pre_red_packet_twitter": "crwdns3993:0{{encrypted}}crwdne3993:0",
"additional_post_box__encrypted_post_pre_red_packet_twitter_official_account": "crwdns3993:0{{encrypted}}crwdne3993:0",
"additional_post_box__encrypted_post_pre_red_packet": "crwdns3995:0{{encrypted}}crwdne3995:0",
"additional_post_box__steganography_post_pre": "crwdns3997:0{{random}}crwdne3997:0",
"auto_paste_failed_dialog_title": "crwdns3999:0crwdne3999:0",
Expand Down Expand Up @@ -434,7 +434,7 @@
"plugin_red_packet_data_broken": "crwdns7999:0{{duration}}crwdne7999:0",
"plugin_red_packet_refunding": "crwdns4733:0crwdne4733:0",
"plugin_red_packet_select_existing": "crwdns4735:0crwdne4735:0",
"plugin_red_packet_share_message": "crwdns4737:0{{sender}}crwdnd4737:0{{network}}crwdnd4737:0{{payload}}crwdne4737:0",
"plugin_red_packet_share_message_official_account": "crwdns4737:0{{sender}}crwdnd4737:0{{network}}crwdnd4737:0{{payload}}crwdne4737:0",
"plugin_red_packet_nft_share_foreshow_message": "crwdns8151:0{{sender}}crwdnd8151:0{{network}}crwdnd8151:0{{payload}}crwdne8151:0",
"plugin_red_packet_nft_share_foreshow_message_not_twitter": "crwdns9011:0{{sender}}crwdnd9011:0{{network}}crwdnd9011:0{{payload}}crwdne9011:0",
"plugin_red_packet_nft_share_claimed_message": "crwdns8153:0{{sender}}crwdnd8153:0{{network}}crwdnd8153:0{{payload}}crwdne8153:0",
Expand Down
Loading