From 0fc85e5de2b4729585b861c1f59a6a64f9beb1b8 Mon Sep 17 00:00:00 2001 From: Niels Simenon Date: Tue, 7 Jul 2020 19:23:36 +0200 Subject: [PATCH] Updated actor photos to use expand and load events with scroll component. Fixed actor description independent entity logo. Fixed unwanted actor horizontal scroll. --- assets/components/actors/actor.vue | 24 +++++++----------------- assets/components/actors/photos.vue | 10 ++++------ assets/js/actors/actions.js | 3 ++- 3 files changed, 13 insertions(+), 24 deletions(-) diff --git a/assets/components/actors/actor.vue b/assets/components/actors/actor.vue index f8b86d68..c1cb69f5 100644 --- a/assets/components/actors/actor.vue +++ b/assets/components/actors/actor.vue @@ -254,7 +254,7 @@ {{ description.text }} @@ -285,16 +285,14 @@
- - - + @@ -37,6 +38,7 @@ :data-loading="sfw ? `/img/${photo.sfw.lazy}` : `/media/${photo.lazy}`" :title="`© ${photo.copyright || photo.entity.name}`" class="photo" + @load="$parent.$emit('load')" >
@@ -67,6 +69,7 @@ export default { display: flex; box-sizing: border-box; padding: .5rem 1rem; + margin: 0 1rem 0 0; font-size: 0; overflow-x: scroll; scroll-behavior: smooth; @@ -75,12 +78,7 @@ export default { &.expanded { flex-wrap: wrap; justify-content: center; - - /* - display: grid; - grid-gap: .5rem; - grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); - */ + margin: 0; .photo-link { margin: 0 .5rem .5rem 0; diff --git a/assets/js/actors/actions.js b/assets/js/actors/actions.js index f921d1a1..f04e12cb 100644 --- a/assets/js/actors/actions.js +++ b/assets/js/actors/actions.js @@ -88,7 +88,7 @@ function initActorActions(store, router) { comment } } - profiles: actorsProfiles { + profiles: actorsProfiles(orderBy: PRIORITY_DESC) { description descriptionHash entity { @@ -96,6 +96,7 @@ function initActorActions(store, router) { name slug type + independent parent { id name