2021-03-14 03:54:43 +00:00
|
|
|
<template>
|
|
|
|
<div
|
|
|
|
v-if="user"
|
|
|
|
class="user"
|
|
|
|
>
|
|
|
|
<div class="header">
|
|
|
|
<h2 class="username">{{ user.username }}</h2>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<section
|
2021-03-15 02:30:47 +00:00
|
|
|
v-if="user.stashes?.length > 0"
|
2021-03-14 03:54:43 +00:00
|
|
|
class="section"
|
|
|
|
>
|
|
|
|
<h3 class="heading">Stashes</h3>
|
|
|
|
|
|
|
|
<ul class="stashes nolist">
|
|
|
|
<li
|
2021-03-15 02:30:47 +00:00
|
|
|
v-for="stash in user.stashes"
|
2021-03-14 03:54:43 +00:00
|
|
|
:key="stash.id"
|
2021-03-15 02:30:47 +00:00
|
|
|
class="stash"
|
2021-03-14 03:54:43 +00:00
|
|
|
>
|
|
|
|
<h4 class="stash-name">{{ stash.name }}</h4>
|
|
|
|
|
2021-03-16 01:31:23 +00:00
|
|
|
<ul
|
|
|
|
v-if="stash.scenes?.length > 0"
|
|
|
|
class="stash-section stash-scenes nolist"
|
|
|
|
>
|
2021-03-14 03:54:43 +00:00
|
|
|
<li
|
2021-03-15 02:30:47 +00:00
|
|
|
v-for="item in stash.scenes"
|
2021-03-14 03:54:43 +00:00
|
|
|
:key="item.id"
|
2021-03-15 02:30:47 +00:00
|
|
|
><Scene :release="item.scene" /></li>
|
2021-03-14 03:54:43 +00:00
|
|
|
</ul>
|
|
|
|
|
2021-03-16 01:31:23 +00:00
|
|
|
<ul
|
|
|
|
v-if="stash.actors?.length > 0"
|
|
|
|
class="stash-section stash-actors nolist"
|
|
|
|
>
|
2021-03-14 03:54:43 +00:00
|
|
|
<li
|
2021-03-15 02:30:47 +00:00
|
|
|
v-for="item in stash.actors"
|
2021-03-14 03:54:43 +00:00
|
|
|
:key="item.id"
|
2021-03-15 02:30:47 +00:00
|
|
|
><Actor :actor="item.actor" /></li>
|
2021-03-14 03:54:43 +00:00
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import Actor from '../actors/tile.vue';
|
|
|
|
import Scene from '../releases/scene-tile.vue';
|
|
|
|
|
|
|
|
async function mounted() {
|
2021-03-15 02:30:47 +00:00
|
|
|
this.user = await this.$store.dispatch('fetchUser', this.$route.params.username);
|
|
|
|
this.pageTitle = this.user?.username;
|
2021-03-14 03:54:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
Actor,
|
|
|
|
Scene,
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
user: this.$route.params.username === this.$store.state.auth.user?.username
|
|
|
|
? this.$store.state.auth.user
|
|
|
|
: null,
|
2021-03-15 02:30:47 +00:00
|
|
|
pageTitle: null,
|
2021-03-14 03:54:43 +00:00
|
|
|
};
|
|
|
|
},
|
|
|
|
mounted,
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.header {
|
2021-03-15 02:30:47 +00:00
|
|
|
padding: .5rem 1rem;
|
2021-03-14 03:54:43 +00:00
|
|
|
background: var(--profile);
|
|
|
|
}
|
|
|
|
|
|
|
|
.username {
|
|
|
|
margin: 0;
|
|
|
|
font-size: 1.5rem;
|
|
|
|
color: var(--text-light);
|
|
|
|
}
|
|
|
|
|
|
|
|
.section {
|
|
|
|
padding: 1rem;
|
|
|
|
margin: 0 0 1rem 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.heading {
|
|
|
|
color: var(--primary);
|
|
|
|
}
|
|
|
|
|
|
|
|
.stash {
|
2021-03-16 01:31:23 +00:00
|
|
|
width: 100%;
|
2021-03-15 02:30:47 +00:00
|
|
|
background: var(--background);
|
2021-03-14 03:54:43 +00:00
|
|
|
margin: 0 0 1rem 0;
|
2021-03-15 02:30:47 +00:00
|
|
|
box-shadow: 0 0 3px var(--shadow-weak);
|
2021-03-14 03:54:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.stash-name {
|
|
|
|
color: var(--shadow-strong);
|
2021-03-15 02:30:47 +00:00
|
|
|
padding: 1rem .5rem 0 .5rem;
|
|
|
|
margin: 0;
|
2021-03-14 03:54:43 +00:00
|
|
|
}
|
|
|
|
|
2021-03-15 02:30:47 +00:00
|
|
|
.stash-section {
|
|
|
|
padding: 1rem .5rem;
|
|
|
|
|
|
|
|
&:not(:last-child) {
|
|
|
|
border-bottom: solid 1px var(--shadow-hint);
|
|
|
|
}
|
2021-03-14 03:54:43 +00:00
|
|
|
}
|
|
|
|
|
2021-03-15 02:30:47 +00:00
|
|
|
.stash-actors,
|
|
|
|
.stash-scenes {
|
2021-03-14 03:54:43 +00:00
|
|
|
display: grid;
|
2021-03-15 02:30:47 +00:00
|
|
|
flex-grow: 1;
|
2021-03-14 03:54:43 +00:00
|
|
|
grid-gap: .5rem;
|
|
|
|
box-sizing: border-box;
|
|
|
|
}
|
2021-03-15 02:30:47 +00:00
|
|
|
|
|
|
|
.stash-actors {
|
|
|
|
grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
|
|
|
|
}
|
|
|
|
|
|
|
|
.stash-scenes {
|
|
|
|
grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
|
|
|
|
}
|
2021-03-14 03:54:43 +00:00
|
|
|
</style>
|