Ver código fonte

Adds an option to show watermark only for guests.

j8
damencho 8 anos atrás
pai
commit
6006333ccf

+ 2
- 0
interface_config.js Ver arquivo

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

+ 9
- 3
react/features/conference/components/Conference.web.js Ver arquivo

@@ -1,4 +1,4 @@
1
-/* global interfaceConfig */
1
+/* global interfaceConfig, APP */
2 2
 import React, { Component } from 'react';
3 3
 
4 4
 /**
@@ -25,15 +25,19 @@ export default class Conference extends Component {
25 25
 
26 26
         const showBrandWatermark = interfaceConfig.SHOW_BRAND_WATERMARK;
27 27
         const showJitsiWatermark = interfaceConfig.SHOW_JITSI_WATERMARK;
28
+        const showJitsiWatermarkForGuest
29
+            = interfaceConfig.SHOW_WATERMARK_FOR_GUESTS;
28 30
 
29 31
         this.state = {
30 32
             ...this.state,
31 33
             showBrandWatermark,
32 34
             showJitsiWatermark,
35
+            showJitsiWatermarkForGuest,
33 36
             brandWatermarkLink:
34 37
                 showBrandWatermark ? interfaceConfig.BRAND_WATERMARK_LINK : '',
35 38
             jitsiWatermarkLink:
36
-                showJitsiWatermark ? interfaceConfig.JITSI_WATERMARK_LINK : '',
39
+                showJitsiWatermark || showJitsiWatermarkForGuest
40
+                    ? interfaceConfig.JITSI_WATERMARK_LINK : '',
37 41
             showPoweredBy: interfaceConfig.SHOW_POWERED_BY
38 42
         };
39 43
     }
@@ -180,7 +184,9 @@ export default class Conference extends Component {
180 184
      * @private
181 185
      */
182 186
     _renderJitsiWatermark() {
183
-        if (this.state.showJitsiWatermark) {
187
+        if (this.state.showJitsiWatermark
188
+            || (APP.tokenData.isGuest
189
+                    && this.state.showJitsiWatermarkForGuest)) {
184 190
             return (
185 191
                 <a
186 192
                     href = { this.state.jitsiWatermarkLink }

Carregando…
Cancelar
Salvar