Skip to content

Commit

Permalink
Merge pull request #11138 from nextcloud/backport/11132/stable28
Browse files Browse the repository at this point in the history
[stable28] Fix(File share authentication): Remove unnecessary options
  • Loading branch information
DorraJaouad committed Dec 6, 2023
2 parents 89e0cec + b67484b commit cc599d2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
6 changes: 4 additions & 2 deletions src/PublicShareAuthRequestPasswordButton.vue
Expand Up @@ -19,7 +19,7 @@
-->

<template>
<div>
<Fragment>
<!-- "submit-wrapper" is used to mimic the login button and thus get
automatic colouring of the confirm icon by the Theming app. -->
<div id="submit-wrapper" class="request-password-wrapper">
Expand All @@ -35,10 +35,11 @@
<p v-if="hasRequestFailed" class="warning error-message">
{{ t('spreed', 'Error requesting the password.') }}
</p>
</div>
</Fragment>
</template>

<script>
import { Fragment } from 'vue-frag'
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
import { getPublicShareAuthConversationToken } from './services/publicShareAuthService.js'
Expand All @@ -50,6 +51,7 @@ export default {
components: {
NcButton,
Fragment,
},
props: {
Expand Down
4 changes: 2 additions & 2 deletions src/PublicShareAuthSidebar.vue
Expand Up @@ -172,7 +172,7 @@ export default {
// has been set, which is done once the conversation has been
// fetched. MediaSettings are called to set up audio and video devices
// and also to give a consent to recording, if set up
emit('talk:media-settings:show')
emit('talk:media-settings:show', 'video-verification')
}
},
Expand Down Expand Up @@ -206,7 +206,7 @@ export default {
// Guest needs to add their display name right after joining conversation,
// before fetching and showing media settings. Then, this latter will be triggered
// by the guest name addition event.
emit('talk:media-settings:show')
emit('talk:media-settings:show', 'video-verification')
unsubscribe('talk:guest-name:added', this.showGuestMediaSettings)
}
},
Expand Down
13 changes: 9 additions & 4 deletions src/components/MediaSettings/MediaSettings.vue
Expand Up @@ -120,7 +120,8 @@
@update-background="handleUpdateVirtualBackground" />

<!-- "Always show" setting -->
<NcCheckboxRadioSwitch class="checkbox"
<NcCheckboxRadioSwitch v-if="!isPublicShareAuthSidebar"
class="checkbox"
:checked="showMediaSettings || showRecordingWarning"
:disabled="showRecordingWarning"
@update:checked="setShowMediaSettings">
Expand Down Expand Up @@ -296,6 +297,7 @@ export default {
audioDeviceStateChanged: false,
videoDeviceStateChanged: false,
isRecordingFromStart: false,
isPublicShareAuthSidebar: false,
}
},
Expand Down Expand Up @@ -381,7 +383,7 @@ export default {
},
showSilentCallOption() {
return !(this.hasCall && !this.isInLobby)
return !(this.hasCall && !this.isInLobby) && !this.isPublicShareAuthSidebar
},
showDeviceSelection() {
Expand Down Expand Up @@ -453,8 +455,11 @@ export default {
},
methods: {
showModal() {
showModal(page) {
this.modal = true
if (page === 'video-verification') {
this.isPublicShareAuthSidebar = true
}
},
closeModal() {
Expand All @@ -463,6 +468,7 @@ export default {
this.deviceIdChanged = false
this.audioDeviceStateChanged = false
this.videoDeviceStateChanged = false
this.isPublicShareAuthSidebar = false
},
toggleAudio() {
Expand Down Expand Up @@ -497,7 +503,6 @@ export default {
if (this.videoDeviceStateChanged) {
emit('local-video-control-button:toggle-video')
}
this.closeModal()
},
Expand Down

0 comments on commit cc599d2

Please sign in to comment.