WardrikWeb.Dashboard (wardrik_web v0.1.0-rc.1)

Copy Markdown

The settings of one mounted dashboard.

WardrikWeb.Router.wardrik_dashboard/2 creates it. Every page gets it as @dashboard.

Fields

  • :prefix - the path the dashboard is mounted at.
  • :resolver - {module, opts}, the WardrikWeb.Resolver that returns each person's scope.
  • :extensions - the WardrikWeb.Extension modules that add pages and panels.
  • :settings - the settings pages that are on, as {module, opts} by page.
  • :socket_path - the path of the endpoint's LiveView socket.
  • :sign_in - where to redirect people the resolver refuses.

Summary

Functions

Returns the pages that the extensions add.

Returns the panels (LiveComponents) that the extensions add to slot.

Types

t()

@type t() :: %WardrikWeb.Dashboard{
  extensions: [module()],
  prefix: String.t(),
  resolver: {module(), term()},
  settings: %{optional(atom()) => {module(), term()}},
  sign_in: String.t(),
  socket_path: String.t()
}

Functions

pages(dashboard)

@spec pages(t()) :: [WardrikWeb.Page.t()]

Returns the pages that the extensions add.

panels(dashboard, slot)

@spec panels(t(), WardrikWeb.Extension.slot()) :: [module()]

Returns the panels (LiveComponents) that the extensions add to slot.