Browse Source

feat(close) Add promotional close page

master
Tudor-Ovidiu Avram 5 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
 
74
 
75
     // A html text to be shown to guests on the close page, false disables it
75
     // A html text to be shown to guests on the close page, false disables it
76
     CLOSE_PAGE_GUEST_HINT: false,
76
     CLOSE_PAGE_GUEST_HINT: false,
77
+    SHOW_PROMOTIONAL_CLOSE_PAGE: false,
77
     RANDOM_AVATAR_URL_PREFIX: false,
78
     RANDOM_AVATAR_URL_PREFIX: false,
78
     RANDOM_AVATAR_URL_SUFFIX: false,
79
     RANDOM_AVATAR_URL_SUFFIX: false,
79
     FILM_STRIP_MAX_HEIGHT: 120,
80
     FILM_STRIP_MAX_HEIGHT: 120,

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

30
 import logger from './logger';
30
 import logger from './logger';
31
 
31
 
32
 declare var APP: Object;
32
 declare var APP: Object;
33
+declare var interfaceConfig: Object;
34
+
33
 
35
 
34
 /**
36
 /**
35
  * Triggers an in-app navigation to a specific route. Allows navigation to be
37
  * Triggers an in-app navigation to a specific route. Allows navigation to be
171
             // fine but pointless to include it because contextRoot is the current
173
             // fine but pointless to include it because contextRoot is the current
172
             // directory.
174
             // directory.
173
             newPathname.startsWith('./')
175
             newPathname.startsWith('./')
174
-            && (newPathname = newPathname.substring(2));
176
+                && (newPathname = newPathname.substring(2));
175
             newPathname = getLocationContextRoot(windowLocation) + newPathname;
177
             newPathname = getLocationContextRoot(windowLocation) + newPathname;
176
         }
178
         }
177
 
179
 
215
         windowLocation.replace(locationURL.toString());
217
         windowLocation.replace(locationURL.toString());
216
 
218
 
217
         if (window.self !== window.top
219
         if (window.self !== window.top
218
-                && locationURL.search === oldSearchString) {
220
+            && locationURL.search === oldSearchString) {
219
             // NOTE: Assuming that only the hash or search part of the URL will
221
             // NOTE: Assuming that only the hash or search part of the URL will
220
             // be changed!
222
             // be changed!
221
             // location.reload will not trigger redirect/reload for iframe when
223
             // location.reload will not trigger redirect/reload for iframe when
254
             // to close page
256
             // to close page
255
             window.sessionStorage.setItem('guest', isGuest);
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
             return;
269
             return;
261
         }
270
         }
279
         }
288
         }
280
     };
289
     };
281
 }
290
 }
282
-

+ 0
- 0
static/close3.html View File


Loading…
Cancel
Save