mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
added more image providers
This commit is contained in:
parent
d3b0c14496
commit
c808cd9871
3 changed files with 25 additions and 14 deletions
|
@ -28,6 +28,8 @@
|
||||||
<div id="divUsers"></div>
|
<div id="divUsers"></div>
|
||||||
|
|
||||||
<p style="text-align: center;"><a onclick="$('.manualLoginForm').show();$('.visualLoginForm').hide();" href="#">Manual Login</a></p>
|
<p style="text-align: center;"><a onclick="$('.manualLoginForm').show();$('.visualLoginForm').hide();" href="#">Manual Login</a></p>
|
||||||
|
|
||||||
|
<p style="text-align: center;">Note: Passwords are not required when logging in from localhost.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
authenticateUserByName: function (username, password) {
|
authenticateUserByName: function (username, password) {
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
@ -107,12 +107,17 @@
|
||||||
loadUserList: function (users) {
|
loadUserList: function (users) {
|
||||||
var html = "";
|
var html = "";
|
||||||
|
|
||||||
|
var isLocalhost = window.location.toString().toLowerCase().indexOf('localhost') != -1;
|
||||||
|
|
||||||
for (var i = 0, length = users.length; i < length; i++) {
|
for (var i = 0, length = users.length; i < length; i++) {
|
||||||
var user = users[i];
|
var user = users[i];
|
||||||
|
|
||||||
var linkId = "lnkUser" + i;
|
var linkId = "lnkUser" + i;
|
||||||
|
|
||||||
if (user.HasPassword) {
|
if (isLocalhost) {
|
||||||
|
html += "<a class='posterItem squarePosterItem' id='" + linkId + "' data-userid='" + user.Id + "' href='index.html?u=" + user.Id + "' data-ajax='false' \">";
|
||||||
|
}
|
||||||
|
else if (user.HasPassword) {
|
||||||
html += "<a class='posterItem squarePosterItem' id='" + linkId + "' data-userid='" + user.Id + "' href='#popupLogin' data-rel='popup' onclick='LoginPage.authenticatingLinkId=this.id;' \">";
|
html += "<a class='posterItem squarePosterItem' id='" + linkId + "' data-userid='" + user.Id + "' href='#popupLogin' data-rel='popup' onclick='LoginPage.authenticatingLinkId=this.id;' \">";
|
||||||
} else {
|
} else {
|
||||||
html += "<a class='posterItem squarePosterItem' id='" + linkId + "' data-userid='" + user.Id + "' href='#' onclick='LoginPage.authenticateUserLink(this);' \">";
|
html += "<a class='posterItem squarePosterItem' id='" + linkId + "' data-userid='" + user.Id + "' href='#' onclick='LoginPage.authenticateUserLink(this);' \">";
|
||||||
|
|
|
@ -90,18 +90,22 @@ var Dashboard = {
|
||||||
if (!window.localStorage) {
|
if (!window.localStorage) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var userId = localStorage.getItem("userId");
|
|
||||||
|
|
||||||
if (!userId) {
|
var autoLoginUserId = getParameterByName('u');
|
||||||
var autoLoginUserId = getParameterByName('u');
|
var userId;
|
||||||
|
|
||||||
|
if (autoLoginUserId) {
|
||||||
|
userId = localStorage.getItem("userId");
|
||||||
|
|
||||||
|
if (userId != autoLoginUserId) {
|
||||||
|
|
||||||
if (autoLoginUserId) {
|
|
||||||
userId = autoLoginUserId;
|
userId = autoLoginUserId;
|
||||||
localStorage.setItem("userId", userId);
|
Dashboard.setCurrentUser(userId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
userId = userId || localStorage.getItem("userId");
|
||||||
|
|
||||||
return userId;
|
return userId;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -110,7 +114,7 @@ var Dashboard = {
|
||||||
if (window.localStorage) {
|
if (window.localStorage) {
|
||||||
localStorage.setItem("userId", userId);
|
localStorage.setItem("userId", userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiClient.currentUserId(userId);
|
ApiClient.currentUserId(userId);
|
||||||
Dashboard.getUserPromise = null;
|
Dashboard.getUserPromise = null;
|
||||||
},
|
},
|
||||||
|
@ -120,7 +124,7 @@ var Dashboard = {
|
||||||
if (window.localStorage) {
|
if (window.localStorage) {
|
||||||
localStorage.removeItem("userId");
|
localStorage.removeItem("userId");
|
||||||
}
|
}
|
||||||
|
|
||||||
Dashboard.getUserPromise = null;
|
Dashboard.getUserPromise = null;
|
||||||
ApiClient.currentUserId(null);
|
ApiClient.currentUserId(null);
|
||||||
window.location = "login.html";
|
window.location = "login.html";
|
||||||
|
@ -804,7 +808,7 @@ var Dashboard = {
|
||||||
var location = window.location;
|
var location = window.location;
|
||||||
|
|
||||||
var webSocketUrl = "ws://" + location.hostname;
|
var webSocketUrl = "ws://" + location.hostname;
|
||||||
|
|
||||||
if (systemInfo.HttpServerPortNumber == systemInfo.WebSocketPortNumber) {
|
if (systemInfo.HttpServerPortNumber == systemInfo.WebSocketPortNumber) {
|
||||||
|
|
||||||
if (location.port) {
|
if (location.port) {
|
||||||
|
@ -1282,9 +1286,9 @@ var Dashboard = {
|
||||||
|
|
||||||
return html;
|
return html;
|
||||||
},
|
},
|
||||||
|
|
||||||
populateLanguages: function(select, languages) {
|
populateLanguages: function (select, languages) {
|
||||||
|
|
||||||
var html = "";
|
var html = "";
|
||||||
|
|
||||||
html += "<option value=''></option>";
|
html += "<option value=''></option>";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue