From f8c50b8ef7877a1bb36b191dc4e5b53a661f894f Mon Sep 17 00:00:00 2001 From: gcampes Date: Wed, 11 Oct 2017 09:05:57 -0300 Subject: [PATCH] wire up audio errors to notifications. WIP --- .../audio/audio-modal/component.jsx | 2 +- .../audio/audio-notification/component.jsx | 14 +- .../audio/audio-notification/container.jsx | 133 +----------------- .../imports/ui/components/audio/service.js | 1 + .../ui/services/audio-manager/index.js | 7 +- 5 files changed, 22 insertions(+), 135 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/components/audio/audio-modal/component.jsx b/bigbluebutton-html5/imports/ui/components/audio/audio-modal/component.jsx index b260517dde..075b4c95ed 100644 --- a/bigbluebutton-html5/imports/ui/components/audio/audio-modal/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/audio/audio-modal/component.jsx @@ -176,7 +176,7 @@ class AudioModal extends Component { if (isConnecting) { return ( - { isEchoTest ? + { !isEchoTest ? intl.formatMessage(intlMessages.connecting) : intl.formatMessage(intlMessages.connectingEchoTest) } diff --git a/bigbluebutton-html5/imports/ui/components/audio/audio-notification/component.jsx b/bigbluebutton-html5/imports/ui/components/audio/audio-notification/component.jsx index d0c3d1823f..7bfa7c62ea 100644 --- a/bigbluebutton-html5/imports/ui/components/audio/audio-notification/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/audio/audio-notification/component.jsx @@ -1,9 +1,9 @@ import React, { Component } from 'react'; +import cx from 'classnames'; +import Button from '/imports/ui/components/button/component'; import PropTypes from 'prop-types'; import { defineMessages, injectIntl } from 'react-intl'; import styles from './styles.scss'; -import cx from 'classnames'; -import Button from '/imports/ui/components/button/component'; const COLORS = [ 'default', 'primary', 'danger', 'success', @@ -11,11 +11,13 @@ const COLORS = [ const propTypes = { color: PropTypes.oneOf(COLORS), + handleClose: PropTypes.func.isRequired, message: PropTypes.string, }; const defaultProps = { - color: 'default', + color: 'danger', + message: null, }; const intlMessages = defineMessages({ @@ -39,11 +41,11 @@ class AudioNotification extends Component { render() { const { color, - message, + error, intl, } = this.props; - if (!color || !message) { + if (!color || !error) { return null; } return ( @@ -51,7 +53,7 @@ class AudioNotification extends Component { role="alert" className={cx(styles.audioNotifications, styles[this.props.color])} > - {message} + {error}