mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-10-31 09:16:51 +01:00 
			
		
		
		
	 1900c04b71
			
		
	
	
		1900c04b71
		
			
		
	
	
	
	
		
			
			Co-authored-by: RMartinOscar <40749467+RMartinOscar@users.noreply.github.com> Co-authored-by: Boy132 <Boy132@users.noreply.github.com> Co-authored-by: Lance Pioch <git@lance.sh>
		
			
				
	
	
		
			45 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| namespace App\Filament\Admin\Widgets;
 | |
| 
 | |
| use Exception;
 | |
| use Filament\Actions\Action;
 | |
| use Filament\Infolists\Components\TextEntry;
 | |
| use Filament\Schemas\Components\Section;
 | |
| use Filament\Schemas\Schema;
 | |
| 
 | |
| class SupportWidget extends FormWidget
 | |
| {
 | |
|     protected static ?int $sort = 3;
 | |
| 
 | |
|     /**
 | |
|      * @throws Exception
 | |
|      */
 | |
|     public function form(Schema $schema): Schema
 | |
|     {
 | |
|         return $schema
 | |
|             ->components([
 | |
|                 Section::make(trans('admin/dashboard.sections.intro-support.heading'))
 | |
|                     ->icon('tabler-heart-filled')
 | |
|                     ->iconColor('danger')
 | |
|                     ->collapsible()
 | |
|                     ->persistCollapsed()
 | |
|                     ->schema([
 | |
|                         TextEntry::make('info')
 | |
|                             ->hiddenLabel()
 | |
|                             ->state(trans('admin/dashboard.sections.intro-support.content')),
 | |
|                         TextEntry::make('extra')
 | |
|                             ->hiddenLabel()
 | |
|                             ->state(trans('admin/dashboard.sections.intro-support.extra_note')),
 | |
|                     ])
 | |
|                     ->headerActions([
 | |
|                         Action::make('donate')
 | |
|                             ->label(trans('admin/dashboard.sections.intro-support.button_donate'))
 | |
|                             ->icon('tabler-cash')
 | |
|                             ->url('https://pelican.dev/donate', true)
 | |
|                             ->color('success'),
 | |
|                     ]),
 | |
|             ]);
 | |
|     }
 | |
| }
 |