Sfoglia il codice sorgente

fix(ui) change streaming icon background + add tooltip (#12973)

factor2
Mihaela Dumitru 2 anni fa
parent
commit
4f95c45e50
Nessun account collegato all'indirizzo email del committer

+ 3
- 1
lang/main.json Vedi File

1295
         "ldTooltip": "Viewing low definition video",
1295
         "ldTooltip": "Viewing low definition video",
1296
         "lowDefinition": "Low definition",
1296
         "lowDefinition": "Low definition",
1297
         "performanceSettings": "Performance settings",
1297
         "performanceSettings": "Performance settings",
1298
+        "recording": "Recording in progress",
1298
         "sd": "SD",
1299
         "sd": "SD",
1299
         "sdTooltip": "Viewing standard definition video",
1300
         "sdTooltip": "Viewing standard definition video",
1300
-        "standardDefinition": "Standard definition"
1301
+        "standardDefinition": "Standard definition",
1302
+        "streaming": "Streaming in progress"
1301
     },
1303
     },
1302
     "videothumbnail": {
1304
     "videothumbnail": {
1303
         "connectionInfo": "Connection Info",
1305
         "connectionInfo": "Connection Info",

+ 1
- 21
react/features/recording/components/native/RecordingLabel.js Vedi File

26
      * @inheritdoc
26
      * @inheritdoc
27
      */
27
      */
28
     _renderLabel() {
28
     _renderLabel() {
29
-        let indicatorStyle = styles.indicatorStyle;
30
-
31
-        switch (this.props.mode) {
32
-        case JitsiRecordingConstants.mode.STREAM:
33
-            indicatorStyle = {
34
-                ...indicatorStyle,
35
-                ...styles.indicatorLive
36
-            };
37
-            break;
38
-        case JitsiRecordingConstants.mode.FILE:
39
-            indicatorStyle = {
40
-                ...indicatorStyle,
41
-                ...styles.indicatorRecording
42
-            };
43
-            break;
44
-        default:
45
-            // Invalid mode is passed to the component.
46
-            return null;
47
-        }
48
-
49
         let status = 'on';
29
         let status = 'on';
50
 
30
 
51
         switch (this.props._status) {
31
         switch (this.props._status) {
60
         return (
40
         return (
61
             <Label
41
             <Label
62
                 status = { status }
42
                 status = { status }
63
-                style = { indicatorStyle }
43
+                style = { styles.indicatorStyle }
64
                 text = { this.props.t(this._getLabelKey()) } />
44
                 text = { this.props.t(this._getLabelKey()) } />
65
         );
45
         );
66
     }
46
     }

+ 2
- 17
react/features/recording/components/native/styles.js Vedi File

1
 // @flow
1
 // @flow
2
 
2
 
3
-import { ColorPalette, createStyleSheet } from '../../../base/styles';
3
+import { createStyleSheet } from '../../../base/styles';
4
 import BaseTheme from '../../../base/ui/components/BaseTheme';
4
 import BaseTheme from '../../../base/ui/components/BaseTheme';
5
 
5
 
6
-export const LIVE_LABEL_COLOR = ColorPalette.blue;
7
-
8
 /**
6
 /**
9
  * The styles of the React {@code Components} of the feature recording.
7
  * The styles of the React {@code Components} of the feature recording.
10
  */
8
  */
16
     indicatorStyle: {
14
     indicatorStyle: {
17
         marginRight: 4,
15
         marginRight: 4,
18
         marginLeft: 0,
16
         marginLeft: 0,
19
-        marginBottom: 0
20
-    },
21
-
22
-    /**
23
-     * Style for the recording indicator.
24
-     */
25
-    indicatorLive: {
26
-        backgroundColor: LIVE_LABEL_COLOR
27
-    },
28
-
29
-    /**
30
-     * Style for the recording indicator.
31
-     */
32
-    indicatorRecording: {
17
+        marginBottom: 0,
33
         backgroundColor: BaseTheme.palette.iconError
18
         backgroundColor: BaseTheme.palette.iconError
34
     }
19
     }
35
 });
20
 });

+ 14
- 9
react/features/recording/components/web/RecordingLabel.tsx Vedi File

7
 import Label from '../../../base/label/components/web/Label';
7
 import Label from '../../../base/label/components/web/Label';
8
 import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet';
8
 import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet';
9
 import { connect } from '../../../base/redux/functions';
9
 import { connect } from '../../../base/redux/functions';
10
+// eslint-disable-next-line lines-around-comment
11
+// @ts-ignore
12
+import { Tooltip } from '../../../base/tooltip';
10
 import AbstractRecordingLabel, {
13
 import AbstractRecordingLabel, {
11
     _mapStateToProps
14
     _mapStateToProps
12
 
15
 
22
  */
25
  */
23
 const styles = (theme: Theme) => {
26
 const styles = (theme: Theme) => {
24
     return {
27
     return {
25
-        [JitsiRecordingConstants.mode.STREAM]: {
26
-            background: theme.palette.support07
27
-        },
28
-        [JitsiRecordingConstants.mode.FILE]: {
28
+        record: {
29
             background: theme.palette.actionDanger
29
             background: theme.palette.actionDanger
30
         }
30
         }
31
     };
31
     };
52
         }
52
         }
53
 
53
 
54
         // @ts-ignore
54
         // @ts-ignore
55
-        const { classes, mode } = this.props;
55
+        const { classes, mode, t } = this.props;
56
+        const isRecording = mode === JitsiRecordingConstants.mode.FILE;
57
+        const icon = isRecording ? IconRecord : IconSites;
58
+        const content = t(isRecording ? 'videoStatus.recording' : 'videoStatus.streaming');
56
 
59
 
57
         return (
60
         return (
58
-            <div>
61
+            <Tooltip
62
+                content = { content }
63
+                position = { 'bottom' }>
59
                 <Label
64
                 <Label
60
-                    className = { classes?.[mode] }
61
-                    icon = { mode === JitsiRecordingConstants.mode.FILE ? IconRecord : IconSites } />
62
-            </div>
65
+                    className = { classes?.record }
66
+                    icon = { icon } />
67
+            </Tooltip>
63
         );
68
         );
64
     }
69
     }
65
 }
70
 }

Loading…
Annulla
Salva