mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 08:44:46 +02:00
fix admin dashboard (widget actions)
This commit is contained in:
parent
ede9942dda
commit
9fbfd630eb
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Filament\Admin\Widgets;
|
namespace App\Filament\Admin\Widgets;
|
||||||
|
|
||||||
use Filament\Actions\CreateAction;
|
use Filament\Actions\Action;
|
||||||
use Filament\Widgets\Widget;
|
use Filament\Widgets\Widget;
|
||||||
|
|
||||||
class CanaryWidget extends Widget
|
class CanaryWidget extends Widget
|
||||||
@ -21,12 +21,11 @@ class CanaryWidget extends Widget
|
|||||||
public function getViewData(): array
|
public function getViewData(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'actions' => [
|
'action' => Action::make('github')
|
||||||
CreateAction::make()
|
->label(trans('admin/dashboard.sections.intro-developers.button_issues'))
|
||||||
->label(trans('admin/dashboard.sections.intro-developers.button_issues'))
|
->icon('tabler-brand-github')
|
||||||
->icon('tabler-brand-github')
|
->url('https://github.com/pelican-dev/panel/issues', true)
|
||||||
->url('https://github.com/pelican-dev/panel/issues', true),
|
->toHtmlString(),
|
||||||
],
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Filament\Admin\Widgets;
|
namespace App\Filament\Admin\Widgets;
|
||||||
|
|
||||||
use Filament\Actions\CreateAction;
|
use Filament\Actions\Action;
|
||||||
use Filament\Widgets\Widget;
|
use Filament\Widgets\Widget;
|
||||||
|
|
||||||
class HelpWidget extends Widget
|
class HelpWidget extends Widget
|
||||||
@ -16,12 +16,11 @@ class HelpWidget extends Widget
|
|||||||
public function getViewData(): array
|
public function getViewData(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'actions' => [
|
'action' => Action::make('docs')
|
||||||
CreateAction::make()
|
->label(trans('admin/dashboard.sections.intro-help.button_docs'))
|
||||||
->label(trans('admin/dashboard.sections.intro-help.button_docs'))
|
->icon('tabler-speedboat')
|
||||||
->icon('tabler-speedboat')
|
->url('https://pelican.dev/docs', true)
|
||||||
->url('https://pelican.dev/docs', true),
|
->toHtmlString(),
|
||||||
],
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ namespace App\Filament\Admin\Widgets;
|
|||||||
|
|
||||||
use App\Filament\Admin\Resources\NodeResource\Pages\CreateNode;
|
use App\Filament\Admin\Resources\NodeResource\Pages\CreateNode;
|
||||||
use App\Models\Node;
|
use App\Models\Node;
|
||||||
use Filament\Actions\CreateAction;
|
use Filament\Actions\Action;
|
||||||
use Filament\Widgets\Widget;
|
use Filament\Widgets\Widget;
|
||||||
|
|
||||||
class NoNodesWidget extends Widget
|
class NoNodesWidget extends Widget
|
||||||
@ -23,12 +23,11 @@ class NoNodesWidget extends Widget
|
|||||||
public function getViewData(): array
|
public function getViewData(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'actions' => [
|
'action' => Action::make('create-node')
|
||||||
CreateAction::make()
|
->label(trans('admin/dashboard.sections.intro-first-node.button_label'))
|
||||||
->label(trans('admin/dashboard.sections.intro-first-node.button_label'))
|
->icon('tabler-server-2')
|
||||||
->icon('tabler-server-2')
|
->url(CreateNode::getUrl())
|
||||||
->url(CreateNode::getUrl()),
|
->toHtmlString(),
|
||||||
],
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Filament\Admin\Widgets;
|
namespace App\Filament\Admin\Widgets;
|
||||||
|
|
||||||
use Filament\Actions\CreateAction;
|
use Filament\Actions\Action;
|
||||||
use Filament\Widgets\Widget;
|
use Filament\Widgets\Widget;
|
||||||
|
|
||||||
class SupportWidget extends Widget
|
class SupportWidget extends Widget
|
||||||
@ -16,13 +16,12 @@ class SupportWidget extends Widget
|
|||||||
public function getViewData(): array
|
public function getViewData(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'actions' => [
|
'action' => Action::make('donate')
|
||||||
CreateAction::make()
|
->label(trans('admin/dashboard.sections.intro-support.button_donate'))
|
||||||
->label(trans('admin/dashboard.sections.intro-support.button_donate'))
|
->icon('tabler-cash')
|
||||||
->icon('tabler-cash')
|
->url('https://pelican.dev/donate', true)
|
||||||
->url('https://pelican.dev/donate', true)
|
->color('success')
|
||||||
->color('success'),
|
->toHtmlString(),
|
||||||
],
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
namespace App\Filament\Admin\Widgets;
|
namespace App\Filament\Admin\Widgets;
|
||||||
|
|
||||||
use App\Services\Helpers\SoftwareVersionService;
|
use App\Services\Helpers\SoftwareVersionService;
|
||||||
use Filament\Actions\CreateAction;
|
use Filament\Actions\Action;
|
||||||
use Filament\Widgets\Widget;
|
use Filament\Widgets\Widget;
|
||||||
|
|
||||||
class UpdateWidget extends Widget
|
class UpdateWidget extends Widget
|
||||||
@ -27,13 +27,12 @@ class UpdateWidget extends Widget
|
|||||||
'version' => $this->softwareVersionService->currentPanelVersion(),
|
'version' => $this->softwareVersionService->currentPanelVersion(),
|
||||||
'latestVersion' => $this->softwareVersionService->latestPanelVersion(),
|
'latestVersion' => $this->softwareVersionService->latestPanelVersion(),
|
||||||
'isLatest' => $this->softwareVersionService->isLatestPanel(),
|
'isLatest' => $this->softwareVersionService->isLatestPanel(),
|
||||||
'actions' => [
|
'action' => Action::make('update')
|
||||||
CreateAction::make()
|
->label(trans('admin/dashboard.sections.intro-update-available.heading'))
|
||||||
->label(trans('admin/dashboard.sections.intro-update-available.heading'))
|
->icon('tabler-clipboard-text')
|
||||||
->icon('tabler-clipboard-text')
|
->url('https://pelican.dev/docs/panel/update', true)
|
||||||
->url('https://pelican.dev/docs/panel/update', true)
|
->color('warning')
|
||||||
->color('warning'),
|
->toHtmlString(),
|
||||||
],
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
collapsible
|
collapsible
|
||||||
persist-collapsed
|
persist-collapsed
|
||||||
collapsed
|
collapsed
|
||||||
:header-actions="$actions"
|
:after-header="$action"
|
||||||
>
|
>
|
||||||
<x-slot name="heading">{{ trans('admin/dashboard.sections.intro-developers.heading') }}</x-slot>
|
<x-slot name="heading">{{ trans('admin/dashboard.sections.intro-developers.heading') }}</x-slot>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
id="intro-help"
|
id="intro-help"
|
||||||
collapsible
|
collapsible
|
||||||
persist-collapsed
|
persist-collapsed
|
||||||
:header-actions="$actions"
|
:after-header="$action"
|
||||||
>
|
>
|
||||||
<x-slot name="heading">{{ trans('admin/dashboard.sections.intro-help.heading') }}</x-slot>
|
<x-slot name="heading">{{ trans('admin/dashboard.sections.intro-help.heading') }}</x-slot>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
id="intro-first-node"
|
id="intro-first-node"
|
||||||
collapsible
|
collapsible
|
||||||
persist-collapsed
|
persist-collapsed
|
||||||
:header-actions="$actions"
|
:after-header="$action"
|
||||||
>
|
>
|
||||||
<x-slot name="heading">{{ trans('admin/dashboard.sections.intro-first-node.heading') }}</x-slot>
|
<x-slot name="heading">{{ trans('admin/dashboard.sections.intro-first-node.heading') }}</x-slot>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
id="intro-support"
|
id="intro-support"
|
||||||
collapsible
|
collapsible
|
||||||
persist-collapsed
|
persist-collapsed
|
||||||
:header-actions="$actions"
|
:after-header="$action"
|
||||||
>
|
>
|
||||||
<x-slot name="heading">{{ trans('admin/dashboard.sections.intro-support.heading') }}</x-slot>
|
<x-slot name="heading">{{ trans('admin/dashboard.sections.intro-support.heading') }}</x-slot>
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
icon="tabler-info-circle"
|
icon="tabler-info-circle"
|
||||||
icon-color="warning"
|
icon-color="warning"
|
||||||
id="intro-update-available"
|
id="intro-update-available"
|
||||||
:header-actions="$actions"
|
:after-header="$action"
|
||||||
>
|
>
|
||||||
<x-slot name="heading">{{ trans('admin/dashboard.sections.intro-update-available.heading') }}</x-slot>
|
<x-slot name="heading">{{ trans('admin/dashboard.sections.intro-update-available.heading') }}</x-slot>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user