feat: artwork page carousels, recommendations, avatars & fixes
- Infinite loop carousels for Similar Artworks & Trending rails
- Mouse wheel horizontal scrolling on both carousels
- Author avatar shown on hover in RailCard (similar + trending)
- Removed "View" badge from RailCard hover overlay
- Added `id` to Meilisearch filterable attributes
- Auto-prepend Scout prefix in meilisearch:configure-index command
- Added author name + avatar to Similar Artworks API response
- Added avatar_url to ArtworkListResource author object
- Added direct /art/{id}/{slug} URL to ArtworkListResource
- Fixed race condition: Similar Artworks no longer briefly shows trending items
- Fixed user_profiles eager load (user_id primary key, not id)
- Bumped /api/art/{id}/similar rate limit to 300/min
- Removed decorative heart icons from tag pills
- Moved ReactionBar under artwork description
This commit is contained in:
@@ -197,7 +197,7 @@ class ContentSanitizer
|
||||
// Suppress warnings from malformed fragments
|
||||
libxml_use_internal_errors(true);
|
||||
$doc->loadHTML(
|
||||
'<html><body>' . $html . '</body></html>',
|
||||
'<?xml encoding="UTF-8"><html><body>' . $html . '</body></html>',
|
||||
LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD
|
||||
);
|
||||
libxml_clear_errors();
|
||||
|
||||
@@ -253,7 +253,7 @@ final class UserStatsService
|
||||
DB::table('user_statistics')
|
||||
->where('user_id', $userId)
|
||||
->update([
|
||||
$column => DB::raw("MAX(0, COALESCE({$column}, 0) + {$by})"),
|
||||
$column => DB::raw("GREATEST(0, COALESCE({$column}, 0) + {$by})"),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
}
|
||||
@@ -264,7 +264,7 @@ final class UserStatsService
|
||||
->where('user_id', $userId)
|
||||
->where($column, '>', 0)
|
||||
->update([
|
||||
$column => DB::raw("MAX(0, COALESCE({$column}, 0) - {$by})"),
|
||||
$column => DB::raw("GREATEST(0, COALESCE({$column}, 0) - {$by})"),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user