2025-04-04 09:30:00 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Filament\Admin\Widgets;
|
|
|
|
|
|
2026-01-27 11:36:07 +01:00
|
|
|
use App\Enums\TablerIcon;
|
2025-09-08 13:12:33 -04:00
|
|
|
use Exception;
|
|
|
|
|
use Filament\Actions\Action;
|
|
|
|
|
use Filament\Infolists\Components\TextEntry;
|
|
|
|
|
use Filament\Schemas\Components\Section;
|
|
|
|
|
use Filament\Schemas\Schema;
|
2025-04-04 09:30:00 +02:00
|
|
|
|
2025-06-19 18:23:32 +02:00
|
|
|
class HelpWidget extends FormWidget
|
2025-04-04 09:30:00 +02:00
|
|
|
{
|
|
|
|
|
protected static ?int $sort = 4;
|
|
|
|
|
|
2025-09-08 13:12:33 -04:00
|
|
|
/**
|
|
|
|
|
* @throws Exception
|
|
|
|
|
*/
|
|
|
|
|
public function form(Schema $schema): Schema
|
2025-04-04 09:30:00 +02:00
|
|
|
{
|
2025-09-08 13:12:33 -04:00
|
|
|
return $schema
|
|
|
|
|
->components([
|
2025-06-19 18:23:32 +02:00
|
|
|
Section::make(trans('admin/dashboard.sections.intro-help.heading'))
|
2026-01-27 11:36:07 +01:00
|
|
|
->icon(TablerIcon::QuestionMark)
|
2025-06-19 18:23:32 +02:00
|
|
|
->iconColor('info')
|
|
|
|
|
->collapsible()
|
|
|
|
|
->persistCollapsed()
|
|
|
|
|
->schema([
|
2025-09-08 13:12:33 -04:00
|
|
|
TextEntry::make('info')
|
|
|
|
|
->hiddenLabel()
|
|
|
|
|
->state(trans('admin/dashboard.sections.intro-help.content')),
|
2025-06-19 18:23:32 +02:00
|
|
|
])
|
|
|
|
|
->headerActions([
|
2026-01-27 20:07:18 -05:00
|
|
|
Action::make('db_docs')
|
2025-06-19 18:23:32 +02:00
|
|
|
->label(trans('admin/dashboard.sections.intro-help.button_docs'))
|
2026-01-27 11:36:07 +01:00
|
|
|
->icon(TablerIcon::Speedboat)
|
2025-06-19 18:23:32 +02:00
|
|
|
->url('https://pelican.dev/docs', true),
|
|
|
|
|
]),
|
|
|
|
|
]);
|
2025-04-04 09:30:00 +02:00
|
|
|
}
|
|
|
|
|
}
|