mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-19 00:22:15 +00:00
author thumbnail in file
This commit is contained in:
47
resources/js/components/FilesView/AuthorThumbnail.vue
Normal file
47
resources/js/components/FilesView/AuthorThumbnail.vue
Normal file
@@ -0,0 +1,47 @@
|
||||
<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: {type: Function}
|
||||
}
|
||||
}
|
||||
</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>
|
||||
Reference in New Issue
Block a user