Added unstash buttons to non-favorites stash items
This commit is contained in:
@@ -46,18 +46,25 @@
|
||||
><Icon icon="blocked" />No thumbnail available</div>
|
||||
|
||||
<Icon
|
||||
v-show="favorited"
|
||||
v-show="(!stash || stash.primary) && favorited"
|
||||
icon="heart7"
|
||||
class="stash stashed"
|
||||
@click.prevent.native="unstashScene"
|
||||
/>
|
||||
|
||||
<Icon
|
||||
v-show="favorited === false"
|
||||
v-show="(!stash || stash.primary) && favorited === false"
|
||||
icon="heart8"
|
||||
class="stash unstashed"
|
||||
@click.prevent.native="stashScene"
|
||||
/>
|
||||
|
||||
<Icon
|
||||
v-show="stash && !stash.primary"
|
||||
icon="cross2"
|
||||
class="stash unstash"
|
||||
@click.prevent.native="unstashScene"
|
||||
/>
|
||||
</a>
|
||||
</span>
|
||||
|
||||
@@ -169,12 +176,14 @@ async function stashScene() {
|
||||
}
|
||||
|
||||
async function unstashScene() {
|
||||
this.favorited = false;
|
||||
if (!this.stash || this.stash.primary) {
|
||||
this.favorited = false;
|
||||
}
|
||||
|
||||
try {
|
||||
await this.$store.dispatch('unstashScene', {
|
||||
sceneId: this.release.id,
|
||||
stashId: this.$store.getters.favorites.id,
|
||||
stashId: this.stash?.id || this.$store.getters.favorites.id,
|
||||
});
|
||||
|
||||
this.$emit('stash', false);
|
||||
@@ -192,6 +201,10 @@ export default {
|
||||
type: Object,
|
||||
default: null,
|
||||
},
|
||||
stash: {
|
||||
type: Object,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
emits: ['stash'],
|
||||
data() {
|
||||
@@ -236,7 +249,8 @@ export default {
|
||||
text-shadow: 0 0 2px var(--darken-weak);
|
||||
}
|
||||
|
||||
&:hover .unstashed {
|
||||
&:hover .unstashed,
|
||||
&:hover .unstash {
|
||||
fill: var(--lighten);
|
||||
}
|
||||
}
|
||||
@@ -295,6 +309,11 @@ export default {
|
||||
fill: var(--primary);
|
||||
filter: drop-shadow(0 0 2px var(--darken-weak));
|
||||
}
|
||||
|
||||
&:hover.unstash {
|
||||
fill: var(--text-light);
|
||||
filter: drop-shadow(0 0 2px var(--darken-weak));
|
||||
}
|
||||
}
|
||||
|
||||
.row {
|
||||
|
||||
Reference in New Issue
Block a user