-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Release] Hotfix 6.7.1 => 6.7.2 (patch) (#3891)
* chore: bump version to 6.7.2 * fix: search x handle (#3909) * fix: text view detail font bold and fix add token and keep it as it is when it already exists (#3911) * fix: setup locale for channel detail page (#3914) * feat: avoid invalid twitter login request (#3921) * chore: code maintenance [bot] * feat: update top collector text and connected wallet text (#3942) * chore: update copy year (#3956) * chore: replace mirror to repost (#3962) * chore: replace mirror to repost * chore: code maintenance [bot] * chore: cspell * chore: code maintenance [bot] --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * feat: query collectable by firefly (#3961) * feat: query article collectable by firefly * chore: code maintenance [bot] --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * feat: buttrfly event (#3970) * refactor: event premium list * feat: butterfly event * chore: spelling check word ignore * feat: event share content on post * feat: event buttrfly * feat: event buttrfly * feat: buttrfly footer text * feat: buttrfly footer text * chore: code maintenance [bot] * fix: buffrfly event android padding bottom * chore: replace mirror text (#3975) * chore: replace mirror text * chore: code maintenance [bot] --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix: event buttrfly share url * feat: event verify icon (#3985) * fix: buttrfly share post text * chore: code maintenance [bot] --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: dudu0506 <[email protected]> Co-authored-by: LeifXu <[email protected]> Co-authored-by: nuanyang233 <[email protected]> Co-authored-by: guanbinrui <[email protected]> Co-authored-by: LeifXu <[email protected]>
- Loading branch information
1 parent
ca824d8
commit a314b49
Showing
52 changed files
with
1,076 additions
and
923 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "mask.social", | ||
"type": "module", | ||
"version": "6.7.1", | ||
"version": "6.7.2", | ||
"private": true, | ||
"packageManager": "[email protected]", | ||
"scripts": { | ||
|
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
'use client'; | ||
|
||
import { createContext, type PropsWithChildren, type ReactNode, useMemo } from 'react'; | ||
|
||
interface ActivityPremiumListItem { | ||
label: ReactNode; | ||
verified?: boolean; | ||
} | ||
|
||
interface ActivityPremiumListContext { | ||
list: ActivityPremiumListItem[]; | ||
} | ||
|
||
export const ActivityPremiumListContext = createContext<ActivityPremiumListContext>({ | ||
list: [], | ||
}); | ||
|
||
export function ActivityPremiumListProvider({ | ||
children, | ||
list, | ||
}: PropsWithChildren<Pick<ActivityPremiumListContext, 'list'>>) { | ||
const value = useMemo(() => { | ||
return { | ||
list, | ||
}; | ||
}, [list]); | ||
return <ActivityPremiumListContext.Provider value={value}>{children}</ActivityPremiumListContext.Provider>; | ||
} |
127 changes: 127 additions & 0 deletions
127
src/components/Activity/ActivityTasks/ActivityButtrflyTasks.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,127 @@ | ||
'use client'; | ||
|
||
import { t } from '@lingui/core/macro'; | ||
import { Trans } from '@lingui/react/macro'; | ||
import { ChainId } from '@masknet/web3-shared-evm'; | ||
import { useContext, useMemo } from 'react'; | ||
|
||
import { ActivityClaimButton } from '@/components/Activity/ActivityClaimButton.js'; | ||
import { ActivityConnectCard } from '@/components/Activity/ActivityConnectCard.js'; | ||
import { ActivityContext } from '@/components/Activity/ActivityContext.js'; | ||
import { ActivityLoginButton } from '@/components/Activity/ActivityLoginButton.js'; | ||
import { ActivityPremiumConditionList } from '@/components/Activity/ActivityPremiumConditionList.js'; | ||
import { ActivityPremiumListProvider } from '@/components/Activity/ActivityPremiumListContext.js'; | ||
import { ActivityVerifyText } from '@/components/Activity/ActivityVerifyText.js'; | ||
import { useActivityClaimCondition } from '@/components/Activity/hooks/useActivityClaimCondition.js'; | ||
import { useActivityShareUrl } from '@/components/Activity/hooks/useActivityShareUrl.js'; | ||
import { Link } from '@/components/Activity/Link.js'; | ||
import { IS_ANDROID } from '@/constants/bowser.js'; | ||
import { Source } from '@/constants/enum.js'; | ||
import { FIREFLY_TELEGRAM_URL } from '@/constants/index.js'; | ||
import { FIREFLY_MENTION } from '@/constants/mentions.js'; | ||
import type { Chars } from '@/helpers/chars.js'; | ||
import { classNames } from '@/helpers/classNames.js'; | ||
import { replaceObjectInStringArray } from '@/helpers/replaceObjectInStringArray.js'; | ||
import { fireflyBridgeProvider } from '@/providers/firefly/Bridge.js'; | ||
import type { ActivityInfoResponse } from '@/providers/types/Firefly.js'; | ||
|
||
export function ActivityButtrflyTasks({ | ||
data, | ||
}: { | ||
data: Pick<Required<ActivityInfoResponse>['data'], 'status' | 'name'>; | ||
}) { | ||
const { address } = useContext(ActivityContext); | ||
const { data: claimCondition } = useActivityClaimCondition(Source.Lens); | ||
const list = [ | ||
{ | ||
label: <Trans>Top 500 Buttrfly Points Leaderboard</Trans>, | ||
verified: claimCondition?.lens?.isTopUser, | ||
}, | ||
]; | ||
const shareUrl = useActivityShareUrl(data.name); | ||
const shareContent = useMemo(() => { | ||
const fireflyMention = 'FIREFLY_MENTION'; | ||
return replaceObjectInStringArray( | ||
t`Just earned $MASK by minting the Buttrfly Fren 🦋 collectible from ${fireflyMention} | ||
Claim here ${shareUrl}`, | ||
{ | ||
[fireflyMention]: FIREFLY_MENTION, | ||
}, | ||
); | ||
}, [shareUrl]); | ||
const isPremium = list.some((x) => x.verified); | ||
|
||
return ( | ||
<ActivityPremiumListProvider list={list}> | ||
<div className="mb-4 w-full space-y-4 px-6 py-4"> | ||
<div className="flex w-full flex-col space-y-2"> | ||
<div className="flex h-8 items-center justify-between"> | ||
<h2 className="text-base font-semibold leading-6"> | ||
<Trans>Check Eligibility</Trans> | ||
</h2> | ||
<ActivityLoginButton source={Source.Lens} /> | ||
</div> | ||
</div> | ||
<div | ||
className={classNames( | ||
'w-full rounded-2xl p-3 text-sm font-normal leading-6', | ||
claimCondition?.lens?.isActiveUser ? 'bg-success/10 dark:bg-success/20' : 'bg-bg', | ||
)} | ||
> | ||
<ActivityVerifyText verified={claimCondition?.lens?.isActiveUser} hasFailedIcon> | ||
<h3> | ||
<Trans>Posted to Lens on Buttrfly since August 1, 2024</Trans> | ||
</h3> | ||
</ActivityVerifyText> | ||
</div> | ||
<h2 className="text-base font-semibold leading-6"> | ||
<Trans>Connect Wallet</Trans> | ||
</h2> | ||
<ActivityConnectCard | ||
chainId={ChainId.Polygon} | ||
source={Source.Lens} | ||
label={ | ||
address ? ( | ||
<Trans>Wallet submitted</Trans> | ||
) : ( | ||
<Trans>Submit a wallet to receive a collectible and $MASK airdrop</Trans> | ||
) | ||
} | ||
/> | ||
<div className="mb-4 flex w-full flex-col space-y-2 text-sm font-semibold leading-6"> | ||
<h2 className="text-base font-semibold leading-6"> | ||
<Trans>Eligible for Premium?</Trans> | ||
</h2> | ||
<ActivityPremiumConditionList | ||
title={<Trans>Unlock a premium collectible and a larger $MASK airdrop </Trans>} | ||
/> | ||
</div> | ||
<p className="w-full text-center text-[10px]"> | ||
<Trans> | ||
For any inquiries, please{' '} | ||
<Link href={FIREFLY_TELEGRAM_URL} target="_blank" className="inline text-highlight"> | ||
contact us | ||
</Link> | ||
. All rights reserved by Firefly. | ||
</Trans> | ||
</p> | ||
</div> | ||
<div | ||
className={classNames( | ||
'sticky bottom-0 mt-auto w-full bg-primaryBottom px-4', | ||
fireflyBridgeProvider.supported && IS_ANDROID | ||
? 'pb-safe-or-8' | ||
: 'pt-1.5 pb-safe-or-4 max-md:pb-safe-or-2', | ||
)} | ||
> | ||
<ActivityClaimButton | ||
status={data.status} | ||
shareContent={shareContent as Chars} | ||
source={Source.Lens} | ||
claimType={isPremium ? 'premium' : 'base'} | ||
/> | ||
</div> | ||
</ActivityPremiumListProvider> | ||
); | ||
} |
Oops, something went wrong.