Skip to content

Commit

Permalink
Merge pull request #13168 from nextcloud/fix/noid/disable-call-buttons
Browse files Browse the repository at this point in the history
fix(TopBar): disable buttons if user has no media permissions
  • Loading branch information
Antreesy authored Aug 28, 2024
2 parents 5e54f1c + 5676b8f commit 1c51bf5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/CallView/shared/LocalAudioControlButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
<NcButton v-tooltip="audioButtonTooltip"
:type="type"
:aria-label="audioButtonAriaLabel"
:class="{ 'no-audio-available': !isAudioAllowed || !model.attributes.audioAvailable }"
:class="{ 'no-audio-available': !model.attributes.audioAvailable }"
:disabled="!isAudioAllowed"
@click.stop="toggleAudio">
<template #icon>
<VolumeIndicator :audio-preview-available="model.attributes.audioAvailable"
Expand Down
3 changes: 2 additions & 1 deletion src/components/CallView/shared/LocalVideoControlButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
<NcButton v-tooltip="videoButtonTooltip"
:type="type"
:aria-label="videoButtonAriaLabel"
:class="{ 'no-video-available': !isVideoAllowed || !model.attributes.videoAvailable }"
:class="{ 'no-video-available': !model.attributes.videoAvailable }"
:disabled="!isVideoAllowed"
@click.stop="toggleVideo">
<template #icon>
<VideoIcon v-if="showVideoOn" :size="20" />
Expand Down
2 changes: 2 additions & 0 deletions src/components/TopBar/TopBarMediaControls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
class="app-navigation-entry-utils-menu-button"
:boundaries-element="boundaryElement"
:container="container"
:disabled="!isScreensharingAllowed"
:open.sync="screenSharingMenuOpen">
<template #icon>
<MonitorOff :size="20" />
Expand All @@ -95,6 +96,7 @@
v-tooltip="screenSharingButtonTooltip"
type="tertiary"
:aria-label="screenSharingButtonAriaLabel"
:disabled="!isScreensharingAllowed"
@click.stop="toggleScreenSharingMenu">
<template #icon>
<MonitorShare :size="20" />
Expand Down

0 comments on commit 1c51bf5

Please sign in to comment.