|
@@ -1,5 +1,6 @@
|
1
|
1
|
// @flow
|
2
|
2
|
|
|
3
|
+import { withStyles } from '@material-ui/core/styles';
|
3
|
4
|
import React from 'react';
|
4
|
5
|
|
5
|
6
|
import { translate } from '../../../base/i18n';
|
|
@@ -10,6 +11,24 @@ import AbstractRecordingLabel, {
|
10
|
11
|
_mapStateToProps
|
11
|
12
|
} from '../AbstractRecordingLabel';
|
12
|
13
|
|
|
14
|
+/**
|
|
15
|
+ * Creates the styles for the component.
|
|
16
|
+ *
|
|
17
|
+ * @param {Object} theme - The current UI theme.
|
|
18
|
+ *
|
|
19
|
+ * @returns {Object}
|
|
20
|
+ */
|
|
21
|
+const styles = theme => {
|
|
22
|
+ return {
|
|
23
|
+ [JitsiRecordingConstants.mode.STREAM]: {
|
|
24
|
+ background: theme.palette.ui03
|
|
25
|
+ },
|
|
26
|
+ [JitsiRecordingConstants.mode.FILE]: {
|
|
27
|
+ background: theme.palette.iconError
|
|
28
|
+ }
|
|
29
|
+ };
|
|
30
|
+};
|
|
31
|
+
|
13
|
32
|
/**
|
14
|
33
|
* Implements a React {@link Component} which displays the current state of
|
15
|
34
|
* conference recording.
|
|
@@ -29,11 +48,13 @@ class RecordingLabel extends AbstractRecordingLabel {
|
29
|
48
|
return null;
|
30
|
49
|
}
|
31
|
50
|
|
|
51
|
+ const { classes, mode, t } = this.props;
|
|
52
|
+
|
32
|
53
|
return (
|
33
|
54
|
<div>
|
34
|
55
|
<Label
|
35
|
|
- className = { this.props.mode }
|
36
|
|
- text = { this.props.t(this._getLabelKey()) } />
|
|
56
|
+ className = { classes && classes[mode] }
|
|
57
|
+ text = { t(this._getLabelKey()) } />
|
37
|
58
|
</div>
|
38
|
59
|
);
|
39
|
60
|
}
|
|
@@ -41,4 +62,4 @@ class RecordingLabel extends AbstractRecordingLabel {
|
41
|
62
|
_getLabelKey: () => ?string
|
42
|
63
|
}
|
43
|
64
|
|
44
|
|
-export default translate(connect(_mapStateToProps)(RecordingLabel));
|
|
65
|
+export default withStyles(styles)(translate(connect(_mapStateToProps)(RecordingLabel)));
|