Refreshing stash page when unstashing scene. Addressed stash preview overflowing on user page.

This commit is contained in:
DebaucheryLibrarian 2021-03-20 02:23:24 +01:00
parent 42a4fe581f
commit 06e6d3940b
4 changed files with 11 additions and 3 deletions

View File

@ -18,6 +18,7 @@
:release="release" :release="release"
:referer="referer" :referer="referer"
:index="index" :index="index"
@stash="isStashed => $emit('stash', isStashed)"
/> />
</li> </li>
</ul> </ul>
@ -63,6 +64,7 @@ export default {
default: null, default: null,
}, },
}, },
emits: ['stash'],
computed: { computed: {
range, range,
sfw, sfw,

View File

@ -155,6 +155,8 @@ async function stashScene() {
sceneId: this.release.id, sceneId: this.release.id,
stashId: this.$store.getters.favorites.id, stashId: this.$store.getters.favorites.id,
}); });
this.$emit('stash', true);
} catch (error) { } catch (error) {
this.stashed = false; this.stashed = false;
} }
@ -168,6 +170,8 @@ async function unstashScene() {
sceneId: this.release.id, sceneId: this.release.id,
stashId: this.$store.getters.favorites.id, stashId: this.$store.getters.favorites.id,
}); });
this.$emit('stash', false);
} catch (error) { } catch (error) {
this.stashed = true; this.stashed = true;
} }
@ -183,6 +187,7 @@ export default {
default: null, default: null,
}, },
}, },
emits: ['stash'],
data() { data() {
return { return {
stashed: this.release.isStashed, stashed: this.release.isStashed,

View File

@ -44,7 +44,6 @@
:releases="stash.scenes.map(item => item.scene)" :releases="stash.scenes.map(item => item.scene)"
class="stash-section stash-scenes" class="stash-section stash-scenes"
@stash="fetchStash" @stash="fetchStash"
@unstash="fetchStash"
/> />
<ul <ul

View File

@ -187,7 +187,8 @@ export default {
padding: 0; padding: 0;
} }
.stash-link.stash-section { .stash-link {
flex-grow: 1;
display: inline-block; display: inline-block;
text-decoration: none; text-decoration: none;
} }
@ -205,9 +206,9 @@ export default {
} }
.stash-name { .stash-name {
color: var(--shadow-strong);
padding: .5rem; padding: .5rem;
margin: 0; margin: 0;
color: var(--shadow-strong);
} }
.stash-actors, .stash-actors,
@ -233,6 +234,7 @@ export default {
.stash-actor, .stash-actor,
.stash-scene { .stash-scene {
height: 100%;
flex-shrink: 0; flex-shrink: 0;
} }