2021-03-19 01:36:31 +00:00
|
|
|
<template>
|
2023-11-24 01:10:03 +00:00
|
|
|
<RouterLink
|
2021-03-19 01:36:31 +00:00
|
|
|
:to="`/actor/${actor.id}/${actor.slug}`"
|
2023-11-24 01:10:03 +00:00
|
|
|
:target="target"
|
2021-03-19 01:36:31 +00:00
|
|
|
class="actor nolink"
|
|
|
|
>
|
|
|
|
<div class="avatar">
|
|
|
|
<img
|
|
|
|
v-if="actor.avatar"
|
2021-03-21 16:28:46 +00:00
|
|
|
:src="getPath(actor.avatar, 'lazy')"
|
2021-03-19 01:36:31 +00:00
|
|
|
class="avatar-image"
|
|
|
|
>
|
|
|
|
|
|
|
|
<Icon
|
|
|
|
v-else-if="actor.gender"
|
|
|
|
:icon="actor.gender"
|
|
|
|
class="avatar-fallback"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<span class="name">{{ actor.name }}</span>
|
2023-11-24 01:10:03 +00:00
|
|
|
</RouterLink>
|
2021-03-19 01:36:31 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
async function unstashActor(actorId, stashId) {
|
|
|
|
await this.$store.dispatch('unstashActor', { actorId, stashId });
|
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
actor: {
|
|
|
|
type: Object,
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
stash: {
|
|
|
|
type: Object,
|
|
|
|
default: null,
|
|
|
|
},
|
2023-11-24 01:10:03 +00:00
|
|
|
target: {
|
|
|
|
type: String,
|
|
|
|
default: null,
|
|
|
|
},
|
2021-03-19 01:36:31 +00:00
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
unstashActor,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.actor {
|
|
|
|
height: 2.5rem;
|
|
|
|
display: inline-flex;
|
|
|
|
align-items: center;
|
|
|
|
border: solid 1px var(--shadow-hint);
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
border: solid 1px var(--primary);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.avatar {
|
|
|
|
display: inline-flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
width: 2rem;
|
|
|
|
height: 100%;
|
2021-03-20 01:34:49 +00:00
|
|
|
border-right: solid 1px var(--shadow-hint);
|
2021-03-19 01:36:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.avatar-image {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
object-fit: cover;
|
|
|
|
object-position: 50% 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.avatar-fallback {
|
2021-03-20 01:34:49 +00:00
|
|
|
fill: var(--shadow-weak);
|
2021-03-19 01:36:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.name {
|
|
|
|
display: inline-flex;
|
|
|
|
align-items: center;
|
|
|
|
height: 100%;
|
|
|
|
padding: 0 .5rem;
|
2021-03-19 20:57:04 +00:00
|
|
|
font-size: .8rem;
|
2021-03-19 01:36:31 +00:00
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
</style>
|