From e4a34cc4d4dcd882e8a546813215dcac95e4ceab Mon Sep 17 00:00:00 2001 From: Maxim Filippov Date: Thu, 13 Dec 2018 19:57:11 +0300 Subject: [PATCH] Use 'userProfileLink' to generate user-profile link --- src/components/chat_panel/chat_panel.js | 2 +- src/components/chat_panel/chat_panel.vue | 9 ++++----- src/components/notification/notification.js | 4 ++++ src/components/notification/notification.vue | 4 +++- src/components/status/status.js | 4 ++++ src/components/status/status.vue | 12 +++++++++--- src/components/user_card/user_card.js | 6 ++++++ src/components/user_card/user_card.vue | 3 ++- .../user_card_content/user_card_content.js | 4 ++++ .../user_card_content/user_card_content.vue | 4 ++-- .../who_to_follow_panel/who_to_follow_panel.js | 4 ++++ .../who_to_follow_panel/who_to_follow_panel.vue | 6 +++--- .../user_profile_link_generator.js | 12 ++++++------ .../user_profile_link_generator.spec.js | 12 ++++++------ 14 files changed, 58 insertions(+), 28 deletions(-) diff --git a/src/components/chat_panel/chat_panel.js b/src/components/chat_panel/chat_panel.js index 959b5c3a..e649e907 100644 --- a/src/components/chat_panel/chat_panel.js +++ b/src/components/chat_panel/chat_panel.js @@ -13,7 +13,7 @@ const chatPanel = { return this.$store.state.chat.messages }, userProfileLink (user) { - return generateProfileLink(user, user.name) + return generateProfileLink(user.id, user.screen_name) } }, methods: { diff --git a/src/components/chat_panel/chat_panel.vue b/src/components/chat_panel/chat_panel.vue index 182ea347..b253342e 100644 --- a/src/components/chat_panel/chat_panel.vue +++ b/src/components/chat_panel/chat_panel.vue @@ -13,8 +13,10 @@
- - {{message.author.username}} + + {{message.author.username}}
@@ -67,9 +69,6 @@ overflow-x: hidden; } -.chat-name { -} - .chat-message { display: flex; padding: 0.2em 0.5em diff --git a/src/components/notification/notification.js b/src/components/notification/notification.js index c786f2cc..95d094f4 100644 --- a/src/components/notification/notification.js +++ b/src/components/notification/notification.js @@ -2,6 +2,7 @@ import Status from '../status/status.vue' import StillImage from '../still-image/still-image.vue' import UserCardContent from '../user_card_content/user_card_content.vue' import { highlightClass, highlightStyle } from '../../services/user_highlighter/user_highlighter.js' +import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator' const Notification = { data () { @@ -28,6 +29,9 @@ const Notification = { const highlight = this.$store.state.config.highlight const user = this.notification.action.user return highlightStyle(highlight[user.screen_name]) + }, + userProfileLink (user) { + return generateProfileLink(user.id, user.screen_name) } } } diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue index 40146513..a34301b7 100644 --- a/src/components/notification/notification.vue +++ b/src/components/notification/notification.vue @@ -28,7 +28,9 @@