Using different icon and fixed unstash fade in secondary stashes.

This commit is contained in:
2024-03-27 03:05:32 +01:00
parent 23a6a60f79
commit 105972b3d4
4 changed files with 24 additions and 18 deletions

View File

@@ -29,17 +29,17 @@
</VDropdown>
<Icon
v-if="itemStashes.some((itemStash) => itemStash.isPrimary)"
icon="heart7"
v-if="itemStashes.some((itemStash) => itemStash.id === currentStash.id)"
:icon="currentStash.isPrimary ? 'heart7' : 'folder-heart'"
class="heart favorited noselect"
@click.native.stop="unstashItem(user.primaryStash)"
@click.native.stop="unstashItem(currentStash)"
/>
<Icon
v-else
icon="heart8"
:icon="currentStash.isPrimary ? 'heart8' : 'folder-heart'"
class="heart noselect"
@click.native.stop="stashItem(user.primaryStash)"
@click.native.stop="stashItem(currentStash)"
/>
</div>
</template>
@@ -70,7 +70,8 @@ const props = defineProps({
const emit = defineEmits(['stashed', 'unstashed']);
const { user } = inject('pageContext');
const { user, pageProps } = inject('pageContext');
const currentStash = pageProps.stash || user.primaryStash;
const itemStashes = ref(props.item.stashes);