|
@@ -18,6 +18,12 @@ import Tabs from './Tabs';
|
18
|
18
|
*/
|
19
|
19
|
export const ROOM_NAME_VALIDATE_PATTERN_STR = '^[^?&:\u0022\u0027%#]+$';
|
20
|
20
|
|
|
21
|
+/**
|
|
22
|
+ * Maximum number of pixels corresponding to a mobile layout.
|
|
23
|
+ * @type {number}
|
|
24
|
+ */
|
|
25
|
+const WINDOW_WIDTH_THRESHOLD = 425;
|
|
26
|
+
|
21
|
27
|
/**
|
22
|
28
|
* The Web container rendering the welcome page.
|
23
|
29
|
*
|
|
@@ -152,6 +158,7 @@ class WelcomePage extends AbstractWelcomePage {
|
152
|
158
|
const { APP_NAME } = interfaceConfig;
|
153
|
159
|
const showAdditionalContent = this._shouldShowAdditionalContent();
|
154
|
160
|
const showAdditionalToolbarContent = this._shouldShowAdditionalToolbarContent();
|
|
161
|
+ const showResponsiveText = this._shouldShowResponsiveText();
|
155
|
162
|
|
156
|
163
|
return (
|
157
|
164
|
<div
|
|
@@ -205,7 +212,11 @@ class WelcomePage extends AbstractWelcomePage {
|
205
|
212
|
className = 'welcome-page-button'
|
206
|
213
|
id = 'enter_room_button'
|
207
|
214
|
onClick = { this._onFormSubmit }>
|
208
|
|
- { t('welcomepage.go') }
|
|
215
|
+ {
|
|
216
|
+ showResponsiveText
|
|
217
|
+ ? t('welcomepage.goSmall')
|
|
218
|
+ : t('welcomepage.go')
|
|
219
|
+ }
|
209
|
220
|
</div>
|
210
|
221
|
</div>
|
211
|
222
|
{ this._renderTabs() }
|
|
@@ -362,6 +373,20 @@ class WelcomePage extends AbstractWelcomePage {
|
362
|
373
|
&& this._additionalToolbarContentTemplate.content
|
363
|
374
|
&& this._additionalToolbarContentTemplate.innerHTML.trim();
|
364
|
375
|
}
|
|
376
|
+
|
|
377
|
+ /**
|
|
378
|
+ * Returns whether or not the screen has a size smaller than a custom margin
|
|
379
|
+ * and therefore display different text in the go button.
|
|
380
|
+ *
|
|
381
|
+ * @private
|
|
382
|
+ * @returns {boolean}
|
|
383
|
+ */
|
|
384
|
+ _shouldShowResponsiveText() {
|
|
385
|
+ const { innerWidth } = window;
|
|
386
|
+
|
|
387
|
+ return innerWidth <= WINDOW_WIDTH_THRESHOLD;
|
|
388
|
+ }
|
|
389
|
+
|
365
|
390
|
}
|
366
|
391
|
|
367
|
392
|
export default translate(connect(_mapStateToProps)(WelcomePage));
|