Pārlūkot izejas kodu

Merge pull request #924 from jitsi/add-close-page

Adds close page
j8
yanas 9 gadus atpakaļ
vecāks
revīzija
06247266ad
6 mainītis faili ar 48 papildinājumiem un 9 dzēšanām
  1. 8
    0
      close.html
  2. 21
    1
      conference.js
  3. 2
    0
      config.js
  4. 12
    0
      css/_close.scss
  5. 2
    0
      css/main.scss
  6. 3
    8
      modules/UI/UI.js

+ 8
- 0
close.html Parādīt failu

@@ -0,0 +1,8 @@
1
+<html>
2
+<head>
3
+    <link rel="stylesheet" href="css/all.css"/>
4
+</head>
5
+<body>
6
+    <div class="closeMessage">Thank you for your feedback!</div>
7
+</body>
8
+</html>

+ 21
- 1
conference.js Parādīt failu

@@ -202,8 +202,28 @@ function muteLocalVideo (muted) {
202 202
 
203 203
 /**
204 204
  * Check if the welcome page is enabled and redirects to it.
205
+ * If requested show a thank you dialog before that.
206
+ * If we have a close page enabled, redirect to it without
207
+ * showing any other dialog.
208
+ * @param {boolean} showThankYou whether we should show a thank you dialog
205 209
  */
206
-function maybeRedirectToWelcomePage() {
210
+function maybeRedirectToWelcomePage(showThankYou) {
211
+
212
+    // if close page is enabled redirect to it, without further action
213
+    if (config.enableClosePage) {
214
+        window.location.pathname = "close.html";
215
+        return;
216
+    }
217
+
218
+    if (showThankYou) {
219
+        APP.UI.messageHandler.openMessageDialog(
220
+            null, null, null,
221
+            APP.translation.translateString(
222
+                "dialog.thankYou", {appName:interfaceConfig.APP_NAME}
223
+            )
224
+        );
225
+    }
226
+
207 227
     if (!config.enableWelcomePage) {
208 228
         return;
209 229
     }

+ 2
- 0
config.js Parādīt failu

@@ -56,6 +56,8 @@ var config = {
56 56
     //disableAdaptiveSimulcast: false,
57 57
     enableRecording: false,
58 58
     enableWelcomePage: true,
59
+    //enableClosePage: false, // enabling the close page will ignore the welcome
60
+                              // page redirection when call is hangup
59 61
     disableSimulcast: false,
60 62
     logStats: false, // Enable logging of PeerConnection stats via the focus
61 63
 //    requireDisplayName: true, // Forces the participants that doesn't have display name to enter it when they enter the room.

+ 12
- 0
css/_close.scss Parādīt failu

@@ -0,0 +1,12 @@
1
+html, body {
2
+    width: 100%;
3
+    height:100%;
4
+    color: $defaultColor;
5
+    background: $defaultBackground;
6
+    text-align: center;
7
+}
8
+
9
+.closeMessage {
10
+    font-size: 36px;
11
+    margin-top: 20%;
12
+}

+ 2
- 0
css/main.scss Parādīt failu

@@ -42,5 +42,7 @@
42 42
 @import 'device_settings_dialog';
43 43
 @import 'jquery.contextMenu';
44 44
 @import 'keyboard-shortcuts';
45
+@import 'close';
46
+
45 47
 
46 48
 /* Modules END */

+ 3
- 8
modules/UI/UI.js Parādīt failu

@@ -1130,14 +1130,9 @@ UI.requestFeedback = function () {
1130 1130
                 }
1131 1131
             } else {
1132 1132
                 // If the feedback functionality isn't enabled we show a thank
1133
-                // you dialog.
1134
-                messageHandler.openMessageDialog(
1135
-                    null, null, null,
1136
-                    APP.translation.translateString(
1137
-                        "dialog.thankYou", {appName:interfaceConfig.APP_NAME}
1138
-                    )
1139
-                );
1140
-                resolve();
1133
+                // you dialog. Signaling it (true), so the caller
1134
+                // of requestFeedback can act on it
1135
+                resolve(true);
1141 1136
             }
1142 1137
         });
1143 1138
 };

Notiek ielāde…
Atcelt
Saglabāt