From 450a9270baa5af3e03df15668444c08b2f5dc5b2 Mon Sep 17 00:00:00 2001 From: Maksim Sukharev Date: Wed, 27 Sep 2023 13:33:46 +0200 Subject: [PATCH 1/6] partially revert a0f8a993, enable mixin for 1-1 conversations only Signed-off-by: Maksim Sukharev --- src/components/TopBar/TopBar.vue | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/components/TopBar/TopBar.vue b/src/components/TopBar/TopBar.vue index ffaa256ffda..71e5b779893 100644 --- a/src/components/TopBar/TopBar.vue +++ b/src/components/TopBar/TopBar.vue @@ -23,7 +23,7 @@
+ :class="{'conversation-header__text--offline': isPeerInactive}">

{{ conversation.displayName }}

@@ -164,7 +164,7 @@ import TopBarMediaControls from './TopBarMediaControls.vue' import TopBarMenu from './TopBarMenu.vue' import { CONVERSATION } from '../../constants.js' -import isInLobby from '../../mixins/isInLobby.js' +import getParticipants from '../../mixins/getParticipants.js' import BrowserStorage from '../../services/BrowserStorage.js' import { getStatusMessage } from '../../utils/userStatus.js' import { localCallParticipantModel, localMediaModel } from '../../utils/webrtc/index.js' @@ -195,7 +195,7 @@ export default { mixins: [ richEditor, - isInLobby, + getParticipants, ], props: { @@ -272,7 +272,7 @@ export default { /** * Online status of the peer in one to one conversation. */ - isPeerOffline() { + isPeerInactive() { // Only compute this in one-to-one conversations if (!this.isOneToOneConversation) { return undefined @@ -343,6 +343,18 @@ export default { this.notifyUnreadMessages(null) } }, + + isOneToOneConversation: { + immediate: true, + // Group conversations have mixin in RightSidebar, so should work only for one-to-one + handler(newValue) { + if (newValue) { + this.initialiseGetParticipantsMixin() + } else { + this.stopGetParticipantsMixin() + } + }, + }, }, mounted() { From cc6a7c564e35b8844bdaa94c2c9fcf96bf95b4dd Mon Sep 17 00:00:00 2001 From: Maksim Sukharev Date: Wed, 27 Sep 2023 16:25:50 +0200 Subject: [PATCH 2/6] replace single-used AuthorAvatar component with AvatarWrapper Signed-off-by: Maksim Sukharev --- .../AvatarWrapper/AvatarWrapper.vue | 54 ++++++-- .../MessagesGroup/AuthorAvatar.vue | 117 ------------------ .../MessagesGroup/MessagesGroup.spec.js | 26 ++-- .../MessagesGroup/MessagesGroup.vue | 23 +++- 4 files changed, 72 insertions(+), 148 deletions(-) delete mode 100644 src/components/MessagesList/MessagesGroup/AuthorAvatar.vue diff --git a/src/components/AvatarWrapper/AvatarWrapper.vue b/src/components/AvatarWrapper/AvatarWrapper.vue index 6f9957f78b9..196be555bd4 100644 --- a/src/components/AvatarWrapper/AvatarWrapper.vue +++ b/src/components/AvatarWrapper/AvatarWrapper.vue @@ -2,8 +2,9 @@ - @copyright Copyright (c) 2020 Marco Ambrosini - - @author Marco Ambrosini + - @author Maksim Sukharev - - - @license GNU AGPL version 3 or any later version + - @license AGPL-3.0-or-later - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as @@ -20,14 +21,7 @@ --> @@ -201,7 +201,7 @@ :title="item.label" @click="createAndJoinConversation(item)"> diff --git a/src/components/RoomSelector.vue b/src/components/RoomSelector.vue index 28fb57c778e..c9185aa4b4e 100644 --- a/src/components/RoomSelector.vue +++ b/src/components/RoomSelector.vue @@ -46,10 +46,7 @@ :key="room.token" :class="{selected: selectedRoom === room.token }" @click="selectedRoom=room.token"> - + {{ room.displayName }} diff --git a/src/components/TopBar/TopBar.vue b/src/components/TopBar/TopBar.vue index 71e5b779893..ec6f5c3c320 100644 --- a/src/components/TopBar/TopBar.vue +++ b/src/components/TopBar/TopBar.vue @@ -25,7 +25,8 @@ class="conversation-icon" :offline="isPeerInactive" :item="conversation" - :disable-menu="isAvatarMenuDisabled" + :disable-menu="disableMenu" + show-user-online-status :hide-favorite="false" :hide-call="false" /> @@ -300,7 +301,7 @@ export default { return n('spreed', '%n participant in call', '%n participants in call', this.$store.getters.participantsInCall(this.token)) }, - isAvatarMenuDisabled() { + disableMenu() { // NcAvatarMenu doesn't work on Desktop // See: https://github.com/nextcloud/talk-desktop/issues/34 return IS_DESKTOP diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index 7076d80e0e2..451e78c203b 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -33,10 +33,7 @@ :sub-text="getSubText(item)" :item="item"> From 2111c38ef12c7ebf9bc792c9a787d55aeeb3ef10 Mon Sep 17 00:00:00 2001 From: Maksim Sukharev Date: Thu, 28 Sep 2023 21:23:30 +0200 Subject: [PATCH 6/6] [stable28] rewrite default props for GuestWelcomeWindow.vue Signed-off-by: Maksim Sukharev --- src/components/GuestWelcomeWindow.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/GuestWelcomeWindow.vue b/src/components/GuestWelcomeWindow.vue index 6d489b78694..63e50f2826a 100644 --- a/src/components/GuestWelcomeWindow.vue +++ b/src/components/GuestWelcomeWindow.vue @@ -27,9 +27,7 @@ size="small">