From 810a9895f81c95812a95fe281c2607076189521f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C3=B3n=20Souza?= Date: Mon, 22 May 2023 09:06:39 -0300 Subject: [PATCH 1/2] change enable/disable self cam label based on state --- .../video-list/video-list-item/component.jsx | 3 +++ .../video-list-item/user-actions/component.jsx | 10 +++++++--- bigbluebutton-html5/public/locales/en.json | 3 ++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/component.jsx b/bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/component.jsx index 23e4f150076f..a636e163fdea 100755 --- a/bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/video-provider/video-list/video-list-item/component.jsx @@ -131,6 +131,7 @@ const VideoListItem = (props) => { isRTL={isRTL} isStream={isStream} onHandleDisableCam={() => setIsSelfViewDisabled((value) => !value)} + isSelfViewDisabled={isSelfViewDisabled} /> ); @@ -157,6 +158,7 @@ const VideoListItem = (props) => { isRTL={isRTL} isStream={isStream} onHandleDisableCam={() => setIsSelfViewDisabled((value) => !value)} + isSelfViewDisabled={isSelfViewDisabled} /> { isRTL={isRTL} isStream={isStream} onHandleDisableCam={() => setIsSelfViewDisabled((value) => !value)} + isSelfViewDisabled={isSelfViewDisabled} /> { const { name, cameraId, numOfStreams, onHandleVideoFocus, user, focused, onHandleMirror, - isVideoSqueezed, videoContainer, isRTL, isStream, + isVideoSqueezed, videoContainer, isRTL, isStream, isSelfViewDisabled, } = props; const intl = useIntl(); @@ -72,6 +75,7 @@ const UserActions = (props) => { const userId = user?.userId; const isPinnedIntlKey = !pinned ? 'pin' : 'unpin'; const isFocusedIntlKey = !focused ? 'focus' : 'unfocus'; + const enableSelfCamIntlKey = !isSelfViewDisabled ? 'disable' : 'enable'; const menuItems = []; @@ -107,8 +111,8 @@ const UserActions = (props) => { if (userId === Auth.userID && isStream) { menuItems.push({ key: `${cameraId}-disable`, - label: intl.formatMessage(intlMessages.disableLabel), - description: intl.formatMessage(intlMessages.disableDesc), + label: intl.formatMessage(intlMessages[`${enableSelfCamIntlKey}Label`]), + description: intl.formatMessage(intlMessages[`${enableSelfCamIntlKey}Label`]), onClick: () => toggleDisableCam(cameraId), dataTest: 'selfViewDisableBtn', }); diff --git a/bigbluebutton-html5/public/locales/en.json b/bigbluebutton-html5/public/locales/en.json index 2d0196386636..9968c8d5ab12 100755 --- a/bigbluebutton-html5/public/locales/en.json +++ b/bigbluebutton-html5/public/locales/en.json @@ -1100,7 +1100,8 @@ "app.videoDock.webcamFocusDesc": "Focus the selected webcam", "app.videoDock.webcamUnfocusLabel": "Unfocus", "app.videoDock.webcamUnfocusDesc": "Unfocus the selected webcam", - "app.videoDock.webcamDisableLabel": "Disable/Enable self cam", + "app.videoDock.webcamDisableLabel": "Disable self cam", + "app.videoDock.webcamEnableLabel": "Enable self cam", "app.videoDock.webcamDisableDesc": "Self cam disabled", "app.videoDock.webcamPinLabel": "Pin", "app.videoDock.webcamPinDesc": "Pin the selected webcam", From 6ef4b408f6f306ed9b40fe92f18836fa13e2bbab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C3=B3n=20Souza?= Date: Fri, 26 May 2023 13:21:56 -0300 Subject: [PATCH 2/2] self cam -> self-view --- bigbluebutton-html5/public/locales/en.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bigbluebutton-html5/public/locales/en.json b/bigbluebutton-html5/public/locales/en.json index 9968c8d5ab12..26066139701e 100755 --- a/bigbluebutton-html5/public/locales/en.json +++ b/bigbluebutton-html5/public/locales/en.json @@ -1100,9 +1100,9 @@ "app.videoDock.webcamFocusDesc": "Focus the selected webcam", "app.videoDock.webcamUnfocusLabel": "Unfocus", "app.videoDock.webcamUnfocusDesc": "Unfocus the selected webcam", - "app.videoDock.webcamDisableLabel": "Disable self cam", - "app.videoDock.webcamEnableLabel": "Enable self cam", - "app.videoDock.webcamDisableDesc": "Self cam disabled", + "app.videoDock.webcamDisableLabel": "Disable self-view", + "app.videoDock.webcamEnableLabel": "Enable self-view", + "app.videoDock.webcamDisableDesc": "Self-view disabled", "app.videoDock.webcamPinLabel": "Pin", "app.videoDock.webcamPinDesc": "Pin the selected webcam", "app.videoDock.webcamFullscreenLabel": "Fullscreen webcam",