PhoenixKitWeb.Components.ProfileSettingsTabs (phoenix_kit v2.41.0)

Copy Markdown View Source

The tabs of the signed-in user's own settings, /profile/settings/<tab>.

One URL per tab, and a tab is offered only when it has something to show for this user:

  • account — who you are: avatar and name, custom fields, email, the start page, and the annotation-tools reset
  • security — password and connected sign-in accounts
  • sessions — signed-in devices and recent sign-in attempts
  • notifications — which notifications you get (when any types exist)
  • integrations — your own service connections, for holders of the opt-in integrations permission. Its own LiveView at /profile/settings/integrations.
  • media — your storage libraries and their members (PhoenixKitWeb.Live.Components.LibrarySettings), while user libraries are on and you hold the "storage" permission. The end-user surface for them is phoenix_kit_photos; this tab is where they are set up.

/profile/settings opens the first tab. Every section of PhoenixKitWeb.Live.Components.UserSettings.default_sections/0 is on exactly one tab (a section on none would be one nobody can reach).

Summary

Functions

Every section some tab shows.

The tab /profile/settings opens on.

The path of a tab.

The tab strip. active is the tab being shown; scope decides which tabs are offered. Tabs rendered by the same LiveView patch; the integrations tab, a LiveView of its own, navigates.

Whether ProfileSettings renders the tab itself (every tab but integrations).

The UserSettings sections a tab rendered by ProfileSettings shows, or nil for a tab that is not one of them (integrations has a page of its own).

The ids of the tabs scope is offered, in order.

Functions

all_sections()

@spec all_sections() :: [atom()]

Every section some tab shows.

default_tab()

@spec default_tab() :: String.t()

The tab /profile/settings opens on.

path(tab)

@spec path(String.t()) :: String.t()

The path of a tab.

profile_tabs(assigns)

The tab strip. active is the tab being shown; scope decides which tabs are offered. Tabs rendered by the same LiveView patch; the integrations tab, a LiveView of its own, navigates.

Attributes

  • active (:string) (required)
  • scope (:any) (required)

rendered_here?(tab)

@spec rendered_here?(String.t()) :: boolean()

Whether ProfileSettings renders the tab itself (every tab but integrations).

sections(tab)

@spec sections(String.t()) :: [atom()] | nil

The UserSettings sections a tab rendered by ProfileSettings shows, or nil for a tab that is not one of them (integrations has a page of its own).

tab_ids(scope)

@spec tab_ids(PhoenixKit.Users.Auth.Scope.t() | nil) :: [String.t()]

The ids of the tabs scope is offered, in order.