|
|
@@ -1,8 +1,11 @@
|
|
1
|
1
|
/* @flow */
|
|
2
|
2
|
|
|
|
3
|
+import Tooltip from '@atlaskit/tooltip';
|
|
3
|
4
|
import React, { Component } from 'react';
|
|
4
|
5
|
import { connect } from 'react-redux';
|
|
5
|
6
|
|
|
|
7
|
+import { translate } from '../../base/i18n';
|
|
|
8
|
+
|
|
6
|
9
|
import { openFeedbackDialog } from '../actions';
|
|
7
|
10
|
|
|
8
|
11
|
/**
|
|
|
@@ -17,7 +20,17 @@ class FeedbackButton extends Component {
|
|
17
|
20
|
*
|
|
18
|
21
|
* @type {JitsiConference}
|
|
19
|
22
|
*/
|
|
20
|
|
- _conference: React.PropTypes.object
|
|
|
23
|
+ _conference: React.PropTypes.object,
|
|
|
24
|
+
|
|
|
25
|
+ /**
|
|
|
26
|
+ * Invoked to obtain translated strings.
|
|
|
27
|
+ */
|
|
|
28
|
+ t: React.PropTypes.func,
|
|
|
29
|
+
|
|
|
30
|
+ /**
|
|
|
31
|
+ * From which side of the button the tooltip should appear from.
|
|
|
32
|
+ */
|
|
|
33
|
+ tooltipPosition: React.PropTypes.string
|
|
21
|
34
|
};
|
|
22
|
35
|
|
|
23
|
36
|
/**
|
|
|
@@ -41,10 +54,15 @@ class FeedbackButton extends Component {
|
|
41
|
54
|
*/
|
|
42
|
55
|
render() {
|
|
43
|
56
|
return (
|
|
44
|
|
- <a
|
|
45
|
|
- className = 'button icon-feedback'
|
|
46
|
|
- id = 'feedbackButton'
|
|
47
|
|
- onClick = { this._onClick } />
|
|
|
57
|
+ <div id = 'feedbackButton'>
|
|
|
58
|
+ <Tooltip
|
|
|
59
|
+ description = { this.props.t('welcomepage.sendFeedback') }
|
|
|
60
|
+ position = { this.props.tooltipPosition } >
|
|
|
61
|
+ <a
|
|
|
62
|
+ className = 'button icon-feedback'
|
|
|
63
|
+ onClick = { this._onClick } />
|
|
|
64
|
+ </Tooltip>
|
|
|
65
|
+ </div>
|
|
48
|
66
|
);
|
|
49
|
67
|
}
|
|
50
|
68
|
|
|
|
@@ -82,4 +100,4 @@ function _mapStateToProps(state) {
|
|
82
|
100
|
};
|
|
83
|
101
|
}
|
|
84
|
102
|
|
|
85
|
|
-export default connect(_mapStateToProps)(FeedbackButton);
|
|
|
103
|
+export default translate(connect(_mapStateToProps)(FeedbackButton));
|