Merge pull request #19062 from antobinary/toast-on-self-view
refactor: Add a toast warning you that your webcam is still streaming…
This commit is contained in:
commit
49864dc6e6
@ -7,6 +7,7 @@ import BBBMenu from '/imports/ui/components/common/menu/component';
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import Styled from './styles';
|
import Styled from './styles';
|
||||||
import Auth from '/imports/ui/services/auth';
|
import Auth from '/imports/ui/services/auth';
|
||||||
|
import { notify } from '/imports/ui/services/notification';
|
||||||
|
|
||||||
const intlMessages = defineMessages({
|
const intlMessages = defineMessages({
|
||||||
focusLabel: {
|
focusLabel: {
|
||||||
@ -56,6 +57,9 @@ const intlMessages = defineMessages({
|
|||||||
disableDesc: {
|
disableDesc: {
|
||||||
id: 'app.videoDock.webcamDisableDesc',
|
id: 'app.videoDock.webcamDisableDesc',
|
||||||
},
|
},
|
||||||
|
disableWarning: {
|
||||||
|
id: 'app.videoDock.webcamDisableWarning',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const UserActions = (props) => {
|
const UserActions = (props) => {
|
||||||
@ -82,6 +86,7 @@ const UserActions = (props) => {
|
|||||||
const toggleDisableCam = () => {
|
const toggleDisableCam = () => {
|
||||||
if (!isCameraDisabled) {
|
if (!isCameraDisabled) {
|
||||||
Session.set('disabledCams', [...disabledCams, cameraId]);
|
Session.set('disabledCams', [...disabledCams, cameraId]);
|
||||||
|
notify(intl.formatMessage(intlMessages.disableWarning), 'info', 'warning');
|
||||||
} else {
|
} else {
|
||||||
Session.set('disabledCams', disabledCams.filter((cId) => cId !== cameraId));
|
Session.set('disabledCams', disabledCams.filter((cId) => cId !== cameraId));
|
||||||
}
|
}
|
||||||
|
@ -1167,6 +1167,7 @@
|
|||||||
"app.videoDock.webcamDisableLabelAllCams": "Disable self-view (all cameras)",
|
"app.videoDock.webcamDisableLabelAllCams": "Disable self-view (all cameras)",
|
||||||
"app.videoDock.webcamEnableLabel": "Enable self-view",
|
"app.videoDock.webcamEnableLabel": "Enable self-view",
|
||||||
"app.videoDock.webcamDisableDesc": "Self-view disabled",
|
"app.videoDock.webcamDisableDesc": "Self-view disabled",
|
||||||
|
"app.videoDock.webcamDisableWarning": "Your webcam is still visible to others! Only your local view is disabled.",
|
||||||
"app.videoDock.webcamPinLabel": "Pin",
|
"app.videoDock.webcamPinLabel": "Pin",
|
||||||
"app.videoDock.webcamPinDesc": "Pin the selected webcam",
|
"app.videoDock.webcamPinDesc": "Pin the selected webcam",
|
||||||
"app.videoDock.webcamFullscreenLabel": "Fullscreen webcam",
|
"app.videoDock.webcamFullscreenLabel": "Fullscreen webcam",
|
||||||
|
Loading…
Reference in New Issue
Block a user