diff --git a/docs/ADMIN.md b/docs/ADMIN.md index 4d37854..9a37bdc 100644 --- a/docs/ADMIN.md +++ b/docs/ADMIN.md @@ -208,6 +208,89 @@ src/app/features/admin/categories/ - **Preview**: simple read-only line in the editor showing computed discounted price. - **Infinite scroll**: `AdminProductsFacade.infiniteScroll` toggle - when on, `loadMore()` appends the next page to `products()` instead of replacing it; pagination UI swaps for a "Load more" button. Off by default (existing paginated behavior unchanged). +## Sprint 22 - Media System hardening + +`core/media/` (`MediaRepository` abstraction, `MockMediaRepository` IndexedDB +implementation) + `features/backoffice/media/` + the shared +`shared/media/media-picker/`: + +- **Folders**: flat `folder?: string` tag on `MediaAsset` (no nesting) - + "New folder" just sets the active filter to a name typed via + `window.prompt` (mirrors the `window.confirm` pattern already used for + destructive actions elsewhere); the folder is created implicitly the next + time something uploads into it. `MediaRepository.listFolders()` derives + the folder list from existing records rather than a separate folder + entity - intentionally light, matches the flat-storage reality of an + IndexedDB mock. +- **Tags**: already existed on `MediaAsset`; added an edit affordance + (`window.prompt`, comma-separated) and `MediaLibraryFacade.updateTags()`. +- **Validation**: `MockMediaRepository.validateFile()` rejects anything over + 10MB or outside the allow-list (`jpeg/png/webp/gif/svg+xml/pdf`); errors + now propagate as real messages through `MediaLibraryFacade.error` (both + `media-library-page` and `media-picker` display it - previously upload + failures were swallowed into a generic string). +- **SVG sanitization**: `sanitizeSvg()` strips `