1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update pooling

This commit is contained in:
Luke Pulverenti 2016-06-14 15:21:26 -04:00
parent cabe68c3e2
commit c5fa5d10b5
5 changed files with 21 additions and 12 deletions

View file

@ -39,7 +39,7 @@
Dashboard.onServerChanged(user.Id, result.AccessToken, apiClient);
Dashboard.navigate(newUrl);
}, function () {
}, function (response) {
$('#pw', page).val('');
$('#txtManualName', page).val('');
@ -47,17 +47,27 @@
Dashboard.hideLoadingMsg();
setTimeout(function () {
if (response.status == 401) {
require(['toast'], function (toast) {
toast(Globalize.translate('MessageInvalidUser'));
});
}, 300);
} else {
showServerConnectionFailure();
}
});
}
};
function showServerConnectionFailure() {
Dashboard.alert({
message: Globalize.translate("MessageUnableToConnectToServer"),
title: Globalize.translate("HeaderConnectionFailure")
});
}
function getApiClient() {
var serverId = getParameterByName('serverid');