Merge branch 'master' into BeatC-moving-conference-init-to-react-1

This commit is contained in:
Ilya Daynatovich 2017-01-04 17:53:13 +02:00 committed by GitHub
commit c2757469a5
2 changed files with 10 additions and 3 deletions

View File

@ -11,6 +11,8 @@ var interfaceConfig = { // eslint-disable-line no-unused-vars
DEFAULT_LOCAL_DISPLAY_NAME: "me", DEFAULT_LOCAL_DISPLAY_NAME: "me",
SHOW_JITSI_WATERMARK: true, SHOW_JITSI_WATERMARK: true,
JITSI_WATERMARK_LINK: "https://jitsi.org", JITSI_WATERMARK_LINK: "https://jitsi.org",
// if watermark is disabled by default, it can be shown only for guests
SHOW_WATERMARK_FOR_GUESTS: true,
SHOW_BRAND_WATERMARK: false, SHOW_BRAND_WATERMARK: false,
BRAND_WATERMARK_LINK: "", BRAND_WATERMARK_LINK: "",
SHOW_POWERED_BY: false, SHOW_POWERED_BY: false,

View File

@ -1,5 +1,4 @@
/* global APP, $, interfaceConfig */ /* global APP, $, interfaceConfig */
import React, { Component } from 'react'; import React, { Component } from 'react';
import { connect as reactReduxConnect } from 'react-redux'; import { connect as reactReduxConnect } from 'react-redux';
@ -68,15 +67,19 @@ class Conference extends Component {
const showBrandWatermark = interfaceConfig.SHOW_BRAND_WATERMARK; const showBrandWatermark = interfaceConfig.SHOW_BRAND_WATERMARK;
const showJitsiWatermark = interfaceConfig.SHOW_JITSI_WATERMARK; const showJitsiWatermark = interfaceConfig.SHOW_JITSI_WATERMARK;
const showJitsiWatermarkForGuest
= interfaceConfig.SHOW_WATERMARK_FOR_GUESTS;
this.state = { this.state = {
...this.state, ...this.state,
showBrandWatermark, showBrandWatermark,
showJitsiWatermark, showJitsiWatermark,
showJitsiWatermarkForGuest,
brandWatermarkLink: brandWatermarkLink:
showBrandWatermark ? interfaceConfig.BRAND_WATERMARK_LINK : '', showBrandWatermark ? interfaceConfig.BRAND_WATERMARK_LINK : '',
jitsiWatermarkLink: jitsiWatermarkLink:
showJitsiWatermark ? interfaceConfig.JITSI_WATERMARK_LINK : '', showJitsiWatermark || showJitsiWatermarkForGuest
? interfaceConfig.JITSI_WATERMARK_LINK : '',
showPoweredBy: interfaceConfig.SHOW_POWERED_BY showPoweredBy: interfaceConfig.SHOW_POWERED_BY
}; };
} }
@ -223,7 +226,9 @@ class Conference extends Component {
* @private * @private
*/ */
_renderJitsiWatermark() { _renderJitsiWatermark() {
if (this.state.showJitsiWatermark) { if (this.state.showJitsiWatermark
|| (APP.tokenData.isGuest
&& this.state.showJitsiWatermarkForGuest)) {
return ( return (
<a <a
href = { this.state.jitsiWatermarkLink } href = { this.state.jitsiWatermarkLink }