Skip to content

Commit 3c97868

Browse files
committed
add gototheUser into ChatParticipantsContextMenu
1 parent e57e5d4 commit 3c97868

File tree

5 files changed

+15
-2
lines changed

5 files changed

+15
-2
lines changed

frontend/src/ChatParticipantsContextMenu.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ export default {
7171
});
7272
}
7373
74+
ret.push({title: this.$vuetify.locale.t('$vuetify.goto_user'), icon: 'mdi-eye', action: () => this.$emit('goToUser', this.menuableItem) });
75+
7476
if (this.dto.canChangeChatAdmins && this.menuableItem.id != this.chatStore.currentUser.id) {
7577
if (this.menuableItem.admin) {
7678
ret.push({title: this.$vuetify.locale.t('$vuetify.revoke_chat_admin'), icon: 'mdi-crown', iconColor: 'disabled', action: () => this.$emit('changeChatAdmin', this.menuableItem) });

frontend/src/ChatParticipantsModal.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
@kickParticipantFromChat="this.kickFromVideoCall"
109109
@forceMuteParticipantInChat="this.forceMute"
110110
@changeChatAdmin="this.changeChatAdmin"
111+
@goToUser="this.goToUser"
111112
/>
112113

113114
<v-progress-circular
@@ -168,7 +169,7 @@
168169
import {
169170
deepCopy,
170171
findIndex,
171-
getLoginColoredStyle,
172+
getLoginColoredStyle, getUserLink,
172173
hasLength,
173174
isCalling,
174175
isSetEqual, isStrippedUserLogin,
@@ -238,6 +239,10 @@
238239
},
239240
});
240241
},
242+
goToUser(item) {
243+
const link = getUserLink(item.id);
244+
window.open(link, '_blank').focus();
245+
},
241246
inviteToCall(dto) {
242247
const call = !dto.callingTo;
243248
axios.put(`/api/video/${this.chatId}/dial/invite`, null, {

frontend/src/locale/en.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ export default {
174174
pinned_messages: "Pinned messages",
175175
pinned_messages_full: "Pinned messages",
176176
goto_pinned_message: "Go to pinned message",
177+
goto_user: "Go to the user",
177178
pin_message: "Pin the message",
178179
no_pin_messages: "No pin messages",
179180
remove_from_pinned: "Remove from pinned",

frontend/src/locale/ru.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ export default {
174174
pinned_messages: "Закреплённые сообщ.",
175175
pinned_messages_full: "Закреплённые сообщения",
176176
goto_pinned_message: "Перейти к закреплённому сообщению",
177+
goto_user: "Перейти к пользователю",
177178
pin_message: "Закрепить сообщение",
178179
no_pin_messages: "Нет закреплённых сообщений",
179180
remove_from_pinned: "Удалить из закреплённых",

frontend/src/utils.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
chat,
44
chat_name, chatIdHashPrefix,
55
messageIdHashPrefix,
6-
prefix,
6+
prefix, profile,
77
public_prefix, userIdHashPrefix,
88
video_suffix,
99
videochat_name
@@ -80,6 +80,10 @@ export const getPublicMessageLink = (chatId, messageId) => {
8080
return getUrlPrefix() + public_prefix + chat + '/' + chatId + '/message/' + messageId;
8181
}
8282

83+
export const getUserLink = (userId) => {
84+
return getUrlPrefix() + profile + '/' + userId
85+
}
86+
8387
export const getMessageLinkRouteObject = (chatId, messageId) => {
8488
return {
8589
name: chat_name,

0 commit comments

Comments
 (0)