Using different icon and fixed unstash fade in secondary stashes.
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
<template>
|
||||
<div
|
||||
class="movie-tile"
|
||||
:class="{ unstashed: !favorited && pageStash && user && pageStash.id === user.primaryStash?.id }"
|
||||
:class="{
|
||||
unstashed: !favorited && pageStash && user && pageStash.user.id === user.id,
|
||||
}"
|
||||
>
|
||||
<div
|
||||
class="cover-container"
|
||||
@@ -31,8 +33,8 @@
|
||||
:item="movie"
|
||||
:show-secondary="false"
|
||||
class="light tiled"
|
||||
@stashed="(stash) => { favorited = stash.isPrimary ? true : favorited; }"
|
||||
@unstashed="(stash) => { favorited = stash.isPrimary ? false : favorited; }"
|
||||
@stashed="(stash) => { favorited = stash.id === currentStash.id ? true : favorited; }"
|
||||
@unstashed="(stash) => { favorited = stash.id === currentStash.id ? false : favorited; }"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -118,10 +120,11 @@ const props = defineProps({
|
||||
const pageContext = inject('pageContext');
|
||||
const user = pageContext.user;
|
||||
const pageStash = pageContext.pageProps.stash;
|
||||
const currentStash = pageStash || user.primaryStash;
|
||||
|
||||
const currentYear = new Date().getFullYear();
|
||||
|
||||
const favorited = ref(props.movie.stashes.some((sceneStash) => sceneStash.isPrimary));
|
||||
const favorited = ref(props.movie.stashes.some((movieStash) => movieStash.id === currentStash.id));
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user