소스 검색

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

j8
Mihai-Andrei Uscat 4 년 전
부모
커밋
a22d054b10
No account linked to committer's email address

+ 19
- 1
css/_toolbars.scss 파일 보기

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
 .toolbox-content-items {
108
 .toolbox-content-items {
103
     background: $newToolbarBackgroundColor;
109
     background: $newToolbarBackgroundColor;
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
 .toolbox-content-mobile {
306
 .toolbox-content-mobile {
301
     @media (max-width: 500px) {
307
     @media (max-width: 500px) {
302
         margin-bottom: 0;
308
         margin-bottom: 0;
303
 
309
 
310
+        .toolbox-content-wrapper {
311
+            width: 100%;
312
+        }
313
+
304
         .toolbox-content-items {
314
         .toolbox-content-items {
305
             border-radius: 0;
315
             border-radius: 0;
306
             display: flex;
316
             display: flex;
308
             padding: 6px 0;
318
             padding: 6px 0;
309
             width: 100%;
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
 .invite-more {
1
 .invite-more {
2
     &-container {
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
         color: #fff;
18
         color: #fff;
19
+        font-size: 16px;
20
+        line-height: 24px;
4
         font-weight: 600;
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
     &-header {
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
     &-button {
32
     &-button {
19
         display: flex;
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
         background: #0376DA;
38
         background: #0376DA;
26
         border-radius: 3px;
39
         border-radius: 3px;
27
-        font-size: 14px;
28
-        line-height: 24px;
29
         cursor: pointer;
40
         cursor: pointer;
30
 
41
 
31
         @media (hover: hover) and (pointer: fine) {
42
         @media (hover: hover) and (pointer: fine) {
36
 
47
 
37
         &-text {
48
         &-text {
38
             margin-left: 8px;
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
     &-dialog {
55
     &-dialog {

+ 24
- 16
react/features/conference/components/web/InviteMore.js 파일 보기

14
 type Props = {
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
      * Handler to open the invite dialog.
27
      * Handler to open the invite dialog.
38
  * @returns {React$Element<any>}
42
  * @returns {React$Element<any>}
39
  */
43
  */
40
 function InviteMore({
44
 function InviteMore({
41
-    _visible,
45
+    _shouldShow,
46
+    _toolboxVisible,
42
     onClick,
47
     onClick,
43
     t
48
     t
44
 }: Props) {
49
 }: Props) {
45
     return (
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
                     </div>
64
                     </div>
58
                 </div>
65
                 </div>
59
             </div> : null
66
             </div> : null
74
     const hide = interfaceConfig.HIDE_INVITE_MORE_HEADER;
81
     const hide = interfaceConfig.HIDE_INVITE_MORE_HEADER;
75
 
82
 
76
     return {
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
         _showParticipantCount: participantCount > 2 && !hideParticipantsStats,
96
         _showParticipantCount: participantCount > 2 && !hideParticipantsStats,
97
         _showSubject: !hideConferenceSubject,
97
         _showSubject: !hideConferenceSubject,
98
         _subject: getConferenceName(state),
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
 
4
 
5
 import { Watermarks } from '../../base/react';
5
 import { Watermarks } from '../../base/react';
6
 import { connect } from '../../base/redux';
6
 import { connect } from '../../base/redux';
7
-import { InviteMore, Subject } from '../../conference';
7
+import { Subject } from '../../conference';
8
 import { fetchCustomBrandingData } from '../../dynamic-branding';
8
 import { fetchCustomBrandingData } from '../../dynamic-branding';
9
 import { Captions } from '../../subtitles/';
9
 import { Captions } from '../../subtitles/';
10
 
10
 
71
                 id = 'largeVideoContainer'
71
                 id = 'largeVideoContainer'
72
                 style = { style }>
72
                 style = { style }>
73
                 <Subject />
73
                 <Subject />
74
-                <InviteMore />
75
                 <div id = 'sharedVideo'>
74
                 <div id = 'sharedVideo'>
76
                     <div id = 'sharedVideoIFrame' />
75
                     <div id = 'sharedVideoIFrame' />
77
                 </div>
76
                 </div>

+ 20
- 16
react/features/toolbox/components/web/Toolbox.js 파일 보기

36
 import { getLocalVideoTrack, toggleScreensharing } from '../../../base/tracks';
36
 import { getLocalVideoTrack, toggleScreensharing } from '../../../base/tracks';
37
 import { isVpaasMeeting } from '../../../billing-counter/functions';
37
 import { isVpaasMeeting } from '../../../billing-counter/functions';
38
 import { CHAT_SIZE, ChatCounter, toggleChat } from '../../../chat';
38
 import { CHAT_SIZE, ChatCounter, toggleChat } from '../../../chat';
39
+import { InviteMore } from '../../../conference';
39
 import { EmbedMeetingDialog } from '../../../embed-meeting';
40
 import { EmbedMeetingDialog } from '../../../embed-meeting';
40
 import { SharedDocumentButton } from '../../../etherpad';
41
 import { SharedDocumentButton } from '../../../etherpad';
41
 import { openFeedbackDialog } from '../../../feedback';
42
 import { openFeedbackDialog } from '../../../feedback';
1264
 
1265
 
1265
         return (
1266
         return (
1266
             <div className = { containerClassName }>
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
                 </div>
1287
                 </div>
1284
             </div>
1288
             </div>
1285
         );
1289
         );

Loading…
취소
저장