Studio: make grid checkbox rectangular and commit table changes

This commit is contained in:
2026-03-01 08:43:48 +01:00
parent 211dc58884
commit e3ca845a6d
89 changed files with 7323 additions and 475 deletions

View File

@@ -269,6 +269,27 @@ final class ArtworkSearchService
});
}
/**
* Rising: sorted by heat_score (recalculated every 15 min).
*
* Surfaces artworks with rapid recent engagement growth.
* Restricts to last 30 days, sorted by heat_score DESC.
*/
public function discoverRising(int $perPage = 24): LengthAwarePaginator
{
$page = (int) request()->get('page', 1);
$cutoff = now()->subDays(30)->toDateString();
return Cache::remember("discover.rising.{$page}", 120, function () use ($perPage, $cutoff) {
return Artwork::search('')
->options([
'filter' => self::BASE_FILTER . ' AND created_at >= "' . $cutoff . '"',
'sort' => ['heat_score:desc', 'engagement_velocity:desc', 'created_at:desc'],
])
->paginate($perPage);
});
}
/**
* Fresh: newest uploads first.
*/