moderator-toolbox-nxg-for-reddit / modules/proposals/components/proposalView
modules/proposals/components/proposalView¶
Functions¶
actionTypeLabel()¶
actionTypeLabel(
type):string
Defined in: extension/data/modules/proposals/components/proposalView.ts:59
A short label for an action type alone (no captured fields), for filter dropdowns
where only the discriminant is known. Unlike describeAction, never references
fields like days/spam, so it is safe to call with just a type.
Parameters¶
type¶
"approve" | "remove" | "ban" | "mute" | "unmute" | "lock" | "removal-reason" | "unlock" | "distinguish" | "marknsfw" | "sticky" | "unban" | "userflair"
Returns¶
string
describeAction()¶
describeAction(
action):string
Defined in: extension/data/modules/proposals/components/proposalView.ts:20
Human-readable summary of a proposed action (the detail title and list heading).
Parameters¶
action¶
Returns¶
string
describeStatus()¶
describeStatus(
proposal):string
Defined in: extension/data/modules/proposals/components/proposalView.ts:93
A short, human label for a proposal’s status.
Parameters¶
proposal¶
Returns¶
string
isAging()¶
isAging(
proposal,nowSeconds?):boolean
Defined in: extension/data/modules/proposals/components/proposalView.ts:161
Whether a proposal is still open and has been waiting long enough to flag for triage. Used to surface stale items in the queue.
Parameters¶
proposal¶
The proposal to test.
nowSeconds?¶
number = ...
Current time in epoch seconds (injected for testability).
Returns¶
boolean
itemKindLabel()¶
itemKindLabel(
kind):string
Defined in: extension/data/modules/proposals/components/proposalView.ts:109
A short label for what a proposal targets, for the list-row chip.
Parameters¶
kind¶
Returns¶
string
proposalExcerpt()¶
proposalExcerpt(
proposal):string
Defined in: extension/data/modules/proposals/components/proposalView.ts:145
A one-line excerpt of what a proposal is about, for the sidebar row: the first non-empty line of a removal reason’s composed text (markdown stripped), else the proposer’s free-text note, else an empty string.
Parameters¶
proposal¶
The proposal to summarize.
Returns¶
string
Variables¶
AGING_THRESHOLD_SECONDS¶
constAGING_THRESHOLD_SECONDS:number
Defined in: extension/data/modules/proposals/components/proposalView.ts:17
A pending proposal older than this (seconds) is considered “aging” and flagged.