浏览代码

fix(welcome-header) Fix and improve welcome page header (#13056)

- small refactor
factor2
Horatiu Muresan 2 年前
父节点
当前提交
2a090d8034
没有帐户链接到提交者的电子邮件
共有 4 个文件被更改,包括 88 次插入88 次删除
  1. 17
    14
      css/_responsive.scss
  2. 1
    1
      css/_variables.scss
  3. 41
    41
      css/_welcome_page.scss
  4. 29
    32
      react/features/welcome/components/WelcomePage.web.js

+ 17
- 14
css/_responsive.scss 查看文件

3
         display: block;
3
         display: block;
4
 
4
 
5
         #enter_room {
5
         #enter_room {
6
-            position: relative;
7
-            height: 42px;
8
-
9
             .welcome-page-button {
6
             .welcome-page-button {
10
-            font-size: 16px;
11
-            left: 0;
12
-            position: absolute;
13
-            top: 68px;
14
-            text-align: center;
15
-            width: 100%;
7
+                font-size: 16px;
8
+                left: 0;
9
+                text-align: center;
10
+                width: 100%;
16
             }
11
             }
17
         }
12
         }
18
 
13
 
19
         .header {
14
         .header {
20
             background-color: #002637;
15
             background-color: #002637;
21
 
16
 
17
+            .insecure-room-name-warning {
18
+                width: 100%;
19
+            }
20
+
22
             #enter_room {
21
             #enter_room {
23
-                .enter-room-input-container {
24
-                    padding-right: 0;
22
+                width: 100%;
23
+
24
+                .join-meeting-container {
25
+                    padding: 0;
26
+                    flex-direction: column;
27
+                    background: transparent;
25
                 }
28
                 }
26
 
29
 
27
-                .warning-without-link,
28
-                .warning-with-link {
29
-                    top: 120px;
30
+                .enter-room-input-container {
31
+                    padding-right: 0;
32
+                    margin-bottom: 10px;
30
                 }
33
                 }
31
             }
34
             }
32
         }
35
         }

+ 1
- 1
css/_variables.scss 查看文件

161
 $welcomePageHeaderBackgroundPosition: center;
161
 $welcomePageHeaderBackgroundPosition: center;
162
 $welcomePageHeaderBackgroundRepeat: none;
162
 $welcomePageHeaderBackgroundRepeat: none;
163
 $welcomePageHeaderBackgroundSize: cover;
163
 $welcomePageHeaderBackgroundSize: cover;
164
-$welcomePageHeaderPaddingBottom: 0px;
164
+$welcomePageHeaderPaddingBottom: 15px;
165
 $welcomePageHeaderTitleMaxWidth: initial;
165
 $welcomePageHeaderTitleMaxWidth: initial;
166
 $welcomePageHeaderTextAlign: center;
166
 $welcomePageHeaderTextAlign: center;
167
 
167
 

+ 41
- 41
css/_welcome_page.scss 查看文件

20
         background-size: $welcomePageHeaderBackgroundSize;
20
         background-size: $welcomePageHeaderBackgroundSize;
21
         padding-bottom: $welcomePageHeaderPaddingBottom;
21
         padding-bottom: $welcomePageHeaderPaddingBottom;
22
         background-color: #131519;
22
         background-color: #131519;
23
-        height: 400px;
24
         overflow: hidden;
23
         overflow: hidden;
25
         position: relative;
24
         position: relative;
26
 
25
 
62
 
61
 
63
         }
62
         }
64
 
63
 
64
+        .insecure-room-name-warning {
65
+            align-items: center;
66
+            color: $defaultWarningColor;
67
+            font-weight: 600;
68
+            display: flex;
69
+            flex-direction: row;
70
+            margin-top: 15px;
71
+            max-width: 480px;
72
+            width: $welcomePageEnterRoomWidth;
73
+
74
+            .jitsi-icon {
75
+                margin-right: 15px;
76
+
77
+                svg {
78
+                    fill: $defaultWarningColor;
79
+
80
+                    & > *:first-child {
81
+                        fill: none !important;
82
+                    }
83
+                }
84
+            }
85
+        }
86
+
87
+        ::placeholder {
88
+            color: #253858;
89
+        }
90
+
65
         #enter_room {
91
         #enter_room {
66
             display: $welcomePageEnterRoomDisplay;
92
             display: $welcomePageEnterRoomDisplay;
67
             align-items: center;
93
             align-items: center;
68
             max-width: 480px;
94
             max-width: 480px;
69
             width: $welcomePageEnterRoomWidth;
95
             width: $welcomePageEnterRoomWidth;
70
             z-index: $zindex2;
96
             z-index: $zindex2;
71
-            background-color: #fff;
72
-            padding: $welcomePageEnterRoomPadding;
73
-            border-radius: 4px;
74
-            margin: $welcomePageEnterRoomMargin;
75
-
76
-            .enter-room-input-container {
97
+            height: fit-content;
98
+
99
+            .join-meeting-container {
100
+                margin: $welcomePageEnterRoomMargin;
101
+                padding: $welcomePageEnterRoomPadding;
102
+                border-radius: 4px;
103
+                background-color: #fff;
104
+                display: flex;
105
+                width: 100%;
77
                 text-align: left;
106
                 text-align: left;
78
                 color: #253858;
107
                 color: #253858;
108
+            }
109
+
110
+            .enter-room-input-container {
79
                 flex-grow: 1;
111
                 flex-grow: 1;
80
-                height: fit-content;
81
                 padding-right: 4px;
112
                 padding-right: 4px;
82
-                position: relative;
83
 
113
 
84
                 .enter-room-input {
114
                 .enter-room-input {
115
+                    border-radius: 4px;
85
                     border: 0;
116
                     border: 0;
86
                     background: #fff;
117
                     background: #fff;
87
                     display: inline-block;
118
                     display: inline-block;
94
                         outline: auto 2px #005fcc;
125
                         outline: auto 2px #005fcc;
95
                     }
126
                     }
96
                 }
127
                 }
97
-
98
-                .insecure-room-name-warning {
99
-                    align-items: center;
100
-                    color: $defaultWarningColor;
101
-                    display: flex;
102
-                    flex-direction: row;
103
-                    margin-top: 15px;
104
-
105
-                    .jitsi-icon {
106
-                        margin-right: 15px;
107
-
108
-                        svg {
109
-                            fill: $defaultWarningColor
110
-                        }
111
-                    }
112
-                }
113
-
114
-                ::placeholder {
115
-                    color: #253858;
116
-                }
117
-            }
118
-
119
-            .warning-without-link {
120
-                position: absolute;
121
-                top: 44px;
122
-                left: -10px;
123
-            }
124
-
125
-            .warning-with-link {
126
-                position: absolute;
127
-                top: 84px;
128
             }
128
             }
129
 
129
 
130
         }
130
         }
131
 
131
 
132
         #moderated-meetings {
132
         #moderated-meetings {
133
             max-width: calc(100% - 40px);
133
             max-width: calc(100% - 40px);
134
-            padding: 16px 0 39px 0;
134
+            padding: 16px 0 0;
135
             width: $welcomePageEnterRoomWidth;
135
             width: $welcomePageEnterRoomWidth;
136
             text-align: center;
136
             text-align: center;
137
 
137
 

+ 29
- 32
react/features/welcome/components/WelcomePage.web.js 查看文件

210
                             { t('welcomepage.headerSubtitle')}
210
                             { t('welcomepage.headerSubtitle')}
211
                         </span>
211
                         </span>
212
                         <div id = 'enter_room'>
212
                         <div id = 'enter_room'>
213
-                            <div className = 'enter-room-input-container'>
214
-                                <form onSubmit = { this._onFormSubmit }>
215
-                                    <input
216
-                                        aria-disabled = 'false'
217
-                                        aria-label = 'Meeting name input'
218
-                                        autoFocus = { true }
219
-                                        className = 'enter-room-input'
220
-                                        id = 'enter_room_field'
221
-                                        onChange = { this._onRoomChange }
222
-                                        pattern = { ROOM_NAME_VALIDATE_PATTERN_STR }
223
-                                        placeholder = { this.state.roomPlaceholder }
224
-                                        ref = { this._setRoomInputRef }
225
-                                        title = { t('welcomepage.roomNameAllowedChars') }
226
-                                        type = 'text'
227
-                                        value = { this.state.room } />
228
-                                    <div
229
-                                        className = { _moderatedRoomServiceUrl
230
-                                            ? 'warning-with-link'
231
-                                            : 'warning-without-link' }>
232
-                                        { this._renderInsecureRoomNameWarning() }
233
-                                    </div>
234
-                                </form>
213
+                            <div className = 'join-meeting-container'>
214
+                                <div className = 'enter-room-input-container'>
215
+                                    <form onSubmit = { this._onFormSubmit }>
216
+                                        <input
217
+                                            aria-disabled = 'false'
218
+                                            aria-label = 'Meeting name input'
219
+                                            autoFocus = { true }
220
+                                            className = 'enter-room-input'
221
+                                            id = 'enter_room_field'
222
+                                            onChange = { this._onRoomChange }
223
+                                            pattern = { ROOM_NAME_VALIDATE_PATTERN_STR }
224
+                                            placeholder = { this.state.roomPlaceholder }
225
+                                            ref = { this._setRoomInputRef }
226
+                                            title = { t('welcomepage.roomNameAllowedChars') }
227
+                                            type = 'text'
228
+                                            value = { this.state.room } />
229
+                                    </form>
230
+                                </div>
231
+                                <button
232
+                                    aria-disabled = 'false'
233
+                                    aria-label = 'Start meeting'
234
+                                    className = 'welcome-page-button'
235
+                                    id = 'enter_room_button'
236
+                                    onClick = { this._onFormSubmit }
237
+                                    tabIndex = '0'
238
+                                    type = 'button'>
239
+                                    { t('welcomepage.startMeeting') }
240
+                                </button>
235
                             </div>
241
                             </div>
236
-                            <button
237
-                                aria-disabled = 'false'
238
-                                aria-label = 'Start meeting'
239
-                                className = 'welcome-page-button'
240
-                                id = 'enter_room_button'
241
-                                onClick = { this._onFormSubmit }
242
-                                tabIndex = '0'
243
-                                type = 'button'>
244
-                                { t('welcomepage.startMeeting') }
245
-                            </button>
246
                         </div>
242
                         </div>
243
+                        { this._renderInsecureRoomNameWarning() }
247
 
244
 
248
                         { _moderatedRoomServiceUrl && (
245
                         { _moderatedRoomServiceUrl && (
249
                             <div id = 'moderated-meetings'>
246
                             <div id = 'moderated-meetings'>

正在加载...
取消
保存