mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 15:07:49 +00:00
feat: add Image Webhook plugin
This commit is contained in:
parent
809965e81c
commit
3def60ae3e
11 changed files with 817 additions and 7 deletions
|
|
@ -26,6 +26,8 @@ new class extends Component {
|
|||
['name' => 'Markup', 'flux_icon_name' => 'code-bracket', 'detail_view_route' => 'plugins.markup'],
|
||||
'api' =>
|
||||
['name' => 'API', 'flux_icon_name' => 'braces', 'detail_view_route' => 'plugins.api'],
|
||||
'image-webhook' =>
|
||||
['name' => 'Image Webhook', 'flux_icon_name' => 'photo', 'detail_view_route' => 'plugins.image-webhook'],
|
||||
];
|
||||
|
||||
protected $rules = [
|
||||
|
|
@ -40,7 +42,12 @@ new class extends Component {
|
|||
|
||||
public function refreshPlugins(): void
|
||||
{
|
||||
$userPlugins = auth()->user()?->plugins?->makeHidden(['render_markup', 'data_payload'])->toArray();
|
||||
// Only show recipe plugins in the main list (image_webhook has its own management page)
|
||||
$userPlugins = auth()->user()?->plugins()
|
||||
->where('plugin_type', 'recipe')
|
||||
->get()
|
||||
->makeHidden(['render_markup', 'data_payload'])
|
||||
->toArray();
|
||||
$allPlugins = array_merge($this->native_plugins, $userPlugins ?? []);
|
||||
$allPlugins = array_values($allPlugins);
|
||||
$allPlugins = $this->sortPlugins($allPlugins);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue