From 4e2aeddb69789a558c0989b15c757bb82de96482 Mon Sep 17 00:00:00 2001 From: Void Date: Fri, 6 Nov 2026 13:39:29 +0000 Subject: [PATCH 1/5] auth: training notice on login and registration; registration needs an acknowledgement One TrainingNotice component above the submit button on both screens. Login shows the notice only; registration adds a ticked checkbox that gates the Register button. Co-Authored-By: Claude Sonnet 5.5 --- src/app/pages/auth/TrainingNotice.tsx | 45 +++++++++++++++++++ .../pages/auth/login/PasswordLoginForm.tsx | 2 + .../auth/register/PasswordRegisterForm.tsx | 10 ++++- 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 src/app/pages/auth/TrainingNotice.tsx diff --git a/src/app/pages/auth/TrainingNotice.tsx b/src/app/pages/auth/TrainingNotice.tsx new file mode 100644 index 00000000..28847e4f --- /dev/null +++ b/src/app/pages/auth/TrainingNotice.tsx @@ -0,0 +1,45 @@ +import { Box, Checkbox, Text, color, config } from 'folds'; +import React from 'react'; + +export const TRAINING_NOTICE = + "Everything said on this server may be used to train GameCult's AI stewards. We never ingest Discord content."; + +type TrainingNoticeProps = { + // Registration passes this to require a ticked acknowledgement; login shows the notice only. + acknowledge?: { checked: boolean; onToggle: () => void }; +}; + +export function TrainingNotice({ acknowledge }: TrainingNoticeProps) { + return ( + + {TRAINING_NOTICE} + {acknowledge && ( + + + I understand and agree. + + )} + + ); +} diff --git a/src/app/pages/auth/login/PasswordLoginForm.tsx b/src/app/pages/auth/login/PasswordLoginForm.tsx index 3c8641d9..6ad6e1b0 100644 --- a/src/app/pages/auth/login/PasswordLoginForm.tsx +++ b/src/app/pages/auth/login/PasswordLoginForm.tsx @@ -35,6 +35,7 @@ import { } from './loginUtil'; import { PasswordInput } from '../../../components/password-input'; import { FieldError } from '../FiledError'; +import { TrainingNotice } from '../TrainingNotice'; import { getResetPasswordPath } from '../../pathUtils'; import { stopPropagation } from '../../../utils/keyboard'; @@ -255,6 +256,7 @@ export function PasswordLoginForm({ defaultUsername, defaultEmail }: PasswordLog +