From 671b31308005fbc5d9f8f466adcc3c55eb24efd6 Mon Sep 17 00:00:00 2001 From: Maksim Sukharev Date: Fri, 22 Mar 2024 10:23:15 +0100 Subject: [PATCH] feat(LeftSidebar): add fast creating option for federated users Signed-off-by: Maksim Sukharev --- src/components/LeftSidebar/LeftSidebar.vue | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/components/LeftSidebar/LeftSidebar.vue b/src/components/LeftSidebar/LeftSidebar.vue index 1934164bb24..c5099c2f428 100644 --- a/src/components/LeftSidebar/LeftSidebar.vue +++ b/src/components/LeftSidebar/LeftSidebar.vue @@ -268,6 +268,23 @@ + + + @@ -328,6 +345,7 @@ import ConversationsListVirtual from './ConversationsList/ConversationsListVirtu import InvitationHandler from './InvitationHandler.vue' import OpenConversationsList from './OpenConversationsList/OpenConversationsList.vue' import SearchBox from './SearchBox/SearchBox.vue' +import AvatarWrapper from '../AvatarWrapper/AvatarWrapper.vue' import ConversationIcon from '../ConversationIcon.vue' import Hint from '../Hint.vue' import NewConversationDialog from '../NewConversationDialog/NewConversationDialog.vue' @@ -360,6 +378,7 @@ export default { name: 'LeftSidebar', components: { + AvatarWrapper, CallPhoneDialog, InvitationHandler, NcAppNavigation, @@ -424,6 +443,7 @@ export default { searchResultsUsers: [], searchResultsGroups: [], searchResultsCircles: [], + searchResultsFederated: [], searchResultsListedConversations: [], contactsLoading: false, listedConversationsLoading: false, @@ -714,6 +734,10 @@ export default { }) this.searchResultsGroups = this.searchResults.filter((match) => match.source === ATTENDEE.ACTOR_TYPE.GROUPS) this.searchResultsCircles = this.searchResults.filter((match) => match.source === ATTENDEE.ACTOR_TYPE.CIRCLES) + this.searchResultsFederated = this.searchResults.filter((match) => match.source === ATTENDEE.ACTOR_TYPE.REMOTES) + .map((item) => { + return { ...item, source: ATTENDEE.ACTOR_TYPE.FEDERATED_USERS } + }) this.contactsLoading = false } catch (exception) { if (CancelableRequest.isCancel(exception)) { @@ -978,6 +1002,16 @@ export default { name: item.id, } } + if (item.source === ATTENDEE.ACTOR_TYPE.FEDERATED_USERS) { + return { + id: item.id, + name: item.label, + source: item.source, + disableMenu: true, + token: 'new', + showUserStatus: true, + } + } return { type: CONVERSATION.TYPE.GROUP, objectType: item.source,