Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix(File share authentication): Remove unnecessary options #11132

Merged
merged 2 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/PublicShareAuthRequestPasswordButton.vue
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading