minor fixes

This commit is contained in:
2026-04-09 08:50:36 +02:00
parent 23d363a50c
commit a2457f4e49
75 changed files with 3848 additions and 387 deletions

View File

@@ -329,6 +329,7 @@ class Artwork extends Model
$stat = $this->stats;
$awardStat = $this->awardStat;
$publishedSortAt = $this->published_at ?? $this->created_at;
// Orientation derived from pixel dimensions
$orientation = 'square';
@@ -380,7 +381,8 @@ class Artwork extends Model
'downloads' => (int) ($stat?->downloads ?? 0),
'likes' => (int) ($stat?->favorites ?? 0),
'views' => (int) ($stat?->views ?? 0),
'created_at' => $this->published_at?->toDateString() ?? $this->created_at?->toDateString() ?? '',
'created_at' => $publishedSortAt?->toDateString() ?? '',
'published_at_ts' => $publishedSortAt?->getTimestamp() ?? 0,
'is_public' => (bool) $this->is_public,
'is_approved' => (bool) $this->is_approved,
// ── Trending / discovery fields ────────────────────────────────────