Skip to content

Commit

Permalink
Merge pull request #11720 from nextcloud/fix/9725/fix-lost-screenshare
Browse files Browse the repository at this point in the history
chore(screenshare): get rid of duplicated properties
  • Loading branch information
Antreesy authored Mar 5, 2024
2 parents fafcca6 + f80af7f commit 11a1888
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 22 deletions.
3 changes: 1 addition & 2 deletions src/components/TopBar/TopBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@
<TopBarMediaControls v-if="isInCall"
:token="token"
:model="localMediaModel"
:show-actions="!isSidebar"
:screen-sharing-button-hidden="isSidebar"
:is-sidebar="isSidebar"
:local-call-participant-model="localCallParticipantModel" />

<!-- TopBar menu -->
Expand Down
27 changes: 7 additions & 20 deletions src/components/TopBar/TopBarMediaControls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
:model="model"
type="tertiary" />

<NcButton v-if="isVirtualBackgroundAvailable && !showActions"
<NcButton v-if="isVirtualBackgroundAvailable && isSidebar"
v-tooltip="toggleVirtualBackgroundButtonLabel"
type="tertiary"
:aria-label="toggleVirtualBackgroundButtonLabel"
Expand All @@ -82,7 +82,7 @@
</template>
</NcButton>

<NcActions v-if="!screenSharingButtonHidden && isScreensharing"
<NcActions v-if="!isSidebar && isScreensharing"
id="screensharing-button"
v-tooltip="screenSharingButtonTooltip"
type="error"
Expand All @@ -92,11 +92,9 @@
:boundaries-element="boundaryElement"
:container="container"
:open.sync="screenSharingMenuOpen">
<!-- Actions button icon -->
<template #icon>
<MonitorOff v-if="isScreensharing" :size="20" />
<MonitorOff :size="20" />
</template>
<!-- /Actions button icon -->
<!-- Actions -->
<NcActionButton close-after-click @click="showScreen">
<template #icon>
Expand All @@ -111,7 +109,7 @@
{{ t('spreed', 'Stop screensharing') }}
</NcActionButton>
</NcActions>
<NcButton v-else-if="!screenSharingButtonHidden"
<NcButton v-else-if="!isSidebar"
v-tooltip="screenSharingButtonTooltip"
type="tertiary"
@click.stop="toggleScreenSharingMenu">
Expand Down Expand Up @@ -186,27 +184,16 @@ export default {
type: Object,
required: true,
},
screenSharingButtonHidden: {
type: Boolean,
default: false,
},
showActions: {
type: Boolean,
default: true,
},

/**
* In the sidebar the conversation settings are hidden
*/
isSidebar: {
type: Boolean,
default: false,
},
},

setup() {
const isInCall = useIsInCall()
return { isInCall }
return {
isInCall: useIsInCall(),
}
},

data() {
Expand Down

0 comments on commit 11a1888

Please sign in to comment.