2021-03-19 01:36:31 +00:00
|
|
|
<template>
|
|
|
|
<div
|
|
|
|
v-if="stash"
|
|
|
|
class="stash content"
|
|
|
|
>
|
|
|
|
<div class="stash-header">
|
|
|
|
<h2 class="stash-name">{{ stash.name }}</h2>
|
|
|
|
|
|
|
|
<router-link
|
|
|
|
v-if="stash.user"
|
|
|
|
:to="{ name: 'user', params: { username: stash.user.username } }"
|
|
|
|
class="stash-username nolink"
|
|
|
|
><Icon icon="user3" />{{ stash.user.username }}</router-link>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="content-inner">
|
2021-03-19 03:18:56 +00:00
|
|
|
<Releases
|
2021-03-19 01:36:31 +00:00
|
|
|
v-if="stash.scenes?.length > 0"
|
2021-03-19 03:18:56 +00:00
|
|
|
:releases="stash.scenes.map(item => item.scene)"
|
|
|
|
class="stash-section stash-scenes"
|
|
|
|
@stash="fetchStash"
|
|
|
|
@unstash="fetchStash"
|
|
|
|
/>
|
2021-03-19 01:36:31 +00:00
|
|
|
|
|
|
|
<ul
|
|
|
|
v-if="stash.actors?.length > 0"
|
|
|
|
class="stash-section stash-actors nolist"
|
|
|
|
>
|
|
|
|
<li
|
|
|
|
v-for="item in stash.actors"
|
|
|
|
:key="item.id"
|
|
|
|
><Actor :actor="item.actor" /></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import Actor from '../actors/tile.vue';
|
2021-03-19 03:18:56 +00:00
|
|
|
import Releases from '../releases/releases.vue';
|
2021-03-19 01:36:31 +00:00
|
|
|
|
|
|
|
async function fetchStash() {
|
|
|
|
this.stash = await this.$store.dispatch('fetchStash', this.$route.params.stashId);
|
|
|
|
}
|
|
|
|
|
|
|
|
async function mounted() {
|
|
|
|
this.fetchStash();
|
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
Actor,
|
2021-03-19 03:18:56 +00:00
|
|
|
Releases,
|
2021-03-19 01:36:31 +00:00
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
stash: null,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
mounted,
|
|
|
|
methods: {
|
|
|
|
fetchStash,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.stash-header {
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
align-items: center;
|
|
|
|
background: var(--profile);
|
|
|
|
color: var(--text-light);
|
|
|
|
}
|
|
|
|
|
|
|
|
.stash-name,
|
|
|
|
.stash-username {
|
|
|
|
display: inline-flex;
|
|
|
|
align-items: center;
|
|
|
|
padding: .5rem 1rem;
|
|
|
|
margin: 0;
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
|
|
.icon {
|
|
|
|
fill: var(--text-light);
|
|
|
|
margin: -.1rem .5rem 0 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-19 03:18:56 +00:00
|
|
|
.stash-section:not(:last-child) {
|
|
|
|
border-bottom: solid 1px var(--shadow-hint);
|
2021-03-19 01:36:31 +00:00
|
|
|
}
|
|
|
|
|
2021-03-19 03:18:56 +00:00
|
|
|
.stash-actors {
|
2021-03-19 01:36:31 +00:00
|
|
|
display: grid;
|
|
|
|
grid-gap: .5rem;
|
|
|
|
grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
|
2021-03-19 03:18:56 +00:00
|
|
|
flex-grow: 1;
|
|
|
|
padding: 1rem;
|
2021-03-19 01:36:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.stash-scenes {
|
2021-03-19 03:18:56 +00:00
|
|
|
flex-grow: 0;
|
|
|
|
|
|
|
|
.tiles {
|
|
|
|
grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
|
|
|
|
}
|
2021-03-19 01:36:31 +00:00
|
|
|
}
|
|
|
|
</style>
|