aboutsummaryrefslogtreecommitdiff
path: root/src/components/user_avatar/user_avatar.js
diff options
context:
space:
mode:
authorshpuld <shp@cock.li>2019-02-04 19:49:23 +0200
committershpuld <shp@cock.li>2019-02-04 19:49:23 +0200
commit54e7e0e31babbfb0c4ebc2e1a73012e1b1890231 (patch)
tree7533728f9f115f877806694960dcaeb48d28dbd7 /src/components/user_avatar/user_avatar.js
parent18ae7bd5f366598d46a65e9da1312c98f7bb00e7 (diff)
parent3cd1deb133926281920f10c1ddd6eb694c09f44d (diff)
merge develop and fix conflicts AGAIN
Diffstat (limited to 'src/components/user_avatar/user_avatar.js')
-rw-r--r--src/components/user_avatar/user_avatar.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/components/user_avatar/user_avatar.js b/src/components/user_avatar/user_avatar.js
new file mode 100644
index 00000000..e513b993
--- /dev/null
+++ b/src/components/user_avatar/user_avatar.js
@@ -0,0 +1,29 @@
+import StillImage from '../still-image/still-image.vue'
+
+const UserAvatar = {
+ props: [
+ 'src',
+ 'betterShadow',
+ 'compact'
+ ],
+ data () {
+ return {
+ showPlaceholder: false
+ }
+ },
+ components: {
+ StillImage
+ },
+ computed: {
+ imgSrc () {
+ return this.showPlaceholder ? '/images/avi.png' : this.src
+ }
+ },
+ methods: {
+ imageLoadError () {
+ this.showPlaceholder = true
+ }
+ }
+}
+
+export default UserAvatar