diff --git a/src/components/still-image/still-image.js b/src/components/still-image/still-image.js
index 5ad06dc2..8f3a7206 100644
--- a/src/components/still-image/still-image.js
+++ b/src/components/still-image/still-image.js
@@ -2,7 +2,8 @@ const StillImage = {
props: [
'src',
'referrerpolicy',
- 'mimetype'
+ 'mimetype',
+ 'imageLoadError'
],
data () {
return {
diff --git a/src/components/still-image/still-image.vue b/src/components/still-image/still-image.vue
index 1dcb7ce6..29c59e42 100644
--- a/src/components/still-image/still-image.vue
+++ b/src/components/still-image/still-image.vue
@@ -1,7 +1,7 @@
-
![]()
+
diff --git a/src/components/user_avatar/user_avatar.js b/src/components/user_avatar/user_avatar.js
new file mode 100644
index 00000000..bfa2c2b5
--- /dev/null
+++ b/src/components/user_avatar/user_avatar.js
@@ -0,0 +1,28 @@
+import StillImage from '../still-image/still-image.vue'
+import nsfwImage from '../../assets/nsfw.png'
+
+const UserAvatar = {
+ props: [
+ 'src'
+ ],
+ data () {
+ return {
+ showPlaceholder: false
+ }
+ },
+ components: {
+ StillImage
+ },
+ computed: {
+ imgSrc () {
+ return this.showPlaceholder ? nsfwImage : this.src
+ }
+ },
+ methods: {
+ imageLoadError () {
+ this.showPlaceholder = true
+ }
+ }
+}
+
+export default UserAvatar
diff --git a/src/components/user_avatar/user_avatar.vue b/src/components/user_avatar/user_avatar.vue
new file mode 100644
index 00000000..75a857ac
--- /dev/null
+++ b/src/components/user_avatar/user_avatar.vue
@@ -0,0 +1,5 @@
+
+
+
+
+
--
cgit v1.2.3-70-g09d2
From 9c4092dbd5887b4476955076fdcbe621718a8d03 Mon Sep 17 00:00:00 2001
From: taehoon
Date: Sat, 2 Feb 2019 14:17:00 -0500
Subject: Use a correct avatar placeholder image
---
src/assets/avatar-placeholder.png | Bin 0 -> 1083 bytes
src/components/user_avatar/user_avatar.js | 4 ++--
2 files changed, 2 insertions(+), 2 deletions(-)
create mode 100644 src/assets/avatar-placeholder.png
(limited to 'src')
diff --git a/src/assets/avatar-placeholder.png b/src/assets/avatar-placeholder.png
new file mode 100644
index 00000000..9c8398da
Binary files /dev/null and b/src/assets/avatar-placeholder.png differ
diff --git a/src/components/user_avatar/user_avatar.js b/src/components/user_avatar/user_avatar.js
index bfa2c2b5..407ce1a6 100644
--- a/src/components/user_avatar/user_avatar.js
+++ b/src/components/user_avatar/user_avatar.js
@@ -1,5 +1,5 @@
import StillImage from '../still-image/still-image.vue'
-import nsfwImage from '../../assets/nsfw.png'
+import avatarPlaceholderImage from '../../assets/avatar-placeholder.png'
const UserAvatar = {
props: [
@@ -15,7 +15,7 @@ const UserAvatar = {
},
computed: {
imgSrc () {
- return this.showPlaceholder ? nsfwImage : this.src
+ return this.showPlaceholder ? avatarPlaceholderImage : this.src
}
},
methods: {
--
cgit v1.2.3-70-g09d2
From d607e4195a114843029e902e09df323096e0dcd6 Mon Sep 17 00:00:00 2001
From: taehoon
Date: Sat, 2 Feb 2019 14:23:16 -0500
Subject: Migrate StillImage to UserAvatar for avatars
---
src/components/status/status.js | 2 --
src/components/status/status.vue | 2 +-
src/components/user_card/user_card.js | 4 ++--
src/components/user_card/user_card.vue | 2 +-
src/components/user_card_content/user_card_content.js | 4 ++--
src/components/user_card_content/user_card_content.vue | 2 +-
6 files changed, 7 insertions(+), 9 deletions(-)
(limited to 'src')
diff --git a/src/components/status/status.js b/src/components/status/status.js
index 2004b5cc..25fa205d 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -4,7 +4,6 @@ import RetweetButton from '../retweet_button/retweet_button.vue'
import DeleteButton from '../delete_button/delete_button.vue'
import PostStatusForm from '../post_status_form/post_status_form.vue'
import UserCardContent from '../user_card_content/user_card_content.vue'
-import StillImage from '../still-image/still-image.vue'
import UserAvatar from '../user_avatar/user_avatar.vue'
import Gallery from '../gallery/gallery.vue'
import LinkPreview from '../link-preview/link-preview.vue'
@@ -245,7 +244,6 @@ const Status = {
DeleteButton,
PostStatusForm,
UserCardContent,
- StillImage,
UserAvatar,
Gallery,
LinkPreview
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index 5611d8d2..cf9d1c47 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -13,7 +13,7 @@