diff --git a/.github/workflows/client.yml b/.github/workflows/client.yml index 53fc8bb7b..f3e4981d2 100644 --- a/.github/workflows/client.yml +++ b/.github/workflows/client.yml @@ -46,6 +46,7 @@ jobs: VITE_SERVER_URL: "https://boku.tachi.ac" VITE_DISCORD: "https://discord.gg/E4n8ZZF5ES" VITE_CDN_URL: "https://cdn-boku.tachi.ac" + VITE_SKIP_RULES: true TACHI_NAME: "Bokutachi" BUILD_OUT_DIR: /tmp/boku @@ -62,6 +63,7 @@ jobs: VITE_CDN_URL: "https://cdn-kamai.tachi.ac" VITE_GIT_REPO: "GitHub:zkldi/Tachi" VITE_HCAPTCHA_SITEKEY: "33267860-177c-487a-a4e6-e1b23f804810" + VITE_SKIP_RULES: true TACHI_NAME: "Kamaitachi" BUILD_OUT_DIR: /tmp/kamai @@ -77,6 +79,7 @@ jobs: VITE_MIN_CLIENT_ID: "A0DBDBB063CD800530EF01C6488B282137E0191E" VITE_GIT_REPO: "GitHub:zkldi/Tachi" VITE_HCAPTCHA_SITEKEY: "f502cf14-6c48-4f5c-8692-c670a0d00314" + VITE_SKIP_RULES: true TACHI_NAME: "Tachi Dev" BUILD_OUT_DIR: /tmp/dev diff --git a/typescript/client/src/app/pages/RegisterPage.tsx b/typescript/client/src/app/pages/RegisterPage.tsx index bfff6f983..0e87fc717 100644 --- a/typescript/client/src/app/pages/RegisterPage.tsx +++ b/typescript/client/src/app/pages/RegisterPage.tsx @@ -18,6 +18,9 @@ import { type UserDocument } from "tachi-common"; // seconds it takes for a user to actually read the rules. const RULES_READ_TIME = Number(import.meta.env.VITE_RULES_READ_TIME) || 30; +// When set, skip the rules gate entirely and go straight to the signup form. +const SKIP_RULES = import.meta.env.VITE_SKIP_RULES === "true"; + export default function RegisterPage() { useSetSubheader("Register"); @@ -26,7 +29,7 @@ export default function RegisterPage() { // opened: user has clicked the rules link // read: at least 30 seconds have expired. const [readRules, setReadRules] = useState<"acknowledged" | "not-opened" | "opened" | "read">( - "not-opened", + SKIP_RULES ? "acknowledged" : "not-opened", ); const [disabled, setDisabled] = useState(true); const [btnText, setBtnText] = useState("I've read the rules. (Click the rules.)");