aboutsummaryrefslogtreecommitdiff
path: root/src/components/chat_avatar/chat_avatar.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/chat_avatar/chat_avatar.js')
-rw-r--r--src/components/chat_avatar/chat_avatar.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/components/chat_avatar/chat_avatar.js b/src/components/chat_avatar/chat_avatar.js
new file mode 100644
index 00000000..7b26e07c
--- /dev/null
+++ b/src/components/chat_avatar/chat_avatar.js
@@ -0,0 +1,23 @@
+import StillImage from '../still-image/still-image.vue'
+import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
+import { mapState } from 'vuex'
+
+const ChatAvatar = {
+ props: ['user', 'width', 'height'],
+ components: {
+ StillImage
+ },
+ methods: {
+ getUserProfileLink (user) {
+ if (!user) { return }
+ return generateProfileLink(user.id, user.screen_name)
+ }
+ },
+ computed: {
+ ...mapState({
+ betterShadow: state => state.interface.browserSupport.cssFilter
+ })
+ }
+}
+
+export default ChatAvatar