awcodes / filament-curator

A media picker plugin for Filament Panels.
MIT License
298 stars 79 forks source link

Add Ability to Disable Curation Tab and Upload New Tab via Config #448

Closed onairmarc closed 4 months ago

onairmarc commented 4 months ago

This PR adds tabs.display_curation and tabs.display_upload_new to the curator config file with a default value of true.

Setting tabs.display_curation to false will hide the "Curation" tab on the Edit Media screen. This is useful for using Curator as a simple media library, but don't want to surface image manipulation features to your users. You could also use a class method to return true or false depending on the user's permissions.

Setting tabs.display_upload_new to false will hide the "Upload New" tab on the Edit Media screen. This is useful when you wish for users to not be able to override media files but upload new ones instead.

onairmarc commented 4 months ago

@awcodes Would you mind taking a look at this, please?

awcodes commented 4 months ago

I will when I get a chance. Pretty busy at the moment with work.

onairmarc commented 4 months ago

Please remove all formatting changes that are not part of the feature for the PR.

Thanks.

Ope! Sorry about that! I forgot my IDE was setup to do that. I'll do that this evening.

onairmarc commented 4 months ago

@awcodes I believe I've reverted all the formatting changes. Please let me know if I missed anything and I'll happily correct them. Thanks!

awcodes commented 4 months ago

This is so much better. 😁 I'll merge it tomorrow or Saturday. Thank you.

onairmarc commented 4 months ago

Thank you!!

awcodes commented 4 months ago

Thanks. 🦒