Showing movie trailers. Added internal parameter for entity visibility.

This commit is contained in:
2024-08-16 23:24:11 +02:00
parent cd6318216f
commit 50570cb734
5 changed files with 40 additions and 21 deletions

View File

@@ -72,12 +72,12 @@ const pageContext = inject('pageContext');
const { pageProps } = pageContext;
const { actor } = pageProps;
const photos = actor.profiles
const photos = Object.values(Object.fromEntries(actor.profiles
.filter((profile) => !!profile.avatar)
.map((profile) => ({
.map((profile) => [profile.avatar.id, {
...profile.avatar,
isAvatar: profile.avatar.id === actor.avatar.id,
}));
}])));
</script>
<style scoped>

View File

@@ -6,20 +6,6 @@
:style="{ 'background-image': `url(${getPath(movie.poster || movie.covers[0])})` }"
>
<div class="banner">
<div
v-if="movie.trailer"
class="trailer"
>
<Player
:video="movie.trailer"
:poster="poster"
class="item"
:class="{ playing }"
@play="playing = true; paused = false;"
@pause="playing = false; paused = true;"
/>
</div>
<img
v-for="cover in movie.covers"
:key="`cover-${cover.id}`"
@@ -27,6 +13,20 @@
class="cover"
>
<div
v-if="movie.trailer"
class="trailer"
>
<Player
:video="movie.trailer"
:poster="getPath(movie.poster || movie.covers[0])"
class="item"
:class="{ playing }"
@play="playing = true; paused = false;"
@pause="playing = false; paused = true;"
/>
</div>
<div
v-if="movie.photos.length > 0"
class="album"
@@ -459,7 +459,7 @@ const scenes = pageContext.pageProps.scenes;
}
.cover {
height: 20rem;
height: 21rem;
}
.actors,