Browse Source

feat(close) Add promotional close page

master
Tudor-Ovidiu Avram 4 years ago
parent
commit
0289a93e5a
3 changed files with 14 additions and 5 deletions
  1. 1
    0
      interface_config.js
  2. 13
    5
      react/features/app/actions.js
  3. 0
    0
      static/close3.html

+ 1
- 0
interface_config.js View File

@@ -74,6 +74,7 @@ var interfaceConfig = {
74 74
 
75 75
     // A html text to be shown to guests on the close page, false disables it
76 76
     CLOSE_PAGE_GUEST_HINT: false,
77
+    SHOW_PROMOTIONAL_CLOSE_PAGE: false,
77 78
     RANDOM_AVATAR_URL_PREFIX: false,
78 79
     RANDOM_AVATAR_URL_SUFFIX: false,
79 80
     FILM_STRIP_MAX_HEIGHT: 120,

+ 13
- 5
react/features/app/actions.js View File

@@ -30,6 +30,8 @@ import {
30 30
 import logger from './logger';
31 31
 
32 32
 declare var APP: Object;
33
+declare var interfaceConfig: Object;
34
+
33 35
 
34 36
 /**
35 37
  * Triggers an in-app navigation to a specific route. Allows navigation to be
@@ -171,7 +173,7 @@ export function redirectToStaticPage(pathname: string) {
171 173
             // fine but pointless to include it because contextRoot is the current
172 174
             // directory.
173 175
             newPathname.startsWith('./')
174
-            && (newPathname = newPathname.substring(2));
176
+                && (newPathname = newPathname.substring(2));
175 177
             newPathname = getLocationContextRoot(windowLocation) + newPathname;
176 178
         }
177 179
 
@@ -215,7 +217,7 @@ export function reloadWithStoredParams() {
215 217
         windowLocation.replace(locationURL.toString());
216 218
 
217 219
         if (window.self !== window.top
218
-                && locationURL.search === oldSearchString) {
220
+            && locationURL.search === oldSearchString) {
219 221
             // NOTE: Assuming that only the hash or search part of the URL will
220 222
             // be changed!
221 223
             // location.reload will not trigger redirect/reload for iframe when
@@ -254,8 +256,15 @@ export function maybeRedirectToWelcomePage(options: Object = {}) {
254 256
             // to close page
255 257
             window.sessionStorage.setItem('guest', isGuest);
256 258
 
257
-            dispatch(redirectToStaticPage(`static/${
258
-                options.feedbackSubmitted ? 'close.html' : 'close2.html'}`));
259
+            let path = 'close.html';
260
+
261
+            if (interfaceConfig.SHOW_PROMOTIONAL_CLOSE_PAGE) {
262
+                path = 'close3.html';
263
+            } else if (!options.feedbackSubmitted) {
264
+                path = 'close2.html';
265
+            }
266
+
267
+            dispatch(redirectToStaticPage(`static/${path}`));
259 268
 
260 269
             return;
261 270
         }
@@ -279,4 +288,3 @@ export function maybeRedirectToWelcomePage(options: Object = {}) {
279 288
         }
280 289
     };
281 290
 }
282
-

+ 0
- 0
static/close3.html View File


Loading…
Cancel
Save