浏览代码

fix(prejoin_page) Add labels for video & more UI fixes

master
Vlad Piersec 5 年前
父节点
当前提交
c05ca1d9fc

+ 0
- 16
css/_atlaskit_overrides.scss 查看文件

48
 .toolbox-button-wth-dialog .eYJELv {
48
 .toolbox-button-wth-dialog .eYJELv {
49
     max-height: initial;
49
     max-height: initial;
50
 }
50
 }
51
-
52
-/**
53
- * Override @atlaskit/InlineDialog styling for the video preview
54
- */
55
-.video-preview .eYJELv {
56
-    outline: none;
57
-    padding: 16px;
58
-}
59
-
60
-/**
61
- * Override @atlaskit/InlineDialog styling for the audio preview
62
- */
63
-.audio-preview .eYJELv {
64
-    outline: none;
65
-    padding: 0;
66
-}

+ 6
- 0
css/_audio-preview.css 查看文件

121
         right: 16px;
121
         right: 16px;
122
         top: 18px;
122
         top: 18px;
123
     }
123
     }
124
+
125
+   // Override @atlaskit/InlineDialog container which is made with styled components
126
+    & > div > div:nth-child(2) > div > div {
127
+        outline: none;
128
+        padding: 0;
129
+    }
124
 }
130
 }

+ 3
- 6
css/_meter.css 查看文件

3
         display: inline-block;
3
         display: inline-block;
4
 
4
 
5
         & > svg {
5
         & > svg {
6
-            fill: #76CF9C;
6
+            fill: #4E5E6C;
7
             width: 38px;
7
             width: 38px;
8
         }
8
         }
9
     }
9
     }
10
 
10
 
11
     &.metr--disabled {
11
     &.metr--disabled {
12
         & > svg {
12
         & > svg {
13
-            fill: #5E6D7A;
13
+            fill: #4E5E6C;
14
         }
14
         }
15
     }
15
     }
16
 }
16
 }
17
 
17
 
18
 .metr-l-0 {
18
 .metr-l-0 {
19
     rect:first-child {
19
     rect:first-child {
20
-        fill: #279255;
20
+        fill: #31B76A;
21
     }
21
     }
22
 }
22
 }
23
 
23
 
26
         rect:nth-child(-n+#{$i+1}) {
26
         rect:nth-child(-n+#{$i+1}) {
27
             fill: #31B76A;
27
             fill: #31B76A;
28
         }
28
         }
29
-        rect:first-child {
30
-            fill: #279255;
31
-        }
32
     }
29
     }
33
 }
30
 }

+ 12
- 9
css/_settings-button.scss 查看文件

50
         bottom: 0;
50
         bottom: 0;
51
         box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.25);
51
         box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.25);
52
         cursor: pointer;
52
         cursor: pointer;
53
-        height: 18px;
53
+        height: 16px;
54
         position: absolute;
54
         position: absolute;
55
         text-align: center;
55
         text-align: center;
56
-        right: 2px;
57
-        width: 18px;
58
-
59
-        &:hover {
60
-            background-color: #daebfa;
61
-        }
56
+        right: 4px;
57
+        width: 16px;
62
 
58
 
63
         &> svg {
59
         &> svg {
64
             margin-top: 5px;
60
             margin-top: 5px;
67
         &--disabled {
63
         &--disabled {
68
             background-color: #a4b8d1;
64
             background-color: #a4b8d1;
69
             cursor: default;
65
             cursor: default;
66
+        }
70
 
67
 
71
-            &:hover {
72
-                background-color: #a4b8d1;
68
+        &--hovered {
69
+            bottom: -1px;
70
+            height: 20px;
71
+            right: 2px;
72
+            width: 20px;
73
+
74
+            &> svg {
75
+                margin-top: 6px;
73
             }
76
             }
74
         }
77
         }
75
     }
78
     }

+ 22
- 0
css/_video-preview.css 查看文件

1
 .video-preview {
1
 .video-preview {
2
+    max-height: 290px;
3
+    overflow: auto;
4
+
2
     &-entry {
5
     &-entry {
3
         cursor: pointer;
6
         cursor: pointer;
4
         height: 135px;
7
         height: 135px;
40
         position: absolute;
43
         position: absolute;
41
         width: 100%;
44
         width: 100%;
42
     }
45
     }
46
+
47
+    &-label {
48
+        color: #fff;
49
+        font-size: 13px;
50
+        line-height: 20px;
51
+        overflow: hidden;
52
+        padding: 8px;
53
+        position: absolute;
54
+        text-align: center;
55
+        text-overflow: ellipsis;
56
+        width: 220px;
57
+        z-index: 2;
58
+    }
59
+
60
+    // Override @atlaskit/InlineDialog container which is made with styled components
61
+    & > div > div:nth-child(2) > div > div {
62
+        outline: none;
63
+        padding: 16px;
64
+    }
43
 }
65
 }

+ 1
- 0
lang/main.json 查看文件

525
         "followMe": "Everyone follows me",
525
         "followMe": "Everyone follows me",
526
         "language": "Language",
526
         "language": "Language",
527
         "loggedIn": "Logged in as {{name}}",
527
         "loggedIn": "Logged in as {{name}}",
528
+        "microphones": "Microphones",
528
         "moderator": "Moderator",
529
         "moderator": "Moderator",
529
         "more": "More",
530
         "more": "More",
530
         "name": "Name",
531
         "name": "Name",

+ 98
- 27
react/features/base/toolbox/components/ToolboxButtonWithIcon.js 查看文件

1
 // @flow
1
 // @flow
2
 
2
 
3
-import React from 'react';
3
+import React, { Component } from 'react';
4
 import { Icon } from '../../icons';
4
 import { Icon } from '../../icons';
5
 
5
 
6
 type Props = {
6
 type Props = {
29
      * Additional styles.
29
      * Additional styles.
30
      */
30
      */
31
     styles?: Object,
31
     styles?: Object,
32
-}
32
+};
33
+
34
+type State = {
35
+
36
+    /**
37
+     * Whether the button is hovered or not.
38
+     */
39
+    isHovered: boolean,
40
+};
33
 
41
 
34
 /**
42
 /**
35
  * Displayes the `ToolboxButtonWithIcon` component.
43
  * Displayes the `ToolboxButtonWithIcon` component.
36
  *
44
  *
37
  * @returns {ReactElement}
45
  * @returns {ReactElement}
38
  */
46
  */
39
-export default function ToolboxButtonWithIcon({
40
-    children,
41
-    icon,
42
-    iconDisabled,
43
-    onIconClick,
44
-    styles
45
-}: Props) {
46
-    const iconProps = {};
47
-
48
-    if (iconDisabled) {
49
-        iconProps.className = 'settings-button-small-icon settings-button-small-icon--disabled';
50
-    } else {
51
-        iconProps.className = 'settings-button-small-icon';
52
-        iconProps.onClick = onIconClick;
47
+export default class ToolboxButtonWithIcon extends Component<Props, State> {
48
+
49
+    /**
50
+     * Initializes a new {@code ToolboxButtonWithIcon} instance.
51
+     *
52
+     * @param {Props} props - The props of the component.
53
+     */
54
+    constructor(props: Props) {
55
+        super(props);
56
+
57
+        this.state = {
58
+            isHovered: false
59
+        };
60
+        this._onMouseEnter = this._onMouseEnter.bind(this);
61
+        this._onMouseLeave = this._onMouseLeave.bind(this);
62
+    }
63
+
64
+    _onMouseEnter: () => void;
65
+
66
+    /**
67
+     * Handler for when the small button has the mouse over.
68
+     *
69
+     * @returns {void}.
70
+     */
71
+    _onMouseEnter() {
72
+        this.setState({
73
+            isHovered: true
74
+        });
53
     }
75
     }
54
 
76
 
55
-    return (
56
-        <div
57
-            className = 'settings-button-container'
58
-            styles = { styles }>
59
-            { children }
60
-            <Icon
61
-                { ...iconProps }
62
-                size = { 9 }
63
-                src = { icon } />
64
-        </div>
65
-    );
77
+    _onMouseLeave: () => void;
78
+
79
+    /**
80
+     * Handler for when the mouse leaves the small button.
81
+     *
82
+     * @returns {void}
83
+     */
84
+    _onMouseLeave() {
85
+        this.setState({
86
+            isHovered: false
87
+        });
88
+    }
89
+
90
+    /**
91
+     * Implements React's {@link Component#render()}.
92
+     *
93
+     * @inheritdoc
94
+     * @returns {React$Node}
95
+     */
96
+    render() {
97
+        const {
98
+            children,
99
+            icon,
100
+            iconDisabled,
101
+            onIconClick,
102
+            styles
103
+        } = this.props;
104
+
105
+        const iconProps = {};
106
+        let size = 9;
107
+
108
+        if (iconDisabled) {
109
+            iconProps.className
110
+                = 'settings-button-small-icon settings-button-small-icon--disabled';
111
+        } else {
112
+            iconProps.className = 'settings-button-small-icon';
113
+            iconProps.onClick = onIconClick;
114
+
115
+            if (this.state.isHovered) {
116
+                iconProps.className = `${iconProps.className} settings-button-small-icon--hovered`;
117
+                size = 11;
118
+            }
119
+        }
120
+
121
+        return (
122
+            <div
123
+                className = 'settings-button-container'
124
+                styles = { styles }>
125
+                {children}
126
+                <div
127
+                    onMouseEnter = { this._onMouseEnter }
128
+                    onMouseLeave = { this._onMouseLeave }>
129
+                    <Icon
130
+                        { ...iconProps }
131
+                        size = { size }
132
+                        src = { icon } />
133
+                </div>
134
+            </div>
135
+        );
136
+    }
66
 }
137
 }

+ 1
- 3
react/features/settings/components/web/SettingsDialog.js 查看文件

127
 function _mapStateToProps(state) {
127
 function _mapStateToProps(state) {
128
     const configuredTabs = interfaceConfig.SETTINGS_SECTIONS || [];
128
     const configuredTabs = interfaceConfig.SETTINGS_SECTIONS || [];
129
     const jwt = state['features/base/jwt'];
129
     const jwt = state['features/base/jwt'];
130
-    const { prejoinPageEnabled } = state['features/base/config'];
131
 
130
 
132
     // The settings sections to display.
131
     // The settings sections to display.
133
-    const showDeviceSettings = !prejoinPageEnabled
134
-          && configuredTabs.includes('devices');
132
+    const showDeviceSettings = configuredTabs.includes('devices');
135
     const moreTabProps = getMoreTabProps(state);
133
     const moreTabProps = getMoreTabProps(state);
136
     const { showModeratorSettings, showLanguageSettings } = moreTabProps;
134
     const { showModeratorSettings, showLanguageSettings } = moreTabProps;
137
     const showProfileSettings
135
     const showProfileSettings

+ 1
- 1
react/features/settings/components/web/audio/AudioSettingsContent.js 查看文件

243
                 <div className = 'audio-preview-content'>
243
                 <div className = 'audio-preview-content'>
244
                     <AudioSettingsHeader
244
                     <AudioSettingsHeader
245
                         IconComponent = { IconMicrophoneEmpty }
245
                         IconComponent = { IconMicrophoneEmpty }
246
-                        text = { t('settings.selectMic') } />
246
+                        text = { t('settings.microphones') } />
247
                     {microphoneDevices.map((data, i) =>
247
                     {microphoneDevices.map((data, i) =>
248
                         this._renderMicrophoneEntry(data, i),
248
                         this._renderMicrophoneEntry(data, i),
249
                     )}
249
                     )}

+ 3
- 1
react/features/settings/components/web/video/VideoSettingsContent.js 查看文件

153
             className,
153
             className,
154
             key
154
             key
155
         };
155
         };
156
+        const label = jitsiTrack && jitsiTrack.getTrackLabel();
156
 
157
 
157
         if (isSelected) {
158
         if (isSelected) {
158
             props.className = `${className} video-preview-entry--selected`;
159
             props.className = `${className} video-preview-entry--selected`;
162
 
163
 
163
         return (
164
         return (
164
             <div { ...props }>
165
             <div { ...props }>
166
+                <div className = 'video-preview-label'>{label}</div>
165
                 <div className = 'video-preview-overlay' />
167
                 <div className = 'video-preview-overlay' />
166
                 <Video
168
                 <Video
167
                     className = { videoClassName }
169
                     className = { videoClassName }
209
         const { trackData } = this.state;
211
         const { trackData } = this.state;
210
 
212
 
211
         return (
213
         return (
212
-            <div>
214
+            <div className = 'video-preview'>
213
                 {trackData.map((data, i) => this._renderPreviewEntry(data, i))}
215
                 {trackData.map((data, i) => this._renderPreviewEntry(data, i))}
214
             </div>
216
             </div>
215
         );
217
         );

正在加载...
取消
保存