diff --git a/components/common/forms/index.tsx b/components/common/forms/index.tsx index 2e0df041..5246e0af 100644 --- a/components/common/forms/index.tsx +++ b/components/common/forms/index.tsx @@ -1,5 +1,6 @@ import { ComponentProps, forwardRef } from 'react' import { CopyButton } from '../CopyButton' +import { classNames } from '@/lib/util' export const Input = forwardRef>( function Input(props: ComponentProps<'input'>, ref) { @@ -138,33 +139,33 @@ export function FormLabel( ) } -export const Checkbox = forwardRef< - HTMLInputElement, - LabelProps & ComponentProps<'input'> ->(function CheckboxElement( - { - label, - required, - className, - ...rest - }: LabelProps & ComponentProps<'input'> & { className?: string }, - ref, -) { - return ( -
- - -
- ) -}) +type CheckboxProps = LabelProps & + ComponentProps<'input'> & { className?: string; inputClassName?: string } + +export const Checkbox = forwardRef( + function CheckboxElement( + { label, required, className, inputClassName, ...rest }: CheckboxProps, + ref, + ) { + return ( +
+ + +
+ ) + }, +) diff --git a/components/workspace/Panel.tsx b/components/workspace/Panel.tsx index 44e03764..62d7e606 100644 --- a/components/workspace/Panel.tsx +++ b/components/workspace/Panel.tsx @@ -113,6 +113,13 @@ export function WorkspacePanel(props: PropsOf) { coreEvent.reportType = ComAtprotoModerationDefs.REASONAPPEAL } + if ( + coreEvent.$type === MOD_EVENTS.TAKEDOWN && + formData.get('acknowledgeAccountSubjects') + ) { + coreEvent.acknowledgeAccountSubjects = true + } + // No need to break if one of the requests fail, continue on with others const results = await actionSubjects( { event: coreEvent }, diff --git a/components/workspace/PanelActionForm.tsx b/components/workspace/PanelActionForm.tsx index a686bcb5..5f7c6160 100644 --- a/components/workspace/PanelActionForm.tsx +++ b/components/workspace/PanelActionForm.tsx @@ -16,12 +16,14 @@ export const WorkspacePanelActionForm = ({ setModEventType: (action: string) => void onCancel: () => void }) => { + const isTakedownEvent = modEventType === MOD_EVENTS.TAKEDOWN const isCommentEvent = modEventType === MOD_EVENTS.COMMENT const isMuteEvent = modEventType === MOD_EVENTS.MUTE const isTagEvent = modEventType === MOD_EVENTS.TAG const isLabelEvent = modEventType === MOD_EVENTS.LABEL const shouldShowDurationInHoursField = modEventType === MOD_EVENTS.TAKEDOWN || isMuteEvent + return (
@@ -99,6 +101,22 @@ export const WorkspacePanelActionForm = ({ label="Update the subject's persistent note with this comment" /> )} + {isTakedownEvent && ( + + Acknowledge all open/escalated/appealed reports on subjects + created by accounts that you are taking down. + + } + /> + )} +
Submit Action