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 +