forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[wallet-ext] bullsharks interstitial (MystenLabs#12865)
## Description <img width="420" alt="image" src="https://github.com/MystenLabs/sui/assets/128089541/17c05c1b-eed6-4271-804a-22922f3784c5"> <img width="467" alt="image" src="https://github.com/MystenLabs/sui/assets/128089541/e968a63d-4670-4801-9b2f-56565fbb4484"> ## Test Plan Locally --- If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process. ### Type of Change (Check all that apply) - [ ] protocol change - [ ] user-visible impact - [ ] breaking change for a client SDKs - [ ] breaking change for FNs (FN binary must upgrade) - [ ] breaking change for validators or node operators (must upgrade binaries) - [ ] breaking change for on-chain data layout - [ ] necessitate either a data wipe or data migration ### Release notes
- Loading branch information
1 parent
deccd8f
commit a49e71b
Showing
8 changed files
with
117 additions
and
1 deletion.
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
67 changes: 67 additions & 0 deletions
67
apps/wallet/src/ui/app/pages/home/bullshark-quests-notification/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,67 @@ | ||
// Copyright (c) Mysten Labs, Inc. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { X32 } from '@mysten/icons'; | ||
|
||
import { Portal } from '../../../shared/Portal'; | ||
import ExternalLink from '_src/ui/app/components/external-link'; | ||
|
||
const InterstitialHeading = ({ text }: { text: string }) => { | ||
return <div className="[-webkit-text-stroke:2px_black] text-heading1">{text}</div>; | ||
}; | ||
|
||
const InterstitialBanner = ({ lines }: { lines: string[] }) => { | ||
return ( | ||
<div className="text-heading4 flex flex-col border-solid border-2 border-gray-90 text-black bg-white py-1 px-3 rounded-md"> | ||
{lines.map((line, key) => { | ||
return <div key={key}>{line}</div>; | ||
})} | ||
</div> | ||
); | ||
}; | ||
|
||
function BullsharkQuestsNotification({ onClose }: { onClose: () => void }) { | ||
const setInterstitialDismissed = () => { | ||
localStorage.setItem('bullshark-interstitial-dismissed', 'true'); | ||
}; | ||
|
||
return ( | ||
<Portal containerId="overlay-portal-container"> | ||
<div className="flex flex-col justify-center flex-nowrap items-center bg-[#99dbfb] border-solid border-4 border-black rounded-lg z-50 overflow-hidden absolute top-0 bottom-0 left-0 right-0 backdrop-blur-sm"> | ||
<div className="flex flex-col font-frankfurter w-full h-full items-center p-4 text-white text-center"> | ||
<div className="flex flex-col py-6 px-7 border-4 border-black border-solid w-full rounded-md h-full items-center"> | ||
<div className="flex flex-col items-center"> | ||
<InterstitialHeading text="Join Bullshark Quests!" /> | ||
<div className="bg-[url('https://quests.mystenlabs.com/_next/static/media/logo.81b4eb8f.svg')] h-40 w-40 bg-cover" /> | ||
<InterstitialHeading text="5 Million SUI prize pool!" /> | ||
<div className="flex flex-col items-center gap-2 mt-2"> | ||
<InterstitialBanner lines={['2.5M SUI', 'Top 10,000 players!']} /> | ||
<InterstitialBanner lines={['2.5M SUI', 'all eligible players!']} /> | ||
</div> | ||
</div> | ||
|
||
<div className="flex flex-col items-center gap-4 [-webkit-text-stroke:1px_black] w-full mt-5"> | ||
<ExternalLink | ||
href="https://tech.mystenlabs.com/introducing-bullsharks-quests/" | ||
className="appearance-none no-underline text-white bg-[#EA3389] rounded-lg py-2 w-60 [-webkit-text-stroke:1px_black]" | ||
> | ||
Read more on the blog | ||
</ExternalLink> | ||
<button | ||
className="appearance-none bg-transparent border-none cursor-pointer mt-1" | ||
onClick={() => { | ||
setInterstitialDismissed(); | ||
onClose(); | ||
}} | ||
> | ||
<X32 className="text-sui-dark h-8 w-8" /> | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</Portal> | ||
); | ||
} | ||
|
||
export default BullsharkQuestsNotification; |
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
Binary file not shown.
Binary file not shown.
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