Skip to content
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

Add support for new org-invite bot #136

Merged
merged 3 commits into from
Aug 7, 2024
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
7 changes: 7 additions & 0 deletions src/pages/join-org/fail.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ See the [guide on publishing packages](/docs/guides/typescript-packages) for mor
:::

Sorry, something went wrong. Please contact a developer by [opening an issue](https://github.com/roblox-ts/roblox-ts.com/issues).

### Error

import BrowserOnly from "@docusaurus/BrowserOnly";
import CodeBlock from "@theme/CodeBlock";

<BrowserOnly>{() => <CodeBlock>{new URLSearchParams(location.search).get("reason")}</CodeBlock>}</BrowserOnly>
45 changes: 22 additions & 23 deletions src/pages/join-org/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,33 @@ Enter your npm username below and you will be added to the "@rbxts" npm organiza

<>
{(() => {
globalThis.onSubmit = (token) =>
document.getElementById("org-form").submit();
globalThis.onSubmit = token => document.getElementById("org-form").submit();
})()}
</>

<form
id="org-form"
action="https://us-central1-roblox-ts.cloudfunctions.net/org-invite"
action="https://roblox-ts-org-invite-production.up.railway.app/invite-to-org"
method="post"
style={{
display: 'flex'
display: "flex",
}}
>
<input
type="text"
name="username"
placeholder="npm username"
style={{
borderRadius: '0.4rem',
borderRadius: "0.4rem",
borderWidth: 0,
height: '2rem',
padding: '1rem',
marginRight: '0.4rem',
verticalAlign: 'middle',
fontFamily: 'var(--ifm-font-family-base)',
width: 'calc(100% - 5.4rem)',
maxWidth: '15rem',
background: '#ebedf0'
height: "2rem",
padding: "1rem",
marginRight: "0.4rem",
verticalAlign: "middle",
fontFamily: "var(--ifm-font-family-base)",
width: "calc(100% - 5.4rem)",
maxWidth: "15rem",
background: "#ebedf0",
}}
required
/>
Expand All @@ -50,17 +49,17 @@ Enter your npm username below and you will be added to the "@rbxts" npm organiza
data-sitekey="6LeJpLIUAAAAANNNvHEWfIBZR08Tamp06xD4yIBy"
data-callback="onSubmit"
style={{
borderRadius: '0.4rem',
border: '1px solid white',
boxSizing: 'border-box',
height: '2rem',
padding: '1rem',
verticalAlign: 'middle',
borderRadius: "0.4rem",
border: "1px solid white",
boxSizing: "border-box",
height: "2rem",
padding: "1rem",
verticalAlign: "middle",
lineHeight: 0,
fontFamily: 'var(--ifm-font-family-base)',
background: 'transparent',
color: 'white',
width: '5rem'
fontFamily: "var(--ifm-font-family-base)",
background: "transparent",
color: "white",
width: "5rem",
}}
>
Submit
Expand Down
52 changes: 52 additions & 0 deletions src/pages/join-org/invite-sent.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
title: Invite Sent
---

# Invite Sent

Please check your email for an invite to the organization. If you don't see it, check your spam folder.

Once you have accepted the invite, click the button below to continue.

<script src="https://www.google.com/recaptcha/api.js" async defer></script>

<>
{(() => {
globalThis.onSubmit = token => document.getElementById("org-form").submit();
})()}
</>

import BrowserOnly from "@docusaurus/BrowserOnly";

<form
id="org-form"
action="https://roblox-ts-org-invite-production.up.railway.app/add-to-team"
method="post"
style={{
display: "flex",
}}
>
<BrowserOnly>
{() => <input type="hidden" name="username" value={new URLSearchParams(location.search).get("username")} />}
</BrowserOnly>
<button
className="g-recaptcha"
data-sitekey="6LeJpLIUAAAAANNNvHEWfIBZR08Tamp06xD4yIBy"
data-callback="onSubmit"
style={{
borderRadius: "0.4rem",
border: "1px solid white",
boxSizing: "border-box",
height: "2rem",
padding: "1rem",
verticalAlign: "middle",
lineHeight: 0,
fontFamily: "var(--ifm-font-family-base)",
background: "transparent",
color: "white",
width: "5rem",
}}
>
Done
</button>
</form>
Loading