MishkaCmsCoreWeb.Live.Admin.Dashboard.Runtime.Media.Index (Mishka CMS Core v0.0.1)

Copy Markdown View Source

Media management LiveView with grid/list view and a folders sidebar. Uses MishkaGervaz MediaGallery template for media display with real-time updates. Media upload/edit form powered by MishkaGervaz Form DSL.

Folders

The library opens on a folder, filter_media_category_id in the URL — the same param the gallery's own Folder filter writes, so either one moves the other — or on none, the top level. The breadcrumb above names the folders down to it, the rail lists the folders directly inside it, read async a page at a time, and the gallery its files. A new folder is made inside it, and a file dropped on the upload form lands in it. Each folder in the rail opens, renames, moves and archives; each file in the gallery moves too, through MishkaCmsCoreWeb.Live.Admin.Components.MediaMove.

At the top level, All media, the gallery shows every file of every folder, newest first; a folder shows only its own. Each card names its folder by the whole path to it.

The folder is the only thing the rail reads again for: the gallery's own filters, sort and page patch the same URL and leave it as it is.

Summary

Functions

Callback implementation for Phoenix.LiveView.render/1.

Functions

render(assigns)

Callback implementation for Phoenix.LiveView.render/1.