mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 14:36:17 +00:00
- 2.x - sites (wip)
- improved ssh error handling - database soft deletes
This commit is contained in:
@ -2,12 +2,40 @@
|
||||
|
||||
namespace App\Web\Components;
|
||||
|
||||
use App\Web\Traits\HasWidgets;
|
||||
use Filament\Pages\Page as BasePage;
|
||||
use Illuminate\View\ComponentAttributeBag;
|
||||
|
||||
abstract class Page extends BasePage
|
||||
{
|
||||
use HasWidgets;
|
||||
|
||||
protected static string $view = 'web.components.page';
|
||||
|
||||
protected ?string $live = '5s';
|
||||
|
||||
protected array $extraAttributes = [];
|
||||
|
||||
protected function getExtraAttributes(): array
|
||||
{
|
||||
$attributes = $this->extraAttributes;
|
||||
|
||||
if ($this->getLive()) {
|
||||
$attributes['wire:poll.'.$this->getLive()] = '$dispatch(\'$refresh\')';
|
||||
}
|
||||
|
||||
return $attributes;
|
||||
}
|
||||
|
||||
public function getExtraAttributesBag(): ComponentAttributeBag
|
||||
{
|
||||
return new ComponentAttributeBag($this->getExtraAttributes());
|
||||
}
|
||||
|
||||
public function getLive(): ?string
|
||||
{
|
||||
return $this->live;
|
||||
}
|
||||
|
||||
public function getWidgets(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user