2018-01-21 06:06:30 +01:00
|
|
|
{{#if error}}
|
2018-02-07 05:54:49 +01:00
|
|
|
<svg class="{{className || ''}} avatar size-{{size}}" aria-hidden="true">
|
2018-01-15 06:41:19 +01:00
|
|
|
<use xlink:href="#fa-user" />
|
|
|
|
</svg>
|
2018-02-01 03:20:30 +01:00
|
|
|
{{elseif $autoplayGifs}}
|
2018-02-07 05:54:49 +01:00
|
|
|
<img class="{{className || ''}} avatar size-{{size}}" aria-hidden="true" alt=""
|
2018-01-23 06:47:29 +01:00
|
|
|
src="{{account.avatar}}" on:imgLoadError="set({error: true})" />
|
2018-02-01 03:20:30 +01:00
|
|
|
{{else}}
|
2018-02-07 05:54:49 +01:00
|
|
|
<NonAutoplayImg className="{{className || ''}} avatar size-{{size}}" ariaHidden="true" alt=""
|
2018-02-01 03:20:30 +01:00
|
|
|
src="{{account.avatar}}" staticSrc="{{account.avatar_static}}" on:imgLoadError="set({error: true})" />
|
2018-01-21 06:06:30 +01:00
|
|
|
{{/if}}
|
2018-01-11 05:45:02 +01:00
|
|
|
<style>
|
2018-02-01 03:20:30 +01:00
|
|
|
:global(.avatar) {
|
|
|
|
border-radius: 4px;
|
|
|
|
}
|
|
|
|
:global(.avatar.size-small) {
|
2018-01-11 09:26:35 +01:00
|
|
|
width: 48px;
|
|
|
|
height: 48px;
|
2018-02-01 03:20:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
:global(.avatar.size-big) {
|
|
|
|
width: 100px;
|
|
|
|
height: 100px;
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (max-width: 767px) {
|
|
|
|
:global(.avatar.size-big) {
|
|
|
|
width: 80px;
|
|
|
|
height: 80px;
|
|
|
|
}
|
2018-01-11 05:45:02 +01:00
|
|
|
}
|
2018-01-15 06:41:19 +01:00
|
|
|
|
2018-01-16 17:38:23 +01:00
|
|
|
svg.avatar {
|
2018-01-15 06:41:19 +01:00
|
|
|
fill: var(--deemphasized-text-color);
|
|
|
|
}
|
2018-01-11 05:45:02 +01:00
|
|
|
</style>
|
|
|
|
<script>
|
2018-01-28 01:35:44 +01:00
|
|
|
import { imgLoadError } from '../../_utils/events'
|
2018-02-01 03:20:30 +01:00
|
|
|
import { store } from '../../_store/store'
|
|
|
|
import NonAutoplayImg from '../NonAutoplayImg.html'
|
2018-01-23 06:47:29 +01:00
|
|
|
|
2018-01-11 05:45:02 +01:00
|
|
|
export default {
|
2018-01-21 06:06:30 +01:00
|
|
|
events: {
|
2018-01-23 06:47:29 +01:00
|
|
|
imgLoadError
|
2018-02-01 03:20:30 +01:00
|
|
|
},
|
|
|
|
store: () => store,
|
|
|
|
components: {
|
|
|
|
NonAutoplayImg
|
2018-01-15 06:41:19 +01:00
|
|
|
}
|
2018-01-11 05:45:02 +01:00
|
|
|
}
|
|
|
|
</script>
|