Using actors avatars table for secondary profile photos.
This commit is contained in:
@@ -37,10 +37,10 @@
|
||||
|
||||
<div
|
||||
class="photos nobar"
|
||||
:class="{ 'has-avatar': actor.avatar, 'has-photos': actor.avatar ? photos.length > 1 : photos.length > 0 }"
|
||||
:class="{ 'has-avatar': actor.avatar, 'has-photos': actor.avatar ? actor.photos.length > 1 : actor.photos.length > 0 }"
|
||||
>
|
||||
<div
|
||||
v-for="photo in photos"
|
||||
v-for="photo in actor.photos"
|
||||
:key="`photo-${photo.id}`"
|
||||
class="photo-container"
|
||||
:class="{ avatar: photo.isAvatar }"
|
||||
@@ -92,13 +92,6 @@ const { pageProps, routeParams } = pageContext;
|
||||
const { actor } = pageProps;
|
||||
|
||||
const domain = routeParams.domain;
|
||||
|
||||
const photos = Object.values(Object.fromEntries(actor.profiles
|
||||
.filter((profile) => !!profile.avatar)
|
||||
.map((profile) => [profile.avatar.id, {
|
||||
...profile.avatar,
|
||||
isAvatar: profile.avatar.id === actor.avatar.id,
|
||||
}])));
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user