noticeMessage is not shown (refs #3295)

* Get back the Notice class
* Add Notice component in the Conference web view
* Notice is not exported in index.js. Only used internally by
  Conference.
* noticeMessage value obtained from features/base/config
  * using mapStateToProps
  * value is stored in the internal _message property
* Notice component, orignal in `toolbox` is moved from
  `toolbox/components` to `conference/components`
* Notice component only implemented and renderable in web views
* Dummy `conference/components/Notice.naive.js`

This patch is partially based in the removed logic included
originally in:

    commit 59a74153dc
    (tag: jitsi-meet_1886, tag: jitsi-meet_1885, tag: 1797, tag: 1796)
    Author: Ilya Daynatovich <shupuercha@gmail.com>
    Date:   Mon Mar 20 11:04:54 2017 -0500

      Toolbar notice as React Component

In reply to: Saúl Ibarra Corretgé @saghul> comments

Signed-off-by: Pablo Saavedra <psaavedra@igalia.com>
This commit is contained in:
Pablo Saavedra 2018-07-24 15:08:26 +02:00 committed by Paweł Domas
parent a36b341865
commit fd78203ff8
4 changed files with 65 additions and 0 deletions

View File

@ -13,6 +13,7 @@ import { CalleeInfoContainer } from '../../invite';
import { LargeVideo } from '../../large-video';
import { NotificationsContainer } from '../../notifications';
import { SidePanel } from '../../side-panel';
import { default as Notice } from './Notice';
import {
Toolbox,
fullScreenChanged,
@ -163,6 +164,7 @@ class Conference extends Component<Props> {
<div
id = 'videoconference_page'
onMouseMove = { this._onShowToolbar }>
<Notice />
<div id = 'videospace'>
<LargeVideo
hideVideoQualityLabel = { hideVideoQualityLabel } />

View File

@ -0,0 +1,61 @@
/* @flow */
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { translate } from '../../base/i18n';
declare var config: Object;
type Props = {
_message?: string,
};
/**
* Notice react component.
*
* @class Notice
*/
class Notice extends Component<Props> {
/**
* Implements React's {@link Component#render()}.
*
* @inheritdoc
* @returns {ReactElement}
*/
render() {
if (!this.props._message) {
return null;
}
return (
<div className = 'notice'>
<span className = 'notice__message' >
{ this.props._message }
</span>
</div>
);
}
}
/**
* Maps (parts of) the Redux state to the associated
* {@code Notice}'s props.
*
* @param {Object} state - The Redux state.
* @private
* @returns {{
* _message: string,
* }}
*/
function _mapStateToProps(state) {
const {
noticeMessage
} = state['features/base/config'];
return {
_message: noticeMessage
};
}
export default translate(connect(_mapStateToProps)(Notice));

View File

@ -1 +1,3 @@
// @flow
export { default as Conference } from './Conference';