PhoenixKitStaff.Web.PersonMediaComponent (PhoenixKitStaff v0.6.0)

Copy Markdown View Source

The Files and Images tabs of a staff person's profile (one component, parameterized by :kind). Media is folder-scoped via core PhoenixKit.Modules.Storage (see PhoenixKitStaff.Attachments): the person's root staff-person-<uuid> folder for :files, the nested Images subfolder for :images.

Upload/browse is delegated to core's MediaSelectorModal (scoped to the folder via scope_folder_id, so the modal owns its own allow_upload — this component never configures uploads itself). The modal notifys its result back here; we attach each picked/uploaded file to the folder and refresh. Removal soft-trashes a sole-owner file or unlinks a shared one. Every add/ remove is activity-logged (staff.person_file_added/removed, staff.person_image_added/removed) so it surfaces on the Events tab.