Fixed actor description logos.

This commit is contained in:
ThePendulum 2020-06-28 04:22:19 +02:00
parent f4029f0ef7
commit 41d7d2fa34
4 changed files with 40 additions and 21 deletions

View File

@ -5,7 +5,7 @@
> >
<div class="actor-header"> <div class="actor-header">
<h2 class="header-name"> <h2 class="header-name">
<span v-if="actor.network">{{ actor.name }} ({{ actor.network.name }})</span> <span v-if="actor.entity">{{ actor.name }} ({{ actor.entity.name }})</span>
<span v-else="">{{ actor.name }}</span> <span v-else="">{{ actor.name }}</span>
<Gender <Gender
@ -248,20 +248,20 @@
> >
<p <p
v-for="description in actor.descriptions" v-for="description in actor.descriptions"
:key="`description-${description.network.id}`" :key="`description-${description.entity.id}`"
class="description" class="description"
> >
{{ description.text }} {{ description.text }}
<router-link :to="{ name: 'network', params: { networkSlug: description.network.slug } }"> <router-link :to="`/${description.entity.type}/${description.entity.slug}`">
<img <img
v-if="description.site" v-if="description.entity.type === 'network'"
:src="`/img/logos/${description.network.slug}/thumbs/${description.site.slug}.png`" :src="`/img/logos/${description.entity.slug}/thumbs/network.png`"
class="description-logo" class="description-logo"
> >
<img <img
v-else v-else
:src="`/img/logos/${description.network.slug}/thumbs/network.png`" :src="`/img/logos/${description.entity.parent.slug}/thumbs/${description.entity.slug}.png`"
class="description-logo" class="description-logo"
> >
</router-link> </router-link>
@ -633,12 +633,6 @@ export default {
background: var(--background-dim); background: var(--background-dim);
} }
.releases {
flex-grow: 1;
border-top: solid 1px var(--crease);
padding: 1rem;
}
.profile-social { .profile-social {
display: none; display: none;
} }

View File

@ -6,6 +6,7 @@
><span class="range">{{ range }}</span> releases for '{{ context }}'</h3> ><span class="range">{{ range }}</span> releases for '{{ context }}'</h3>
<ul <ul
v-if="releases.length > 0"
:key="sfw" :key="sfw"
v-lazy-container="{ selector: '.thumbnail' }" v-lazy-container="{ selector: '.thumbnail' }"
class="nolist tiles" class="nolist tiles"
@ -82,6 +83,10 @@ export default {
} }
} }
.releases {
border-top: solid 1px var(--crease);
}
.tiles { .tiles {
width: 100%; width: 100%;
display: grid; display: grid;
@ -89,10 +94,10 @@ export default {
grid-gap: 1rem; grid-gap: 1rem;
box-sizing: border-box; box-sizing: border-box;
padding: 1rem; padding: 1rem;
border-top: solid 1px var(--crease);
} }
.empty { .empty {
display: inline-block;
padding: 1rem; padding: 1rem;
color: var(--shadow-strong); color: var(--shadow-strong);
font-weight: bold; font-weight: bold;

View File

@ -57,10 +57,17 @@ function initActorActions(store, _router) {
description description
createdAt createdAt
updatedAt updatedAt
network: entity { entity {
id id
name name
slug slug
type
parent {
id
name
slug
type
}
} }
avatar: avatarMedia { avatar: avatarMedia {
id id
@ -80,10 +87,17 @@ function initActorActions(store, _router) {
profiles: actorsProfiles { profiles: actorsProfiles {
description description
descriptionHash descriptionHash
network: entity { entity {
id id
slug
name name
slug
type
parent {
id
name
slug
type
}
} }
avatar: avatarMedia { avatar: avatarMedia {
id id
@ -157,12 +171,12 @@ function initActorActions(store, _router) {
${releaseActorsFragment} ${releaseActorsFragment}
${releaseTagsFragment} ${releaseTagsFragment}
${releasePosterFragment} ${releasePosterFragment}
site: entity { entity {
id id
name name
slug slug
url url
network: parent { parent {
id id
name name
slug slug
@ -260,10 +274,17 @@ function initActorActions(store, _router) {
dateOfBirth dateOfBirth
dateOfDeath dateOfDeath
gender gender
network: entity { entity {
id id
name name
slug slug
type
parent {
id
name
slug
type
}
} }
avatar: avatarMedia { avatar: avatarMedia {
id id

View File

@ -39,8 +39,7 @@ function curateActor(actor, release) {
...(profile.description && { ...(profile.description && {
[profile.descriptionHash]: { [profile.descriptionHash]: {
text: profile.description, text: profile.description,
network: profile.network, entity: profile.entity,
site: profile.site,
}, },
}), }),
}), {}); }), {});