Add bot indication to user icon on statuses

This commit is contained in:
Alexander Tumin 2022-03-01 00:35:00 +03:00
parent fe0ed7e8f0
commit 2b7f12613e
10 changed files with 43 additions and 3 deletions

View file

@ -1,10 +1,21 @@
import StillImage from '../still-image/still-image.vue'
import { library } from '@fortawesome/fontawesome-svg-core'
import {
faRobot
} from '@fortawesome/free-solid-svg-icons'
library.add(
faRobot
)
const UserAvatar = {
props: [
'user',
'betterShadow',
'compact'
'compact',
'bot'
],
data () {
return {

View file

@ -7,7 +7,9 @@
:src="imgSrc(user.profile_image_url_original)"
:class="{ 'avatar-compact': compact, 'better-shadow': betterShadow }"
:image-load-error="imageLoadError"
/>
>
<FAIcon v-if="bot" icon="robot" class="bot-indicator" />
</StillImage>
<div
v-else
class="Avatar -placeholder"
@ -36,6 +38,12 @@
height: 100%;
}
& > .bot-indicator {
position: absolute;
bottom: 0;
right: 0;
}
&.better-shadow {
box-shadow: var(--_avatarShadowInset);
filter: var(--_avatarShadowFilter);