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