Fixed actor boolean logic, addressing missing boob, tattoo and piercing info. Removed scroll background, fixed actor photo load event and padding.

This commit is contained in:
DebaucheryLibrarian
2020-12-29 04:20:13 +01:00
parent 0f88ae324e
commit 0f052a0631
4 changed files with 29 additions and 31 deletions

View File

@@ -318,13 +318,14 @@
<div class="actor-content">
<Scroll
v-if="actor.avatar || (actor.photos && actor.photos.length > 0)"
v-slot="scroll"
:expanded="photosExpanded"
class="scroll-light"
@expand="(state) => photosExpanded = state"
>
<Photos
:actor="actor"
:class="{ expanded: photosExpanded }"
@load="scroll.loaded"
/>
</Scroll>
@@ -683,10 +684,6 @@ export default {
margin: 0 0 1rem 0;
}
.photos {
background: var(--background-dim);
}
.profile-social {
display: none;
}
@@ -696,6 +693,7 @@ export default {
}
.scroll {
background: var(--background-dim);
border-bottom: solid 1px var(--shadow-hint);
}

View File

@@ -19,7 +19,7 @@
:title="actor.avatar.credit && `© ${actor.avatar.credit}`"
loading="lazy"
class="avatar photo"
@load="$parent.$emit('load')"
@load="$emit('load', $event)"
>
</a>
@@ -37,7 +37,7 @@
:title="`© ${photo.credit || photo.entity.name}`"
loading="lazy"
class="photo"
@load="$parent.$emit('load')"
@load="$emit('load', $event)"
>
</a>
</div>
@@ -59,6 +59,7 @@ export default {
default: null,
},
},
emits: ['load'],
computed: {
sfw,
photos,
@@ -73,7 +74,6 @@ export default {
display: flex;
box-sizing: border-box;
padding: .5rem 1rem;
margin: 0 1rem 0 0;
font-size: 0;
&.expanded {
@@ -100,7 +100,11 @@ export default {
}
.photo-link {
margin: 0 .5rem 0 0;
padding: 0 .5rem 0 0;
&:last-child {
padding: 0 1rem 0 0;
}
}
.photo {

View File

@@ -84,7 +84,7 @@ function mounted() {
this.updateScroll();
}
function beforeDestroy() {
function beforeUnmount() {
this.$refs.content.removeEventListener('scroll', this.updateScroll);
window.removeEventListener('resize', this.updateScroll);
@@ -121,7 +121,7 @@ export default {
},
mounted,
updated,
beforeDestroy,
beforeUnmount,
methods: {
scroll,
loaded,
@@ -133,15 +133,11 @@ export default {
<style lang="scss" scoped>
@import 'theme';
.scroll {
background: var(--profile);
.scroll.expanded {
padding: 0;
&.expanded {
padding: 0;
.scroll {
display: none;
}
.scroll {
display: none;
}
}