forked from DebaucheryLibrarian/traxxx
Scrolling release actors, added custom scroll bars.
This commit is contained in:
@@ -3,8 +3,7 @@
|
||||
v-if="actor"
|
||||
class="actor"
|
||||
>
|
||||
<RouterLink
|
||||
:to="{ name: 'actor', params: { actorId: actor.id, actorSlug: actor.slug } }"
|
||||
<div
|
||||
class="link"
|
||||
>
|
||||
<span
|
||||
@@ -42,12 +41,16 @@
|
||||
/>
|
||||
</span>
|
||||
|
||||
<div class="avatar-container">
|
||||
<a
|
||||
class="avatar-container"
|
||||
@click="goToActor"
|
||||
>
|
||||
<img
|
||||
v-if="actor.avatar"
|
||||
:src="getPath(actor.avatar, 'thumbnail')"
|
||||
:style="{ 'background-image': getBgPath(actor.avatar, 'lazy') }"
|
||||
loading="lazy"
|
||||
draggable="false"
|
||||
class="avatar"
|
||||
>
|
||||
|
||||
@@ -56,6 +59,7 @@
|
||||
class="avatar"
|
||||
><img
|
||||
:src="`/img/avatar_${actor.gender || 'female'}.svg`"
|
||||
draggable="false"
|
||||
class="avatar-fallback"
|
||||
></span>
|
||||
|
||||
@@ -80,9 +84,7 @@
|
||||
@click.prevent.native="unstashActor"
|
||||
/>
|
||||
|
||||
<span
|
||||
class="details"
|
||||
>
|
||||
<span class="details">
|
||||
<span class="gender-age">
|
||||
<Gender :gender="actor.gender" />
|
||||
|
||||
@@ -128,14 +130,21 @@
|
||||
class="country"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
</RouterLink>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Gender from './gender.vue';
|
||||
|
||||
function goToActor() {
|
||||
// can't seem to control behavior with RouterLink
|
||||
if (!this.hasScrolled) {
|
||||
this.$router.push({ name: 'actor', params: { actorId: this.actor.id, actorSlug: this.actor.slug } });
|
||||
}
|
||||
}
|
||||
|
||||
async function stashActor() {
|
||||
this.favorited = true;
|
||||
|
||||
@@ -189,6 +198,10 @@ export default {
|
||||
type: Object,
|
||||
default: null,
|
||||
},
|
||||
hasScrolled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
emits: ['stash'],
|
||||
data() {
|
||||
@@ -202,6 +215,7 @@ export default {
|
||||
methods: {
|
||||
stashActor,
|
||||
unstashActor,
|
||||
goToActor,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -289,6 +303,7 @@ export default {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: var(--profile);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
|
||||
Reference in New Issue
Block a user