|
@@ -18,6 +18,7 @@ import EtherpadManager from './etherpad/Etherpad';
|
18
|
18
|
import VideoLayout from "./videolayout/VideoLayout";
|
19
|
19
|
import SettingsMenu from "./side_pannels/settings/SettingsMenu";
|
20
|
20
|
import Settings from "./../settings/Settings";
|
|
21
|
+import { reload } from '../util/helpers';
|
21
|
22
|
|
22
|
23
|
var EventEmitter = require("events");
|
23
|
24
|
UI.messageHandler = require("./util/MessageHandler");
|
|
@@ -136,7 +137,7 @@ function toggleFullScreen () {
|
136
|
137
|
/**
|
137
|
138
|
* Notify user that server has shut down.
|
138
|
139
|
*/
|
139
|
|
-UI.notifyGracefulShudown = function () {
|
|
140
|
+UI.notifyGracefulShutdown = function () {
|
140
|
141
|
messageHandler.openMessageDialog(
|
141
|
142
|
'dialog.serviceUnavailable',
|
142
|
143
|
'dialog.gracefulShutdown'
|
|
@@ -635,7 +636,7 @@ UI.showLoginPopup = function(callback) {
|
635
|
636
|
'<input name="password" ' +
|
636
|
637
|
'type="password" data-i18n="[placeholder]dialog.userPassword"' +
|
637
|
638
|
' placeholder="user password">';
|
638
|
|
- UI.messageHandler.openTwoButtonDialog(null, null, null, message,
|
|
639
|
+ messageHandler.openTwoButtonDialog(null, null, null, message,
|
639
|
640
|
true,
|
640
|
641
|
"dialog.Ok",
|
641
|
642
|
function (e, v, m, f) {
|
|
@@ -965,17 +966,39 @@ UI.notifyTokenAuthFailed = function () {
|
965
|
966
|
};
|
966
|
967
|
|
967
|
968
|
UI.notifyInternalError = function () {
|
968
|
|
- UI.messageHandler.showError("dialog.sorry", "dialog.internalError");
|
|
969
|
+ messageHandler.showError("dialog.sorry", "dialog.internalError");
|
969
|
970
|
};
|
970
|
971
|
|
971
|
972
|
UI.notifyFocusDisconnected = function (focus, retrySec) {
|
972
|
|
- UI.messageHandler.notify(
|
|
973
|
+ messageHandler.notify(
|
973
|
974
|
null, "notify.focus",
|
974
|
975
|
'disconnected', "notify.focusFail",
|
975
|
976
|
{component: focus, ms: retrySec}
|
976
|
977
|
);
|
977
|
978
|
};
|
978
|
979
|
|
|
980
|
+/**
|
|
981
|
+ * Notify user that focus left the conference so page should be reloaded.
|
|
982
|
+ */
|
|
983
|
+UI.notifyFocusLeft = function () {
|
|
984
|
+ let title = APP.translation.generateTranslationHTML(
|
|
985
|
+ 'dialog.serviceUnavailable'
|
|
986
|
+ );
|
|
987
|
+ let msg = APP.translation.generateTranslationHTML(
|
|
988
|
+ 'dialog.jicofoUnavailable'
|
|
989
|
+ );
|
|
990
|
+ messageHandler.openDialog(
|
|
991
|
+ title,
|
|
992
|
+ msg,
|
|
993
|
+ true, // persistent
|
|
994
|
+ [{title: 'retry'}],
|
|
995
|
+ function () {
|
|
996
|
+ reload();
|
|
997
|
+ return false;
|
|
998
|
+ }
|
|
999
|
+ );
|
|
1000
|
+};
|
|
1001
|
+
|
979
|
1002
|
/**
|
980
|
1003
|
* Updates auth info on the UI.
|
981
|
1004
|
* @param {boolean} isAuthEnabled if authentication is enabled
|
|
@@ -1030,7 +1053,7 @@ UI.getLargeVideoID = function () {
|
1030
|
1053
|
* Shows dialog with a link to FF extension.
|
1031
|
1054
|
*/
|
1032
|
1055
|
UI.showExtensionRequiredDialog = function (url) {
|
1033
|
|
- APP.UI.messageHandler.openMessageDialog(
|
|
1056
|
+ messageHandler.openMessageDialog(
|
1034
|
1057
|
"dialog.extensionRequired",
|
1035
|
1058
|
null,
|
1036
|
1059
|
null,
|