Skip to content

Commit

Permalink
update activation page layout
Browse files Browse the repository at this point in the history
  • Loading branch information
softmarshmallow committed Feb 28, 2023
1 parent ae41350 commit 23beac2
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const Description = styled.span`
font-weight: 500;
line-height: 96%;
text-align: center;
width: 279px;
max-width: 260px;
`;

const ActionAsButton = styled.button`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export function RegisterWithCodeCard() {
verify(code).then((verified) => {
if (verified) {
PluginSdk.setItem(__key, code);
setVerified(true);
alert("Congrats🎉 Early access program activated.");
} else {
alert("Hmm🤔 That's not a valid access key");
Expand All @@ -44,27 +45,35 @@ export function RegisterWithCodeCard() {
return (
<>
<RootWrapperEnterAccessKeyCard>
<Heading>Enter your Access Key</Heading>
<Paragraph>
Please enter your early bird access key. It can be found at
</Paragraph>
<Field
onSubmit={(e) => {
e.preventDefault();
const totp = e.target["topt"].value;
activate(totp);
}}
>
<KeyAsInput
id="topt"
type="text"
// the length is 39 (prefix 6) value 32
maxLength={50}
minLength={24}
placeholder="xxxxxx-xxxxxxxxxxxxx"
/>
<EnterAsButton>Enter</EnterAsButton>
</Field>
{verified ? (
<>
<Heading>Activated</Heading>
</>
) : (
<>
<Heading>Enter your Access Key</Heading>
<Paragraph>
Please enter your early bird access key. It can be found at
</Paragraph>
<Field
onSubmit={(e) => {
e.preventDefault();
const totp = e.target["topt"].value;
activate(totp);
}}
>
<KeyAsInput
id="topt"
type="text"
// the length is 39 (prefix 6) value 32
maxLength={50}
minLength={24}
placeholder="xxxxxx-xxxxxxxxxxxxx"
/>
<EnterAsButton>Enter</EnterAsButton>
</Field>
</>
)}
</RootWrapperEnterAccessKeyCard>
</>
);
Expand Down Expand Up @@ -102,7 +111,7 @@ const Paragraph = styled.span`
line-height: 96%;
text-align: center;
color: rgba(0, 0, 0, 0.5);
width: 279px;
max-width: 260px;
`;

const Field = styled.form`
Expand All @@ -116,6 +125,7 @@ const Field = styled.form`
`;

const KeyAsInput = styled.input`
width: 100%;
background-color: rgba(0, 0, 0, 0.02);
border: solid 1px rgba(0, 0, 0, 0.04);
border-radius: 4px;
Expand Down

1 comment on commit 23beac2

@vercel
Copy link

@vercel vercel bot commented on 23beac2 Feb 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.