Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ForumApplication

Hierarchy

Index

Constructors

constructor

Properties

alerts

alerts: AlertManagerState = ...

An object that manages the state of active alerts.

booted

booted: boolean = false

Whether or not the app has been booted.

cache

cache: Record<string, unknown> = {}

A local cache that can be used to store data at the application level, so that is persists between different routes.

composer

composer: ComposerState = ...

An object which controls the state of the composer.

current

current: PageState = ...

The page the app is currently on.

This object holds information about the type of page we are currently visiting, and sometimes additional arbitrary page state that may be relevant to lower-level components.

data

discussions

An object which controls the state of the cached discussion list, which is used in the index page and the slideout pane.

drawer

drawer: Drawer

An object that manages the state of the navigation drawer.

forum

forum: Forum

The forum model for this application.

history

history: History = ...

The app's history stack, which keeps track of which routes the user visits so that they can easily navigate back to the previous route.

initialRoute

initialRoute: string

initializers

initializers: ItemList<(app: ForumApplication) => void> = ...

An ordered list of initializers to bootstrap the application.

modal

modal: ModalManagerState = ...

An object that manages modal state.

notificationComponents

notificationComponents: Record<string, ComponentClass<{ notification: Notification }, Notification<{ notification: Notification }>>> = ...

A map of notification types to their components.

notifications

notifications: NotificationListState = ...

An object which controls the state of the user's notifications.

pane

pane: null | Pane = null

An object which controls the state of the page's side pane.

postComponents

postComponents: Record<string, ComponentClass<{ post: Post }, Post<{ post: Post }>>> = ...

A map of post types to their components.

previous

previous: PageState = ...

The page the app was on before the current page.

Once the application navigates to another page, the object previously assigned to this.current will be moved to this.previous, while this.current is re-initialized.

route

route: ((name: string, params?: Record<string, unknown>) => string) & ForumRoutes

routes

routes: Record<string, FlarumGenericRoute> = {}

A map of routes, keyed by a unique route name. Each route is an object containing the following properties:

  • path The path that the route is accessed at.
  • component The Mithril component to render when this route is active.
example

app.routes.discussion = { path: '/d/:id', component: DiscussionPage };

search

search: GlobalSearchState = ...

An object which stores previously searched queries and provides convenient tools for retrieving and managing search values.

session

session: Session

The app's session.

Stores info about the current user.

store

store: Store = ...

The app's data store.

translator

translator: Translator = ...

The app's translator.

Accessors

Private title

  • get title(): string
  • set title(val: string): void

Private titleCount

  • get titleCount(): number
  • set titleCount(val: number): void

Methods

authenticationComplete

  • authenticationComplete(payload: Record<string, unknown>): void
  • Callback for when an external authenticator (social login) action has completed.

    If the payload indicates that the user has been logged in, then the page will be reloaded. Otherwise, a SignUpModal will be opened, prefilled with the provided details.

    Parameters

    • payload: Record<string, unknown>

    Returns void

boot

  • boot(): void

bootExtensions

  • bootExtensions(extensions: Record<string, { extend?: unknown[] }>): void

load

mount

  • mount(): void

preloadedApiDocument

request

Protected requestErrorCatch

Protected requestErrorDefaultHandler

  • requestErrorDefaultHandler(e: unknown, isDebug: boolean, formattedErrors: string[]): void

screen

setTitle

  • setTitle(title: string): void

setTitleCount

  • setTitleCount(count: number): void

Protected transformRequestOptions

updateTitle

  • updateTitle(): void

viewingDiscussion

  • viewingDiscussion(discussion: Discussion): boolean

Generated using TypeDoc version 0.22.10