Reference Source
import IndexPage from 'flarum/forum/components/IndexPage'
public class | source

IndexPage

Extends:

src/common/Component.js~ComponentPage → IndexPage

The IndexPage component displays the index page, including the welcome hero, the sidebar, and the discussion list.

Static Member Summary

Static Public Members
public static

Member Summary

Public Members
public
public
public

Method Summary

Public Methods
public

Build an item list for the part of the toolbar which is about taking action on the results.

public

hero(): MithrilComponent

Get the component to display as the hero.

public

Mark all discussions as read.

public

Build an item list for the navigation in the sidebar of the index page.

public

Open the composer for a new discussion or prompt the user to login.

public

onbeforeremove(vnode: *)

public

oncreate(vnode: *)

public

oninit(vnode: *)

public

onremove(vnode: *)

public
public

Build an item list for the sidebar of the index page.

public

view(): *

public

Build an item list for the part of the toolbar which is concerned with how the results are displayed.

Inherited Summary

From class Page
public

A class name to apply to the body while the route is active.

public

Whether we should scroll to the top of the page when its rendered.

public

Whether the browser should restore scroll state on refreshes.

public

oncreate(vnode: *)

public

oninit(vnode: *)

public

onremove(vnode: *)

Static Public Members

public static providesInitialSearch: * source

Public Members

public bodyClass: string source

A class name to apply to the body while the route is active.

Override:

Page#bodyClass

public lastDiscussion: * source

public scrollTopOnCreate: boolean source

Whether we should scroll to the top of the page when its rendered.

Override:

Page#scrollTopOnCreate

Public Methods

public actionItems(): ItemList source

Build an item list for the part of the toolbar which is about taking action on the results. By default this is just a "mark all as read" button.

Return:

ItemList

public hero(): MithrilComponent source

Get the component to display as the hero.

Return:

MithrilComponent

public markAllAsRead(): * source

Mark all discussions as read.

Return:

*

void

public navItems(): ItemList source

Build an item list for the navigation in the sidebar of the index page. By default this is just the 'All Discussions' link.

Return:

ItemList

public newDiscussionAction(): Promise source

Open the composer for a new discussion or prompt the user to login.

Return:

Promise

public onbeforeremove(vnode: *) source

Params:

NameTypeAttributeDescription
vnode *

public oncreate(vnode: *) source

Override:

Page#oncreate

Params:

NameTypeAttributeDescription
vnode *

public oninit(vnode: *) source

Override:

Page#oninit

Params:

NameTypeAttributeDescription
vnode *

public onremove(vnode: *) source

Override:

Page#onremove

Params:

NameTypeAttributeDescription
vnode *

public setTitle() source

public sidebarItems(): ItemList source

Build an item list for the sidebar of the index page. By default this is a "New Discussion" button, and then a DropdownSelect component containing a list of navigation items.

Return:

ItemList

public view(): * source

Return:

*

public viewItems(): ItemList source

Build an item list for the part of the toolbar which is concerned with how the results are displayed. By default this is just a select box to change the way discussions are sorted.

Return:

ItemList