moderator-toolbox-nxg-for-reddit / modules/removalreasons/components/RemovalReasonsOverlay

modules/removalreasons/components/RemovalReasonsOverlay

Functions

RemovalReasonsOverlay()

RemovalReasonsOverlay(__namedParameters): Element

Defined in: extension/data/modules/removalreasons/components/RemovalReasonsOverlay.tsx:186

Renders the removal-reasons overlay for a single post or comment removal.

Parameters

__namedParameters

RemovalReasonsOverlayProps

Returns

Element


showRemovalReasonsOverlay()

showRemovalReasonsOverlay(props): () => void

Defined in: extension/data/modules/removalreasons/components/RemovalReasonsOverlay.tsx:1342

Mounts the RemovalReasonsOverlay as a popup and returns a cleanup function.

Parameters

props

Omit<RemovalReasonsOverlayProps, "onClose"> & object

Overlay props; onClose is optional and supplemented by unmount logic.

Returns

() => void

Interfaces

RemovalAcceptGate

Defined in: extension/data/modules/removalreasons/components/RemovalReasonsOverlay.tsx:74

The claim/release gate for Edit & Accept. Bundling both halves in one object means a caller cannot supply a claim without its matching release. When an overlay receives an acceptGate it performs the removal directly (never re-capturing it) and brackets the perform with claim/release; its absence means a normal removal.

Properties

claim

claim: () => Promise<{ ok: true; } | { message: string; ok: false; }>

Defined in: extension/data/modules/removalreasons/components/RemovalReasonsOverlay.tsx:80

Atomic gate run immediately before the removal is performed, so two reviewers accepting the same proposal can’t both perform it. Returns {ok: false, message} to abort the perform (the message is shown as the overlay status).

Returns

Promise<{ ok: true; } | { message: string; ok: false; }>

release

release: () => void

Defined in: extension/data/modules/removalreasons/components/RemovalReasonsOverlay.tsx:85

Called when the removal fails (returned error OR thrown) after claim succeeded, so the caller can release the claim and allow a retry.

Returns

void


RemovalReasonsOverlayPreseed

Defined in: extension/data/modules/removalreasons/components/RemovalReasonsOverlay.tsx:96

Pre-fill for re-opening the overlay to accept-with-edit a captured proposal. Mirrors the structured fields of a FrozenRemovalIntent (minus the composed text/subject) so the reviewer sees exactly what the trainee selected and can adjust any of it. When present, the overlay seeds its state from this instead of the configured defaults. Seeding the form is independent of perform mode: the direct-perform behavior is driven by RemovalReasonsOverlayProps.acceptGate, not by this pre-seed.

Properties

actionLockComment?

optional actionLockComment?: boolean

Defined in: extension/data/modules/removalreasons/components/RemovalReasonsOverlay.tsx:109

actionLockThread?

optional actionLockThread?: boolean

Defined in: extension/data/modules/removalreasons/components/RemovalReasonsOverlay.tsx:108

ban?

optional ban?: object

Defined in: extension/data/modules/removalreasons/components/RemovalReasonsOverlay.tsx:115

Ban to issue (presence ⇒ issue a ban).

days

days: number

note

note: string

permanent

permanent: boolean

includeFooter?

optional includeFooter?: boolean

Defined in: extension/data/modules/removalreasons/components/RemovalReasonsOverlay.tsx:101

includeHeader?

optional includeHeader?: boolean

Defined in: extension/data/modules/removalreasons/components/RemovalReasonsOverlay.tsx:100

Whether the configured header/footer were included.

logReasonText?

optional logReasonText?: string

Defined in: extension/data/modules/removalreasons/components/RemovalReasonsOverlay.tsx:111

Public log reason text.

reasonAsSub?

optional reasonAsSub?: boolean

Defined in: extension/data/modules/removalreasons/components/RemovalReasonsOverlay.tsx:105

reasonAutoArchive?

optional reasonAutoArchive?: boolean

Defined in: extension/data/modules/removalreasons/components/RemovalReasonsOverlay.tsx:106

reasonCommentAsSubreddit?

optional reasonCommentAsSubreddit?: boolean

Defined in: extension/data/modules/removalreasons/components/RemovalReasonsOverlay.tsx:107

reasons

Defined in: extension/data/modules/removalreasons/components/RemovalReasonsOverlay.tsx:98

Selected reasons (persistent id + resolved body) in display order.

reasonSticky?

optional reasonSticky?: boolean

Defined in: extension/data/modules/removalreasons/components/RemovalReasonsOverlay.tsx:104

reasonType

reasonType: FrozenReasonType

Defined in: extension/data/modules/removalreasons/components/RemovalReasonsOverlay.tsx:103

Delivery mode.

usernote?

optional usernote?: object

Defined in: extension/data/modules/removalreasons/components/RemovalReasonsOverlay.tsx:113

Usernote to leave (presence ⇒ leave a note).

includeMessage?

optional includeMessage?: boolean

text

text: string

type?

optional type?: string

References

RemovalReasonsDisplayMode

Re-exports RemovalReasonsDisplayMode