The avatar
helper displays a user's avatar.
Attributes to apply to the avatar element
Fire a Flarum error which is shown in the JS console for everyone and in an alert for the admin.
Calls console.warn
with the provided arguments, but only if the forum is in debug mode.
This function is intended to provide warnings to extension developers about issues with their extensions that may not be easily noticed when testing, such as accessibility issues.
These warnings should be hidden on production forums to ensure webmasters are not inundated with do-gooders telling them they have an issue when it isn't something they can fix.
Fire a Flarum deprecation warning which is shown in the JS console.
These warnings are only shown when the forum is in debug mode, and the function exists to reduce bundle size caused by multiple warnings across our JavaScript.
The message to display. (Short, but sweet, please!)
The PR or Issue ID with more info in relation to this change.
The fullTime
helper displays a formatted time string wrapped in a
The highlight
helper searches for a word phrase in a string, and wraps
matches with the tag.
The string to highlight.
The word or words to highlight.
The humanTime
helper displays a time in a human-friendly time-ago format
(e.g. '12 days ago'), wrapped in a
The icon
helper displays an icon.
The full icon class, prefix and the icon’s name.
Any other attributes to apply.
The listItems
helper wraps an array of components in the provided tag,
stripping out any unnecessary Separator
components.
By default, this tag is an <li>
tag, but this is customisable through the
second function parameter, customTag
.
The punctuateSeries
helper formats a list of strings (e.g. names) to read
fluently in the application's locale.
punctuateSeries(['Toby', 'Franz', 'Dominion']) // Toby, Franz, and Dominion
')}
The useronline
helper displays a green circle if the user is online
The username
helper displays a user's username in a
tag. If the user doesn't exist, the username will be displayed as [deleted].
Generated using TypeDoc version 0.22.10
This type represents an element of a list returned by
ItemList.toArray()
, coupled with some static properties used on various components.