moderator-toolbox-nxg-for-reddit / modules/massmoderation/components/ModtoolsToolbar

modules/massmoderation/components/ModtoolsToolbar

Functions

ModtoolsToolbar()

ModtoolsToolbar(__namedParameters): Element

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:108

Parameters

__namedParameters

ModtoolsToolbarProps

Returns

Element

Interfaces

ModtoolsToolbarControls

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:26

Imperative controls exposed to the parent after the toolbar mounts.

Properties

setHiddenCount

setHiddenCount: (n) => void

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:42

Updates the hidden item count; “unhide all” is shown only when this is > 0.

Parameters
n

number

Number of currently hidden items.

Returns

void

setSelectAll

setSelectAll: (checked, indeterminate) => void

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:32

Programmatically updates the select-all checkbox state.

Parameters
checked

boolean

Whether all visible items are selected.

indeterminate

boolean

Whether some (but not all) visible items are selected.

Returns

void

setSelectedCount

setSelectedCount: (n) => void

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:37

Updates the live count of currently selected items shown in the actions group.

Parameters
n

number

Number of items currently checked.

Returns

void

triggerAutoRefresh

triggerAutoRefresh: () => void

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:47

Resets the auto-refresh backoff and polls immediately. Call when an out-of-toolbar action (e.g. a per-item pretty-button) is taken, so the queue reconciles right away.

Returns

void


ModtoolsToolbarProps

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:51

Props for the ModtoolsToolbar component.

Properties

initialAutoRefresh

initialAutoRefresh: boolean

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:62

initialExpandosOpen

initialExpandosOpen: boolean

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:59

initialExpandReports

initialExpandReports: boolean

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:58

initialGroupBySubreddit

initialGroupBySubreddit: boolean

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:61

initialReportsThreshold

initialReportsThreshold: number

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:56

initialScoreThreshold

initialScoreThreshold: number

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:57

initialSortAscending

initialSortAscending: boolean

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:55

initialSortLocked

initialSortLocked: boolean

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:60

initialSortOrder

initialSortOrder: string

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:54

onActionButton

onActionButton: (type) => Promise<number>

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:79

Called when one of the spam/remove/approve/ignore bulk action buttons is clicked. Resolves with the number of items that were actioned.

Parameters
type

"negative" | "neutral" | "positive" | "ignore"

Returns

Promise<number>

onAutoRefreshChange

onAutoRefreshChange: (enabled) => void

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:97

Called when auto-refresh is toggled; parent should persist the new value.

Parameters
enabled

boolean

Returns

void

onAutoRefreshTick

onAutoRefreshTick: () => Promise<boolean>

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:103

Called each time the auto-refresh timer fires; parent should check for new queue items and reconcile the mod log. Resolves to true when something new was found (a new item or a new mod-log action), which resets the backoff to its minimum interval.

Returns

Promise<boolean>

onContentTypeFilter

onContentTypeFilter: (type) => void

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:105

Called when the content-type filter cycles (all / posts / comments).

Parameters
type

"all" | "posts" | "comments"

Returns

void

onGroupBySubreddit

onGroupBySubreddit: (enabled) => void

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:95

Called when the group-by-subreddit toggle changes.

Parameters
enabled

boolean

Returns

void

onHideSelected

onHideSelected: () => void

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:70

Called to hide all currently-selected items from the view.

Returns

void

onInvert

onInvert: () => void

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:66

Called when the user clicks the “invert” button to flip all checkbox states.

Returns

void

onMount

onMount: (controls) => void

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:64

Called once on mount with the imperative controls object.

Parameters
controls

ModtoolsToolbarControls

Returns

void

onOpenExpandos

onOpenExpandos: (open) => void

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:93

Called when the user toggles all expando boxes open or closed.

Parameters
open

boolean

Returns

void

onScoreThresholdChange

onScoreThresholdChange: (threshold) => void

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:83

Called when the score-threshold input changes.

Parameters
threshold

number

Returns

void

onSelectAll

onSelectAll: (checked) => void

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:68

Called when the select-all checkbox changes.

Parameters
checked

boolean

Returns

void

onSortChoice

onSortChoice: (order, toggleAsc) => void

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:89

Called when the user picks a sort order from the dropdown.

Parameters
order

string

The chosen sort field.

toggleAsc

boolean

true when the same field was selected again (toggles direction).

Returns

void

onSortLockChange

onSortLockChange: (locked) => void

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:91

Called when the sort-lock toggle changes.

Parameters
locked

boolean

Returns

void

onThresholdChange

onThresholdChange: (threshold) => void

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:81

Called when the reports-threshold input changes.

Parameters
threshold

number

Returns

void

onToggleReports

onToggleReports: (expanded) => void

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:74

Called when the expand/collapse reports toggle changes.

Parameters
expanded

boolean

Returns

void

onUnhideSelected

onUnhideSelected: () => void

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:72

Called to unhide all previously-hidden items.

Returns

void

viewingspam

viewingspam: boolean

Defined in: extension/data/modules/massmoderation/components/ModtoolsToolbar.tsx:53

Whether the current page is a spam/trials queue (hides the reports sort and threshold).