Closed imorland closed 3 years ago
I swapped from a POST to a PATCH since it seemed more appropriate for modifying content.
All files have a 🗑️ button in the top-right. Clicking this shows this confirmation dialog:
Clicking OK will fire off the AJAX request, display a loading icon on the image, then remove the image from the frontend once the request is complete.
As part of the PR, I also rewrote some of the front-end to use more modern styling techniques (CSS grid, supported on 95.49% of web traffic), and using proper JSX notation as opposed to abc.component({...})
.
It it worth adding a permission to view hidden files of other users?
It it worth adding a permission to view hidden files of other users?
Yeah. It's kinda there already, just not hooked in yet https://github.com/FriendsOfFlarum/upload/blob/08079568df367ca6717fc323e98ee43b7b202692/migrations/2021_02_11_01_add_uploads_view_and_delete_permissions.php#L18
It it worth adding a permission to view hidden files of other users?
Yeah, I think that could be a useful moderator feature. Should probably add that as part of phase 2. This PR is probably at it's scope right now imo
Backend:
hidden_from_media_manager
column tofof-upload-files
ListUploadsController
to constrain results to non-hidden items/api/fof/upload/hide
endpoint -POST
should contain theuuid
of the file being hiddenFrontend:
POST
to the new endpoint, body contains theuuid