From aa2cf51c05ebdf411d74af5debbbc8fa4d3cf457 Mon Sep 17 00:00:00 2001 From: eugenijm Date: Thu, 7 May 2020 16:10:53 +0300 Subject: Add Chats --- src/components/chat_avatar/chat_avatar.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/components/chat_avatar/chat_avatar.js (limited to 'src/components/chat_avatar/chat_avatar.js') 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 -- cgit v1.2.3-70-g09d2