瀏覽代碼

feat(InviteMore): Relocate invite prompt for mobile friendliness.

master
Mihai-Andrei Uscat 4 年之前
父節點
當前提交
a22d054b10
沒有連結到貢獻者的電子郵件帳戶。

+ 19
- 1
css/_toolbars.scss 查看文件

@@ -98,6 +98,12 @@
98 98
     }
99 99
 }
100 100
 
101
+.toolbox-content-wrapper {
102
+    display: flex;
103
+    flex-direction: column;
104
+    margin: 0 auto;
105
+    max-width: 100%;
106
+}
101 107
 
102 108
 .toolbox-content-items {
103 109
     background: $newToolbarBackgroundColor;
@@ -295,12 +301,16 @@
295 301
 }
296 302
 
297 303
 /**
298
- * On small mobile devices make the toolbar full width.
304
+ * On small mobile devices make the toolbar full width and pad the invite prompt.
299 305
  */
300 306
 .toolbox-content-mobile {
301 307
     @media (max-width: 500px) {
302 308
         margin-bottom: 0;
303 309
 
310
+        .toolbox-content-wrapper {
311
+            width: 100%;
312
+        }
313
+
304 314
         .toolbox-content-items {
305 315
             border-radius: 0;
306 316
             display: flex;
@@ -308,5 +318,13 @@
308 318
             padding: 6px 0;
309 319
             width: 100%;
310 320
         }
321
+
322
+        .invite-more-container {
323
+            margin: 0 16px 8px;
324
+        }
325
+
326
+        .invite-more-container.elevated {
327
+            margin-bottom: 52px;
328
+        }
311 329
     }
312 330
 }

+ 29
- 17
css/modals/invite/_invite_more.scss 查看文件

@@ -1,31 +1,42 @@
1 1
 .invite-more {
2 2
     &-container {
3
+        margin-bottom: 8px;
4
+        transition: margin-bottom 0.3s;
5
+
6
+        &.elevated {
7
+            margin-bottom: 36px;
8
+        }
9
+    }
10
+
11
+    &-content {
12
+        display: flex;
13
+        flex-direction: column;
14
+        align-items: center;
15
+        padding: 16px;
16
+        background: rgba(0, 0, 0, 0.7);
17
+        border-radius: 8px;
3 18
         color: #fff;
19
+        font-size: 16px;
20
+        line-height: 24px;
4 21
         font-weight: 600;
5
-        position: absolute;
6
-        width: 100%;
7
-        text-align: center;
8
-        z-index: $zindex2;
9
-        background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
10 22
     }
11 23
 
12 24
     &-header {
13
-        font-size: 19px;
14
-        line-height: 28px;
15
-        margin: 24px 0 16px 0;
25
+        max-width: 100%;
26
+        margin-bottom: 16px;
27
+        text-overflow: ellipsis;
28
+        overflow: hidden;
29
+        white-space: nowrap;
16 30
     }
17 31
 
18 32
     &-button {
19 33
         display: flex;
20
-        margin: auto;
21
-        padding: 8px 16px;
22
-        width: fit-content;
23
-        width: -moz-fit-content;
24
-        height: 24px;
34
+        max-width: 100%;
35
+        height: 48px;
36
+        box-sizing: border-box;
37
+        padding: 12px 16px;
25 38
         background: #0376DA;
26 39
         border-radius: 3px;
27
-        font-size: 14px;
28
-        line-height: 24px;
29 40
         cursor: pointer;
30 41
 
31 42
         @media (hover: hover) and (pointer: fine) {
@@ -36,8 +47,9 @@
36 47
 
37 48
         &-text {
38 49
             margin-left: 8px;
39
-            font-size: 15px;
40
-            line-height: 24px;
50
+            text-overflow: ellipsis;
51
+            overflow: hidden;
52
+            white-space: nowrap;
41 53
         }
42 54
     }
43 55
     &-dialog {

+ 24
- 16
react/features/conference/components/web/InviteMore.js 查看文件

@@ -14,10 +14,14 @@ declare var interfaceConfig: Object;
14 14
 type Props = {
15 15
 
16 16
     /**
17
-     * Whether to show the option to invite more people
18
-     * instead of the subject.
17
+     * Whether to show the option to invite more people.
19 18
      */
20
-    _visible: boolean,
19
+    _shouldShow: boolean,
20
+
21
+    /**
22
+     * Whether the toolbox is visible.
23
+     */
24
+    _toolboxVisible: boolean,
21 25
 
22 26
     /**
23 27
      * Handler to open the invite dialog.
@@ -38,22 +42,25 @@ type Props = {
38 42
  * @returns {React$Element<any>}
39 43
  */
40 44
 function InviteMore({
41
-    _visible,
45
+    _shouldShow,
46
+    _toolboxVisible,
42 47
     onClick,
43 48
     t
44 49
 }: Props) {
45 50
     return (
46
-        _visible
47
-            ? <div className = 'invite-more-container'>
48
-                <div className = 'invite-more-header'>
49
-                    {t('addPeople.inviteMoreHeader')}
50
-                </div>
51
-                <div
52
-                    className = 'invite-more-button'
53
-                    onClick = { onClick }>
54
-                    <Icon src = { IconInviteMore } />
55
-                    <div className = 'invite-more-button-text'>
56
-                        {t('addPeople.inviteMorePrompt')}
51
+        _shouldShow
52
+            ? <div className = { `invite-more-container${_toolboxVisible ? '' : ' elevated'}` }>
53
+                <div className = 'invite-more-content'>
54
+                    <div className = 'invite-more-header'>
55
+                        {t('addPeople.inviteMoreHeader')}
56
+                    </div>
57
+                    <div
58
+                        className = 'invite-more-button'
59
+                        onClick = { onClick }>
60
+                        <Icon src = { IconInviteMore } />
61
+                        <div className = 'invite-more-button-text'>
62
+                            {t('addPeople.inviteMorePrompt')}
63
+                        </div>
57 64
                     </div>
58 65
                 </div>
59 66
             </div> : null
@@ -74,7 +81,8 @@ function mapStateToProps(state) {
74 81
     const hide = interfaceConfig.HIDE_INVITE_MORE_HEADER;
75 82
 
76 83
     return {
77
-        _visible: isToolboxVisible(state) && isButtonEnabled('invite', state) && isAlone && !hide
84
+        _shouldShow: isButtonEnabled('invite', state) && isAlone && !hide,
85
+        _toolboxVisible: isToolboxVisible(state)
78 86
     };
79 87
 }
80 88
 

+ 1
- 1
react/features/conference/components/web/Subject.js 查看文件

@@ -96,7 +96,7 @@ function _mapStateToProps(state) {
96 96
         _showParticipantCount: participantCount > 2 && !hideParticipantsStats,
97 97
         _showSubject: !hideConferenceSubject,
98 98
         _subject: getConferenceName(state),
99
-        _visible: isToolboxVisible(state) && participantCount > 1
99
+        _visible: isToolboxVisible(state)
100 100
     };
101 101
 }
102 102
 

+ 1
- 2
react/features/large-video/components/LargeVideo.web.js 查看文件

@@ -4,7 +4,7 @@ import React, { Component } from 'react';
4 4
 
5 5
 import { Watermarks } from '../../base/react';
6 6
 import { connect } from '../../base/redux';
7
-import { InviteMore, Subject } from '../../conference';
7
+import { Subject } from '../../conference';
8 8
 import { fetchCustomBrandingData } from '../../dynamic-branding';
9 9
 import { Captions } from '../../subtitles/';
10 10
 
@@ -71,7 +71,6 @@ class LargeVideo extends Component<Props> {
71 71
                 id = 'largeVideoContainer'
72 72
                 style = { style }>
73 73
                 <Subject />
74
-                <InviteMore />
75 74
                 <div id = 'sharedVideo'>
76 75
                     <div id = 'sharedVideoIFrame' />
77 76
                 </div>

+ 20
- 16
react/features/toolbox/components/web/Toolbox.js 查看文件

@@ -36,6 +36,7 @@ import { OverflowMenuItem } from '../../../base/toolbox/components';
36 36
 import { getLocalVideoTrack, toggleScreensharing } from '../../../base/tracks';
37 37
 import { isVpaasMeeting } from '../../../billing-counter/functions';
38 38
 import { CHAT_SIZE, ChatCounter, toggleChat } from '../../../chat';
39
+import { InviteMore } from '../../../conference';
39 40
 import { EmbedMeetingDialog } from '../../../embed-meeting';
40 41
 import { SharedDocumentButton } from '../../../etherpad';
41 42
 import { openFeedbackDialog } from '../../../feedback';
@@ -1264,22 +1265,25 @@ class Toolbox extends Component<Props, State> {
1264 1265
 
1265 1266
         return (
1266 1267
             <div className = { containerClassName }>
1267
-                <div className = 'toolbox-content-items'>
1268
-                    { this._renderAudioButton() }
1269
-                    { this._renderVideoButton() }
1270
-                    { mainMenuAdditionalButtons }
1271
-                    { showOverflowMenuButton && <OverflowMenuButton
1272
-                        isOpen = { _overflowMenuVisible }
1273
-                        onVisibilityChange = { this._onSetOverflowVisible }>
1274
-                        <ul
1275
-                            aria-label = { t(toolbarAccLabel) }
1276
-                            className = 'overflow-menu'>
1277
-                            { this._renderOverflowMenuContent(overflowMenuAdditionalButtons) }
1278
-                        </ul>
1279
-                    </OverflowMenuButton>}
1280
-                    <HangupButton
1281
-                        customClass = 'hangup-button'
1282
-                        visible = { this._shouldShowButton('hangup') } />
1268
+                <div className = 'toolbox-content-wrapper'>
1269
+                    <InviteMore />
1270
+                    <div className = 'toolbox-content-items'>
1271
+                        { this._renderAudioButton() }
1272
+                        { this._renderVideoButton() }
1273
+                        { mainMenuAdditionalButtons }
1274
+                        { showOverflowMenuButton && <OverflowMenuButton
1275
+                            isOpen = { _overflowMenuVisible }
1276
+                            onVisibilityChange = { this._onSetOverflowVisible }>
1277
+                            <ul
1278
+                                aria-label = { t(toolbarAccLabel) }
1279
+                                className = 'overflow-menu'>
1280
+                                { this._renderOverflowMenuContent(overflowMenuAdditionalButtons) }
1281
+                            </ul>
1282
+                        </OverflowMenuButton>}
1283
+                        <HangupButton
1284
+                            customClass = 'hangup-button'
1285
+                            visible = { this._shouldShowButton('hangup') } />
1286
+                    </div>
1283 1287
                 </div>
1284 1288
             </div>
1285 1289
         );

Loading…
取消
儲存