Преглед изворни кода

feat(Labels): Redesign labels on mobile & web

master
Vlad Piersec пре 4 година
родитељ
комит
b135e2a06a
35 измењених фајлова са 455 додато и 980 уклоњено
  1. 26
    57
      css/_labels.scss
  2. 0
    26
      css/_participants-count.scss
  3. 46
    21
      css/_subject.scss
  4. 0
    1
      css/main.scss
  5. 1
    0
      react/features/base/icons/svg/index.js
  6. 2
    2
      react/features/base/icons/svg/user-groups.svg
  7. 3
    4
      react/features/base/label/components/AbstractLabel.js
  8. 0
    68
      react/features/base/label/components/CircularLabel.web.js
  9. 7
    44
      react/features/base/label/components/ExpandedLabel.native.js
  10. 12
    18
      react/features/base/label/components/Label.native.js
  11. 57
    0
      react/features/base/label/components/Label.web.js
  12. 1
    1
      react/features/base/label/components/index.js
  13. 23
    34
      react/features/base/label/components/styles.js
  14. 0
    130
      react/features/conference/components/AbstractLabels.js
  15. 2
    2
      react/features/conference/components/native/InsecureRoomNameLabel.js
  16. 73
    246
      react/features/conference/components/native/Labels.js
  17. 7
    11
      react/features/conference/components/native/NavigationBar.js
  18. 6
    36
      react/features/conference/components/native/styles.js
  19. 2
    10
      react/features/conference/components/web/Conference.js
  20. 125
    0
      react/features/conference/components/web/ConferenceInfo.js
  21. 1
    1
      react/features/conference/components/web/ConferenceTimerDisplay.js
  22. 4
    4
      react/features/conference/components/web/InsecureRoomNameLabel.js
  23. 0
    119
      react/features/conference/components/web/Labels.js
  24. 7
    4
      react/features/conference/components/web/ParticipantsCount.js
  25. 0
    103
      react/features/conference/components/web/Subject.js
  26. 1
    1
      react/features/conference/components/web/index.js
  27. 4
    4
      react/features/e2ee/components/E2EELabel.js
  28. 0
    2
      react/features/large-video/components/LargeVideo.web.js
  29. 4
    4
      react/features/local-recording/components/LocalRecordingLabel.web.js
  30. 4
    4
      react/features/recording/components/native/RecordingLabel.js
  31. 3
    3
      react/features/recording/components/web/RecordingLabel.js
  32. 2
    5
      react/features/transcribing/components/TranscribingLabel.native.js
  33. 3
    3
      react/features/transcribing/components/TranscribingLabel.web.js
  34. 4
    6
      react/features/video-quality/components/VideoQualityLabel.native.js
  35. 25
    6
      react/features/video-quality/components/VideoQualityLabel.web.js

+ 26
- 57
css/_labels.scss Прегледај датотеку

@@ -1,68 +1,37 @@
1
-.large-video-labels {
1
+.label {
2
+    align-items: center;
3
+    background: #36383C;
4
+    border-radius: 3px;
5
+    color: #fff;
2 6
     display: flex;
3
-    position: absolute;
4
-    top: 30px;
5
-    right: 30px;
6
-    transition: right 0.5s;
7
-    z-index: $labelsZ;
7
+    font-size: 12px;
8
+    font-weight: 600;
9
+    height: 28px;
10
+    margin: 0 0 4px 4px;
11
+    padding: 0 8px;
8 12
 
9
-    .circular-label {
10
-        align-items: center;
11
-        color: white;
12
-        display: flex;
13
-        font-weight: bold;
14
-        justify-content: center;
15
-        margin-left: 8px;
16
-        opacity: 0.8;
13
+    &--green {
14
+        background: #31B76A;
17 15
     }
18 16
 
19
-    .circular-label {
20
-        background: #B8C7E0;
17
+    &--red {
18
+        background: #E34F56
21 19
     }
22 20
 
23
-    .circular-label.e2ee {
24
-        align-items: center;
25
-        background: #76CF9C;
26
-        display: flex;
27
-        justify-content: center;
28
-    }
29
-
30
-    .circular-label.file {
31
-        background: #FF5630;
32
-    }
33
-
34
-    .circular-label.local-rec {
35
-        background: #FF5630;
36
-    }
21
+    &--white {
22
+        background: #fff;
23
+        color: #5e6d7a;
37 24
 
38
-    .circular-label.stream {
39
-        background: #0065FF;
40
-    }
41
-
42
-    .circular-label.insecure {
43
-        background: $defaultWarningColor;
25
+        svg {
26
+            fill: #5e6d7a;
27
+        }
44 28
     }
29
+}
45 30
 
46
-    .recording-label.center-message {
47
-        background: $videoStateIndicatorBackground;
48
-        bottom: 50%;
49
-        display: block;
50
-        left: 50%;
51
-        padding: 10px;
52
-        position: fixed;
53
-        transform: translate(-50%, -50%);
54
-        z-index: $centeredVideoLabelZ;
55
-    }
31
+.label-text-with-icon {
32
+    margin-left: 8px;
56 33
 }
57 34
 
58
-.circular-label {
59
-    background: $videoStateIndicatorBackground;
60
-    border-radius: 50%;
61
-    box-sizing: border-box;
62
-    cursor: default;
63
-    font-size: 13px;
64
-    height: $videoStateIndicatorSize;
65
-    line-height: $videoStateIndicatorSize;
66
-    text-align: center;
67
-    min-width: $videoStateIndicatorSize;
68
-}
35
+.participants-count {
36
+    cursor: pointer;
37
+}

+ 0
- 26
css/_participants-count.scss Прегледај датотеку

@@ -1,26 +0,0 @@
1
-.participants-count {
2
-    background: #fff;
3
-    border-radius: 4px;
4
-    color: #5e6d7a;
5
-    cursor: pointer;
6
-    display: inline-block;
7
-    font-size: 13px;
8
-    line-height: 20px;
9
-    margin-left: 16px;
10
-    padding: 4px 8px;
11
-    pointer-events: auto;
12
-
13
-    &-number {
14
-        margin-right: 8px;
15
-        vertical-align: middle;
16
-    }
17
-
18
-    &-icon {
19
-        background: url('../images/user-groups.svg');
20
-        background-repeat: no-repeat;
21
-        display: inline-block;
22
-        height: 16px;
23
-        width: 16px;
24
-        vertical-align: middle;
25
-    }
26
-}

+ 46
- 21
css/_subject.scss Прегледај датотеку

@@ -1,35 +1,60 @@
1 1
 .subject {
2
+    box-sizing: border-box;
3
+    color: #fff;
4
+    margin-top: 20px;
5
+    position: absolute;
2 6
     top: -120px;
3 7
     transition: top .3s ease-in;
4
-    height: 95px;
5 8
     width: 100%;
6
-    pointer-events: none;
7
-    position: absolute;
8
-    padding: 25px 140px 0 140px;
9
-    text-align: center;
10
-    font-size: 17px;
11
-    color: #fff;
12
-    z-index: $zindex10;
13
-    overflow: hidden;
14
-    text-overflow: ellipsis;
15
-    box-sizing: border-box;
16
-    white-space: nowrap;
9
+    z-index: $zindex3;
17 10
 
18 11
     &.visible {
19 12
         top: 0px;
20 13
     }
14
+}
21 15
 
22
-    &.gradient {
23
-        background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
24
-    }
16
+.subject-info-container {
17
+    display: flex;
18
+    justify-content: center;
19
+    max-width: calc(100% - 280px);
20
+    margin: 0 auto;
25 21
 
26
-    &-text {
27
-        vertical-align: middle;
22
+    &--full-width {
23
+        max-width: 100%;
28 24
     }
29 25
 
30
-    &-conference-timer {
31
-        display: block;
32
-        font-size: 15px;
33
-        opacity: 0.6;
26
+    @media (max-width: 500px) {
27
+        flex-wrap: wrap;
28
+        max-width: 100%;
34 29
     }
35 30
 }
31
+
32
+.subject-info {
33
+    align-items: center;
34
+    display: flex;
35
+    margin-bottom: 4px;
36
+    max-width: 80%;
37
+    height: 28px;
38
+}
39
+
40
+.subject-text {
41
+    background: rgba(0, 0, 0, 0.6);
42
+    border-radius: 3px 0px 0px 3px;
43
+    font-size: 14px;
44
+    line-height: 24px;
45
+    padding: 2px 16px;
46
+    height: 24px;
47
+    overflow: hidden;
48
+    text-overflow: ellipsis;
49
+    white-space: nowrap;
50
+}
51
+
52
+.subject-timer {
53
+    background: rgba(0, 0, 0, 0.8);
54
+    border-radius: 0px 3px 3px 0px;
55
+    display: inline-block;
56
+    font-size: 12px;
57
+    line-height: 16px;
58
+    min-width: 34px;
59
+    padding: 6px 8px;
60
+}

+ 0
- 1
css/main.scss Прегледај датотеку

@@ -48,7 +48,6 @@ $flagsImagePath: "../images/";
48 48
 @import 'videolayout_default';
49 49
 @import 'notice';
50 50
 @import 'subject';
51
-@import 'participants-count';
52 51
 @import 'popup_menu';
53 52
 @import 'recording';
54 53
 @import 'login_menu';

+ 1
- 0
react/features/base/icons/svg/index.js Прегледај датотеку

@@ -111,6 +111,7 @@ export { default as IconVideoQualityAudioOnly } from './AUD.svg';
111 111
 export { default as IconVideoQualityHD } from './HD.svg';
112 112
 export { default as IconVideoQualityLD } from './LD.svg';
113 113
 export { default as IconVideoQualitySD } from './SD.svg';
114
+export { default as IconUserGroups } from './user-groups.svg';
114 115
 export { default as IconVirtualBackground } from './virtual-background.svg';
115 116
 export { default as IconVolume } from './volume.svg';
116 117
 export { default as IconVolumeEmpty } from './volume-empty.svg';

images/user-groups.svg → react/features/base/icons/svg/user-groups.svg Прегледај датотеку

@@ -1,3 +1,3 @@
1
-<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
-<path fill-rule="evenodd" clip-rule="evenodd" d="M5.33331 2C6.28101 2 7.09675 2.56499 7.46207 3.37651C7.00766 3.45023 6.58406 3.61583 6.21095 3.85361C6.04111 3.54356 5.71176 3.33333 5.33331 3.33333C4.78103 3.33333 4.33331 3.78105 4.33331 4.33333C4.33331 4.75895 4.59921 5.12246 4.97395 5.26682C4.77672 5.69245 4.66665 6.16671 4.66665 6.66667L4.66678 6.6967C3.12249 6.85332 2.66665 7.65415 2.66665 9.83333C2.66665 9.89666 2.66835 9.95222 2.67088 10H3.13441C2.977 10.3982 2.86114 10.8423 2.7841 11.3333H2.33331C1.66665 11.3333 1.33331 10.8333 1.33331 9.83333C1.33331 7.60559 1.88097 6.20498 3.39417 5.63152C3.14521 5.26038 2.99998 4.81382 2.99998 4.33333C2.99998 3.04467 4.04465 2 5.33331 2ZM9.78901 3.85361C9.4159 3.61583 8.9923 3.45023 8.53788 3.37651C8.90321 2.56499 9.71895 2 10.6666 2C11.9553 2 13 3.04467 13 4.33333C13 4.81382 12.8547 5.26038 12.6058 5.63152C14.119 6.20498 14.6666 7.60559 14.6666 9.83333C14.6666 10.8333 14.3333 11.3333 13.6666 11.3333H13.2159C13.1388 10.8423 13.023 10.3982 12.8656 10H13.3291C13.3316 9.95222 13.3333 9.89666 13.3333 9.83333C13.3333 7.65415 12.8775 6.85332 11.3332 6.6967L11.3333 6.66667C11.3333 6.1667 11.2232 5.69245 11.026 5.26682C11.4008 5.12246 11.6666 4.75895 11.6666 4.33333C11.6666 3.78105 11.2189 3.33333 10.6666 3.33333C10.2882 3.33333 9.95885 3.54356 9.78901 3.85361ZM4.49998 14.6667C3.7222 14.6667 3.33331 14.1111 3.33331 13C3.33331 10.4598 4.0062 8.8875 5.87888 8.28308C5.5366 7.83462 5.33331 7.27438 5.33331 6.66667C5.33331 5.19391 6.52722 4 7.99998 4C9.47274 4 10.6666 5.19391 10.6666 6.66667C10.6666 7.27438 10.4634 7.83462 10.1211 8.28308C11.9938 8.8875 12.6666 10.4598 12.6666 13C12.6666 14.1111 12.2778 14.6667 11.5 14.6667H4.49998ZM9.33331 6.66667C9.33331 7.40305 8.73636 8 7.99998 8C7.2636 8 6.66665 7.40305 6.66665 6.66667C6.66665 5.93029 7.2636 5.33333 7.99998 5.33333C8.73636 5.33333 9.33331 5.93029 9.33331 6.66667ZM11.3333 13C11.3333 13.1426 11.3252 13.2536 11.3152 13.3333H4.68477C4.67476 13.2536 4.66665 13.1426 4.66665 13C4.66665 10.1957 5.42021 9.33333 7.99998 9.33333C10.5797 9.33333 11.3333 10.1957 11.3333 13Z" fill="#5E6D7A"/>
1
+<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
2
+<path fill-rule="evenodd" clip-rule="evenodd" d="M5.33331 2C6.28101 2 7.09675 2.56499 7.46207 3.37651C7.00766 3.45023 6.58406 3.61583 6.21095 3.85361C6.04111 3.54356 5.71176 3.33333 5.33331 3.33333C4.78103 3.33333 4.33331 3.78105 4.33331 4.33333C4.33331 4.75895 4.59921 5.12246 4.97395 5.26682C4.77672 5.69245 4.66665 6.16671 4.66665 6.66667L4.66678 6.6967C3.12249 6.85332 2.66665 7.65415 2.66665 9.83333C2.66665 9.89666 2.66835 9.95222 2.67088 10H3.13441C2.977 10.3982 2.86114 10.8423 2.7841 11.3333H2.33331C1.66665 11.3333 1.33331 10.8333 1.33331 9.83333C1.33331 7.60559 1.88097 6.20498 3.39417 5.63152C3.14521 5.26038 2.99998 4.81382 2.99998 4.33333C2.99998 3.04467 4.04465 2 5.33331 2ZM9.78901 3.85361C9.4159 3.61583 8.9923 3.45023 8.53788 3.37651C8.90321 2.56499 9.71895 2 10.6666 2C11.9553 2 13 3.04467 13 4.33333C13 4.81382 12.8547 5.26038 12.6058 5.63152C14.119 6.20498 14.6666 7.60559 14.6666 9.83333C14.6666 10.8333 14.3333 11.3333 13.6666 11.3333H13.2159C13.1388 10.8423 13.023 10.3982 12.8656 10H13.3291C13.3316 9.95222 13.3333 9.89666 13.3333 9.83333C13.3333 7.65415 12.8775 6.85332 11.3332 6.6967L11.3333 6.66667C11.3333 6.1667 11.2232 5.69245 11.026 5.26682C11.4008 5.12246 11.6666 4.75895 11.6666 4.33333C11.6666 3.78105 11.2189 3.33333 10.6666 3.33333C10.2882 3.33333 9.95885 3.54356 9.78901 3.85361ZM4.49998 14.6667C3.7222 14.6667 3.33331 14.1111 3.33331 13C3.33331 10.4598 4.0062 8.8875 5.87888 8.28308C5.5366 7.83462 5.33331 7.27438 5.33331 6.66667C5.33331 5.19391 6.52722 4 7.99998 4C9.47274 4 10.6666 5.19391 10.6666 6.66667C10.6666 7.27438 10.4634 7.83462 10.1211 8.28308C11.9938 8.8875 12.6666 10.4598 12.6666 13C12.6666 14.1111 12.2778 14.6667 11.5 14.6667H4.49998ZM9.33331 6.66667C9.33331 7.40305 8.73636 8 7.99998 8C7.2636 8 6.66665 7.40305 6.66665 6.66667C6.66665 5.93029 7.2636 5.33333 7.99998 5.33333C8.73636 5.33333 9.33331 5.93029 9.33331 6.66667ZM11.3333 13C11.3333 13.1426 11.3252 13.2536 11.3152 13.3333H4.68477C4.67476 13.2536 4.66665 13.1426 4.66665 13C4.66665 10.1957 5.42021 9.33333 7.99998 9.33333C10.5797 9.33333 11.3333 10.1957 11.3333 13Z" />
3 3
 </svg>

react/features/base/label/components/AbstractCircularLabel.js → react/features/base/label/components/AbstractLabel.js Прегледај датотеку

@@ -12,13 +12,12 @@ export type Props = {
12 12
     /**
13 13
      * String or component that will be rendered as the label itself.
14 14
      */
15
-    label: string
15
+    text: string
16 16
 };
17 17
 
18 18
 /**
19
- * Abstract class for the {@code CircularLabel} component.
19
+ * Abstract class for the {@code Label} component.
20 20
  */
21
-export default class AbstractCircularLabel<P: Props, S: *>
21
+export default class Label<P: Props, S: *>
22 22
     extends Component<P, S> {
23
-
24 23
 }

+ 0
- 68
react/features/base/label/components/CircularLabel.web.js Прегледај датотеку

@@ -1,68 +0,0 @@
1
-// @flow
2
-
3
-import React from 'react';
4
-
5
-import Icon from '../../icons/components/Icon';
6
-
7
-import AbstractCircularLabel, {
8
-    type Props as AbstractProps
9
-} from './AbstractCircularLabel';
10
-
11
-type Props = AbstractProps & {
12
-
13
-    /**
14
-     * Additional CSS class names to add to the root of {@code CircularLabel}.
15
-     */
16
-    className: string,
17
-
18
-    /**
19
-     * HTML ID attribute to add to the root of {@code CircularLabel}.
20
-     */
21
-    id: string
22
-
23
-};
24
-
25
-/**
26
- * React Component for showing short text in a circle.
27
- *
28
- * @extends Component
29
- */
30
-export default class CircularLabel extends AbstractCircularLabel<Props, {}> {
31
-    /**
32
-     * Default values for {@code CircularLabel} component's properties.
33
-     *
34
-     * @static
35
-     */
36
-    static defaultProps = {
37
-        className: ''
38
-    };
39
-
40
-    /**
41
-     * Implements React's {@link Component#render()}.
42
-     *
43
-     * @inheritdoc
44
-     * @returns {ReactElement}
45
-     */
46
-    render() {
47
-        const {
48
-            className,
49
-            icon,
50
-            id,
51
-            label
52
-        } = this.props;
53
-
54
-        const labelComponent = icon
55
-            ? (
56
-                <Icon
57
-                    src = { icon } />
58
-            ) : label;
59
-
60
-        return (
61
-            <div
62
-                className = { `circular-label ${className}` }
63
-                id = { id }>
64
-                { labelComponent }
65
-            </div>
66
-        );
67
-    }
68
-}

+ 7
- 44
react/features/base/label/components/ExpandedLabel.native.js Прегледај датотеку

@@ -3,7 +3,7 @@
3 3
 import React, { Component } from 'react';
4 4
 import { Animated, Text, View } from 'react-native';
5 5
 
6
-import styles, { DEFAULT_COLOR, LABEL_MARGIN, LABEL_SIZE } from './styles';
6
+import styles, { DEFAULT_COLOR } from './styles';
7 7
 
8 8
 export type Props = {
9 9
 
@@ -19,21 +19,9 @@ type State = {
19 19
     /**
20 20
      * The opacity animation Object.
21 21
      */
22
-    opacityAnimation: Object,
23
-
24
-    /**
25
-     * A boolean to decide to show or not show the arrow. This is required as
26
-     * we can't easily animate this transformed Component so we render it once
27
-     * the animation is done.
28
-     */
29
-    showArrow: boolean
22
+    opacityAnimation: Object
30 23
 };
31 24
 
32
-/**
33
- * Offset to the arrow to be rendered in the right position.
34
- */
35
-const ARROW_OFFSET = 0;
36
-
37 25
 /**
38 26
  * A react {@code Component} that implements an expanded label as tooltip-like
39 27
  * component to explain the meaning of the {@code Label}.
@@ -48,8 +36,7 @@ export default class ExpandedLabel<P: Props> extends Component<P, State> {
48 36
         super(props);
49 37
 
50 38
         this.state = {
51
-            opacityAnimation: new Animated.Value(0),
52
-            showArrow: false
39
+            opacityAnimation: new Animated.Value(0)
53 40
         };
54 41
     }
55 42
 
@@ -63,11 +50,7 @@ export default class ExpandedLabel<P: Props> extends Component<P, State> {
63 50
             toValue: 1,
64 51
             velocity: 1,
65 52
             useNativeDriver: true
66
-        }).start(({ finished }) => {
67
-            finished && this.setState({
68
-                showArrow: true
69
-            });
70
-        });
53
+        }).start();
71 54
     }
72 55
 
73 56
     /**
@@ -76,32 +59,12 @@ export default class ExpandedLabel<P: Props> extends Component<P, State> {
76 59
      * @inheritdoc
77 60
      */
78 61
     render() {
79
-        const arrowPosition
80
-            = this.props.parentPosition - LABEL_MARGIN - (LABEL_SIZE / 2);
81
-
82 62
         return (
83 63
             <Animated.View
84
-                style = { [
85
-                    styles.expandedLabelWrapper,
86
-                    {
87
-                        opacity: this.state.opacityAnimation
88
-                    }
89
-                ] } >
90
-                <View
91
-                    style = { [
92
-                        styles.expandedLabelArrow,
93
-                        {
94
-                            backgroundColor: this._getColor() || DEFAULT_COLOR,
95
-                            marginRight: arrowPosition + ARROW_OFFSET
96
-                        }
97
-                    ] } />
64
+                style = { [ styles.expandedLabelContainer, { opacity: this.state.opacityAnimation } ] }>
98 65
                 <View
99
-                    style = { [
100
-                        styles.expandedLabelContainer,
101
-                        {
102
-                            backgroundColor: this._getColor() || DEFAULT_COLOR
103
-                        }
104
-                    ] }>
66
+                    style = { [ styles.expandedLabelTextContainer,
67
+                        { backgroundColor: this._getColor() || DEFAULT_COLOR } ] }>
105 68
                     <Text style = { styles.expandedLabelText }>
106 69
                         { this._getLabel() }
107 70
                     </Text>

react/features/base/label/components/CircularLabel.native.js → react/features/base/label/components/Label.native.js Прегледај датотеку

@@ -5,9 +5,9 @@ import { Animated, Text } from 'react-native';
5 5
 import Icon from '../../icons/components/Icon';
6 6
 import { combineStyles, type StyleType } from '../../styles';
7 7
 
8
-import AbstractCircularLabel, {
8
+import AbstractLabel, {
9 9
     type Props as AbstractProps
10
-} from './AbstractCircularLabel';
10
+} from './AbstractLabel';
11 11
 import styles from './styles';
12 12
 
13 13
 /**
@@ -48,14 +48,14 @@ type State = {
48 48
  * Renders a circular indicator to be used for status icons, such as recording
49 49
  * on, audio-only conference, video quality and similar.
50 50
  */
51
-export default class CircularLabel extends AbstractCircularLabel<Props, State> {
51
+export default class Label extends AbstractLabel<Props, State> {
52 52
     /**
53 53
      * A reference to the started animation of this label.
54 54
      */
55 55
     animationReference: Object;
56 56
 
57 57
     /**
58
-     * Instantiates a new instance of {@code CircularLabel}.
58
+     * Instantiates a new instance of {@code Label}.
59 59
      *
60 60
      * @inheritdoc
61 61
      */
@@ -91,7 +91,7 @@ export default class CircularLabel extends AbstractCircularLabel<Props, State> {
91 91
      * @inheritdoc
92 92
      */
93 93
     render() {
94
-        const { icon, label, status, style } = this.props;
94
+        const { icon, text, status, style } = this.props;
95 95
 
96 96
         let extraStyle = null;
97 97
 
@@ -106,24 +106,18 @@ export default class CircularLabel extends AbstractCircularLabel<Props, State> {
106 106
             break;
107 107
         }
108 108
 
109
-        const labelComponent = icon
110
-            ? (
111
-                <Icon
112
-                    src = { icon }
113
-                    style = { styles.indicatorIcon } />
114
-            ) : (
115
-                <Text style = { styles.indicatorText }>
116
-                    { label }
117
-                </Text>
118
-            );
119
-
120 109
         return (
121 110
             <Animated.View
122 111
                 style = { [
123
-                    combineStyles(styles.indicatorContainer, style),
112
+                    combineStyles(styles.labelContainer, style),
124 113
                     extraStyle
125 114
                 ] }>
126
-                { labelComponent }
115
+                { icon && <Icon
116
+                    size = '18'
117
+                    src = { icon } /> }
118
+                { text && <Text style = { styles.labelText }>
119
+                    { text }
120
+                </Text>}
127 121
             </Animated.View>
128 122
         );
129 123
     }

+ 57
- 0
react/features/base/label/components/Label.web.js Прегледај датотеку

@@ -0,0 +1,57 @@
1
+// @flow
2
+
3
+import React from 'react';
4
+
5
+import Icon from '../../icons/components/Icon';
6
+
7
+import AbstractLabel, {
8
+    type Props as AbstractProps
9
+} from './AbstractLabel';
10
+
11
+type Props = AbstractProps & {
12
+
13
+    /**
14
+     * Additional CSS class names to add to the root of {@code Label}.
15
+     */
16
+    className: string,
17
+
18
+    /**
19
+     * HTML ID attribute to add to the root of {@code Label}.
20
+     */
21
+    id: string
22
+
23
+};
24
+
25
+/**
26
+ * React Component for showing short text in a circle.
27
+ *
28
+ * @extends Component
29
+ */
30
+export default class Label extends AbstractLabel<Props, *> {
31
+    /**
32
+     * Implements React's {@link Component#render()}.
33
+     *
34
+     * @inheritdoc
35
+     */
36
+    render() {
37
+        const {
38
+            className,
39
+            icon,
40
+            id,
41
+            text
42
+        } = this.props;
43
+
44
+        const labelClassName = icon ? 'label-text-with-icon' : '';
45
+
46
+        return (
47
+            <div
48
+                className = { `label ${className}` }
49
+                id = { id }>
50
+                { icon && <Icon
51
+                    size = '16'
52
+                    src = { icon } /> }
53
+                { text && <span className = { labelClassName }>{text}</span> }
54
+            </div>
55
+        );
56
+    }
57
+}

+ 1
- 1
react/features/base/label/components/index.js Прегледај датотеку

@@ -1,2 +1,2 @@
1
-export { default as CircularLabel } from './CircularLabel';
1
+export { default as Label } from './Label';
2 2
 export { default as ExpandedLabel } from './ExpandedLabel';

+ 23
- 34
react/features/base/label/components/styles.js Прегледај датотеку

@@ -1,76 +1,65 @@
1 1
 // @flow
2 2
 
3
-import { BoxModel, ColorPalette } from '../../styles';
3
+import { ColorPalette } from '../../styles';
4 4
 
5 5
 /**
6 6
  * The default color of the {@code Label} and {@code ExpandedLabel}.
7 7
  */
8
-export const DEFAULT_COLOR = '#808080';
8
+export const DEFAULT_COLOR = '#36383C';
9 9
 
10 10
 /**
11 11
  * Margin of the {@Label} - to be reused when rendering the
12 12
  * {@code ExpandedLabel}.
13 13
  */
14
-export const LABEL_MARGIN = 5;
14
+export const LABEL_MARGIN = 8;
15 15
 
16 16
 /**
17 17
  * Size of the {@Label} - to be reused when rendering the
18 18
  * {@code ExpandedLabel}.
19 19
  */
20
-export const LABEL_SIZE = 36;
20
+export const LABEL_SIZE = 28;
21 21
 
22 22
 /**
23 23
  * The styles of the native base/label feature.
24 24
  */
25 25
 export default {
26
-
27
-    expandedLabelArrow: {
28
-        backgroundColor: ColorPalette.blue,
29
-        height: 15,
30
-        transform: [ { rotate: '45deg' }, { translateX: 10 } ],
31
-        width: 15
26
+    expandedLabelContainer: {
27
+        position: 'absolute',
28
+        left: 0,
29
+        right: 0,
30
+        top: 36,
31
+        flexDirection: 'row',
32
+        justifyContent: 'center'
32 33
     },
33 34
 
34
-    expandedLabelContainer: {
35
-        backgroundColor: ColorPalette.blue,
36
-        borderColor: ColorPalette.blue,
37
-        borderRadius: 6,
38
-        marginHorizontal: BoxModel.margin,
39
-        padding: BoxModel.padding
35
+    expandedLabelTextContainer: {
36
+        borderRadius: 3,
37
+        paddingHorizontal: LABEL_MARGIN,
38
+        paddingVertical: LABEL_MARGIN / 2
40 39
     },
41 40
 
42 41
     expandedLabelText: {
43 42
         color: ColorPalette.white
44 43
     },
45 44
 
46
-    expandedLabelWrapper: {
47
-        alignItems: 'flex-end',
48
-        flexDirection: 'column'
49
-    },
50
-
51 45
     /**
52 46
      * The outermost view.
53 47
      */
54
-    indicatorContainer: {
55
-        alignItems: 'center',
48
+    labelContainer: {
49
+        alignItems: 'space-between',
56 50
         backgroundColor: DEFAULT_COLOR,
57
-        borderRadius: LABEL_SIZE / 2,
58
-        borderWidth: 0,
51
+        borderRadius: 3,
59 52
         flex: 0,
60 53
         height: LABEL_SIZE,
61 54
         justifyContent: 'center',
62
-        marginHorizontal: LABEL_MARGIN,
63
-        opacity: 0.6,
64
-        width: LABEL_SIZE
65
-    },
66
-
67
-    indicatorIcon: {
68
-        fontSize: 24
55
+        marginLeft: LABEL_MARGIN,
56
+        marginBottom: LABEL_MARGIN,
57
+        paddingHorizontal: 8
69 58
     },
70 59
 
71
-    indicatorText: {
60
+    labelText: {
72 61
         color: ColorPalette.white,
73
-        fontSize: 10
62
+        fontSize: 12
74 63
     },
75 64
 
76 65
     labelOff: {

+ 0
- 130
react/features/conference/components/AbstractLabels.js Прегледај датотеку

@@ -1,130 +0,0 @@
1
-// @flow
2
-
3
-import React, { Component } from 'react';
4
-
5
-import { E2EELabel } from '../../e2ee';
6
-import { isFilmstripVisible } from '../../filmstrip';
7
-import { LocalRecordingLabel } from '../../local-recording';
8
-import { RecordingLabel } from '../../recording';
9
-import { TranscribingLabel } from '../../transcribing';
10
-import { shouldDisplayTileView } from '../../video-layout';
11
-import { VideoQualityLabel } from '../../video-quality';
12
-
13
-import { InsecureRoomNameLabel } from '.';
14
-
15
-/**
16
- * The type of the React {@code Component} props of {@link AbstractLabels}.
17
- */
18
-export type Props = {
19
-
20
-    /**
21
-     * Whether the filmstrip is displayed with remote videos. Used to determine
22
-     * display classes to set.
23
-     */
24
-    _filmstripVisible: boolean,
25
-
26
-    /**
27
-     * Whether the video quality label should be displayed.
28
-     */
29
-    _showVideoQualityLabel: boolean
30
-};
31
-
32
-/**
33
- * A container to hold video status labels, including recording status and
34
- * current large video quality.
35
- *
36
- * @extends Component
37
- */
38
-export default class AbstractLabels<P: Props, S> extends Component<P, S> {
39
-    /**
40
-     * Renders the {@code E2EELabel}.
41
-     *
42
-     * @protected
43
-     * @returns {React$Element}
44
-     */
45
-    _renderE2EELabel() {
46
-        return (
47
-            <E2EELabel />
48
-        );
49
-    }
50
-
51
-    /**
52
-     * Renders the {@code LocalRecordingLabel}.
53
-     *
54
-     * @protected
55
-     * @returns {React$Element}
56
-     */
57
-    _renderLocalRecordingLabel() {
58
-        return (
59
-            <LocalRecordingLabel />
60
-        );
61
-    }
62
-
63
-    /**
64
-     * Renders the {@code RecordingLabel} that is platform independent.
65
-     *
66
-     * @param {string} mode - The recording mode that this label is rendered
67
-     * for.
68
-     * @protected
69
-     * @returns {React$Element}
70
-     */
71
-    _renderRecordingLabel(mode: string) {
72
-        return (
73
-            <RecordingLabel mode = { mode } />
74
-        );
75
-    }
76
-
77
-    /**
78
-     * Renders the {@code TranscribingLabel}.
79
-     *
80
-     * @protected
81
-     * @returns {React$Element}
82
-     */
83
-    _renderTranscribingLabel() {
84
-        return (
85
-            <TranscribingLabel />
86
-        );
87
-    }
88
-
89
-    /**
90
-     * Renders the {@code InsecureRoomNameLabel}.
91
-     *
92
-     * @protected
93
-     * @returns {React$Element}
94
-     */
95
-    _renderInsecureRoomNameLabel() {
96
-        return (
97
-            <InsecureRoomNameLabel />
98
-        );
99
-    }
100
-
101
-    /**
102
-     * Renders the {@code VideoQualityLabel} that is platform independent.
103
-     *
104
-     * @protected
105
-     * @returns {React$Element}
106
-     */
107
-    _renderVideoQualityLabel() {
108
-        return (
109
-            <VideoQualityLabel />
110
-        );
111
-    }
112
-}
113
-
114
-/**
115
- * Maps (parts of) the redux state to the associated props of the {@link Labels}
116
- * {@code Component}.
117
- *
118
- * @param {Object} state - The redux state.
119
- * @private
120
- * @returns {{
121
- *     _filmstripVisible: boolean,
122
- *     _showVideoQualityLabel: boolean
123
- * }}
124
- */
125
-export function _abstractMapStateToProps(state: Object) {
126
-    return {
127
-        _filmstripVisible: isFilmstripVisible(state),
128
-        _showVideoQualityLabel: !shouldDisplayTileView(state)
129
-    };
130
-}

+ 2
- 2
react/features/conference/components/native/InsecureRoomNameLabel.js Прегледај датотеку

@@ -3,7 +3,7 @@
3 3
 import React from 'react';
4 4
 
5 5
 import { IconWarning } from '../../../base/icons';
6
-import { CircularLabel } from '../../../base/label';
6
+import { Label } from '../../../base/label';
7 7
 import { connect } from '../../../base/redux';
8 8
 import AbstractInsecureRoomNameLabel, { _mapStateToProps } from '../AbstractInsecureRoomNameLabel';
9 9
 
@@ -20,7 +20,7 @@ class InsecureRoomNameLabel extends AbstractInsecureRoomNameLabel {
20 20
      */
21 21
     _render() {
22 22
         return (
23
-            <CircularLabel
23
+            <Label
24 24
                 icon = { IconWarning }
25 25
                 style = { styles.insecureRoomNameLabel } />
26 26
         );

+ 73
- 246
react/features/conference/components/native/Labels.js Прегледај датотеку

@@ -1,80 +1,22 @@
1 1
 // @flow
2 2
 
3
-import React from 'react';
3
+import React, { Component } from 'react';
4 4
 import { TouchableOpacity, View } from 'react-native';
5 5
 
6 6
 import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet';
7
-import { connect } from '../../../base/redux';
8
-import { ASPECT_RATIO_WIDE } from '../../../base/responsive-ui/constants';
9
-import {
10
-    RecordingExpandedLabel
11
-} from '../../../recording';
12
-import { TranscribingExpandedLabel } from '../../../transcribing';
13
-import { shouldDisplayTileView } from '../../../video-layout';
14
-import { VideoQualityExpandedLabel } from '../../../video-quality';
15
-import { shouldDisplayNotifications } from '../../functions';
16
-import AbstractLabels, {
17
-    _abstractMapStateToProps,
18
-    type Props as AbstractLabelsProps
19
-} from '../AbstractLabels';
7
+import { RecordingLabel, RecordingExpandedLabel } from '../../../recording';
8
+import { TranscribingExpandedLabel, TranscribingLabel } from '../../../transcribing';
9
+import { VideoQualityExpandedLabel, VideoQualityLabel } from '../../../video-quality';
20 10
 
21 11
 import InsecureRoomNameExpandedLabel from './InsecureRoomNameExpandedLabel';
22 12
 import styles from './styles';
23 13
 
24
-/**
25
- * The type of the React {@code Component} props of {@link Labels}.
26
- */
27
-type Props = AbstractLabelsProps & {
14
+import { InsecureRoomNameLabel } from '.';
28 15
 
29
-    /**
30
-     * Application's aspect ratio.
31
-     */
32
-    _aspectRatio: Symbol,
33
-
34
-    /**
35
-     * True if tile view is being diaplyed, false otherwise.
36
-     */
37
-    _shouldDisplayTileView: boolean,
38
-
39
-    /**
40
-     * True if the labels should be visible, false otherwise.
41
-     */
42
-    _visible: boolean,
43
-
44
-    /**
45
-     * Function to translate i18n labels.
46
-     */
47
-    t: Function
48
-};
16
+type Props = {}
49 17
 
50 18
 type State = {
51 19
 
52
-    /**
53
-     * Layout object of the outermost container. For structure please see:
54
-     * https://facebook.github.io/react-native/docs/view#onlayout
55
-     */
56
-    containerLayout: ?Object,
57
-
58
-    /**
59
-     * Layout objects of the individual labels. This data type contains the same
60
-     * structure as the layout is defined here:
61
-     * https://facebook.github.io/react-native/docs/view#onlayout
62
-     * but keyed with the ID of the label its layout it contains. E.g.
63
-     *
64
-     * {
65
-     *   transcribing: {
66
-     *     { layout: { x, y, width, height } }
67
-     *   },
68
-     *   ...
69
-     * }
70
-     */
71
-    labelLayouts: Object,
72
-
73
-    /**
74
-     * Position of the label to render the {@code ExpandedLabel} to.
75
-     */
76
-    parentPosition: ?number,
77
-
78 20
     /**
79 21
      * String to show which {@code ExpandedLabel} to be shown. (Equals to the
80 22
      * label IDs below.)
@@ -88,26 +30,33 @@ const LABEL_ID_STREAMING = 'streaming';
88 30
 const LABEL_ID_TRANSCRIBING = 'transcribing';
89 31
 const LABEL_ID_INSECURE_ROOM_NAME = 'insecure-room-name';
90 32
 
33
+const LabelHitSlop = {
34
+    top: 10,
35
+    bottom: 10,
36
+    left: 0,
37
+    right: 0
38
+};
39
+
91 40
 /**
92 41
  * The {@code ExpandedLabel} components to be rendered for the individual
93 42
  * {@code Label}s.
94 43
  */
95 44
 const EXPANDED_LABELS = {
96
-    quality: VideoQualityExpandedLabel,
97
-    recording: {
45
+    [LABEL_ID_QUALITY]: VideoQualityExpandedLabel,
46
+    [LABEL_ID_RECORDING]: {
98 47
         component: RecordingExpandedLabel,
99 48
         props: {
100 49
             mode: JitsiRecordingConstants.mode.FILE
101 50
         }
102 51
     },
103
-    streaming: {
52
+    [LABEL_ID_STREAMING]: {
104 53
         component: RecordingExpandedLabel,
105 54
         props: {
106 55
             mode: JitsiRecordingConstants.mode.STREAM
107 56
         }
108 57
     },
109
-    transcribing: TranscribingExpandedLabel,
110
-    'insecure-room-name': InsecureRoomNameExpandedLabel
58
+    [LABEL_ID_TRANSCRIBING]: TranscribingExpandedLabel,
59
+    [LABEL_ID_INSECURE_ROOM_NAME]: InsecureRoomNameExpandedLabel
111 60
 };
112 61
 
113 62
 /**
@@ -118,7 +67,7 @@ const EXPANDED_LABEL_TIMEOUT = 5000;
118 67
 /**
119 68
  * A container that renders the conference indicators, if any.
120 69
  */
121
-class Labels extends AbstractLabels<Props, State> {
70
+class Labels extends Component<Props, State> {
122 71
     /**
123 72
      * Timeout for the expanded labels to disappear.
124 73
      */
@@ -131,15 +80,9 @@ class Labels extends AbstractLabels<Props, State> {
131 80
      */
132 81
     constructor(props: Props) {
133 82
         super(props);
134
-
135 83
         this.state = {
136
-            containerLayout: undefined,
137
-            labelLayouts: {},
138
-            parentPosition: undefined,
139 84
             visibleExpandedLabel: undefined
140 85
         };
141
-
142
-        this._onTopViewLayout = this._onTopViewLayout.bind(this);
143 86
     }
144 87
 
145 88
     /**
@@ -157,110 +100,49 @@ class Labels extends AbstractLabels<Props, State> {
157 100
      * @inheritdoc
158 101
      */
159 102
     render() {
160
-        const { _aspectRatio, _filmstripVisible, _shouldDisplayTileView, _visible } = this.props;
161
-
162
-        if (!_visible) {
163
-            return null;
164
-        }
165
-
166
-        const wide = _aspectRatio === ASPECT_RATIO_WIDE;
167
-
168 103
         return (
169
-            <View
170
-                pointerEvents = 'box-none'
171
-                style = { styles.labelWrapper }>
172
-                <View
173
-                    onLayout = { this._onTopViewLayout }
174
-                    pointerEvents = 'box-none'
175
-                    style = { [
176
-                        styles.indicatorContainer,
177
-                        wide && _filmstripVisible && !_shouldDisplayTileView
178
-                            && styles.indicatorContainerWide
179
-                    ] }>
180
-                    <TouchableOpacity
181
-                        onLayout = { this._createOnLayout(LABEL_ID_RECORDING) }
182
-                        onPress = { this._createOnPress(LABEL_ID_RECORDING) } >
183
-                        {
184
-                            this._renderRecordingLabel(
185
-                                JitsiRecordingConstants.mode.FILE)
186
-                        }
187
-                    </TouchableOpacity>
188
-                    <TouchableOpacity
189
-                        onLayout = { this._createOnLayout(LABEL_ID_STREAMING) }
190
-                        onPress = { this._createOnPress(LABEL_ID_STREAMING) } >
191
-                        {
192
-                            this._renderRecordingLabel(
193
-                                JitsiRecordingConstants.mode.STREAM)
194
-                        }
195
-                    </TouchableOpacity>
196
-                    <TouchableOpacity
197
-                        onLayout = {
198
-                            this._createOnLayout(LABEL_ID_TRANSCRIBING)
199
-                        }
200
-                        onPress = {
201
-                            this._createOnPress(LABEL_ID_TRANSCRIBING)
202
-                        } >
203
-                        {
204
-                            this._renderTranscribingLabel()
205
-                        }
206
-                    </TouchableOpacity>
207
-                    <TouchableOpacity
208
-                        onLayout = {
209
-                            this._createOnLayout(LABEL_ID_INSECURE_ROOM_NAME)
210
-                        }
211
-                        onPress = {
212
-                            this._createOnPress(LABEL_ID_INSECURE_ROOM_NAME)
213
-                        } >
214
-                        {
215
-                            this._renderInsecureRoomNameLabel()
216
-                        }
217
-                    </TouchableOpacity>
218
-                    <TouchableOpacity
219
-                        onLayout = {
220
-                            this._createOnLayout(LABEL_ID_QUALITY) }
221
-                        onPress = {
222
-                            this._createOnPress(LABEL_ID_QUALITY) } >
223
-                        { this._renderVideoQualityLabel() }
224
-                    </TouchableOpacity>
225
-                </View>
226
-                <View
227
-                    style = { [
228
-                        styles.indicatorContainer,
229
-                        wide && _filmstripVisible && !_shouldDisplayTileView
230
-                            && styles.indicatorContainerWide
231
-                    ] }>
232
-                    {
233
-                        this._renderExpandedLabel()
234
-                    }
104
+            <>
105
+                <View pointerEvents = 'box-none'>
106
+                    <View
107
+                        pointerEvents = 'box-none'
108
+                        style = { styles.indicatorContainer }>
109
+                        <TouchableOpacity
110
+                            hitSlop = { LabelHitSlop }
111
+                            onPress = { this._createOnPress(LABEL_ID_RECORDING) } >
112
+                            <RecordingLabel mode = { JitsiRecordingConstants.mode.FILE } />
113
+                        </TouchableOpacity>
114
+                        <TouchableOpacity
115
+                            hitSlop = { LabelHitSlop }
116
+                            onPress = { this._createOnPress(LABEL_ID_STREAMING) } >
117
+                            <RecordingLabel mode = { JitsiRecordingConstants.mode.STREAM } />
118
+                        </TouchableOpacity>
119
+                        <TouchableOpacity
120
+                            hitSlop = { LabelHitSlop }
121
+                            onPress = {
122
+                                this._createOnPress(LABEL_ID_TRANSCRIBING)
123
+                            } >
124
+                            <TranscribingLabel />
125
+                        </TouchableOpacity>
126
+                        <TouchableOpacity
127
+                            hitSlop = { LabelHitSlop }
128
+                            onPress = {
129
+                                this._createOnPress(LABEL_ID_INSECURE_ROOM_NAME)
130
+                            } >
131
+                            <InsecureRoomNameLabel />
132
+                        </TouchableOpacity>
133
+                        <TouchableOpacity
134
+                            hitSlop = { LabelHitSlop }
135
+                            onPress = {
136
+                                this._createOnPress(LABEL_ID_QUALITY) } >
137
+                            <VideoQualityLabel />
138
+                        </TouchableOpacity>
139
+                    </View>
235 140
                 </View>
236
-            </View>
141
+                { this._renderExpandedLabel() }
142
+            </>
237 143
         );
238 144
     }
239 145
 
240
-    /**
241
-     * Creates a function to be invoked when the onLayout of the touchables are
242
-     * triggered.
243
-     *
244
-     * @param {string} label - The identifier of the label that's onLayout is
245
-     * triggered.
246
-     * @returns {Function}
247
-     */
248
-    _createOnLayout(label) {
249
-        return ({ nativeEvent: { layout } }) => {
250
-            const { labelLayouts } = this.state;
251
-            const updatedLayout = {};
252
-
253
-            updatedLayout[label] = layout;
254
-
255
-            this.setState({
256
-                labelLayouts: {
257
-                    ...labelLayouts,
258
-                    ...updatedLayout
259
-                }
260
-            });
261
-        };
262
-    }
263
-
264 146
     /**
265 147
      * Creates a function to be invoked when the onPress of the touchables are
266 148
      * triggered.
@@ -271,102 +153,47 @@ class Labels extends AbstractLabels<Props, State> {
271 153
      */
272 154
     _createOnPress(label) {
273 155
         return () => {
274
-            const {
275
-                containerLayout,
276
-                labelLayouts
277
-            } = this.state;
278 156
             let { visibleExpandedLabel } = this.state;
279 157
 
280
-            if (containerLayout) {
281
-                const labelLayout = labelLayouts[label];
282
-
283
-                // This calculation has to be changed if the labels are not
284
-                // positioned right anymore.
285
-                const right = containerLayout.width - labelLayout.x;
158
+            visibleExpandedLabel
159
+                = visibleExpandedLabel === label ? undefined : label;
286 160
 
161
+            clearTimeout(this.expandedLabelTimeout);
162
+            this.setState({
287 163
                 visibleExpandedLabel
288
-                    = visibleExpandedLabel === label ? undefined : label;
289
-
290
-                clearTimeout(this.expandedLabelTimeout);
291
-                this.setState({
292
-                    parentPosition: right,
293
-                    visibleExpandedLabel
294
-                });
164
+            });
295 165
 
296
-                if (visibleExpandedLabel) {
297
-                    this.expandedLabelTimeout = setTimeout(() => {
298
-                        this.setState({
299
-                            visibleExpandedLabel: undefined
300
-                        });
301
-                    }, EXPANDED_LABEL_TIMEOUT);
302
-                }
166
+            if (visibleExpandedLabel) {
167
+                this.expandedLabelTimeout = setTimeout(() => {
168
+                    this.setState({
169
+                        visibleExpandedLabel: undefined
170
+                    });
171
+                }, EXPANDED_LABEL_TIMEOUT);
303 172
             }
304 173
         };
305 174
     }
306 175
 
307
-    _onTopViewLayout: Object => void
308
-
309
-    /**
310
-     * Invoked when the View containing the {@code Label}s is laid out.
311
-     *
312
-     * @param {Object} layout - The native layout object.
313
-     * @returns {void}
314
-     */
315
-    _onTopViewLayout({ nativeEvent: { layout } }) {
316
-        this.setState({
317
-            containerLayout: layout
318
-        });
319
-    }
320
-
321 176
     /**
322 177
      * Rendes the expanded (explaining) label for the label that was touched.
323 178
      *
324 179
      * @returns {React$Element}
325 180
      */
326 181
     _renderExpandedLabel() {
327
-        const { parentPosition, visibleExpandedLabel } = this.state;
182
+        const { visibleExpandedLabel } = this.state;
328 183
 
329 184
         if (visibleExpandedLabel) {
330 185
             const expandedLabel = EXPANDED_LABELS[visibleExpandedLabel];
331 186
 
332 187
             if (expandedLabel) {
333
-                const component = expandedLabel.component || expandedLabel;
334
-                const expandedLabelProps = expandedLabel.props || {};
188
+                const LabelComponent = expandedLabel.component || expandedLabel;
189
+                const { props } = expandedLabel || {};
335 190
 
336
-                return React.createElement(component, {
337
-                    ...expandedLabelProps,
338
-                    parentPosition
339
-                });
191
+                return <LabelComponent { ...props } />;
340 192
             }
341 193
         }
342 194
 
343 195
         return null;
344 196
     }
345
-
346
-    _renderRecordingLabel: string => React$Element<any>;
347
-
348
-    _renderTranscribingLabel: () => React$Element<any>;
349
-
350
-    _renderInsecureRoomNameLabel: () => React$Element<any>;
351
-
352
-    _renderVideoQualityLabel: () => React$Element<any>;
353
-}
354
-
355
-/**
356
- * Maps (parts of) the redux state to the associated
357
- * {@code Labels}'s props.
358
- *
359
- * @param {Object} state - The redux state.
360
- * @private
361
- * @returns {Props}
362
- */
363
-function _mapStateToProps(state) {
364
-    return {
365
-        ..._abstractMapStateToProps(state),
366
-        _aspectRatio: state['features/base/responsive-ui'].aspectRatio,
367
-        _shouldDisplayTileView: shouldDisplayTileView(state),
368
-        _visible: !shouldDisplayNotifications(state)
369
-    };
370 197
 }
371 198
 
372
-export default connect(_mapStateToProps)(Labels);
199
+export default Labels;

+ 7
- 11
react/features/conference/components/native/NavigationBar.js Прегледај датотеку

@@ -57,12 +57,9 @@ const NavigationBar = (props: Props) => {
57 57
                 styles = { styles.navBarButton } />
58 58
             <View
59 59
                 pointerEvents = 'box-none'
60
-                style = { styles.roomNameContainer }>
61
-                <View
62
-                    pointerEvents = 'box-none'
63
-                    style = { styles.roomNameWrapper }>
64
-                    {
65
-                        props._meetingNameEnabled
60
+                style = { styles.roomNameWrapper }>
61
+                {
62
+                    props._meetingNameEnabled
66 63
                         && <View style = { styles.roomNameView }>
67 64
                             <Text
68 65
                                 numberOfLines = { 1 }
@@ -70,14 +67,13 @@ const NavigationBar = (props: Props) => {
70 67
                                 { props._meetingName }
71 68
                             </Text>
72 69
                         </View>
73
-                    }
74
-                    {
75
-                        props._conferenceTimerEnabled
70
+                }
71
+                {
72
+                    props._conferenceTimerEnabled
76 73
                             && <View style = { styles.roomTimerView }>
77 74
                                 <ConferenceTimer textStyle = { styles.roomTimer } />
78 75
                             </View>
79
-                    }
80
-                </View>
76
+                }
81 77
                 <Labels />
82 78
             </View>
83 79
         </View>

+ 6
- 36
react/features/conference/components/native/styles.js Прегледај датотеку

@@ -1,6 +1,5 @@
1 1
 import { ColorSchemeRegistry, schemeColor } from '../../../base/color-scheme';
2 2
 import { BoxModel, ColorPalette, fixAndroidViewClipping } from '../../../base/styles';
3
-import { FILMSTRIP_SIZE } from '../../../filmstrip';
4 3
 
5 4
 export const INSECURE_ROOM_NAME_LABEL_COLOR = ColorPalette.warning;
6 5
 
@@ -27,23 +26,9 @@ export default {
27 26
      */
28 27
     indicatorContainer: {
29 28
         flex: 1,
30
-        flexDirection: 'row',
31
-        justifyContent: 'flex-end'
32
-    },
33
-
34
-    /**
35
-     * Indicator container for wide aspect ratio.
36
-     */
37
-    indicatorContainerWide: {
38
-        marginRight: FILMSTRIP_SIZE + BoxModel.margin
29
+        flexDirection: 'row'
39 30
     },
40 31
 
41
-    labelWrapper: {
42
-        flexDirection: 'column',
43
-        position: 'absolute',
44
-        right: 0,
45
-        top: 0
46
-    },
47 32
 
48 33
     lonelyButton: {
49 34
         alignItems: 'center',
@@ -77,14 +62,6 @@ export default {
77 62
         underlayColor: 'transparent'
78 63
     },
79 64
 
80
-    navBarContainer: {
81
-        flexDirection: 'column',
82
-        left: 0,
83
-        position: 'absolute',
84
-        right: 0,
85
-        top: 0
86
-    },
87
-
88 65
     navBarSafeView: {
89 66
         left: 0,
90 67
         position: 'absolute',
@@ -97,14 +74,15 @@ export default {
97 74
         flex: 1,
98 75
         flexDirection: 'row',
99 76
         height: 44,
100
-        justifyContent: 'space-between',
77
+        justifyContent: 'center',
101 78
         paddingHorizontal: 14
102 79
     },
103 80
 
104 81
     roomTimer: {
105 82
         color: ColorPalette.white,
106 83
         fontSize: 12,
107
-        fontWeight: '400'
84
+        fontWeight: '400',
85
+        paddingHorizontal: 8
108 86
     },
109 87
 
110 88
     roomTimerView: {
@@ -113,7 +91,7 @@ export default {
113 91
         borderTopRightRadius: 3,
114 92
         height: 28,
115 93
         justifyContent: 'center',
116
-        paddingHorizontal: 10
94
+        minWidth: 50
117 95
     },
118 96
 
119 97
     roomName: {
@@ -126,21 +104,13 @@ export default {
126 104
         backgroundColor: 'rgba(0,0,0,0.6)',
127 105
         borderBottomLeftRadius: 3,
128 106
         borderTopLeftRadius: 3,
107
+        flexShrink: 1,
129 108
         height: 28,
130 109
         justifyContent: 'center',
131 110
         paddingHorizontal: 10
132 111
     },
133 112
 
134
-    roomNameContainer: {
135
-        alignItems: 'center',
136
-        left: 0,
137
-        paddingHorizontal: 48,
138
-        position: 'absolute',
139
-        right: 0
140
-    },
141
-
142 113
     roomNameWrapper: {
143
-        alignItems: 'center',
144 114
         flexDirection: 'row'
145 115
     },
146 116
 

+ 2
- 10
react/features/conference/components/web/Conference.js Прегледај датотеку

@@ -25,7 +25,7 @@ import {
25 25
 } from '../AbstractConference';
26 26
 import type { AbstractProps } from '../AbstractConference';
27 27
 
28
-import Labels from './Labels';
28
+import ConferenceInfo from './ConferenceInfo';
29 29
 import { default as Notice } from './Notice';
30 30
 
31 31
 declare var APP: Object;
@@ -67,11 +67,6 @@ type Props = AbstractProps & {
67 67
      */
68 68
     _backgroundAlpha: number,
69 69
 
70
-    /**
71
-     * Whether the local participant is recording the conference.
72
-     */
73
-    _iAmRecorder: boolean,
74
-
75 70
     /**
76 71
      * Returns true if the 'lobby screen' is visible.
77 72
      */
@@ -183,12 +178,10 @@ class Conference extends AbstractConference<Props, *> {
183 178
      */
184 179
     render() {
185 180
         const {
186
-            _iAmRecorder,
187 181
             _isLobbyScreenVisible,
188 182
             _layoutClassName,
189 183
             _showPrejoin
190 184
         } = this.props;
191
-        const hideLabels = _iAmRecorder;
192 185
 
193 186
         return (
194 187
             <div
@@ -196,13 +189,13 @@ class Conference extends AbstractConference<Props, *> {
196 189
                 id = 'videoconference_page'
197 190
                 onMouseMove = { this._onShowToolbar }
198 191
                 ref = { this._setBackground }>
192
+                <ConferenceInfo />
199 193
 
200 194
                 <Notice />
201 195
                 <div id = 'videospace'>
202 196
                     <LargeVideo />
203 197
                     <KnockingParticipantList />
204 198
                     <Filmstrip />
205
-                    { hideLabels || <Labels /> }
206 199
                 </div>
207 200
 
208 201
                 { _showPrejoin || _isLobbyScreenVisible || <Toolbox /> }
@@ -302,7 +295,6 @@ class Conference extends AbstractConference<Props, *> {
302 295
 function _mapStateToProps(state) {
303 296
     return {
304 297
         ...abstractMapStateToProps(state),
305
-        _iAmRecorder: state['features/base/config'].iAmRecorder,
306 298
         _backgroundAlpha: state['features/base/config'].backgroundAlpha,
307 299
         _isLobbyScreenVisible: state['features/base/dialog']?.component === LobbyScreen,
308 300
         _layoutClassName: LAYOUT_CLASSNAMES[getCurrentLayout(state)],

+ 125
- 0
react/features/conference/components/web/ConferenceInfo.js Прегледај датотеку

@@ -0,0 +1,125 @@
1
+/* @flow */
2
+
3
+import React from 'react';
4
+
5
+import { getConferenceName } from '../../../base/conference/functions';
6
+import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet';
7
+import { getParticipantCount } from '../../../base/participants/functions';
8
+import { connect } from '../../../base/redux';
9
+import { E2EELabel } from '../../../e2ee';
10
+import { LocalRecordingLabel } from '../../../local-recording';
11
+import { RecordingLabel } from '../../../recording';
12
+import { isToolboxVisible } from '../../../toolbox/functions.web';
13
+import { TranscribingLabel } from '../../../transcribing';
14
+import { VideoQualityLabel } from '../../../video-quality';
15
+import ConferenceTimer from '../ConferenceTimer';
16
+
17
+import ParticipantsCount from './ParticipantsCount';
18
+
19
+import { InsecureRoomNameLabel } from '.';
20
+
21
+/**
22
+ * The type of the React {@code Component} props of {@link Subject}.
23
+ */
24
+type Props = {
25
+
26
+    /**
27
+     * Whether the info should span across the full width.
28
+     */
29
+    _fullWidth: boolean,
30
+
31
+    /**
32
+     * Whether the conference name and timer should be displayed or not.
33
+     */
34
+    _hideConferenceNameAndTimer: boolean,
35
+
36
+    /**
37
+     * Whether the conference timer should be shown or not.
38
+     */
39
+    _hideConferenceTimer: boolean,
40
+
41
+    /**
42
+     * Whether the participant count should be shown or not.
43
+     */
44
+    _showParticipantCount: boolean,
45
+
46
+    /**
47
+     * The subject or the of the conference.
48
+     * Falls back to conference name.
49
+     */
50
+    _subject: string,
51
+
52
+    /**
53
+     * Indicates whether the component should be visible or not.
54
+     */
55
+    _visible: boolean
56
+};
57
+
58
+/**
59
+ * The upper band of the meeing containing the conference name, timer and labels.
60
+ *
61
+ * @param {Object} props - The props of the component.
62
+ * @returns {React$None}
63
+ */
64
+function ConferenceInfo(props: Props) {
65
+    const {
66
+        _hideConferenceNameAndTimer,
67
+        _hideConferenceTimer,
68
+        _showParticipantCount,
69
+        _subject,
70
+        _fullWidth,
71
+        _visible
72
+    } = props;
73
+
74
+    return (
75
+        <div className = { `subject ${_visible ? 'visible' : ''}` }>
76
+            <div className = { `subject-info-container${_fullWidth ? ' subject-info-container--full-width' : ''}` }>
77
+                {
78
+                    !_hideConferenceNameAndTimer
79
+                        && <div className = 'subject-info'>
80
+                            { _subject && <span className = 'subject-text'>{ _subject }</span>}
81
+                            { !_hideConferenceTimer && <ConferenceTimer /> }
82
+                        </div>
83
+                }
84
+                { _showParticipantCount && <ParticipantsCount /> }
85
+                <E2EELabel />
86
+                <RecordingLabel mode = { JitsiRecordingConstants.mode.FILE } />
87
+                <RecordingLabel mode = { JitsiRecordingConstants.mode.STREAM } />
88
+                <LocalRecordingLabel />
89
+                <TranscribingLabel />
90
+                <VideoQualityLabel />
91
+                <InsecureRoomNameLabel />
92
+            </div>
93
+        </div>
94
+    );
95
+}
96
+
97
+/**
98
+ * Maps (parts of) the Redux state to the associated
99
+ * {@code Subject}'s props.
100
+ *
101
+ * @param {Object} state - The Redux state.
102
+ * @private
103
+ * @returns {{
104
+ *     _hideConferenceTimer: boolean,
105
+ *     _showParticipantCount: boolean,
106
+ *     _subject: string,
107
+ *     _visible: boolean
108
+ * }}
109
+ */
110
+function _mapStateToProps(state) {
111
+    const participantCount = getParticipantCount(state);
112
+    const { hideConferenceTimer, hideConferenceSubject, hideParticipantsStats } = state['features/base/config'];
113
+    const { clientWidth } = state['features/base/responsive-ui'];
114
+
115
+    return {
116
+        _hideConferenceNameAndTimer: clientWidth < 300,
117
+        _hideConferenceTimer: Boolean(hideConferenceTimer),
118
+        _fullWidth: state['features/video-layout'].tileViewEnabled,
119
+        _showParticipantCount: participantCount > 2 && !hideParticipantsStats,
120
+        _subject: hideConferenceSubject ? '' : getConferenceName(state),
121
+        _visible: isToolboxVisible(state)
122
+    };
123
+}
124
+
125
+export default connect(_mapStateToProps)(ConferenceInfo);

+ 1
- 1
react/features/conference/components/web/ConferenceTimerDisplay.js Прегледај датотеку

@@ -14,6 +14,6 @@ import React from 'react';
14 14
  */
15 15
 export default function renderConferenceTimer(timerValue: string, textStyle: Object) {
16 16
     return (
17
-        <span className = 'subject-conference-timer' >{ timerValue }</span>
17
+        <span className = 'subject-timer'>{ timerValue }</span>
18 18
     );
19 19
 }

+ 4
- 4
react/features/conference/components/web/InsecureRoomNameLabel.js Прегледај датотеку

@@ -5,7 +5,7 @@ import React from 'react';
5 5
 
6 6
 import { translate } from '../../../base/i18n';
7 7
 import { IconWarning } from '../../../base/icons';
8
-import { CircularLabel } from '../../../base/label';
8
+import { Label } from '../../../base/label';
9 9
 import { connect } from '../../../base/redux';
10 10
 import AbstractInsecureRoomNameLabel, { _mapStateToProps } from '../AbstractInsecureRoomNameLabel';
11 11
 
@@ -22,9 +22,9 @@ class InsecureRoomNameLabel extends AbstractInsecureRoomNameLabel {
22 22
         return (
23 23
             <Tooltip
24 24
                 content = { this.props.t('security.insecureRoomNameWarning') }
25
-                position = 'left'>
26
-                <CircularLabel
27
-                    className = 'insecure'
25
+                position = 'bottom'>
26
+                <Label
27
+                    className = 'label--red'
28 28
                     icon = { IconWarning } />
29 29
             </Tooltip>
30 30
         );

+ 0
- 119
react/features/conference/components/web/Labels.js Прегледај датотеку

@@ -1,119 +0,0 @@
1
-// @flow
2
-
3
-import React from 'react';
4
-
5
-import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet';
6
-import { connect } from '../../../base/redux';
7
-import AbstractLabels, {
8
-    _abstractMapStateToProps as _mapStateToProps,
9
-    type Props
10
-} from '../AbstractLabels';
11
-
12
-declare var interfaceConfig: Object;
13
-
14
-/**
15
- * The type of the React {@code Component} state of {@link Labels}.
16
- */
17
-type State = {
18
-
19
-    /**
20
-     * Whether or not the filmstrip was not visible but has transitioned in the
21
-     * latest component update to visible. This boolean is used  to set a class
22
-     * for position animations.
23
-     *
24
-     * @type {boolean}
25
-     */
26
-    filmstripBecomingVisible: boolean
27
-};
28
-
29
-/**
30
- * A container to hold video status labels, including recording status and
31
- * current large video quality.
32
- *
33
- * @extends Component
34
- */
35
-class Labels extends AbstractLabels<Props, State> {
36
-    /**
37
-     * Updates the state for whether or not the filmstrip is transitioning to
38
-     * a displayed state.
39
-     *
40
-     * @inheritdoc
41
-     */
42
-    static getDerivedStateFromProps(props: Props, prevState: State) {
43
-        return {
44
-            filmstripBecomingVisible: !prevState.filmstripBecomingVisible && props._filmstripVisible
45
-        };
46
-    }
47
-
48
-    /**
49
-     * Initializes a new {@code Labels} instance.
50
-     *
51
-     * @param {Object} props - The read-only properties with which the new
52
-     * instance is to be initialized.
53
-     */
54
-    constructor(props: Props) {
55
-        super(props);
56
-
57
-        this.state = {
58
-            filmstripBecomingVisible: false
59
-        };
60
-    }
61
-
62
-    /**
63
-     * Implements React's {@link Component#render()}.
64
-     *
65
-     * @inheritdoc
66
-     * @returns {ReactElement}
67
-     */
68
-    render() {
69
-        const { _filmstripVisible } = this.props;
70
-        const { filmstripBecomingVisible } = this.state;
71
-        const { VIDEO_QUALITY_LABEL_DISABLED } = interfaceConfig;
72
-        const className = `large-video-labels ${
73
-            filmstripBecomingVisible ? 'opening' : ''} ${
74
-            _filmstripVisible ? 'with-filmstrip' : 'without-filmstrip'}`;
75
-
76
-        return (
77
-            <div className = { className } >
78
-                {
79
-                    this._renderE2EELabel()
80
-                }
81
-                {
82
-                    this._renderRecordingLabel(
83
-                        JitsiRecordingConstants.mode.FILE)
84
-                }
85
-                {
86
-                    this._renderRecordingLabel(
87
-                        JitsiRecordingConstants.mode.STREAM)
88
-                }
89
-                {
90
-                    this._renderLocalRecordingLabel()
91
-                }
92
-                {
93
-                    this._renderTranscribingLabel()
94
-                }
95
-                {
96
-                    this.props._showVideoQualityLabel && !VIDEO_QUALITY_LABEL_DISABLED
97
-                        && this._renderVideoQualityLabel()
98
-                }
99
-                {
100
-                    this._renderInsecureRoomNameLabel()
101
-                }
102
-            </div>
103
-        );
104
-    }
105
-
106
-    _renderE2EELabel: () => React$Element<*>;
107
-
108
-    _renderLocalRecordingLabel: () => React$Element<*>;
109
-
110
-    _renderRecordingLabel: string => React$Element<*>;
111
-
112
-    _renderTranscribingLabel: () => React$Element<*>;
113
-
114
-    _renderInsecureRoomNameLabel: () => React$Element<any>;
115
-
116
-    _renderVideoQualityLabel: () => React$Element<*>;
117
-}
118
-
119
-export default connect(_mapStateToProps)(Labels);

+ 7
- 4
react/features/conference/components/web/ParticipantsCount.js Прегледај датотеку

@@ -4,10 +4,13 @@ import React, { PureComponent } from 'react';
4 4
 import type { Dispatch } from 'redux';
5 5
 
6 6
 import { openDialog } from '../../../base/dialog';
7
+import { IconUserGroups } from '../../../base/icons';
8
+import { Label } from '../../../base/label';
7 9
 import { getParticipantCount } from '../../../base/participants';
8 10
 import { connect } from '../../../base/redux';
9 11
 import { SpeakerStats } from '../../../speaker-stats';
10 12
 
13
+
11 14
 /**
12 15
  * The type of the React {@code Component} props of {@link ParticipantsCount}.
13 16
  */
@@ -73,10 +76,10 @@ class ParticipantsCount extends PureComponent<Props> {
73 76
             <div
74 77
                 className = 'participants-count'
75 78
                 onClick = { this._onClick }>
76
-                <span className = 'participants-count-number'>
77
-                    {this.props.count}
78
-                </span>
79
-                <span className = 'participants-count-icon' />
79
+                <Label
80
+                    className = 'label--white'
81
+                    icon = { IconUserGroups }
82
+                    text = { this.props.count } />
80 83
             </div>
81 84
         );
82 85
     }

+ 0
- 103
react/features/conference/components/web/Subject.js Прегледај датотеку

@@ -1,103 +0,0 @@
1
-/* @flow */
2
-
3
-import React, { Component } from 'react';
4
-
5
-import { getConferenceName } from '../../../base/conference/functions';
6
-import { getParticipantCount } from '../../../base/participants/functions';
7
-import { connect } from '../../../base/redux';
8
-import { isToolboxVisible } from '../../../toolbox/functions.web';
9
-import ConferenceTimer from '../ConferenceTimer';
10
-
11
-import ParticipantsCount from './ParticipantsCount';
12
-
13
-/**
14
- * The type of the React {@code Component} props of {@link Subject}.
15
- */
16
-type Props = {
17
-
18
-    /**
19
-     * Whether the conference timer should be shown or not.
20
-     */
21
-    _hideConferenceTimer: Boolean,
22
-
23
-    /**
24
-     * Whether the participant count should be shown or not.
25
-     */
26
-    _showParticipantCount: boolean,
27
-
28
-    /**
29
-     * Whether the conference subject should be shown or not.
30
-     */
31
-    _showSubject: boolean,
32
-
33
-    /**
34
-     * The subject or the of the conference.
35
-     * Falls back to conference name.
36
-     */
37
-    _subject: string,
38
-
39
-    /**
40
-     * Indicates whether the component should be visible or not.
41
-     */
42
-    _visible: boolean
43
-};
44
-
45
-/**
46
- * Subject react component.
47
- *
48
- * @class Subject
49
- */
50
-class Subject extends Component<Props> {
51
-
52
-    /**
53
-     * Implements React's {@link Component#render()}.
54
-     *
55
-     * @inheritdoc
56
-     * @returns {ReactElement}
57
-     */
58
-    render() {
59
-        const { _hideConferenceTimer, _showParticipantCount, _showSubject, _subject, _visible } = this.props;
60
-        let className = `subject ${_visible ? 'visible' : ''}`;
61
-
62
-        if (!_hideConferenceTimer || _showParticipantCount || _showSubject) {
63
-            className += ' gradient';
64
-        }
65
-
66
-        return (
67
-            <div className = { className }>
68
-                { _showSubject && <span className = 'subject-text'>{ _subject }</span>}
69
-                { _showParticipantCount && <ParticipantsCount /> }
70
-                { !_hideConferenceTimer && <ConferenceTimer /> }
71
-            </div>
72
-        );
73
-    }
74
-}
75
-
76
-/**
77
- * Maps (parts of) the Redux state to the associated
78
- * {@code Subject}'s props.
79
- *
80
- * @param {Object} state - The Redux state.
81
- * @private
82
- * @returns {{
83
- *     _hideConferenceTimer: boolean,
84
- *     _showParticipantCount: boolean,
85
- *     _showSubject: boolean,
86
- *     _subject: string,
87
- *     _visible: boolean
88
- * }}
89
- */
90
-function _mapStateToProps(state) {
91
-    const participantCount = getParticipantCount(state);
92
-    const { hideConferenceTimer, hideConferenceSubject, hideParticipantsStats } = state['features/base/config'];
93
-
94
-    return {
95
-        _hideConferenceTimer: Boolean(hideConferenceTimer),
96
-        _showParticipantCount: participantCount > 2 && !hideParticipantsStats,
97
-        _showSubject: !hideConferenceSubject,
98
-        _subject: getConferenceName(state),
99
-        _visible: isToolboxVisible(state)
100
-    };
101
-}
102
-
103
-export default connect(_mapStateToProps)(Subject);

+ 1
- 1
react/features/conference/components/web/index.js Прегледај датотеку

@@ -4,4 +4,4 @@ export { default as Conference } from './Conference';
4 4
 export { default as renderConferenceTimer } from './ConferenceTimerDisplay';
5 5
 export { default as InsecureRoomNameLabel } from './InsecureRoomNameLabel';
6 6
 export { default as InviteMore } from './InviteMore';
7
-export { default as Subject } from './Subject';
7
+export { default as ConferenceInfo } from './ConferenceInfo';

+ 4
- 4
react/features/e2ee/components/E2EELabel.js Прегледај датотеку

@@ -4,7 +4,7 @@ import React, { Component } from 'react';
4 4
 
5 5
 import { translate } from '../../base/i18n';
6 6
 import { IconE2EE } from '../../base/icons';
7
-import { CircularLabel } from '../../base/label';
7
+import { Label } from '../../base/label';
8 8
 import { connect } from '../../base/redux';
9 9
 import { Tooltip } from '../../base/tooltip';
10 10
 
@@ -32,9 +32,9 @@ class E2EELabel extends Component<Props> {
32 32
         return (
33 33
             <Tooltip
34 34
                 content = { this.props.t('e2ee.labelToolTip') }
35
-                position = { 'left' }>
36
-                <CircularLabel
37
-                    className = 'e2ee'
35
+                position = { 'bottom' }>
36
+                <Label
37
+                    className = 'label--green'
38 38
                     icon = { IconE2EE } />
39 39
             </Tooltip>
40 40
         );

+ 0
- 2
react/features/large-video/components/LargeVideo.web.js Прегледај датотеку

@@ -5,7 +5,6 @@ import React, { Component } from 'react';
5 5
 import { Watermarks } from '../../base/react';
6 6
 import { connect } from '../../base/redux';
7 7
 import { setColorAlpha } from '../../base/util';
8
-import { Subject } from '../../conference';
9 8
 import { fetchCustomBrandingData } from '../../dynamic-branding';
10 9
 import { Captions } from '../../subtitles/';
11 10
 
@@ -76,7 +75,6 @@ class LargeVideo extends Component<Props> {
76 75
                 className = { className }
77 76
                 id = 'largeVideoContainer'
78 77
                 style = { style }>
79
-                <Subject />
80 78
                 <div id = 'sharedVideo'>
81 79
                     <div id = 'sharedVideoIFrame' />
82 80
                 </div>

+ 4
- 4
react/features/local-recording/components/LocalRecordingLabel.web.js Прегледај датотеку

@@ -3,7 +3,7 @@
3 3
 import React, { Component } from 'react';
4 4
 
5 5
 import { translate } from '../../base/i18n/index';
6
-import { CircularLabel } from '../../base/label/index';
6
+import { Label } from '../../base/label/index';
7 7
 import { connect } from '../../base/redux';
8 8
 import { Tooltip } from '../../base/tooltip';
9 9
 
@@ -45,10 +45,10 @@ class LocalRecordingLabel extends Component<Props> {
45 45
         return (
46 46
             <Tooltip
47 47
                 content = { this.props.t('localRecording.labelToolTip') }
48
-                position = { 'left' }>
49
-                <CircularLabel
48
+                position = { 'bottom' }>
49
+                <Label
50 50
                     className = 'local-rec'
51
-                    label = { this.props.t('localRecording.label') } />
51
+                    text = { this.props.t('localRecording.label') } />
52 52
             </Tooltip>
53 53
         );
54 54
     }

+ 4
- 4
react/features/recording/components/native/RecordingLabel.js Прегледај датотеку

@@ -3,7 +3,7 @@
3 3
 import React from 'react';
4 4
 
5 5
 import { translate } from '../../../base/i18n';
6
-import { CircularLabel } from '../../../base/label';
6
+import { Label } from '../../../base/label';
7 7
 import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet';
8 8
 import { connect } from '../../../base/redux';
9 9
 import AbstractRecordingLabel, {
@@ -52,10 +52,10 @@ class RecordingLabel extends AbstractRecordingLabel {
52 52
         }
53 53
 
54 54
         return (
55
-            <CircularLabel
56
-                label = { this.props.t(this._getLabelKey()) }
55
+            <Label
57 56
                 status = { status }
58
-                style = { indicatorStyle } />
57
+                style = { indicatorStyle }
58
+                text = { this.props.t(this._getLabelKey()) } />
59 59
         );
60 60
     }
61 61
 

+ 3
- 3
react/features/recording/components/web/RecordingLabel.js Прегледај датотеку

@@ -3,7 +3,7 @@
3 3
 import React from 'react';
4 4
 
5 5
 import { translate } from '../../../base/i18n';
6
-import { CircularLabel } from '../../../base/label';
6
+import { Label } from '../../../base/label';
7 7
 import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet';
8 8
 import { connect } from '../../../base/redux';
9 9
 import AbstractRecordingLabel, {
@@ -31,9 +31,9 @@ class RecordingLabel extends AbstractRecordingLabel {
31 31
 
32 32
         return (
33 33
             <div>
34
-                <CircularLabel
34
+                <Label
35 35
                     className = { this.props.mode }
36
-                    label = { this.props.t(this._getLabelKey()) } />
36
+                    text = { this.props.t(this._getLabelKey()) } />
37 37
             </div>
38 38
         );
39 39
     }

+ 2
- 5
react/features/transcribing/components/TranscribingLabel.native.js Прегледај датотеку

@@ -3,7 +3,7 @@
3 3
 import React, { Component } from 'react';
4 4
 
5 5
 import { translate } from '../../base/i18n';
6
-import { CircularLabel } from '../../base/label';
6
+import { Label } from '../../base/label';
7 7
 import { connect } from '../../base/redux';
8 8
 
9 9
 import { _mapStateToProps, type Props } from './AbstractTranscribingLabel';
@@ -26,10 +26,7 @@ class TranscribingLabel extends Component<Props> {
26 26
             return null;
27 27
         }
28 28
 
29
-        return (
30
-            <CircularLabel
31
-                label = { this.props.t('transcribing.tr') } />
32
-        );
29
+        return <Label text = { this.props.t('transcribing.tr') } />;
33 30
     }
34 31
 }
35 32
 

+ 3
- 3
react/features/transcribing/components/TranscribingLabel.web.js Прегледај датотеку

@@ -3,7 +3,7 @@
3 3
 import React, { Component } from 'react';
4 4
 
5 5
 import { translate } from '../../base/i18n';
6
-import { CircularLabel } from '../../base/label';
6
+import { Label } from '../../base/label';
7 7
 import { connect } from '../../base/redux';
8 8
 import { Tooltip } from '../../base/tooltip';
9 9
 
@@ -32,9 +32,9 @@ class TranscribingLabel extends Component<Props> {
32 32
             <Tooltip
33 33
                 content = { this.props.t('transcribing.labelToolTip') }
34 34
                 position = { 'left' }>
35
-                <CircularLabel
35
+                <Label
36 36
                     className = 'recording-label'
37
-                    label = { this.props.t('transcribing.tr') } />
37
+                    text = { this.props.t('transcribing.tr') } />
38 38
             </Tooltip>
39 39
         );
40 40
     }

+ 4
- 6
react/features/video-quality/components/VideoQualityLabel.native.js Прегледај датотеку

@@ -3,7 +3,7 @@
3 3
 import React from 'react';
4 4
 
5 5
 import { translate } from '../../base/i18n';
6
-import { CircularLabel } from '../../base/label';
6
+import { Label } from '../../base/label';
7 7
 import { connect } from '../../base/redux';
8 8
 import { combineStyles, type StyleType } from '../../base/styles';
9 9
 
@@ -46,11 +46,9 @@ class VideoQualityLabel extends AbstractVideoQualityLabel<Props> {
46 46
         }
47 47
 
48 48
         return (
49
-            <CircularLabel
50
-                label = { t('videoStatus.audioOnly') }
51
-                style = {
52
-                    combineStyles(styles.indicatorAudioOnly, style)
53
-                } />
49
+            <Label
50
+                style = { combineStyles(styles.indicatorAudioOnly, style) }
51
+                text = { t('videoStatus.audioOnly') } />
54 52
         );
55 53
     }
56 54
 }

+ 25
- 6
react/features/video-quality/components/VideoQualityLabel.web.js Прегледај датотеку

@@ -3,17 +3,20 @@
3 3
 import React from 'react';
4 4
 
5 5
 import { translate } from '../../base/i18n';
6
-import { CircularLabel } from '../../base/label';
6
+import { Label } from '../../base/label';
7 7
 import { MEDIA_TYPE } from '../../base/media';
8 8
 import { connect } from '../../base/redux';
9 9
 import { Tooltip } from '../../base/tooltip';
10 10
 import { getTrackByMediaTypeAndParticipant } from '../../base/tracks';
11
+import { shouldDisplayTileView } from '../../video-layout';
11 12
 
12 13
 import AbstractVideoQualityLabel, {
13 14
     _abstractMapStateToProps,
14 15
     type Props as AbstractProps
15 16
 } from './AbstractVideoQualityLabel';
16 17
 
18
+declare var interfaceConfig: Object;
19
+
17 20
 type Props = AbstractProps & {
18 21
 
19 22
     /**
@@ -21,6 +24,11 @@ type Props = AbstractProps & {
21 24
      */
22 25
     _labelKey: string,
23 26
 
27
+    /**
28
+     * Whether to show video quality label or not.
29
+     */
30
+     _showVideoQualityLabel: boolean,
31
+
24 32
     /**
25 33
      * The message to show within the label's tooltip.
26 34
      */
@@ -29,7 +37,12 @@ type Props = AbstractProps & {
29 37
     /**
30 38
      * The redux representation of the JitsiTrack displayed on large video.
31 39
      */
32
-    _videoTrack: Object
40
+    _videoTrack: Object,
41
+
42
+    /**
43
+     * Flag controlling visibility of the component.
44
+     */
45
+    _visible: boolean,
33 46
 };
34 47
 
35 48
 /**
@@ -75,10 +88,15 @@ export class VideoQualityLabel extends AbstractVideoQualityLabel<Props> {
75 88
             _labelKey,
76 89
             _tooltipKey,
77 90
             _videoTrack,
91
+            _visible,
78 92
             t
79 93
         } = this.props;
80 94
 
81 95
 
96
+        if (!_visible) {
97
+            return null;
98
+        }
99
+
82 100
         let className, labelContent, tooltipKey;
83 101
 
84 102
         if (_audioOnly) {
@@ -99,11 +117,11 @@ export class VideoQualityLabel extends AbstractVideoQualityLabel<Props> {
99 117
         return (
100 118
             <Tooltip
101 119
                 content = { t(tooltipKey) }
102
-                position = { 'left' }>
103
-                <CircularLabel
120
+                position = { 'bottom' }>
121
+                <Label
104 122
                     className = { className }
105 123
                     id = 'videoResolutionLabel'
106
-                    label = { labelContent } />
124
+                    text = { labelContent } />
107 125
             </Tooltip>
108 126
         );
109 127
     }
@@ -171,7 +189,8 @@ function _mapStateToProps(state) {
171 189
         ..._abstractMapStateToProps(state),
172 190
         _labelKey: translationKeys.labelKey,
173 191
         _tooltipKey: translationKeys.tooltipKey,
174
-        _videoTrack: videoTrackOnLargeVideo
192
+        _videoTrack: videoTrackOnLargeVideo,
193
+        _visible: !(shouldDisplayTileView(state) || interfaceConfig.VIDEO_QUALITY_LABEL_DISABLED)
175 194
     };
176 195
 }
177 196
 

Loading…
Откажи
Сачувај