Skip to content

Commit

Permalink
Add support for new org-invite bot (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
osyrisrblx authored Aug 7, 2024
1 parent 9c19e7f commit 86504dd
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 23 deletions.
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>

0 comments on commit 86504dd

Please sign in to comment.