Skip to content

Commit

Permalink
refactor(TopBar): get rid of duplicated properties
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>

[skip ci]
  • Loading branch information
Antreesy authored and backportbot[bot] committed Mar 5, 2024
1 parent 286ef6c commit 865c656
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
3 changes: 1 addition & 2 deletions src/components/TopBar/TopBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@
class="local-media-controls dark-hover"
:token="token"
:model="localMediaModel"
:show-actions="!isSidebar"
:screen-sharing-button-hidden="isSidebar"
:is-sidebar="isSidebar"
:local-call-participant-model="localCallParticipantModel" />

<!-- TopBar menu -->
Expand Down
21 changes: 4 additions & 17 deletions src/components/TopBar/TopBarMediaControls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
:model="model"
color="#ffffff" />

<NcButton v-if="isVirtualBackgroundAvailable && !showActions"
<NcButton v-if="isVirtualBackgroundAvailable && isSidebar"
v-tooltip="toggleVirtualBackgroundButtonLabel"
type="tertiary-no-background"
:aria-label="toggleVirtualBackgroundButtonLabel"
Expand All @@ -91,12 +91,10 @@
:boundaries-element="boundaryElement"
:container="container"
:open.sync="screenSharingMenuOpen">
<!-- Actions button icon -->
<template #icon>
<CancelPresentation v-if="model.attributes.localScreen" :size="20" fill-color="#ffffff" />
<PresentToAll v-else :size="20" fill-color="#ffffff" />
</template>
<!-- /Actions button icon -->
<!-- Actions -->
<NcActionButton v-if="!screenSharingMenuOpen"
@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 865c656

Please sign in to comment.