feat: Add webmention counts and icons for replies, likes, and reposts.
- Add new SVG icons for the "reply", "like", and "repost" actions - Update webmention info display in note template to include counts and icons for replies, likes, and reposts - Add webmention counts to FrontPageController.php and modify queries in NotesController.php - Modify WebMentionsTableSeeder.php to change URLs, commentable ID, and add new WebMentions
This commit is contained in:
parent
5bc03f36d2
commit
92098a793e
15 changed files with 179 additions and 35 deletions
|
@ -20,7 +20,16 @@ class SearchController extends Controller
|
|||
|
||||
/** @var Note $note */
|
||||
foreach ($notes as $note) {
|
||||
$note->load('place', 'media', 'client');
|
||||
$note->load('place', 'media', 'client')
|
||||
->loadCount(['webmentions AS replies' => function ($query) {
|
||||
$query->where('type', 'in-reply-to');
|
||||
}])
|
||||
->loadCount(['webmentions AS likes' => function ($query) {
|
||||
$query->where('type', 'like-of');
|
||||
}])
|
||||
->loadCount(['webmentions AS reposts' => function ($query) {
|
||||
$query->where('type', 'repost-of');
|
||||
}]);
|
||||
}
|
||||
|
||||
return view('search', compact('search', 'notes'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue