瀏覽代碼

feat(Dialog): Make dialog close button more mobile friendly.

* Remove pointless custom headers, fall back to ModalHeader instead.
j8
Mihai-Andrei Uscat 4 年之前
父節點
當前提交
4aab5e2054
沒有連結到貢獻者的電子郵件帳戶。

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

@@ -20,12 +20,27 @@
20 20
  * Override @atlaskit/modal-dialog header styling
21 21
  */
22 22
 .atlaskit-portal [role="dialog"] header {
23
+    .jitsi-icon {
24
+        cursor: pointer;
25
+    }
26
+
23 27
     .jitsi-icon svg {
24 28
         fill: #B8C7E0;
25
-        cursor: pointer;
26 29
     }
27 30
 }
28 31
 
32
+/**
33
+ * Make header close button more easily tappable on mobile.
34
+ */
35
+.mobile-browser .atlaskit-portal [role="dialog"] header .jitsi-icon {
36
+    display: grid;
37
+    place-items: center;
38
+    height: 48px;
39
+    width: 48px;
40
+    background: #2a3a4b;
41
+    border-radius: 3px;
42
+}
43
+
29 44
 /**
30 45
  * Override @atlaskit/theme styling for the top toolbar so it displays over
31 46
  * the video thumbnail while obscuring as little as possible.

+ 21
- 2
css/_chat.scss 查看文件

@@ -113,8 +113,11 @@
113 113
     font-size: 24px;
114 114
     line-height: 32px;
115 115
 
116
-    .jitsi-icon > svg {
116
+    .jitsi-icon {
117 117
         cursor: pointer;
118
+    }
119
+
120
+    .jitsi-icon > svg {
118 121
         fill: #A4B8D1;
119 122
     }
120 123
 }
@@ -387,6 +390,7 @@
387 390
     &-header {
388 391
         display: flex;
389 392
         justify-content: space-between;
393
+        align-items: center;
390 394
         margin: 16px 16px 24px;
391 395
         width: calc(100% - 32px);
392 396
         box-sizing: border-box;
@@ -395,8 +399,11 @@
395 399
         font-size: 24px;
396 400
         line-height: 32px;
397 401
 
398
-        .jitsi-icon > svg {
402
+        .jitsi-icon {
399 403
             cursor: pointer;
404
+        }
405
+
406
+        .jitsi-icon > svg {
400 407
             fill: #A4B8D1;
401 408
         }
402 409
     }
@@ -405,3 +412,15 @@
405 412
         width: 100%;
406 413
     }
407 414
 }
415
+
416
+/**
417
+ * Make header close button more easily tappable on mobile.
418
+ */
419
+.mobile-browser .chat-dialog-header .jitsi-icon {
420
+    display: grid;
421
+    place-items: center;
422
+    height: 48px;
423
+    width: 48px;
424
+    background: #2a3a4b;
425
+    border-radius: 3px;
426
+}

+ 0
- 16
css/modals/embed-meeting/_embed-meeting.scss 查看文件

@@ -2,22 +2,6 @@
2 2
     &-dialog {
3 3
         display: flex;
4 4
         flex-direction: column;
5
-
6
-        &-header {
7
-            display: flex;
8
-            justify-content: space-between;
9
-            margin: 16px 16px 24px;
10
-            width: calc(100% - 32px);
11
-            color: #fff;
12
-            font-weight: 600;
13
-            font-size: 24px;
14
-            line-height: 32px;
15
-
16
-            & > div > svg {
17
-                cursor: pointer;
18
-                fill: #A4B8D1;
19
-            }
20
-        }
21 5
     }
22 6
 
23 7
     &-copy {

+ 0
- 16
css/modals/invite/_invite_more.scss 查看文件

@@ -47,22 +47,6 @@
47 47
         font-size: 15px;
48 48
         line-height: 24px;
49 49
 
50
-        &.header {
51
-            display: flex;
52
-            justify-content: space-between;
53
-            margin: 16px 16px 24px;
54
-            width: calc(100% - 32px);
55
-            color: #fff;
56
-            font-weight: 600;
57
-            font-size: 24px;
58
-            line-height: 32px;
59
-
60
-            & > div > svg {
61
-                cursor: pointer;
62
-                fill: #A4B8D1;
63
-            }
64
-        }
65
-
66 50
         &.separator {
67 51
             margin: 24px 0 24px -20px;
68 52
             padding: 0 20px;

+ 1
- 3
react/features/embed-meeting/components/EmbedMeetingDialog.js 查看文件

@@ -8,8 +8,6 @@ import { getInviteURL } from '../../base/connection';
8 8
 import { Dialog } from '../../base/dialog';
9 9
 import { translate } from '../../base/i18n';
10 10
 
11
-import Header from './Header';
12
-
13 11
 type Props = {
14 12
 
15 13
     /**
@@ -40,9 +38,9 @@ function EmbedMeeting({ t, url }: Props) {
40 38
 
41 39
     return (
42 40
         <Dialog
43
-            customHeader = { Header }
44 41
             hideCancelButton = { true }
45 42
             submitDisabled = { true }
43
+            titleKey = { 'embedMeeting.title' }
46 44
             width = 'small'>
47 45
             <div className = 'embed-meeting-dialog'>
48 46
                 <textarea

+ 0
- 38
react/features/embed-meeting/components/Header.js 查看文件

@@ -1,38 +0,0 @@
1
-// @flow
2
-
3
-import React from 'react';
4
-
5
-import { translate } from '../../base/i18n';
6
-import { Icon, IconClose } from '../../base/icons';
7
-
8
-type Props = {
9
-
10
-    /**
11
-     * The {@link ModalDialog} closing function.
12
-     */
13
-    onClose: Function,
14
-
15
-    /**
16
-     * Invoked to obtain translated strings.
17
-     */
18
-    t: Function
19
-};
20
-
21
-/**
22
- * Custom header of the {@code EmbedMeetingDialog}.
23
- *
24
- * @returns {React$Element<any>}
25
- */
26
-function Header({ onClose, t }: Props) {
27
-    return (
28
-        <div
29
-            className = 'embed-meeting-dialog-header'>
30
-            { t('embedMeeting.title') }
31
-            <Icon
32
-                onClick = { onClose }
33
-                src = { IconClose } />
34
-        </div>
35
-    );
36
-}
37
-
38
-export default translate(Header);

+ 0
- 2
react/features/invite/components/add-people-dialog/web/AddPeopleDialog.js 查看文件

@@ -18,7 +18,6 @@ import { _getDefaultPhoneNumber, getInviteText, isAddPeopleEnabled, isDialOutEna
18 18
 
19 19
 import CopyMeetingLinkSection from './CopyMeetingLinkSection';
20 20
 import DialInSection from './DialInSection';
21
-import Header from './Header';
22 21
 import InviteByEmailSection from './InviteByEmailSection';
23 22
 import InviteContactsSection from './InviteContactsSection';
24 23
 import LiveStreamSection from './LiveStreamSection';
@@ -148,7 +147,6 @@ function AddPeopleDialog({
148 147
     return (
149 148
         <Dialog
150 149
             cancelKey = { 'dialog.close' }
151
-            customHeader = { Header }
152 150
             hideCancelButton = { true }
153 151
             submitDisabled = { true }
154 152
             titleKey = 'addPeople.inviteMorePrompt'

+ 0
- 38
react/features/invite/components/add-people-dialog/web/Header.js 查看文件

@@ -1,38 +0,0 @@
1
-// @flow
2
-
3
-import React from 'react';
4
-
5
-import { translate } from '../../../../base/i18n';
6
-import { Icon, IconClose } from '../../../../base/icons';
7
-
8
-type Props = {
9
-
10
-    /**
11
-     * The {@link ModalDialog} closing function.
12
-     */
13
-    onClose: Function,
14
-
15
-    /**
16
-     * Invoked to obtain translated strings.
17
-     */
18
-    t: Function
19
-};
20
-
21
-/**
22
- * Custom header of the {@code AddPeopleDialog}.
23
- *
24
- * @returns {React$Element<any>}
25
- */
26
-function Header({ onClose, t }: Props) {
27
-    return (
28
-        <div
29
-            className = 'invite-more-dialog header'>
30
-            { t('addPeople.inviteMorePrompt') }
31
-            <Icon
32
-                onClick = { onClose }
33
-                src = { IconClose } />
34
-        </div>
35
-    );
36
-}
37
-
38
-export default translate(Header);

+ 0
- 38
react/features/security/components/security-dialog/Header.js 查看文件

@@ -1,38 +0,0 @@
1
-// @flow
2
-
3
-import React from 'react';
4
-
5
-import { translate } from '../../../base/i18n';
6
-import { Icon, IconClose } from '../../../base/icons';
7
-
8
-type Props = {
9
-
10
-    /**
11
-     * The {@link ModalDialog} closing function.
12
-     */
13
-    onClose: Function,
14
-
15
-    /**
16
-     * Invoked to obtain translated strings.
17
-     */
18
-    t: Function
19
-};
20
-
21
-/**
22
- * Custom header of the {@code SecurityDialog}.
23
- *
24
- * @returns {React$Element<any>}
25
- */
26
-function Header({ onClose, t }: Props) {
27
-    return (
28
-        <div
29
-            className = 'invite-more-dialog header'>
30
-            { t('security.securityOptions') }
31
-            <Icon
32
-                onClick = { onClose }
33
-                src = { IconClose } />
34
-        </div>
35
-    );
36
-}
37
-
38
-export default translate(Header);

+ 0
- 2
react/features/security/components/security-dialog/SecurityDialog.js 查看文件

@@ -10,7 +10,6 @@ import { connect } from '../../../base/redux';
10 10
 import { E2EESection } from '../../../e2ee/components';
11 11
 import { LobbySection } from '../../../lobby';
12 12
 
13
-import Header from './Header';
14 13
 import PasswordSection from './PasswordSection';
15 14
 
16 15
 type Props = {
@@ -82,7 +81,6 @@ function SecurityDialog({
82 81
 
83 82
     return (
84 83
         <Dialog
85
-            customHeader = { Header }
86 84
             hideCancelButton = { true }
87 85
             submitDisabled = { true }
88 86
             titleKey = 'security.securityOptions'

Loading…
取消
儲存