Using different icon and fixed unstash fade in secondary stashes.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<div
|
||||
class="tile"
|
||||
:class="{
|
||||
unstashed: !favorited && pageStash && user && pageStash.id === user.primaryStash?.id
|
||||
unstashed: !favorited && pageStash && user && pageStash.user.id === user.id,
|
||||
}"
|
||||
>
|
||||
<span class="name">{{ actor.name }}</span>
|
||||
@@ -33,8 +33,8 @@
|
||||
:item="actor"
|
||||
: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>
|
||||
|
||||
@@ -88,8 +88,9 @@ const props = defineProps({
|
||||
const pageContext = inject('pageContext');
|
||||
const { user } = pageContext;
|
||||
const pageStash = pageContext.pageProps.stash;
|
||||
const currentStash = pageStash || user.primaryStash;
|
||||
|
||||
const favorited = ref(props.actor.stashes?.some((sceneStash) => sceneStash.isPrimary) || false);
|
||||
const favorited = ref(props.actor.stashes.some((actorStash) => actorStash.id === currentStash.id));
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user