Skip to content

Commit

Permalink
Merge pull request #11137 from nextcloud/fix/10759/recording-consent-…
Browse files Browse the repository at this point in the history
…in-breakout-rooms

fix(RecordingConsentSettings): Disable toggle button when breakout is active
  • Loading branch information
DorraJaouad authored Dec 6, 2023
2 parents 4edb17f + 82166fb commit e556811
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/components/ConversationSettings/RecordingConsentSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
<h4 class="app-settings-section__subtitle">
{{ t('spreed', 'Recording Consent') }}
</h4>
<div v-if="disabled && !loading" class="app-settings-section__hint">
{{ t('spreed', 'Recording consent cannot be changed once a call or breakout session has started.') }}
</div>
<NcCheckboxRadioSwitch v-if="canFullModerate && !isGlobalConsent"
type="switch"
:checked.sync="recordingConsentSelected"
Expand All @@ -45,7 +48,7 @@ import { showError, showSuccess } from '@nextcloud/dialogs'

import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'

import { CALL } from '../../constants.js'
import { CALL, CONVERSATION } from '../../constants.js'
import { getCapabilities } from '@nextcloud/capabilities'

const recordingConsent = getCapabilities()?.spreed?.config?.call?.['recording-consent']
Expand Down Expand Up @@ -85,8 +88,12 @@ export default {
return recordingConsent === CALL.RECORDING_CONSENT.REQUIRED
},

isBreakoutRoomStarted() {
return this.conversation.breakoutRoomStatus === CONVERSATION.BREAKOUT_ROOM_STATUS.STARTED
},

disabled() {
return this.loading || this.conversation.hasCall
return this.loading || this.conversation.hasCall || this.isBreakoutRoomStarted
},

summaryLabel() {
Expand Down

0 comments on commit e556811

Please sign in to comment.