mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 08:12:15 +00:00
47 lines
946 B
Vue
47 lines
946 B
Vue
<template>
|
|
<div class="user-preview">
|
|
<img
|
|
v-if="item.data.relationships.user.data.attributes.avatar"
|
|
class="user-image"
|
|
:src="item.data.relationships.user.data.attributes.avatar"
|
|
:alt="item.data.relationships.user.data.attributes.name"
|
|
>
|
|
<TypedAvatar
|
|
v-else
|
|
:size="24"
|
|
:letter="item.data.relationships.user.data.attributes.name.substr(0, 1)"
|
|
:color="item.data.relationships.user.data.attributes.color"
|
|
/>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import TypedAvatar from "../Others/TypedAvatar"
|
|
|
|
export default {
|
|
name: 'AuthorThumbnail',
|
|
components: {
|
|
TypedAvatar
|
|
},
|
|
props: [
|
|
'item',
|
|
]
|
|
}
|
|
</script>
|
|
<style scoped lang="scss">
|
|
@import '/resources/sass/vuefilemanager/_variables';
|
|
@import '/resources/sass/vuefilemanager/_mixins';
|
|
|
|
.user-preview {
|
|
position: absolute;
|
|
right: -5px;
|
|
bottom: -5px;
|
|
|
|
.user-image {
|
|
width: 22px;
|
|
height: 22px;
|
|
outline: 3px solid white;
|
|
border-radius: 6px;
|
|
}
|
|
}
|
|
|
|
</style> |