|
|
@ -6,6 +6,7 @@ app = window.app || {};
|
|
|
|
app.isFocused = true;
|
|
|
|
app.isFocused = true;
|
|
|
|
app.currentRoom = null;
|
|
|
|
app.currentRoom = null;
|
|
|
|
app.widgets = {};
|
|
|
|
app.widgets = {};
|
|
|
|
|
|
|
|
app.flags = {};
|
|
|
|
app.cacheBuster = null;
|
|
|
|
app.cacheBuster = null;
|
|
|
|
|
|
|
|
|
|
|
|
(function () {
|
|
|
|
(function () {
|
|
|
@ -117,6 +118,9 @@ app.cacheBuster = null;
|
|
|
|
headers: {
|
|
|
|
headers: {
|
|
|
|
'x-csrf-token': config.csrf_token,
|
|
|
|
'x-csrf-token': config.csrf_token,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
beforeSend: function () {
|
|
|
|
|
|
|
|
app.flags._logout = true;
|
|
|
|
|
|
|
|
},
|
|
|
|
success: function (data) {
|
|
|
|
success: function (data) {
|
|
|
|
$(window).trigger('action:app.loggedOut', data);
|
|
|
|
$(window).trigger('action:app.loggedOut', data);
|
|
|
|
if (redirect) {
|
|
|
|
if (redirect) {
|
|
|
@ -169,6 +173,10 @@ app.cacheBuster = null;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
app.handleInvalidSession = function () {
|
|
|
|
app.handleInvalidSession = function () {
|
|
|
|
|
|
|
|
if (app.flags._logout) {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
socket.disconnect();
|
|
|
|
socket.disconnect();
|
|
|
|
bootbox.alert({
|
|
|
|
bootbox.alert({
|
|
|
|
title: '[[error:invalid-session]]',
|
|
|
|
title: '[[error:invalid-session]]',
|
|
|
|