Переглянути джерело

Moves feedback button as a component.

When callstats is not configured hide the button.
master
damencho 8 роки тому
джерело
коміт
0765c60d77

+ 4
- 3
react/features/conference/components/Conference.web.js Переглянути файл

5
 
5
 
6
 import { connect, disconnect } from '../../base/connection';
6
 import { connect, disconnect } from '../../base/connection';
7
 import { Watermarks } from '../../base/react';
7
 import { Watermarks } from '../../base/react';
8
+import { FeedbackButton } from '../../feedback';
8
 
9
 
9
 /**
10
 /**
10
  * For legacy reasons, inline style for display none.
11
  * For legacy reasons, inline style for display none.
83
                     className = 'toolbar'
84
                     className = 'toolbar'
84
                     id = 'extendedToolbar'>
85
                     id = 'extendedToolbar'>
85
                     <div id = 'extendedToolbarButtons' />
86
                     <div id = 'extendedToolbarButtons' />
86
-                    <a
87
-                        className = 'button icon-feedback'
88
-                        id = 'feedbackButton' />
87
+
88
+                    <FeedbackButton />
89
+
89
                     <div id = 'sideToolbarContainer' />
90
                     <div id = 'sideToolbarContainer' />
90
                 </div>
91
                 </div>
91
                 <div id = 'videospace'>
92
                 <div id = 'videospace'>

+ 28
- 0
react/features/feedback/components/FeedbackButton.web.js Переглянути файл

1
+/* global config */
2
+import React, { Component } from 'react';
3
+
4
+/**
5
+ * A Web Component which renders feedback button.
6
+ */
7
+export class FeedbackButton extends Component {
8
+
9
+    /**
10
+     * Implements React's {@link Component#render()}.
11
+     *
12
+     * @inheritdoc
13
+     * @returns {ReactElement}
14
+     */
15
+    render() {
16
+
17
+        // if there is no callstats configured skip rendering
18
+        if (!config.callStatsID) {
19
+            return null;
20
+        }
21
+
22
+        return (
23
+            <a
24
+                className = 'button icon-feedback'
25
+                id = 'feedbackButton' />
26
+        );
27
+    }
28
+}

+ 1
- 0
react/features/feedback/components/index.js Переглянути файл

1
+export * from './FeedbackButton';

+ 1
- 0
react/features/feedback/index.js Переглянути файл

1
+export * from './components';

Завантаження…
Відмінити
Зберегти