Skip to content

Commit

Permalink
fixup! Fix(PresenterOverlay): move PresenterOverlay to a different co…
Browse files Browse the repository at this point in the history
…mponent and add grabbing effects
  • Loading branch information
DorraJaouad committed Mar 22, 2024
1 parent 9159c0f commit 7e8ca76
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 26 deletions.
28 changes: 3 additions & 25 deletions src/components/CallView/CallView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,11 @@
:shared-data="sharedDatas[shownRemoteScreenPeerId]"
is-big />
<!-- presenter overlay -->
<PresenterOverlay v-if="shouldShowPresenterOverlay || isPresenterCollapsed"
:class="{'presenter-overlay--collapsed': isPresenterCollapsed }"
<PresenterOverlay v-if="shouldShowPresenterOverlay"
:token="token"
:model="shownRemoteScreenCallParticipantModel"
:shared-data="sharedDatas[shownRemoteScreenPeerId]"
:is-collapsed="isPresenterCollapsed"
:is-collapsed="!showPresenterOverlay"
@click="toggleShowPresenterOverlay" />
</template>
<!-- Promoted "autopilot" mode -->
Expand Down Expand Up @@ -339,12 +338,8 @@ export default {
})
},
isPresenterCollapsed() {
return !this.showPresenterOverlay && this.shownRemoteScreenCallParticipantModel.attributes.videoAvailable
},
shouldShowPresenterOverlay() {
return this.showPresenterOverlay && this.isModelWithVideo(this.shownRemoteScreenCallParticipantModel)
return this.shownRemoteScreenCallParticipantModel.attributes.videoAvailable || this.isModelWithVideo(this.shownRemoteScreenCallParticipantModel)
},
Expand Down Expand Up @@ -766,23 +761,6 @@ export default {
}
}
.presenter-overlay--collapsed {
position: absolute !important;
opacity: .7;
bottom: 48px;
right: 0;
#call-container:hover & {
background-color: rgba(0, 0, 0, 0.1) !important;
&:hover,
&:focus {
opacity: 1;
background-color: rgba(0, 0, 0, 0.2) !important;
}
}
}
#videos {
position: absolute;
width: 100%;
Expand Down
19 changes: 18 additions & 1 deletion src/components/CallView/shared/PresenterOverlay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<NcButton v-else
:aria-label="t('spreed', 'Show presenter')"
:title="t('spreed', 'Show presenter')"
class="presenter-overlay--collapse"
class="presenter-overlay--collapsed"
type="tertiary-no-background"
@click="$emit('click')">
<template #icon>
Expand Down Expand Up @@ -140,6 +140,23 @@ export default {
}
}
.presenter-overlay--collapsed {
position: absolute !important;
opacity: .7;
bottom: 48px;
right: 0;
#call-container:hover & {
background-color: rgba(0, 0, 0, 0.1) !important;
&:hover,
&:focus {
opacity: 1;
background-color: rgba(0, 0, 0, 0.2) !important;
}
}
}
:deep(div) {
cursor: inherit;
}
Expand Down
2 changes: 2 additions & 0 deletions src/components/CallView/shared/VideoVue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,7 @@ export default {
content: '';
box-shadow: inset 0 0 0 3px white;
cursor: pointer;
z-index: 1;
}
.presenter-icon__hide {
Expand All @@ -739,6 +740,7 @@ export default {
border-radius: 50%;
padding: 6px;
width: 44px;
z-index: 2;
&:hover {
cursor: pointer;
Expand Down

0 comments on commit 7e8ca76

Please sign in to comment.