-
Notifications
You must be signed in to change notification settings - Fork 12
Unlock hardcore mode page #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 13 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
79c3d02
update products.json to have new products for unlocking HARDCORE mode
6e05220
add payment handler
69f839b
swap impages
80b7d62
pr feedback
abde52a
fix
768946f
pr feedback
26b05ea
show unlock page
f54b486
revert to regular
17ed78b
Merge branch 'cytommi/unlock-hardcore' into cytommi/show-hardcore-if-β¦
873de32
checkpoint
8bba5ea
done
a3edf36
Merge remote-tracking branch 'origin/main' into cytommi/hardcore-lockβ¦
f363c88
revert default to regular
5cfb01e
pr feedback
774689d
PR feedback
b81beb2
Merge remote-tracking branch 'origin/main' into cytommi/hardcore-lockβ¦
4a19f40
default to no show
c83ca1e
revert to regular
5920001
package-lock
39bf786
tailwind feedback;
2e53ce9
reuse modal context
cdf2015
modal refactor
a6f3acc
Merge remote-tracking branch 'origin/main' into cytommi/hardcore-lockβ¦
fb8a076
don't show modal by default
8e3e024
Merge remote-tracking branch 'origin/main' into cytommi/hardcore-lockβ¦
6ed8b4d
Merge remote-tracking branch 'origin/main' into cytommi/hardcore-lockβ¦
848f66f
final PR feedback
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,79 @@ | ||
| import React from 'react'; | ||
| import { HardcoreLogo } from '@hotandcold/webview-common/components/logo'; | ||
| import { GoldIcon } from '@hotandcold/webview-common/components/icon'; | ||
|
|
||
| const primaryBorderColor = '#FFBF0B'; | ||
| const secondaryBorderColor = '#8BA2AD'; | ||
| const secondaryPillBgColor = '#2A3236'; | ||
|
cytommi marked this conversation as resolved.
Outdated
|
||
|
|
||
| // Inline PurchaseButton component | ||
| interface PurchaseButtonProps { | ||
| mainText: string; | ||
| style: 'primary' | 'secondary'; | ||
| badgeIcon: React.ReactNode; | ||
| badgeText: string; | ||
| onClick?: () => void; | ||
| } | ||
|
|
||
| const PurchaseButton: React.FC<PurchaseButtonProps> = (props) => { | ||
| const { mainText, badgeIcon, badgeText, onClick, style } = props; | ||
| const color = style === 'primary' ? primaryBorderColor : secondaryBorderColor; | ||
| const pillBg = style === 'secondary' ? secondaryPillBgColor : color; | ||
| const pillTextColor = style === 'secondary' ? 'white' : 'black'; | ||
|
cytommi marked this conversation as resolved.
Outdated
|
||
|
|
||
| return ( | ||
| <button | ||
| onClick={onClick} | ||
| className="flex w-full flex-auto flex-row items-center justify-between gap-4 whitespace-nowrap rounded-[64px] border-2 p-3 sm:w-auto" | ||
|
cytommi marked this conversation as resolved.
Outdated
|
||
| style={{ borderColor: color }} | ||
|
cytommi marked this conversation as resolved.
Outdated
|
||
| > | ||
| <span | ||
| className="text-left font-sans text-base font-semibold leading-5 tracking-tight" | ||
| style={{ color }} | ||
|
cytommi marked this conversation as resolved.
Outdated
|
||
| > | ||
| {mainText} | ||
| </span> | ||
| <span | ||
| className="flex h-8 w-fit flex-row items-center gap-1 rounded-full px-3 py-2 text-xs font-semibold" | ||
|
cytommi marked this conversation as resolved.
Outdated
|
||
| style={{ backgroundColor: pillBg, color: pillTextColor }} | ||
| > | ||
| <span className="h-4 w-4">{badgeIcon}</span> | ||
| <span className="text-center leading-4 tracking-[-0.1px]">{badgeText}</span> | ||
|
cytommi marked this conversation as resolved.
Outdated
|
||
| </span> | ||
| </button> | ||
| ); | ||
| }; | ||
|
|
||
| export const UnlockHardcorePage: React.FC = () => { | ||
| return ( | ||
| <div className="flex min-h-screen items-center justify-center bg-[#0E1113] p-4 text-center"> | ||
| <div className="flex w-full max-w-md flex-col items-center justify-center gap-4 rounded-lg bg-[#0E1113] p-6 shadow-lg sm:gap-6 sm:p-8 md:max-w-2xl md:p-10"> | ||
|
cytommi marked this conversation as resolved.
Outdated
|
||
| <HardcoreLogo /> | ||
| <p className="font-sans text-xl font-bold leading-tight tracking-normal text-white sm:text-2xl sm:leading-7"> | ||
| 100 guesses. No hints. No mercy. | ||
| </p> | ||
|
cytommi marked this conversation as resolved.
Outdated
|
||
| <p className="text-center font-sans text-sm font-normal leading-5 tracking-tight text-gray-300"> | ||
|
cytommi marked this conversation as resolved.
Outdated
|
||
| Unlocking Hardcore grants access to today and all previous hardcore puzzles. | ||
| </p> | ||
| <div className="h-px w-1/2 max-w-xs bg-white/20"></div> | ||
|
cytommi marked this conversation as resolved.
Outdated
|
||
| <div className="flex w-full flex-col items-center gap-4 py-2 sm:w-auto sm:flex-row sm:items-start"> | ||
|
cytommi marked this conversation as resolved.
Outdated
|
||
| <PurchaseButton | ||
| mainText="Unlock for 7 days" | ||
|
cytommi marked this conversation as resolved.
Outdated
|
||
| badgeIcon={<GoldIcon />} | ||
|
cytommi marked this conversation as resolved.
Outdated
|
||
| badgeText="Use 50" | ||
|
cytommi marked this conversation as resolved.
Outdated
|
||
| style="secondary" | ||
| /> | ||
| <PurchaseButton | ||
| mainText="Unlock FOREVER" | ||
| badgeIcon={<GoldIcon />} | ||
| badgeText="Use 250" | ||
| style="primary" | ||
| /> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| // Default export is often helpful for page components | ||
| export default UnlockHardcorePage; | ||
|
cytommi marked this conversation as resolved.
Outdated
|
||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sneaking in product images with correct sizes in this PR |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.