diff --git a/src/App.vue b/src/App.vue index b1f65775099..3fc30119db4 100644 --- a/src/App.vue +++ b/src/App.vue @@ -30,7 +30,7 @@ - + @@ -104,6 +104,7 @@ export default { defaultPageTitle: false, loading: false, isRefreshingCurrentConversation: false, + recordingConsentGiven: false, } }, @@ -220,13 +221,18 @@ export default { this.setPageTitle(this.getConversationName(this.token), this.atLeastOneLastMessageIdChanged) }, - token() { - // Collapse the sidebar if it's a 1to1 conversation + token(newValue, oldValue) { + // Collapse the sidebar if it's a one to one conversation if (this.isOneToOne || BrowserStorage.getItem('sidebarOpen') === 'false' || this.isMobile) { this.$store.dispatch('hideSidebar') } else if (BrowserStorage.getItem('sidebarOpen') === 'true') { this.$store.dispatch('showSidebar') } + + // Reset recording consent if switch doesn't happen within breakout rooms or main room + if (!this.isBreakoutRoomsNavigation(oldValue, newValue)) { + this.recordingConsentGiven = false + } }, }, @@ -348,6 +354,8 @@ export default { token: params.token, participantIdentifier: this.$store.getters.getParticipantIdentifier(), flags, + silent: true, + recordingConsent: this.recordingConsentGiven, }) this.$store.dispatch('setForceCallView', false) @@ -676,6 +684,38 @@ export default { }) document.querySelector('.conversations-search input').focus() }, + + /** + * Check if conversation was switched within breakout rooms and parent room. + * + * @param {string} oldToken The old conversation's token + * @param {string} newToken The new conversation's token + * @return {boolean} + */ + isBreakoutRoomsNavigation(oldToken, newToken) { + const oldConversation = this.$store.getters.conversation(oldToken) + const newConversation = this.$store.getters.conversation(newToken) + + // One of rooms is undefined + if (!oldConversation || !newConversation) { + return false + } + + // Parent to breakout + if (oldConversation.breakoutRoomMode !== CONVERSATION.BREAKOUT_ROOM_MODE.NOT_CONFIGURED + && newConversation.objectType === 'room') { + return true + } + + // Breakout to parent + if (oldConversation.objectType === 'room' + && newConversation.breakoutRoomMode !== CONVERSATION.BREAKOUT_ROOM_MODE.NOT_CONFIGURED) { + return true + } + + // Breakout to breakout + return oldConversation.objectType === 'room' && newConversation.objectType === 'room' + } }, } diff --git a/src/PublicShareAuthSidebar.vue b/src/PublicShareAuthSidebar.vue index 75fb8b5fcfe..1a81388b45c 100644 --- a/src/PublicShareAuthSidebar.vue +++ b/src/PublicShareAuthSidebar.vue @@ -32,6 +32,7 @@ :is-sidebar="true" /> + @@ -39,10 +40,12 @@ diff --git a/src/components/ConversationSettings/RecordingConsentSettings.vue b/src/components/ConversationSettings/RecordingConsentSettings.vue new file mode 100644 index 00000000000..09cd9729e16 --- /dev/null +++ b/src/components/ConversationSettings/RecordingConsentSettings.vue @@ -0,0 +1,123 @@ + + + + + + {{ t('spreed', 'Recording Consent') }} + + + {{ t('spreed', 'Require recording consent before joining call in this conversation') }} + + + {{ t('spreed', 'Recording consent is required for all calls') }} + + + {{ summaryLabel }} + + + + + + + diff --git a/src/components/MediaDevicesSelector.vue b/src/components/MediaDevicesSelector.vue index 97299bb8ade..488db26173d 100644 --- a/src/components/MediaDevicesSelector.vue +++ b/src/components/MediaDevicesSelector.vue @@ -200,7 +200,7 @@ export default {
+ {{ t('spreed', 'Recording consent is required for all calls') }} +
+ {{ summaryLabel }} +