PhoenixKitWeb.Live.Users.Media (phoenix_kit v2.40.1)

Copy Markdown View Source

Media management LiveView — thin wrapper around MediaBrowser LiveComponent.

This LiveView owns the page layout and assigns required by LayoutWrapper.app_layout. All media browser state and logic live in PhoenixKitWeb.Components.MediaBrowser.

URL sync (shareable …/admin/media?folder=<uuid> deep links) is provided by the MediaBrowser.Embed macro's url_sync option — it injects the handle_params / {:navigate} → push_patch round-trip and parses :initial_params from the URL in on_mount, so this module only owns the page-chrome assigns.

Libraries

The page shows one system library at a time (PhoenixKit.Modules.Storage.Libraries): the default one (Media) at the bare /admin/media, any other at /admin/media/library/<slug>. The browser is always given that library. While Media is the only system library, nothing about libraries is shown. A user library is not listed here; it is browsed at /admin/libraries. Libraries are created, renamed and deleted in Settings → Media → Libraries (PhoenixKitWeb.Live.Modules.Storage.LibrariesComponent).

Summary

Functions

handle_event(binary, arg2, socket)

Callback implementation for Phoenix.LiveView.handle_event/3.

handle_info(msg, socket)

Callback implementation for Phoenix.LiveView.handle_info/2.

handle_params(params, uri, socket)

Callback implementation for Phoenix.LiveView.handle_params/3.

mount(params, session, socket)

Callback implementation for Phoenix.LiveView.mount/3.

render(assigns)

Callback implementation for Phoenix.LiveView.render/1.