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

added finally for request that made loading spin forever on start

This commit is contained in:
vitorsemeano 2019-02-27 22:05:53 +00:00
parent c7ea132f07
commit 183528cf72

View file

@ -87,9 +87,23 @@ define(["appSettings", "dom", "connectionManager", "loading", "cardStyle", "emby
}), view.addEventListener("viewshow", function(e) {
loading.show();
var apiClient = getApiClient();
apiClient.getPublicUsers().then(function(users) {
users.length ? users.length && users[0].EnableAutoLogin ? authenticateUserByName(view, apiClient, users[0].Name, "") : (showVisualForm(), loadUserList(view, apiClient, users)) : (view.querySelector("#txtManualName").value = "", showManualForm(view, !1, !1)), loading.hide()
apiClient.getPublicUsers().then(function(users) {debugger;
if (users.length) {
if (users[0].EnableAutoLogin) {
authenticateUserByName(view, apiClient, users[0].Name, "");
} else {
showVisualForm();
loadUserList(view, apiClient, users);
}
} else {
view.querySelector("#txtManualName").value = "";
showManualForm(view, false, false);
}
}).finally(function () {
loading.hide();
});
apiClient.getJSON(apiClient.getUrl("Branding/Configuration")).then(function(options) {
view.querySelector(".disclaimer").textContent = options.LoginDisclaimer || ""
});