Explorar el Código

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

- small refactor
factor2
Horatiu Muresan hace 2 años
padre
commit
2a090d8034
No account linked to committer's email address

+ 17
- 14
css/_responsive.scss Ver fichero

@@ -3,30 +3,33 @@
3 3
         display: block;
4 4
 
5 5
         #enter_room {
6
-            position: relative;
7
-            height: 42px;
8
-
9 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 14
         .header {
20 15
             background-color: #002637;
21 16
 
17
+            .insecure-room-name-warning {
18
+                width: 100%;
19
+            }
20
+
22 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 Ver fichero

@@ -161,7 +161,7 @@ $welcomePageHeaderBackground: linear-gradient(0deg, rgba(0, 0, 0, 0.2), rgba(0,
161 161
 $welcomePageHeaderBackgroundPosition: center;
162 162
 $welcomePageHeaderBackgroundRepeat: none;
163 163
 $welcomePageHeaderBackgroundSize: cover;
164
-$welcomePageHeaderPaddingBottom: 0px;
164
+$welcomePageHeaderPaddingBottom: 15px;
165 165
 $welcomePageHeaderTitleMaxWidth: initial;
166 166
 $welcomePageHeaderTextAlign: center;
167 167
 

+ 41
- 41
css/_welcome_page.scss Ver fichero

@@ -20,7 +20,6 @@ body.welcome-page {
20 20
         background-size: $welcomePageHeaderBackgroundSize;
21 21
         padding-bottom: $welcomePageHeaderPaddingBottom;
22 22
         background-color: #131519;
23
-        height: 400px;
24 23
         overflow: hidden;
25 24
         position: relative;
26 25
 
@@ -62,26 +61,58 @@ body.welcome-page {
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 91
         #enter_room {
66 92
             display: $welcomePageEnterRoomDisplay;
67 93
             align-items: center;
68 94
             max-width: 480px;
69 95
             width: $welcomePageEnterRoomWidth;
70 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 106
                 text-align: left;
78 107
                 color: #253858;
108
+            }
109
+
110
+            .enter-room-input-container {
79 111
                 flex-grow: 1;
80
-                height: fit-content;
81 112
                 padding-right: 4px;
82
-                position: relative;
83 113
 
84 114
                 .enter-room-input {
115
+                    border-radius: 4px;
85 116
                     border: 0;
86 117
                     background: #fff;
87 118
                     display: inline-block;
@@ -94,44 +125,13 @@ body.welcome-page {
94 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 132
         #moderated-meetings {
133 133
             max-width: calc(100% - 40px);
134
-            padding: 16px 0 39px 0;
134
+            padding: 16px 0 0;
135 135
             width: $welcomePageEnterRoomWidth;
136 136
             text-align: center;
137 137
 

+ 29
- 32
react/features/welcome/components/WelcomePage.web.js Ver fichero

@@ -210,40 +210,37 @@ class WelcomePage extends AbstractWelcomePage {
210 210
                             { t('welcomepage.headerSubtitle')}
211 211
                         </span>
212 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 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 242
                         </div>
243
+                        { this._renderInsecureRoomNameWarning() }
247 244
 
248 245
                         { _moderatedRoomServiceUrl && (
249 246
                             <div id = 'moderated-meetings'>

Loading…
Cancelar
Guardar