diff --git a/composer.json b/composer.json index ea53237..f334b3e 100644 --- a/composer.json +++ b/composer.json @@ -20,9 +20,9 @@ ], "require": { "php": "^8.0", - "filament/filament": "^3.0 || 3.0-stable", - "illuminate/http": "^9.0 || ^10.0", - "illuminate/support": "^9.0 || ^10.0" + "filament/filament": "^3.0", + "illuminate/http": "^9.0|^10.0|^11.0", + "illuminate/support": "^9.0|^10.0|^11.0" }, "autoload": { "psr-4": { diff --git a/resources/lang/en/widget.php b/resources/lang/en/widget.php index 82c18f7..8747310 100644 --- a/resources/lang/en/widget.php +++ b/resources/lang/en/widget.php @@ -15,7 +15,7 @@ ], 'footer' => [ - 'view_more' => 'View more', + 'view_more' => 'View more statistics', 'statistics_by' => 'Statistics by', ], ]; diff --git a/resources/lang/it/widget.php b/resources/lang/it/widget.php index 3532894..d5d6ca6 100644 --- a/resources/lang/it/widget.php +++ b/resources/lang/it/widget.php @@ -15,7 +15,7 @@ ], 'footer' => [ - 'view_more' => 'Guarda di più', + 'view_more' => 'Guarda più statistiche', 'statistics_by' => 'Statistiche da', ], ]; diff --git a/src/Widgets/PlausibleWidget.php b/src/Widgets/PlausibleWidget.php index 7a50184..7a07c73 100644 --- a/src/Widgets/PlausibleWidget.php +++ b/src/Widgets/PlausibleWidget.php @@ -4,10 +4,12 @@ use DaniloPolani\FilamentPlausibleWidget\Clients\PlausibleClient; use Filament\Widgets\ChartWidget; +use Illuminate\Contracts\Support\Htmlable; use Illuminate\Support\Carbon; use Illuminate\Support\Collection; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Config; +use Illuminate\Support\HtmlString; class PlausibleWidget extends ChartWidget { @@ -25,6 +27,16 @@ public function getHeading(): string return __('filament-plausible-widget::widget.header.visitors'); } + public function getDescription(): string|Htmlable|null + { + return new HtmlString(sprintf( + '%s %s', + Config::get('filament-plausible-widget.site_id'), + __('filament-plausible-widget::widget.footer.view_more'), + svg('heroicon-o-arrow-top-right-on-square', 'w-3 h-3 inline-block')->toHtml(), + )); + } + protected function getType(): string { return 'line';