Browse Source

feat(welcome): new design (#2492)

* feat(welcome): new design

* squash: update strings

* squash: copy/paste error?

* squash: remove welcome page disabling checks

* squash: change strings again

* squash: background var

* squash: title and desc css as variables
master
virtuacoplenny 6 years ago
parent
commit
74a92f83c7

+ 0
- 1
conference.js View File

@@ -234,7 +234,6 @@ function maybeRedirectToWelcomePage(options) {
234 234
     if (config.enableWelcomePage) {
235 235
         setTimeout(
236 236
             () => {
237
-                APP.settings.setWelcomePageEnabled(true);
238 237
                 assignWindowLocationPathname('./');
239 238
             },
240 239
             3000);

+ 8
- 1
css/_variables.scss View File

@@ -151,4 +151,11 @@ $unsupportedDesktopBrowserTextFontSize: 21px;
151 151
  * The size of the default watermark.
152 152
  */
153 153
 $watermarkWidth: 186px;
154
-$watermarkHeight: 74px;
154
+$watermarkHeight: 74px;
155
+
156
+/**
157
+ * Welcome page variables.
158
+ */
159
+$welcomePageDescriptionColor: #fff;
160
+$welcomePageHeaderBackground: linear-gradient(#165ecc, #44A5FF);
161
+$welcomePageTitleColor: #fff;

+ 71
- 194
css/_welcome_page.scss View File

@@ -1,208 +1,85 @@
1
-#welcome_page {
1
+.welcome {
2
+    font-family: Helvetica;
2 3
     height: 100%;
3 4
     overflow: auto;
4 5
     position: relative;
5
-}
6
-
7
-#disable_welcome {
8
-    display:none;
9
-}
10
-
11
-.disable_welcome_position
12
-{
13
-    margin: -139px auto 0px auto;
14
-    padding-left: 39px;
15
-    padding-top: 7px;
16
-    width: 269px;
17
-    height: 31px;
18
-    display:block;
19
-}
20
-
21
-#disable_welcome + label
22
-{
23
-    background-image: url(../images/welcome_page/disable-welcome.png);
24
-    cursor: pointer;
25
-    -webkit-user-select: none;
26
-    -moz-user-select: none;
27
-    background-repeat: no-repeat;
28
-    font-weight: 500;
29
-    font-size: 16px;
30
-    color: #acacac;
31
-    z-index: $zindex2;
32
-}
33
-
34
-#disable_welcome:checked + label
35
-{
36
-    background-image: url(../images/welcome_page/disable-welcome-selected.png);
37
-    cursor: pointer;
38
-    -webkit-user-select: none;
39
-    -moz-user-select: none;
40
-    background-repeat: no-repeat;
41
-    font-weight: 500;
42
-    font-size: 16px;
43
-    color: #acacac;
44
-    z-index: $zindex2;
45
-}
46
-
47
-#enter_room_form {
48
-    border-radius: 1px;
49
-    background-color: #FFFFFF;
50
-    border: none;
51
-    -moz-border-radius: 1px;
52
-    -webkit-border-radius: 1px;
53
-    -webkit-appearance: none;
54
-    height: 55px;
55
-    box-shadow: none;
56
-    float: left;
57
-}
58 6
 
59
-.domain-name
60
-{
61
-    float: left;
62
-    height: 55px;
63
-    line-height: 55px;
64
-    font-size: 18px;
65
-    font-weight: 500;
66
-    padding-left: 20px;
67
-    color: $defaultDarkColor;
68
-}
69
-
70
-.enter-room {
71
-    &__field {
72
-        font-size: 15px;
73
-        border: none;
74
-        -webkit-appearance: none;
75
-        width: 228px;
76
-        height: 55px;
77
-        line-height: 55px;
78
-        font-weight: 500;
79
-        box-shadow: none;
80
-        float: left;
81
-        background-color: #FFFFFF;
7
+    .header {
8
+        align-items: center;
9
+        background: $welcomePageHeaderBackground;
10
+        display: flex;
11
+        flex-direction: column;
12
+        overflow: hidden;
82 13
         position: relative;
83
-        z-index: $zindex2;
84
-    }
85
-
86
-    &__reload {
87
-        display: block;
88
-        width: 30px;
89
-        color: #acacac;
90
-        font-size: 1.9em;
91
-        line-height: 55px;
92
-        z-index: $zindex3;
93
-        float:  left;
94
-        cursor: pointer;
95 14
         text-align: center;
96
-    }
97 15
 
98
-    &__button {
99
-        width: 73px;
100
-        height: 45px;
101
-        background-color: #21B9FC;
102
-        moz-border-radius: 1px;
103
-        -webkit-border-radius: 1px;
104
-        color: #ffffff;
105
-        font-weight: 600;
106
-        border: none;
107
-        margin-top: 5px;
108
-        font-size: 19px;
109
-        padding-top: 6px;
110
-        outline: none;
111
-        float:left;
112
-        position: relative;
113
-        z-index: $zindex2;
16
+        .header-text {
17
+            display: flex;
18
+            flex-direction: column;
19
+            height: 286px;
20
+            justify-content: space-around;
21
+            margin-top: 120px;
22
+            width: 645px;
23
+        }
24
+
25
+        .header-text-title {
26
+            color: $welcomePageTitleColor;
27
+            font-size: 48px;
28
+            letter-spacing: -1px;
29
+            line-height: 58px;
30
+        }
31
+
32
+        .header-text-description {
33
+            color: $welcomePageDescriptionColor;
34
+            font-size: 20px;
35
+            line-height: 28px;
36
+            opacity: 0.8;
37
+        }
38
+
39
+        .header-image {
40
+            background-image: url(../images/welcome_page/curves.png);
41
+            background-size: contain;
42
+            height: 209px;
43
+            position: absolute;
44
+            width: 1070px;
45
+        }
46
+
47
+        #new_enter_room {
48
+            align-items: center;
49
+            display: flex;
50
+            margin-top: 25px;
51
+            position: relative;
52
+            z-index: 2;
53
+
54
+            .enter-room-input {
55
+                display: inline-block;
56
+                margin-right: 15px;
57
+                width: 350px;
58
+            }
59
+        }
114 60
     }
115
-}
116
-
117
-#enter_room_container {
118
-    margin: 70px auto 0px auto;
119
-    display: table;
120
-}
121
-
122
-#enter_room{
123
-    float:left;
124
-    padding-right: 5px;
125
-}
126
-
127
-#welcome_page_header
128
-{
129
-    background-image: url(../images/welcome_page/pattern-header.png);
130
-    height: 290px;
131
-    width: 100%;
132
-    position: absolute;
133
-}
134 61
 
135
-#welcome_page_main
136
-{
137
-    background-image:url(../images/welcome_page/pattern-body.png);
138
-    width: 100%;
139
-    position: absolute;
140
-    margin-top: 290px;
141
-}
142
-
143
-#brand_header
144
-{
145
-    background-image:url(../images/welcome_page/header-big.png);
146
-    width: 583px;
147
-    height: 274px;
148
-    margin: -110px auto 0px auto;
149
-}
150
-
151
-#header_text
152
-{
153
-    width: 885px;
154
-    height: 100px;
155
-    color: #ffffff;
156
-    font-size: 24px;
157
-    text-align: center;
158
-    margin: 0px auto 0px auto;
159
-}
160
-
161
-#features
162
-{
163
-    margin-top: 30px;
164
-    position: relative;
165
-}
166
-
167
-.feature_row
168
-{
169
-    position: relative;
170
-    width: 976px;
171
-    margin: 0px auto 30px auto;
172
-    padding-right: 75px;
173
-
174
-}
175
-
176
-.feature_holder
177
-{
178
-    display: inline-block;
179
-    width: 169px;
180
-    padding-left: 75px;
181
-    padding-bottom: 30px;
182
-    vertical-align: top;
62
+    .welcome-page-button {
63
+        font-size: 16px;
64
+    }
183 65
 }
184 66
 
185
-.feature_icon
186
-{
187
-    background-image:url(../images/welcome_page/bubble.png);
188
-    background-repeat: no-repeat;
189
-    width: 169px;
190
-    height: 169px;
191
-    color: #ffffff;
192
-    font-size: 22px;
193
-    /*font-weight: bold;*/
194
-    text-align: center;
195
-    display: table-cell;
196
-    padding: 0px 26px 0px 20px;
197
-    vertical-align: middle;
67
+.welcome.with-content {
68
+    .header {
69
+        height: 552px;
70
+    }
71
+    .header-image {
72
+        left: -61px;
73
+        top: 401px;
74
+    }
198 75
 }
199 76
 
200
-.feature_description
201
-{
202
-    width: 190px;
203
-    color: #ffffff;
204
-    font-size: 16px;
205
-    padding-top: 30px;
206
-    line-height: 22px;
207
-    font-weight: 200;
77
+.welcome.without-content {
78
+    .header {
79
+        height: 100%;
80
+    }
81
+    .header-image {
82
+        bottom: -20px;
83
+        left: 0;
84
+    }
208 85
 }

+ 1
- 0
css/_welcome_page_content.scss View File

@@ -0,0 +1 @@
1
+/** Insert custom CSS for any additional content in the welcome page **/

+ 1
- 0
css/main.scss View File

@@ -55,6 +55,7 @@
55 55
 @import 'chat';
56 56
 @import 'ringing/ringing';
57 57
 @import 'welcome_page';
58
+@import 'welcome_page_content';
58 59
 @import 'toolbars';
59 60
 @import 'side_toolbar_container';
60 61
 @import 'jquery.contextMenu';

BIN
images/welcome_page/bubble.png View File


BIN
images/welcome_page/curves.png View File


BIN
images/welcome_page/disable-welcome-selected.png View File


BIN
images/welcome_page/disable-welcome.png View File


BIN
images/welcome_page/header-big.png View File


BIN
images/welcome_page/pattern-body.png View File


BIN
images/welcome_page/pattern-header.png View File


+ 1
- 0
index.html View File

@@ -138,6 +138,7 @@
138 138
     <script src="libs/app.bundle.min.js?v=139"></script>
139 139
     <!--#include virtual="title.html" -->
140 140
     <!--#include virtual="plugin.head.html" -->
141
+    <!--#include virtual="static/welcomePageAdditionalContent.html" -->
141 142
   </head>
142 143
   <body>
143 144
     <div id="react"></div>

+ 1
- 0
interface_config.js View File

@@ -24,6 +24,7 @@ var interfaceConfig = {
24 24
     BRAND_WATERMARK_LINK: '',
25 25
     SHOW_POWERED_BY: false,
26 26
     GENERATE_ROOMNAMES_ON_WELCOME_PAGE: true,
27
+    DISPLAY_WELCOME_PAGE_CONTENT: true,
27 28
     APP_NAME: 'Jitsi Meet',
28 29
     LANG_DETECTION: false, // Allow i18n to detect the system language
29 30
     INVITATION_POWERED_BY: true,

+ 3
- 35
lang/main.json View File

@@ -46,46 +46,14 @@
46 46
         "showSpeakerStats": "Show speaker stats"
47 47
     },
48 48
     "welcomepage":{
49
-        "disable": "Don't show this page again",
50
-        "feature1": {
51
-            "content": "No downloads required. __app__ works directly within your browser. Simply share your conference URL with others to get started.",
52
-            "title": "Simple to use"
53
-        },
54
-        "feature2": {
55
-            "content": "Multi-party video conferences work with as little as 128Kbps. Screen-sharing and audio-only conferences are possible with far less.",
56
-            "title": "Low bandwidth"
57
-        },
58
-        "feature3": {
59
-            "content": "__app__ is licensed under the Apache License. You are free to download, use, modify, and share it as per this license.",
60
-            "title": "Open source"
61
-        },
62
-        "feature4": {
63
-            "content": "There are no artificial restrictions on the number of users or conference members. Server power and bandwidth are the only limiting factors.",
64
-            "title": "Unlimited users"
65
-        },
66
-        "feature5": {
67
-            "content": "It's easy to share your screen with others. __app__ is ideal for on-line presentations, lectures, and tech support sessions.",
68
-            "title": "Screen sharing"
69
-        },
70
-        "feature6": {
71
-            "content": "Need some privacy? __app__ conference rooms can be secured with a password in order to exclude unwanted guests and prevent interruptions.",
72
-            "title": "Secure rooms"
73
-        },
74
-        "feature7": {
75
-            "content": "__app__ features Etherpad, a real-time collaborative text editor that's great for meeting minutes, writing articles, and more.",
76
-            "title": "Shared notes"
77
-        },
78
-        "feature8": {
79
-            "content": "Learn about your users through easy integration with Piwik, Google Analytics, and other usage monitoring and statistics systems.",
80
-            "title": "Usage statistics"
81
-        },
49
+        "appDescription": "Go ahead, video chat with the whole team. In fact, invite everyone you know. __app__ is a fully encrypted, 100% open source video conferencing solution that you can use all day, every day, for free — with no account needed.",
82 50
         "go": "GO",
83 51
         "join": "JOIN",
84 52
         "privacy": "Privacy",
85 53
         "roomname": "Enter room name",
86
-        "roomnamePlaceHolder": "room name",
87 54
         "sendFeedback": "Send feedback",
88
-        "terms": "Terms"
55
+        "terms": "Terms",
56
+        "title": "More secure, more flexible, and completely free video conferencing"
89 57
     },
90 58
     "startupoverlay": {
91 59
         "policyText": " ",

+ 0
- 19
modules/settings/Settings.js View File

@@ -21,8 +21,6 @@ let displayName = UIUtil.unescapeHtml(
21 21
     jitsiLocalStorage.getItem('displayname') || '');
22 22
 let cameraDeviceId = jitsiLocalStorage.getItem('cameraDeviceId') || '';
23 23
 let micDeviceId = jitsiLocalStorage.getItem('micDeviceId') || '';
24
-let welcomePageDisabled = JSON.parse(
25
-    jitsiLocalStorage.getItem('welcomePageDisabled') || false);
26 24
 
27 25
 // Currently audio output device change is supported only in Chrome and
28 26
 // default output always has 'default' device ID
@@ -189,22 +187,5 @@ export default {
189 187
         return JitsiMeetJS.mediaDevices.setAudioOutputDevice(newId)
190 188
             .then(() =>
191 189
                 jitsiLocalStorage.setItem('audioOutputDeviceId', newId));
192
-    },
193
-
194
-    /**
195
-     * Check if welcome page is enabled or not.
196
-     * @returns {boolean}
197
-     */
198
-    isWelcomePageEnabled() {
199
-        return !welcomePageDisabled;
200
-    },
201
-
202
-    /**
203
-     * Enable or disable welcome page.
204
-     * @param {boolean} enabled if welcome page should be enabled or not
205
-     */
206
-    setWelcomePageEnabled(enabled) {
207
-        welcomePageDisabled = !enabled;
208
-        jitsiLocalStorage.setItem('welcomePageDisabled', welcomePageDisabled);
209 190
     }
210 191
 };

+ 98
- 183
react/features/welcome/components/WelcomePage.web.js View File

@@ -1,5 +1,8 @@
1
-/* global APP, interfaceConfig */
1
+/* global interfaceConfig */
2 2
 
3
+import Button from '@atlaskit/button';
4
+import { FieldTextStateless } from '@atlaskit/field-text';
5
+import { AtlasKitThemeProvider } from '@atlaskit/theme';
3 6
 import React from 'react';
4 7
 import { connect } from 'react-redux';
5 8
 
@@ -26,15 +29,33 @@ class WelcomePage extends AbstractWelcomePage {
26 29
         this.state = {
27 30
             ...this.state,
28 31
 
29
-            enableWelcomePage: true,
30 32
             generateRoomnames:
31 33
                 interfaceConfig.GENERATE_ROOMNAMES_ON_WELCOME_PAGE
32 34
         };
33 35
 
36
+        /**
37
+         * The HTML Element used as the container for additional content. Used
38
+         * for directly appending the additional content template to the dom
39
+         *
40
+         * @private
41
+         * @type {HTMLTemplateElement|null}
42
+         */
43
+        this._additionalContentRef = null;
44
+
45
+        /**
46
+         * The template to use as the main content for the welcome page. If
47
+         * not found then only the welcome page head will display.
48
+         *
49
+         * @private
50
+         * @type {HTMLTemplateElement|null}
51
+         */
52
+        this._additionalContentTemplate = document.getElementById(
53
+            'welcome-page-additional-content-template');
54
+
34 55
         // Bind event handlers so they are only bound once per instance.
35
-        this._onDisableWelcomeChange = this._onDisableWelcomeChange.bind(this);
36
-        this._onKeyDown = this._onKeyDown.bind(this);
37 56
         this._onRoomChange = this._onRoomChange.bind(this);
57
+        this._setAdditionalContentRef
58
+            = this._setAdditionalContentRef.bind(this);
38 59
     }
39 60
 
40 61
     /**
@@ -48,6 +69,11 @@ class WelcomePage extends AbstractWelcomePage {
48 69
         if (this.state.generateRoomnames) {
49 70
             this._updateRoomname();
50 71
         }
72
+
73
+        if (this._shouldShowAdditionalContent()) {
74
+            this._additionalContentRef.appendChild(
75
+                this._additionalContentTemplate.content.cloneNode(true));
76
+        }
51 77
     }
52 78
 
53 79
     /**
@@ -57,63 +83,63 @@ class WelcomePage extends AbstractWelcomePage {
57 83
      * @returns {ReactElement|null}
58 84
      */
59 85
     render() {
86
+        const { t } = this.props;
87
+        const { APP_NAME } = interfaceConfig;
88
+        const showAdditionalContent = this._shouldShowAdditionalContent();
89
+
60 90
         return (
61
-            <div id = 'welcome_page'>
62
-                {
63
-                    this._renderHeader()
64
-                }
65
-                {
66
-                    this._renderMain()
67
-                }
68
-            </div>
91
+            <AtlasKitThemeProvider mode = 'light'>
92
+                <div
93
+                    className = { `welcome ${showAdditionalContent
94
+                        ? 'with-content' : 'without-content'}` }
95
+                    id = 'new_welcome_page'>
96
+                    <div className = 'header'>
97
+                        <div className = 'header-image' />
98
+                        <Watermarks />
99
+                        <div className = 'header-text'>
100
+                            <h1 className = 'header-text-title'>
101
+                                { t('welcomepage.title') }
102
+                            </h1>
103
+                            <p className = 'header-text-description'>
104
+                                { t('welcomepage.appDescription',
105
+                                    { app: APP_NAME }) }
106
+                            </p>
107
+                        </div>
108
+                        <div id = 'new_enter_room'>
109
+                            <form
110
+                                className = 'enter-room-input'
111
+                                onSubmit = { this._onJoin }>
112
+                                <FieldTextStateless
113
+                                    autoFocus = { true }
114
+                                    id = 'enter_room_field'
115
+                                    isLabelHidden = { true }
116
+                                    label = 'enter_room_field'
117
+                                    onChange = { this._onRoomChange }
118
+                                    placeholder = { this.state.roomPlaceholder }
119
+                                    shouldFitContainer = { true }
120
+                                    type = 'text'
121
+                                    value = { this.state.room } />
122
+                            </form>
123
+                            <Button
124
+                                appearance = 'primary'
125
+                                className = 'welcome-page-button'
126
+                                id = 'enter_room_button'
127
+                                onClick = { this._onJoin }
128
+                                type = 'button'>
129
+                                { t('welcomepage.go') }
130
+                            </Button>
131
+                        </div>
132
+                    </div>
133
+                    { showAdditionalContent
134
+                        ? <div
135
+                            className = 'welcome-page-content'
136
+                            ref = { this._setAdditionalContentRef } />
137
+                        : null }
138
+                </div>
139
+            </AtlasKitThemeProvider>
69 140
         );
70 141
     }
71 142
 
72
-    /**
73
-     * Returns the URL of this WelcomePage for display purposes. For
74
-     * historic/legacy reasons, the return value is referred to as domain.
75
-     *
76
-     * @private
77
-     * @returns {string} The URL of this WelcomePage for display purposes.
78
-     */
79
-    _getDomain() {
80
-        // As the returned URL is for display purposes, do not return the
81
-        // userinfo, query and fragment URI parts.
82
-        const wl = window.location;
83
-
84
-        return `${wl.protocol}//${wl.host}${wl.pathname}`;
85
-    }
86
-
87
-    /**
88
-     * Handles {@code change} event of the checkbox which allows specifying
89
-     * whether the WelcomePage is disabled.
90
-     *
91
-     * @param {Event} event - The (HTML) Event which details the change such as
92
-     * the EventTarget.
93
-     * @returns {void}
94
-     */
95
-    _onDisableWelcomeChange(event) {
96
-        this.setState({
97
-            enableWelcomePage: !event.target.checked
98
-        }, () => {
99
-            APP.settings.setWelcomePageEnabled(this.state.enableWelcomePage);
100
-        });
101
-    }
102
-
103
-    /**
104
-     * Handles 'keydown' event to initiate joining the room when the
105
-     * 'Enter/Return' button is pressed.
106
-     *
107
-     * @param {Event} event - Key down event object.
108
-     * @private
109
-     * @returns {void}
110
-     */
111
-    _onKeyDown(event) {
112
-        if (event.keyCode === /* Enter */ 13) {
113
-            this._onJoin();
114
-        }
115
-    }
116
-
117 143
     /**
118 144
      * Overrides the super to account for the differences in the argument types
119 145
      * provided by HTML and React Native text inputs.
@@ -129,141 +155,30 @@ class WelcomePage extends AbstractWelcomePage {
129 155
     }
130 156
 
131 157
     /**
132
-     * Renders a feature with a specific index.
133
-     *
134
-     * @param {number} index - The index of the feature to render.
135
-     * @private
136
-     * @returns {ReactElement}
137
-     */
138
-    _renderFeature(index) {
139
-        const { t } = this.props;
140
-        const tns = `welcomepage.feature${index}`;
141
-
142
-        return (
143
-            <div
144
-                className = 'feature_holder'
145
-                key = { index } >
146
-                <div className = 'feature_icon'>
147
-                    { t(`${tns}.title`) }
148
-                </div>
149
-                <div className = 'feature_description'>
150
-                    { t(`${tns}.content`, { postProcess: 'resolveAppName' }) }
151
-                </div>
152
-            </div>
153
-        );
154
-    }
155
-
156
-    /**
157
-     * Renders a row of features.
158
-     *
159
-     * @param {number} beginIndex - The inclusive feature index to begin the row
160
-     * with.
161
-     * @param {number} endIndex - The exclusive feature index to end the row
162
-     * with.
163
-     * @private
164
-     * @returns {ReactElement}
165
-     */
166
-    _renderFeatureRow(beginIndex, endIndex) {
167
-        const features = [];
168
-
169
-        for (let index = beginIndex; index < endIndex; ++index) {
170
-            features.push(this._renderFeature(index));
171
-        }
172
-
173
-        return (
174
-            <div className = 'feature_row'>
175
-                {
176
-                    features
177
-                }
178
-            </div>
179
-        );
180
-    }
181
-
182
-    /**
183
-     * Renders the header part of this WelcomePage.
158
+     * Sets the internal reference to the HTMLDivElement used to hold the
159
+     * welcome page content.
184 160
      *
161
+     * @param {HTMLDivElement} el - The HTMLElement for the div that is the root
162
+     * of the welcome page content.
185 163
      * @private
186
-     * @returns {ReactElement|null}
164
+     * @returns {void}
187 165
      */
188
-    _renderHeader() {
189
-        const { t } = this.props;
190
-
191
-        return (
192
-            <div id = 'welcome_page_header'>
193
-                <Watermarks />
194
-
195
-                <div id = 'enter_room_container'>
196
-                    <div id = 'enter_room_form'>
197
-                        <div className = 'domain-name'>
198
-                            {
199
-                                this._getDomain()
200
-                            }
201
-                        </div>
202
-                        <div id = 'enter_room'>
203
-                            <input
204
-                                autoFocus = { true }
205
-                                className = 'enter-room__field'
206
-                                data-room-name
207
-                                    = { this.state.generatedRoomname }
208
-                                id = 'enter_room_field'
209
-                                onChange = { this._onRoomChange }
210
-                                onKeyDown = { this._onKeyDown }
211
-                                placeholder = { this.state.roomPlaceholder }
212
-                                type = 'text'
213
-                                value = { this.state.room } />
214
-
215
-                            { /* eslint-disable react/jsx-handler-names */ }
216
-                            <div
217
-                                className = 'icon-reload enter-room__reload'
218
-                                onClick = { this._updateRoomname } />
219
-                            { /* eslint-enable react/jsx-handler-names */ }
220
-
221
-                            <button
222
-                                className = 'enter-room__button'
223
-                                id = 'enter_room_button'
224
-                                onClick = { this._onJoin }
225
-                                type = 'button'>
226
-                                { t('welcomepage.go') }
227
-                            </button>
228
-                        </div>
229
-                    </div>
230
-                </div>
231
-                <div id = 'brand_header' />
232
-                <input
233
-                    checked = { !this.state.enableWelcomePage }
234
-                    id = 'disable_welcome'
235
-                    name = 'checkbox'
236
-                    onChange = { this._onDisableWelcomeChange }
237
-                    type = 'checkbox' />
238
-                <label
239
-                    className = 'disable_welcome_position'
240
-                    htmlFor = 'disable_welcome'>
241
-                    { t('welcomepage.disable') }
242
-                </label>
243
-                <div id = 'header_text' />
244
-            </div>
245
-        );
166
+    _setAdditionalContentRef(el) {
167
+        this._additionalContentRef = el;
246 168
     }
247 169
 
248 170
     /**
249
-     * Renders the main part of this WelcomePage.
171
+     * Returns whether or not additional content should be displayed belowed
172
+     * the welcome page's header for entering a room name.
250 173
      *
251 174
      * @private
252
-     * @returns {ReactElement|null}
175
+     * @returns {boolean}
253 176
      */
254
-    _renderMain() {
255
-        return (
256
-            <div id = 'welcome_page_main'>
257
-                <div id = 'features'>
258
-                    {
259
-                        this._renderFeatureRow(1, 5)
260
-                    }
261
-                    {
262
-                        this._renderFeatureRow(5, 9)
263
-                    }
264
-                </div>
265
-            </div>
266
-        );
177
+    _shouldShowAdditionalContent() {
178
+        return interfaceConfig.DISPLAY_WELCOME_PAGE_CONTENT
179
+            && this._additionalContentTemplate
180
+            && this._additionalContentTemplate.content
181
+            && this._additionalContentTemplate.innerHTML.trim();
267 182
     }
268 183
 }
269 184
 

+ 2
- 2
react/features/welcome/functions.js View File

@@ -52,6 +52,6 @@ export function isWelcomePageUserEnabled(stateOrGetState: Object | Function) {
52 52
     return (
53 53
         typeof APP === 'undefined'
54 54
             ? true
55
-            : toState(stateOrGetState)['features/base/config'].enableWelcomePage
56
-                && APP.settings.isWelcomePageEnabled());
55
+            : toState(stateOrGetState)['features/base/config']
56
+                .enableWelcomePage);
57 57
 }

+ 1
- 0
static/welcomePageAdditionalContent.html View File

@@ -0,0 +1 @@
1
+<template id = "welcome-page-additional-content-template"></template>

Loading…
Cancel
Save