Added descriptions to actor profile page, using profiles for secondary photos.
This commit is contained in:
@@ -244,25 +244,25 @@
|
||||
|
||||
<div class="descriptions-container">
|
||||
<div
|
||||
v-if="actor.descriptions && actor.descriptions.length > 0"
|
||||
v-if="descriptions.length > 0"
|
||||
class="descriptions"
|
||||
>
|
||||
<p
|
||||
v-for="description in actor.descriptions"
|
||||
v-for="description in descriptions"
|
||||
:key="`description-${description.entity.id}`"
|
||||
class="description"
|
||||
>
|
||||
{{ description.text }}
|
||||
<a :href="`/${description.entity.type}/${description.entity.slug}`">
|
||||
<img
|
||||
v-if="description.entity.type === 'network' || !description.entity.parent || description.entity.independent"
|
||||
:src="`/img/logos/${description.entity.slug}/thumbs/network.png`"
|
||||
v-if="description.entity.type === 'network' || !description.entity.parent || description.entity.isIndependent"
|
||||
:src="`/logos/${description.entity.slug}/thumbs/network.png`"
|
||||
class="description-logo"
|
||||
>
|
||||
|
||||
<img
|
||||
v-else
|
||||
:src="`/img/logos/${description.entity.parent.slug}/thumbs/${description.entity.slug}.png`"
|
||||
:src="`/logos/${description.entity.parent.slug}/thumbs/${description.entity.slug}.png`"
|
||||
class="description-logo"
|
||||
>
|
||||
</a>
|
||||
@@ -325,6 +325,13 @@ const showExpand = [
|
||||
'waist',
|
||||
'weight',
|
||||
].some((attribute) => !!props.actor[attribute]);
|
||||
|
||||
const descriptions = Object.values(Object.fromEntries(props.actor.profiles
|
||||
.filter((profile) => !!profile.description)
|
||||
.map((profile) => [profile.descriptionHash, {
|
||||
text: profile.description,
|
||||
entity: profile.entity,
|
||||
}])));
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user