mirror of
https://github.com/pelican-dev/panel.git
synced 2025-06-27 01:31:08 +02:00
49 lines
1.6 KiB
PHP
49 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Admin\Widgets;
|
|
|
|
use Filament\Actions\Action;
|
|
use Filament\Infolists\Components\TextEntry;
|
|
use Filament\Schemas\Components\Section;
|
|
use Filament\Schemas\Schema;
|
|
|
|
class CanaryWidget extends FormWidget
|
|
{
|
|
protected static ?int $sort = 1;
|
|
|
|
public static function canView(): bool
|
|
{
|
|
return config('app.version') === 'canary';
|
|
}
|
|
|
|
/**
|
|
* @throws \Exception
|
|
*/
|
|
public function form(Schema $schema): Schema
|
|
{
|
|
return $schema
|
|
->schema([
|
|
Section::make(trans('admin/dashboard.sections.intro-developers.heading'))
|
|
->icon('tabler-code')
|
|
->iconColor('primary')
|
|
->collapsible()
|
|
->collapsed()
|
|
->persistCollapsed()
|
|
->schema([
|
|
TextEntry::make('iNeedAName')
|
|
->hiddenLabel()
|
|
->state(trans('admin/dashboard.sections.intro-developers.content')),
|
|
TextEntry::make('iNeedAName')
|
|
->hiddenLabel()
|
|
->state(trans('admin/dashboard.sections.intro-developers.extra_note')),
|
|
])
|
|
->headerActions([
|
|
Action::make('issues')
|
|
->label(trans('admin/dashboard.sections.intro-developers.button_issues'))
|
|
->icon('tabler-brand-github')
|
|
->url('https://github.com/pelican-dev/panel/issues', true),
|
|
]),
|
|
]);
|
|
}
|
|
}
|