1
0
Fork 0
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:
Luke Pulverenti 2014-02-08 15:02:35 -05:00
parent d3b0c14496
commit c808cd9871
3 changed files with 25 additions and 14 deletions

View file

@ -28,6 +28,8 @@
<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;">Note: Passwords are not required when logging in from localhost.</p>
</div>
</div>

View file

@ -107,12 +107,17 @@
loadUserList: function (users) {
var html = "";
var isLocalhost = window.location.toString().toLowerCase().indexOf('localhost') != -1;
for (var i = 0, length = users.length; i < length; i++) {
var user = users[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;' \">";
} else {
html += "<a class='posterItem squarePosterItem' id='" + linkId + "' data-userid='" + user.Id + "' href='#' onclick='LoginPage.authenticateUserLink(this);' \">";

View file

@ -91,17 +91,21 @@ var Dashboard = {
return null;
}
var userId = localStorage.getItem("userId");
if (!userId) {
var autoLoginUserId = getParameterByName('u');
var userId;
if (autoLoginUserId) {
userId = localStorage.getItem("userId");
if (userId != autoLoginUserId) {
userId = autoLoginUserId;
localStorage.setItem("userId", userId);
Dashboard.setCurrentUser(userId);
}
}
userId = userId || localStorage.getItem("userId");
return userId;
},