From 20e3654695f9737630f4caf616fb8f9ae1e79132 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 4 Aug 2022 20:32:12 +0200 Subject: Move call buttons to vue buttons Signed-off-by: Joas Schilling --- .../CallView/shared/LocalMediaControls.vue | 242 ++++++++++----------- 1 file changed, 117 insertions(+), 125 deletions(-) (limited to 'src') diff --git a/src/components/CallView/shared/LocalMediaControls.vue b/src/components/CallView/shared/LocalMediaControls.vue index 4ad0e2206..02bf55b03 100644 --- a/src/components/CallView/shared/LocalMediaControls.vue +++ b/src/components/CallView/shared/LocalMediaControls.vue @@ -28,76 +28,89 @@ trigger="hover" :auto-hide="false" :open="showQualityWarningTooltip"> - +
{{ qualityWarningTooltip.content }}
- - +
- + +
- - + + + - - + - + {{ screenSharingButtonTooltip }} - + {{ t('spreed', 'Show your screen') }} - + {{ t('spreed', 'Stop screensharing') }} - + + - + - + {{ raiseHandButtonLabel }} - - + {{ toggleVirtualBackgroundButtonLabel }} - - + {{ changeViewText }} - + {{ t('spreed', 'Devices settings') }} @@ -223,6 +245,7 @@ import VideoOff from 'vue-material-design-icons/VideoOff' import Blur from 'vue-material-design-icons/Blur' import BlurOff from 'vue-material-design-icons/BlurOff' import Popover from '@nextcloud/vue/dist/Components/Popover' +import Button from '@nextcloud/vue/dist/Components/Button' import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip' import { PARTICIPANT } from '../../../constants.js' import SpeakingWhileMutedWarner from '../../../utils/webrtc/SpeakingWhileMutedWarner.js' @@ -247,6 +270,7 @@ export default { Actions, ActionSeparator, ActionButton, + Button, CancelPresentation, Cog, DotsHorizontal, @@ -353,7 +377,7 @@ export default { audioButtonClass() { return { - 'audio-disabled': this.isAudioAllowed && this.model.attributes.audioAvailable && !this.model.attributes.audioEnabled, + 'audio-enabled': this.isAudioAllowed && this.model.attributes.audioAvailable && this.model.attributes.audioEnabled, 'no-audio-available': !this.isAudioAllowed || !this.model.attributes.audioAvailable, } }, @@ -414,7 +438,7 @@ export default { videoButtonClass() { return { - 'video-disabled': this.isVideoAllowed && this.model.attributes.videoAvailable && !this.model.attributes.videoEnabled, + 'video-enabled': this.isVideoAllowed && this.model.attributes.videoAvailable && this.model.attributes.videoEnabled, 'no-video-available': !this.isVideoAllowed || !this.model.attributes.videoAvailable, } }, @@ -467,7 +491,7 @@ export default { screenSharingButtonClass() { return { - 'screensharing-disabled': this.isScreensharingAllowed && !this.model.attributes.localScreen, + 'screensharing-enabled': this.isScreensharingAllowed && this.model.attributes.localScreen, 'no-screensharing-available': !this.isScreensharingAllowed, } }, @@ -865,21 +889,15 @@ export default { .buttons-bar { display: flex; align-items: center; - button, .action-item { - vertical-align: middle; - } } -.buttons-bar button, .buttons-bar button:active { - background-color: transparent; - border: none; - margin: 0; - padding: 0 12px; - width: $clickable-area; - height: $clickable-area; - &:active { - background: transparent; - } +.buttons-bar button.lower-hand.hidden-visually { + position: absolute; + left: -10000px; + top: -10000px; + width: 1px; + height: 1px; + overflow: hidden; } .buttons-bar #screensharing-menu button { @@ -887,21 +905,11 @@ export default { height: auto; } -.buttons-bar button.audio-disabled, -.buttons-bar button.video-disabled, -.buttons-bar button.screensharing-disabled, -.buttons-bar button.lower-hand { - opacity: .7; -} - -.buttons-bar button.audio-disabled:not(.no-audio-available), -.buttons-bar button.video-disabled:not(.no-video-available), -.buttons-bar button.screensharing-disabled:not(.no-screensharing-available), -.buttons-bar button.lower-hand { - &:hover, - &:focus { - opacity: 1; - } +/* Highlight the media buttons when enabled */ +.buttons-bar button.audio-enabled, +.buttons-bar button.video-enabled, +.buttons-bar button.screensharing-enabled { + opacity: 1; } .buttons-bar button.no-audio-available, @@ -913,12 +921,6 @@ export default { } } -.buttons-bar button.no-audio-available:active, -.buttons-bar button.no-video-available:active, -.buttons-bar button.no-screensharing-available:active { - background-color: transparent; -} - #muteWrapper { display: inline-block; @@ -963,16 +965,6 @@ export default { } } -::v-deep button.action-item, -::v-deep .action-item__menutoggle { - // Fix screensharing icon width - &:hover, - &:focus, - &:active { - background-color: transparent; - } -} - .trigger { display: flex; align-items: center; -- cgit v1.2.3