From f4898db9ada8c59e266cac6ef9952b9b2373b840 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 12 Jun 2024 01:23:40 -0600 Subject: [PATCH 1/3] Update status embed, add support for album carousels --- resources/views/status/embed.blade.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/resources/views/status/embed.blade.php b/resources/views/status/embed.blade.php index 02ab2de90..7446ee528 100644 --- a/resources/views/status/embed.blade.php +++ b/resources/views/status/embed.blade.php @@ -15,7 +15,8 @@ - +
@@ -26,11 +27,19 @@ {{$status['account']['username']}}
+ @if($status['pf_type'] === 'photo')
+ @elseif($status['pf_type'] === 'photo:album') + + @foreach($status['media_attachments'] as $media) + + @endforeach + + @endif @if($layout != 'compact')
@@ -64,9 +73,10 @@
- From 4fd156c4a6007c915fe240a0fef912418d106489 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 12 Jun 2024 01:44:38 -0600 Subject: [PATCH 2/3] Update profile embeds, add support for albums --- resources/views/profile/embed.blade.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/resources/views/profile/embed.blade.php b/resources/views/profile/embed.blade.php index 98b8b2692..d0edb9f59 100644 --- a/resources/views/profile/embed.blade.php +++ b/resources/views/profile/embed.blade.php @@ -15,7 +15,7 @@ - +
@@ -76,11 +76,13 @@ .then(res => res.json()) .then(res => { let parent = document.querySelector('.embed-row'); - res.filter(post => post.pf_type == 'photo' && !post.sensitive && post.visibility === 'public') + res.filter(post => ['photo', 'photo:album'].includes(post.pf_type) && !post.sensitive && post.visibility === 'public') .slice(0, 9) .forEach((post, idx) => { let mediaUrl = post.media_attachments[0].preview_url ? post.media_attachments[0].preview_url : post.media_attachments[0].url; - let html = `
`; + let html = post.pf_type === 'photo:album' ? + `
` : + `
`; let el = document.createElement('div'); el.innerHTML = html; parent.appendChild(el.firstChild); From 17b449d5ed09b2d4ce05ec753945c09694ab6889 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 12 Jun 2024 01:45:00 -0600 Subject: [PATCH 3/3] Update changelog --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 40fb20909..8fab39cd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,7 +23,11 @@ - Update ApiV1Controller, fix update_credentials boolean handling ([19c62aaa](https://github.com/pixelfed/pixelfed/commit/19c62aaa)) - Update ApiV1Controller, fix cache invalidation bug in update_credentials ([d56a4108](https://github.com/pixelfed/pixelfed/commit/d56a4108)) - Update ApiV1Controller, fix self relationship response ([28bc7aa4](https://github.com/pixelfed/pixelfed/commit/28bc7aa4)) -- ([](https://github.com/pixelfed/pixelfed/commit/)) +- Update ApiController, add pe support to like/unlike endpoints ([679ef677](https://github.com/pixelfed/pixelfed/commit/679ef677)) +- Update ApiV1Dot1Controller, fix username to id endpoint ([4d6cea9a](https://github.com/pixelfed/pixelfed/commit/4d6cea9a)) +- Update StatusController, cache AP object ([a75b89b2](https://github.com/pixelfed/pixelfed/commit/a75b89b2)) +- Update status embed, add support for album carousels ([f4898db9](https://github.com/pixelfed/pixelfed/commit/f4898db9)) +- Update profile embeds, add support for albums ([4fd156c4](https://github.com/pixelfed/pixelfed/commit/4fd156c4)) - ([](https://github.com/pixelfed/pixelfed/commit/)) - ([](https://github.com/pixelfed/pixelfed/commit/))