PhoenixKitWeb.Live.Modules.Storage.LibraryPage (phoenix_kit v2.60.2)

Copy Markdown View Source

One system library on one page (Settings → Media → Libraries → the library's name): what it holds and where, how it is syncing, its annotated-thumbnail choice, who changed it, and renaming or deleting it.

Where a library keeps its files (its storage profile) and which sizes it gets (its variant set) are shown here and not changed: they are chosen when the library is created. Moving files to other buckets is done on the profile (Storage profiles tab), which moves every library on it in the background.

Nothing slow is read in mount/3. The library, its profile and its history load in handle_params/3; the per-bucket breakdown scans location rows, so it runs in start_async. A user's library never opens here: it is loaded through Libraries.get_system_library_with_stats/1.

Summary

Functions

handle_async(atom, arg, socket)

Callback implementation for Phoenix.LiveView.handle_async/3.

handle_event(event, params, socket)

Callback implementation for Phoenix.LiveView.handle_event/3.

handle_info(arg1, socket)

Callback implementation for Phoenix.LiveView.handle_info/2.

handle_params(map, 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.