diff --git a/src/app/features/room/RoomTrainingLine.tsx b/src/app/features/room/RoomTrainingLine.tsx new file mode 100644 index 00000000..21877c3a --- /dev/null +++ b/src/app/features/room/RoomTrainingLine.tsx @@ -0,0 +1,15 @@ +import { Text, color, config } from 'folds'; +import React from 'react'; +import { TRAINING_NOTICE_TEXT } from '../../utils/trainingNotice'; + +// One line per room, pinned above the composer. +export function RoomTrainingLine() { + return ( + + {TRAINING_NOTICE_TEXT} + + ); +} diff --git a/src/app/features/room/RoomView.tsx b/src/app/features/room/RoomView.tsx index a4f0d7af..6e2a315a 100644 --- a/src/app/features/room/RoomView.tsx +++ b/src/app/features/room/RoomView.tsx @@ -13,6 +13,7 @@ import { RoomTimeline } from './RoomTimeline'; import { RoomViewTyping } from './RoomViewTyping'; import { RoomTombstone } from './RoomTombstone'; import { RoomInput } from './RoomInput'; +import { RoomTrainingLine } from './RoomTrainingLine'; import { RoomViewFollowing, RoomViewFollowingPlaceholder } from './RoomViewFollowing'; import { Page } from '../../components/page'; import { useKeyDown } from '../../hooks/useKeyDown'; @@ -104,6 +105,7 @@ export function RoomView({ eventId }: { eventId?: string }) {
+ {tombstoneEvent ? ( void }; + checked: boolean; + onToggle: () => void; }; -export function TrainingNotice({ acknowledge }: TrainingNoticeProps) { +// Registration only: ticking it is the newcomer's acceptance of the current notice version. +export function TrainingNotice({ checked, onToggle }: TrainingNoticeProps) { return ( - {TRAINING_NOTICE} - {acknowledge && ( - - - I understand and agree. - - )} + + + {TRAINING_NOTICE_TEXT} + ); } diff --git a/src/app/pages/auth/login/PasswordLoginForm.tsx b/src/app/pages/auth/login/PasswordLoginForm.tsx index 6ad6e1b0..3c8641d9 100644 --- a/src/app/pages/auth/login/PasswordLoginForm.tsx +++ b/src/app/pages/auth/login/PasswordLoginForm.tsx @@ -35,7 +35,6 @@ 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'; @@ -256,7 +255,6 @@ export function PasswordLoginForm({ defaultUsername, defaultEmail }: PasswordLog -