FriendsOfFlarum / upload

The file upload extension with insane intelligence for your Flarum forum.
https://discuss.flarum.org/d/4154
MIT License
176 stars 95 forks source link

Add options to hide uploads from Mediamanager #271

Closed imorland closed 3 years ago

imorland commented 3 years ago

Backend:

Frontend:

davwheat commented 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: image

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({...}).

davwheat commented 3 years ago

It it worth adding a permission to view hidden files of other users?

imorland commented 3 years ago

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

imorland commented 3 years ago

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