feat: post cover filter + admin AI cover action, restyle page-cache admin
- 抽 CoverGenerator 服务(covers:generate 与后台共用),内部强制同步产出 card 转换 - 文章列表:新增封面状态图标列、「有/无封面/完全无图」筛选、行内「生成封面」AI 操作 - 页面缓存:统计改为原生 StatsOverviewWidget(缓存页数/总大小/命中率/时长), 缓存明细表重排(表头、悬停、URL 截断、图标删除按钮、空状态)
This commit is contained in:
@@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||
namespace App\Filament\Pages;
|
||||
|
||||
use App\Blog\Support\PageCacheMiddleware;
|
||||
use App\Filament\Widgets\PageCacheStats;
|
||||
use App\Models\Setting;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Notifications\Notification;
|
||||
@@ -28,18 +29,7 @@ class PageCache extends Page
|
||||
protected string $view = 'filament.pages.page-cache';
|
||||
|
||||
/**
|
||||
* @return array{hits: int, misses: int, count: int, rate: float, ttl: int}
|
||||
*/
|
||||
public function getStatsProperty(): array
|
||||
{
|
||||
return [
|
||||
...PageCacheMiddleware::stats(),
|
||||
'ttl' => (int) config('blog.page_cache_ttl', 300),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return list<array{key: string, url: string, cached_at: string}>
|
||||
* @return list<array{key: string, url: string, cached_at: string, size: int, expires_at: string}>
|
||||
*/
|
||||
public function getEntriesProperty(): array
|
||||
{
|
||||
@@ -72,6 +62,13 @@ class PageCache extends Page
|
||||
Notification::make()->title('已删除这条缓存')->success()->send();
|
||||
}
|
||||
|
||||
protected function getHeaderWidgets(): array
|
||||
{
|
||||
return [
|
||||
PageCacheStats::class,
|
||||
];
|
||||
}
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user